version 1.62, 2006/11/29 07:46:39
|
version 1.63, 2006/12/05 02:55:51
|
Line 37 use Apache::lonnavmaps();
|
Line 37 use Apache::lonnavmaps();
|
use Apache::lonrss(); |
use Apache::lonrss(); |
use Apache::lonnet; |
use Apache::lonnet; |
use HTML::Entities(); |
use HTML::Entities(); |
|
use LONCAPA qw(:match); |
|
|
my %todayhash; |
my %todayhash; |
my %showedcheck; |
my %showedcheck; |
Line 92 sub readcalendar {
|
Line 93 sub readcalendar {
|
foreach my $thiskey (sort keys %resourcedata) { |
foreach my $thiskey (sort keys %resourcedata) { |
if ($resourcedata{$thiskey.'.type'}=~/^date/) { |
if ($resourcedata{$thiskey.'.type'}=~/^date/) { |
my ($course,$middle,$part,$name)= |
my ($course,$middle,$part,$name)= |
($thiskey=~/^(\w+)\.(?:(.+)\.)*([\w\s]+)\.(\w+)$/); |
($thiskey=~/^($match_courseid)\.(?:(.+)\.)*([\w\s]+)\.(\w+)$/); |
my %data = ( 'section' => &mt('All Students')); |
my %data = ( 'section' => &mt('All Students')); |
if ($middle=~/^\[(.*)\]\./) { |
if ($middle=~/^\[(.*)\]\./) { |
my $sec=$1; |
my $sec=$1; |
Line 309 sub showday {
|
Line 310 sub showday {
|
$nextday+=$oneday; |
$nextday+=$oneday; |
} |
} |
foreach my $item (keys(%allcal)) { |
foreach my $item (keys(%allcal)) { |
my ($course,$startdate,$enddate)=($item=~/^(\w+)\@(\d+)\_(\d+)$/); |
my ($course,$startdate,$enddate)=($item=~/^($match_courseid)\@(\d+)\_(\d+)$/); |
if (($startdate<$nextday) && ($enddate>=$tk)) { |
if (($startdate<$nextday) && ($enddate>=$tk)) { |
push(@outp,[$course,$startdate,$enddate,$allcal{$item}]); |
push(@outp,[$course,$startdate,$enddate,$allcal{$item}]); |
} |
} |
Line 375 sub output_ics_file {
|
Line 376 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=~/^(\w+)\@(\d+)\_(\d+)$/); |
my ($courseid,$startdate,$enddate)=($event=~/^($match_courseid)\@(\d+)\_(\d+)$/); |
my $uid=$event; |
my $uid=$event; |
$uid=~s/[\W\_]/-/gs; |
$uid=~s/[\W\_]/-/gs; |
$uid.='@loncapa'; |
$uid.='@loncapa'; |