Diff for /loncom/interface/lonannounce.pm between versions 1.63 and 1.64

version 1.63, 2006/12/05 02:55:51 version 1.64, 2006/12/06 21:52:49
Line 78  sub readcalendar { Line 78  sub readcalendar {
     my %returnhash=();      my %returnhash=();
     foreach my $item (keys(%thiscal)) {      foreach my $item (keys(%thiscal)) {
         unless (($item=~/^error\:/) || ($thiscal{$item}=~/^error\:/)) {          unless (($item=~/^error\:/) || ($thiscal{$item}=~/^error\:/)) {
    $returnhash{$courseid.'@'.$item}=$thiscal{$item};      my ($start,$end)=split('_',$item);
       $returnhash{join("\0",$courseid,$start,$end)}=$thiscal{$item};
         }          }
     }      }
     my $can_see_hidden = ($env{'request.role.adv'} &&      my $can_see_hidden = ($env{'request.role.adv'} &&
Line 161  sub readcalendar { Line 162  sub readcalendar {
  }    } 
  $data{'datetype'}=&mt('Answer Available');    $data{'datetype'}=&mt('Answer Available'); 
     }      }
     $returnhash{$courseid.'@'.$resourcedata{$thiskey}.'_'.      $returnhash{join("\0",$courseid,
     $resourcedata{$thiskey}}=\%data;       $resourcedata{$thiskey},
        $resourcedata{$thiskey})}=\%data;
  }   }
     }      }
     return %returnhash;      return %returnhash;
Line 310  sub showday { Line 312  sub showday {
  $nextday+=$oneday;   $nextday+=$oneday;
     }      }
     foreach my $item (keys(%allcal)) {      foreach my $item (keys(%allcal)) {
  my ($course,$startdate,$enddate)=($item=~/^($match_courseid)\@(\d+)\_(\d+)$/);   my ($courseid,$startdate,$enddate)= split("\0",$item);
         if (($startdate<$nextday) && ($enddate>=$tk))  {   if (($startdate<$nextday) && ($enddate>=$tk))  {
     push(@outp,[$course,$startdate,$enddate,$allcal{$item}]);      push(@outp,[$courseid,$startdate,$enddate,$allcal{$item}]);
         }          }
     }      }
     unless ($mode) {      unless ($mode) {
Line 376  sub output_ics_file { Line 378  sub output_ics_file {
     $r->print("PRODID:-//LONCAPA//LONCAPA Calendar Output//EN$crlf");      $r->print("PRODID:-//LONCAPA//LONCAPA Calendar Output//EN$crlf");
     my %allcal=&get_all_calendars();      my %allcal=&get_all_calendars();
     foreach my $event (keys(%allcal)) {      foreach my $event (keys(%allcal)) {
  my ($courseid,$startdate,$enddate)=($event=~/^($match_courseid)\@(\d+)\_(\d+)$/);   my ($courseid,$startdate,$enddate)= split('\0',$event);
  my $uid=$event;   my $uid=$event;
  $uid=~s/[\W\_]/-/gs;   $uid=~s/[\W\_]/-/gs;
  $uid.='@loncapa';   $uid.='@loncapa';

Removed from v.1.63  
changed lines
  Added in v.1.64


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