Diff for /loncom/interface/lonannounce.pm between versions 1.31 and 1.32

version 1.31, 2004/08/27 21:41:39 version 1.32, 2004/09/02 13:15:07
Line 142  sub normalcell { Line 142  sub normalcell {
  $msg=~s/INTERNAL\://gs;   $msg=~s/INTERNAL\://gs;
  $internalflag=1;   $internalflag=1;
     }      }
             my $fullmsg=$ENV{'course.'.$courseid.'.description'}.              my $fullmsg=&mt('Calendar Announcement for ').$ENV{'course.'.$courseid.'.description'}.
  ', '.&Apache::lonlocal::locallocaltime($start);   '\n'.&Apache::lonlocal::locallocaltime($start);
     if ($start!=$end) {      if ($start!=$end) {
  $fullmsg.=' - '.&Apache::lonlocal::locallocaltime($end);   $fullmsg.=' - '.&Apache::lonlocal::locallocaltime($end);
     }      }
     $fullmsg.=': '.$msg;      $fullmsg.=':\n'.$msg;
             if ($courseid eq $ENV{'request.course.id'}) {              if ($courseid eq $ENV{'request.course.id'}) {
               if ((&Apache::lonnet::allowed('srm',$ENV{'request.course.id'}))                if ((&Apache::lonnet::allowed('srm',$ENV{'request.course.id'}))
                && (!$showedcheck{$start.'_'.$end})                 && (!$showedcheck{$start.'_'.$end})
Line 158  sub normalcell { Line 158  sub normalcell {
                $showedcheck{$start.'_'.$end}=1;                 $showedcheck{$start.'_'.$end}=1;
       }        }
     }      }
       $fullmsg=~s/[\n\r]/\\n/gs;
             $fullmsg=&HTML::Entities::encode($fullmsg,'<>&"\'');              $fullmsg=&HTML::Entities::encode($fullmsg,'<>&"\'');
             $fullmsg=~s/&/\\&/g;              $fullmsg=~s/&/\\&/g;
             $output.='<a href="javascript:alert('."'$fullmsg'".')">'.              $output.='<a href="javascript:alert('."'$fullmsg'".')">'.
Line 178  sub plaincell { Line 179  sub plaincell {
         if ($_) {          if ($_) {
     my ($courseid,$start,$end,@msg)=split(/\@/,$_);      my ($courseid,$start,$end,@msg)=split(/\@/,$_);
             my $msg=join('@',@msg);              my $msg=join('@',@msg);
             my $fullmsg=$ENV{'course.'.$courseid.'.description'}.              my $fullmsg=&mt('Calendar Announcement for ').$ENV{'course.'.$courseid.'.description'}.
  ', '.&Apache::lonlocal::locallocaltime($start);   '\n'.&Apache::lonlocal::locallocaltime($start);
     if ($start!=$end) {      if ($start!=$end) {
  $fullmsg.=' - '.&Apache::lonlocal::locallocaltime($end);   $fullmsg.=' - '.&Apache::lonlocal::locallocaltime($end);
     }      }
     $msg=~s/INTERNAL\://gs;      $msg=~s/INTERNAL\://gs;
     $fullmsg.=': '.$msg;      $fullmsg.=':\n'.$msg;
        $fullmsg=~s/[\n\r]/\\n/gs;
             $fullmsg=&HTML::Entities::encode($fullmsg,'<>&"\'');              $fullmsg=&HTML::Entities::encode($fullmsg,'<>&"\'');
             $fullmsg=~s/&/\\&/g;              $fullmsg=~s/&/\\&/g;
             $output.='<a href="javascript:alert('."'$fullmsg'".')">'.              $output.='<a href="javascript:alert('."'$fullmsg'".')">'.

Removed from v.1.31  
changed lines
  Added in v.1.32


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