Diff for /loncom/interface/lonannounce.pm between versions 1.3 and 1.4

version 1.3, 2002/08/08 13:44:17 version 1.4, 2002/08/09 20:15:16
Line 52  sub emptycell { Line 52  sub emptycell {
   
 sub normalcell {  sub normalcell {
     my ($day,$text)=@_;      my ($day,$text)=@_;
     return '<td><b>'.$day.'</b><br>'.$text.'</td>';      my $output='';
       foreach (split(/\_\_\_\&\&\&\_\_\_/,$text)) {
           if ($_) {
       my ($courseid,$msg)=split(/\@/,$_);
               my $fullmsg=$ENV{'course.'.$courseid.'.description'}.': '.$msg;
              $output.='<a href="javascript:alert('."'$fullmsg'".')">'.
          substr($msg,0,20).'...</a><br>';
          }
       }
       return '<td><b>'.$day.'</b><br>'.$output.'</td>';
 }  }
   
 sub nextday {  sub nextday {
Line 66  sub showday { Line 75  sub showday {
     my %th=&Apache::loncommon::timehash($tk);      my %th=&Apache::loncommon::timehash($tk);
     my ($nextday,$nextmonth)=&nextday(%th);      my ($nextday,$nextmonth)=&nextday(%th);
     my $outp='';      my $outp='';
       my $oneday=24*3600;
     foreach (keys %allcal) {      foreach (keys %allcal) {
  my ($course,$startdate,$enddate)=($_=~/^(\w+)\@(\d+)\_(\d+)$/);   my ($course,$startdate,$enddate)=($_=~/^(\w+)\@(\d+)\_(\d+)$/);
         print $course.' '.localtime($startdate).' '.localtime($enddate).          if (($startdate<$nextday) && ($enddate>$tk))  {
               localtime($tk).' '.localtime($nextday).'<br>';  
         if (($startdate>$tk) && ($enddate<$nextday)) {  
     $outp.='___&&&___'.$course.'@'.$allcal{$_};      $outp.='___&&&___'.$course.'@'.$allcal{$_};
         }          }
     }      }

Removed from v.1.3  
changed lines
  Added in v.1.4


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