Diff for /loncom/interface/lonannounce.pm between versions 1.56 and 1.61

version 1.56, 2006/06/29 15:23:59 version 1.61, 2006/10/10 01:52:45
Line 80  sub readcalendar { Line 80  sub readcalendar {
    $returnhash{$courseid.'@'.$item}=$thiscal{$item};     $returnhash{$courseid.'@'.$item}=$thiscal{$item};
         }          }
     }      }
       my $can_see_hidden = ($env{'request.role.adv'} &&
     my $can_see_hidden = $env{'request.role.adv'};    ($courseid eq $env{'request.course.id'}));
     my $navmap;# = Apache::lonnavmaps::navmap->new();      
       my $navmap;
       if ($courseid eq $env{'request.course.id'}) {
    $navmap = Apache::lonnavmaps::navmap->new();
       }
     my %resourcedata=      my %resourcedata=
  &Apache::lonnet::dump('resourcedata',$coursedom,$coursenum);   &Apache::lonnet::dump('resourcedata',$coursedom,$coursenum);
     foreach my $thiskey (sort keys %resourcedata) {      foreach my $thiskey (sort keys %resourcedata) {
Line 241  sub listcell { Line 245  sub listcell {
     foreach my $item (@items) {      foreach my $item (@items) {
         if (ref($item)) {          if (ref($item)) {
     my ($courseid,$start,$end,$msg)=@$item;      my ($courseid,$start,$end,$msg)=@$item;
     &Apache::lonnet::logthis(" msg2 is ".ref($msg)." $msg ");  
     my $fullmsg=&Apache::lonlocal::locallocaltime($start);      my $fullmsg=&Apache::lonlocal::locallocaltime($start);
     if ($start!=$end) {      if ($start!=$end) {
  $fullmsg.=&mt(' to ').   $fullmsg.=&mt(' to ').
Line 280  sub display_msg { Line 283  sub display_msg {
   
     my $output = $msg->{'datetype'}. ': '.$msg->{'realm'};      my $output = $msg->{'datetype'}. ': '.$msg->{'realm'};
     if (exists($msg->{'url'})) {      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'})) {      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'}.') ';      $output .= ' ('.$msg->{'section'}.') ';
     return $output;      return $output;
Line 486  SERVERANNOUNCE Line 495  SERVERANNOUNCE
 # list servers  # list servers
     foreach my $host (sort(keys(%Apache::lonnet::hostname))) {      foreach my $host (sort(keys(%Apache::lonnet::hostname))) {
  if (&Apache::lonnet::allowed('psa',$Apache::lonnet::hostdom{$host})) {   if (&Apache::lonnet::allowed('psa',$Apache::lonnet::hostdom{$host})) {
     $r->print ('<br /><input type="checkbox" name="postto_'.$host.'" /> '.      $r->print ('<br /><label><input type="checkbox" name="postto_'.$host.'" /> '.
        $host.' <tt>'.$Apache::lonnet::hostname{$host}.'</tt> '.         $host.' <tt>'.$Apache::lonnet::hostname{$host}.'</tt> '.
        '<a href="http://'.$Apache::lonnet::hostname{$host}.         '</label><a href="http://'.$Apache::lonnet::hostname{$host}.
        '/announcement.txt" target="annowin">current</a>');         '/announcement.txt" target="annowin">current</a>');
  }   }
     }      }

Removed from v.1.56  
changed lines
  Added in v.1.61


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>