--- loncom/interface/lonannounce.pm 2006/07/03 03:11:07 1.58 +++ loncom/interface/lonannounce.pm 2006/09/02 20:47:11 1.60 @@ -1,7 +1,7 @@ # The LearningOnline Network # Announce # -# $Id: lonannounce.pm,v 1.58 2006/07/03 03:11:07 albertel Exp $ +# $Id: lonannounce.pm,v 1.60 2006/09/02 20:47:11 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -80,9 +80,6 @@ sub readcalendar { $returnhash{$courseid.'@'.$item}=$thiscal{$item}; } } - - return %returnhash if ($courseid ne $env{'request.course.id'}); - my $can_see_hidden = $env{'request.role.adv'}; my $navmap;# = Apache::lonnavmaps::navmap->new(); my %resourcedata= @@ -281,10 +278,16 @@ sub display_msg { my $output = $msg->{'datetype'}. ': '.$msg->{'realm'}; if (exists($msg->{'url'})) { - $output .= ': '.&Apache::lonnet::gettitle($msg->{'url'}); + my $displayurl=&Apache::lonnet::gettitle($msg->{'url'}); + if ($msg->{'url'}!~/\Q$displayurl\E$/) { + $output .= ' - '.$displayurl; + } } if (exists($msg->{'symb'})) { - $output .= ': '.&Apache::lonnet::gettitle($msg->{'symb'}); + my $displaysymb=&Apache::lonnet::gettitle($msg->{'symb'}); + if ($msg->{'symb'}!~/\Q$displaysymb\E$/) { + $output .= ' - '.$displaysymb; + } } $output .= ' ('.$msg->{'section'}.') '; return $output; @@ -487,9 +490,9 @@ SERVERANNOUNCE # list servers foreach my $host (sort(keys(%Apache::lonnet::hostname))) { if (&Apache::lonnet::allowed('psa',$Apache::lonnet::hostdom{$host})) { - $r->print ('
'. + $r->print ('