--- loncom/interface/lonannounce.pm 2003/05/21 20:10:53 1.11 +++ loncom/interface/lonannounce.pm 2003/05/23 16:14:33 1.12 @@ -1,7 +1,7 @@ # The LearningOnline Network # Announce # -# $Id: lonannounce.pm,v 1.11 2003/05/21 20:10:53 www Exp $ +# $Id: lonannounce.pm,v 1.12 2003/05/23 16:14:33 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -33,6 +33,8 @@ use Apache::Constants qw(:common); use Apache::loncommon; use Apache::lonhtmlcommon(); +my %todayhash; + sub editfield { my ($r,$start,$end,$text)=@_; # Deal with date forms @@ -72,7 +74,7 @@ sub emptycell { } sub normalcell { - my ($day,$text)=@_; + my ($day,$month,$year,$text)=@_; my $output=''; foreach (split(/\_\_\_\&\&\&\_\_\_/,$text)) { if ($_) { @@ -90,7 +92,11 @@ sub normalcell { substr($msg,0,20).'...
'; } } - return ''.$day.'
'.$output.''; + return ''.$day.'
'.$output.''; } sub plaincell { @@ -144,7 +150,8 @@ sub showday { } } unless ($mode) { - return ($nextday,$nextmonth,&normalcell($th{'day'},$outp)); + return ($nextday,$nextmonth,&normalcell( + $th{'day'},$th{'month'},$th{'year'},$outp)); } elsif ($outp) { if ($mode==1) { return '
'.&plaincell($outp); @@ -164,7 +171,7 @@ sub handler { # ---------------------------------------------------------- Get time right now my $today=time; - my %todayhash=&Apache::loncommon::timehash($today); + %todayhash=&Apache::loncommon::timehash($today); # ---------------------------------------------------------- Get month and year &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, @@ -260,7 +267,9 @@ ENDDOCUMENT 'June','July','August','September','October', 'November','December')[$month].' '.$year.''. 'Previous Month '. - 'Next Month

'. + 'Next Month'. + '   Current Month

'. ''. ''); @@ -291,7 +300,9 @@ ENDDOCUMENT if ($allowed) { $r->print(''); } $r->print('

'. 'Previous Month '. - 'Next Month

'. + 'Next Month'. + '   Current Month

'. ''); return OK; }
SunMonTueWedThuFriSat