version 1.26, 2004/02/17 01:36:14
|
version 1.28, 2004/06/12 01:04:10
|
Line 92 sub readcalendar {
|
Line 92 sub readcalendar {
|
$realm=&mt('Resource').': '.&Apache::lonnet::gettitle($middle); |
$realm=&mt('Resource').': '.&Apache::lonnet::gettitle($middle); |
} |
} |
my $datetype=''; |
my $datetype=''; |
if ($name eq 'duedate') { $datetype=&mt('Due'); } |
if ($name eq 'duedate') { |
|
$datetype=&mt('Due'); |
|
# see if accidentally answerdate is before duedate |
|
my $answerkey=$thiskey; |
|
$answerkey=~s/duedate$/answerdate/; |
|
if ($resourcedata{$thiskey}>$resourcedata{$answerkey}) { |
|
$datetype='Due and Answer Available'; |
|
} |
|
} |
if ($name eq 'opendate') { $datetype=&mt('Opening'); } |
if ($name eq 'opendate') { $datetype=&mt('Opening'); } |
if ($name eq 'answerdate') { $datetype=&mt('Answer Available'); } |
if ($name eq 'answerdate') { |
|
# see if accidentally answerdate is before duedate |
|
my $duekey=$thiskey; |
|
$duekey=~s/answerdate$/duedate/; |
|
if ($resourcedata{$duekey}>$resourcedata{$thiskey}) { |
|
# forget it |
|
next; |
|
} |
|
$datetype=&mt('Answer Available'); |
|
} |
$returnhash{$courseid.'@'.$resourcedata{$thiskey}.'_'. |
$returnhash{$courseid.'@'.$resourcedata{$thiskey}.'_'. |
$resourcedata{$thiskey}}= |
$resourcedata{$thiskey}}= |
'INTERNAL:'.$datetype.': '.$realm.' ('.$section.')'; |
'INTERNAL:'.$datetype.': '.$realm.' ('.$section.')'; |
Line 161 sub plaincell {
|
Line 178 sub plaincell {
|
if ($start!=$end) { |
if ($start!=$end) { |
$fullmsg.=' - '.&Apache::lonlocal::locallocaltime($end); |
$fullmsg.=' - '.&Apache::lonlocal::locallocaltime($end); |
} |
} |
|
$msg=~s/INTERNAL\://gs; |
$fullmsg.=': '.$msg; |
$fullmsg.=': '.$msg; |
$fullmsg=&HTML::Entities::encode($fullmsg,'<>&"\''); |
$fullmsg=&HTML::Entities::encode($fullmsg,'<>&"\''); |
$fullmsg=~s/&/\\&/g; |
$fullmsg=~s/&/\\&/g; |
Line 178 sub listcell {
|
Line 196 sub listcell {
|
if ($_) { |
if ($_) { |
my ($courseid,$start,$end,@msg)=split(/\@/,$_); |
my ($courseid,$start,$end,@msg)=split(/\@/,$_); |
my $msg=join('@',@msg); |
my $msg=join('@',@msg); |
|
$msg=~s/INTERNAL\://gs; |
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 202 sub showday {
|
Line 221 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; |
if ($mode) { |
|
my $oneday=24*3600; |
|
$tk-=$oneday; |
|
$nextday+=$oneday; |
|
} |
foreach (keys %allcal) { |
foreach (keys %allcal) { |
my ($course,$startdate,$enddate)=($_=~/^(\w+)\@(\d+)\_(\d+)$/); |
my ($course,$startdate,$enddate)=($_=~/^(\w+)\@(\d+)\_(\d+)$/); |
if (($startdate<$nextday) && ($enddate>$tk)) { |
if (($startdate<$nextday) && ($enddate>$tk)) { |