version 1.15, 2003/06/18 20:06:29
|
version 1.16, 2003/07/10 10:27:04
|
Line 35 use Apache::lonhtmlcommon();
|
Line 35 use Apache::lonhtmlcommon();
|
use HTML::Entities(); |
use HTML::Entities(); |
|
|
my %todayhash; |
my %todayhash; |
|
my %showedcheck; |
|
|
sub editfield { |
sub editfield { |
my ($r,$start,$end,$text)=@_; |
my ($r,$start,$end,$text)=@_; |
Line 84 sub normalcell {
|
Line 85 sub normalcell {
|
my $fullmsg=$ENV{'course.'.$courseid.'.description'}. |
my $fullmsg=$ENV{'course.'.$courseid.'.description'}. |
', '.localtime($start).' - '.localtime($end).': '.$msg; |
', '.localtime($start).' - '.localtime($end).': '.$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})) { |
$output.='<input type="checkbox" name="remove_'.$start.'_'. |
$output.='<input type="checkbox" name="remove_'.$start.'_'. |
$end.'">'; |
$end.'">'; |
|
$showedcheck{$start.'_'.$end}=1; |
} |
} |
} |
} |
$fullmsg=&HTML::Entities::encode($fullmsg,'<>&"\''); |
$fullmsg=&HTML::Entities::encode($fullmsg,'<>&"\''); |
Line 177 sub handler {
|
Line 180 sub handler {
|
# ---------------------------------------------------------- Get time right now |
# ---------------------------------------------------------- Get time right now |
my $today=time; |
my $today=time; |
%todayhash=&Apache::loncommon::timehash($today); |
%todayhash=&Apache::loncommon::timehash($today); |
|
# ----------------------------------------------------------------- Check marks |
|
%showedcheck=(); |
|
undef %showedcheck; |
# ---------------------------------------------------------- Get month and year |
# ---------------------------------------------------------- Get month and year |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, |
['month','year']); |
['month','year']); |
Line 311 ENDDOCUMENT
|
Line 316 ENDDOCUMENT
|
} |
} |
# ------------------------------------------------------------------- End table |
# ------------------------------------------------------------------- End table |
$r->print('</table>'); |
$r->print('</table>'); |
|
# ----------------------------------------------------------------- Check marks |
|
%showedcheck=(); |
|
undef %showedcheck; |
|
# --------------------------------------------------------------- Remove button |
if ($allowed) { $r->print('<input type="button" onClick="removesub()" value="Remove Checked Entries"></form>'); } |
if ($allowed) { $r->print('<input type="button" onClick="removesub()" value="Remove Checked Entries"></form>'); } |
$r->print('<p>'. |
$r->print('<p>'. |
'<a href="/adm/announcements?month='.$pm.'&year='.$py.'">Previous Month</a> '. |
'<a href="/adm/announcements?month='.$pm.'&year='.$py.'">Previous Month</a> '. |