--- loncom/interface/loncommunicate.pm 2005/05/20 17:00:40 1.29 +++ loncom/interface/loncommunicate.pm 2006/05/30 20:09:25 1.34 @@ -1,7 +1,7 @@ # The LearningOnline Network # Communicate # -# $Id: loncommunicate.pm,v 1.29 2005/05/20 17:00:40 albertel Exp $ +# $Id: loncommunicate.pm,v 1.34 2006/05/30 20:09:25 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -31,23 +31,32 @@ package Apache::loncommunicate; use strict; use Apache::Constants qw(:common); -use Apache::lonmsg(); +use Apache::lonmsgdisplay(); use Apache::loncommon; use Apache::lonlocal; use Apache::lonnet; sub menu { my $r=shift; + my $crstype = 'Course'; + my $usertype = 'Student'; + if (defined($env{'course.'.$env{'request.course.id'}.'.type'})) { + $crstype = $env{'course.'.$env{'request.course.id'}.'.type'}; + if ($crstype eq 'Group') { + $usertype = 'Member'; + } + } my %lt=&Apache::lonlocal::texthash( 'mnf' => 'Make New Folder', 'vcm' => 'View Critical Messages', 'smu' => 'Send Message to User(s)', -'bmc' => 'Broadcast Message to Course', -'dmu' => 'Distribute Messages from Uploaded File to Course', +'bmc' => "Broadcast Message to $crstype", +'dmu' => "Distribute Messages from Uploaded File to $crstype", 'unr' => 'User Notes, Records of Face-to-Face Discussions, and Critical Messages', -'cbs' => 'Configure blocking of student communication during exams' +'cbs' => "Configure Blocking of $usertype Communication during Exams", +'blog' => 'Add or Edit Blog Entries' ); my %help=(); @@ -65,6 +74,9 @@ sub menu { $lt{'smu'} + + $lt{'blog'} + END if (($env{'request.course.id'}) && ( @@ -97,13 +109,6 @@ sub handler { # # Start document # - my $html=&Apache::lonxml::xmlbegin(); - $r->print(< -The LearningOnline Network with CAPA - -END # ----------------------------------------------------------------- Breadcrumbs &Apache::lonhtmlcommon::clear_breadcrumbs(); @@ -113,9 +118,10 @@ END faq=>12,bug=>'Communication Tools',}); # ---------------------------------------------------------------------- Header - &Apache::lonmsg::header($r); + &Apache::lonmsgdisplay::header($r); &menu($r); - &Apache::lonmsg::disall($r,'new'); + &Apache::lonmsgdisplay::disall($r,'new'); + $r->print(&Apache::loncommon::end_page()); return OK; }