version 1.30, 2004/08/17 15:38:58
|
version 1.33, 2005/02/17 08:29:42
|
Line 79 sub readcalendar {
|
Line 79 sub readcalendar {
|
($thiskey=~/^(\w+)\.(?:(.+)\.)*([\w\s]+)\.(\w+)$/); |
($thiskey=~/^(\w+)\.(?:(.+)\.)*([\w\s]+)\.(\w+)$/); |
my $section=&mt('All Students'); |
my $section=&mt('All Students'); |
if ($middle=~/^\[(.*)\]\./) { |
if ($middle=~/^\[(.*)\]\./) { |
|
my $sec=$1; |
|
# if we have a section don't show ones that aren't ours |
|
if ($ENV{'request.course.sec'} && |
|
$ENV{'request.course.sec'} ne $sec) { next; } |
|
# if a student without a section don't show any section ones |
|
if (!$ENV{'request.role.adv'} && |
|
!$ENV{'request.course.sec'}) { next; } |
$section=&mt('Group/Section').': '.$1; |
$section=&mt('Group/Section').': '.$1; |
$middle=~s/^\[(.*)\]\.//; |
$middle=~s/^\[(.*)\]\.//; |
} |
} |
Line 135 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 151 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 171 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'".')">'. |
Line 316 sub handler {
|
Line 325 sub handler {
|
'dlsav' => -1 )); |
'dlsav' => -1 )); |
my $weekday=$firstday{'weekday'}; |
my $weekday=$firstday{'weekday'}; |
# ------------------------------------------------------------ Print the screen |
# ------------------------------------------------------------ Print the screen |
|
my $html=&Apache::lonxml::xmlbegin(); |
$r->print(<<ENDDOCUMENT); |
$r->print(<<ENDDOCUMENT); |
<html> |
$html |
<head> |
<head> |
<title>The LearningOnline Network with CAPA</title> |
<title>The LearningOnline Network with CAPA</title> |
<script> |
<script> |