File:  [LON-CAPA] / loncom / interface / lonannounce.pm
Revision 1.32: download - view: text, annotated - select for diffs
Thu Sep 2 13:15:07 2004 UTC (19 years, 9 months ago) by www
Branches: MAIN
CVS tags: version_1_3_X, version_1_3_3, version_1_3_2, version_1_3_1, version_1_3_0, version_1_2_99_1, version_1_2_99_0, HEAD
Bug #3419: Better explanation and formatting of announcement links

    1: # The LearningOnline Network
    2: # Announce
    3: #
    4: # $Id: lonannounce.pm,v 1.32 2004/09/02 13:15:07 www Exp $
    5: #
    6: # Copyright Michigan State University Board of Trustees
    7: #
    8: # This file is part of the LearningOnline Network with CAPA (LON-CAPA).
    9: #
   10: # LON-CAPA is free software; you can redistribute it and/or modify
   11: # it under the terms of the GNU General Public License as published by
   12: # the Free Software Foundation; either version 2 of the License, or
   13: # (at your option) any later version.
   14: #
   15: # LON-CAPA is distributed in the hope that it will be useful,
   16: # but WITHOUT ANY WARRANTY; without even the implied warranty of
   17: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   18: # GNU General Public License for more details.
   19: #
   20: # You should have received a copy of the GNU General Public License
   21: # along with LON-CAPA; if not, write to the Free Software
   22: # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   23: #
   24: # /home/httpd/html/adm/gpl.txt
   25: #
   26: # http://www.lon-capa.org/
   27: #
   28: 
   29: package Apache::lonannounce;
   30: 
   31: use strict;
   32: use Apache::Constants qw(:common);
   33: use Apache::loncommon;
   34: use Apache::lonhtmlcommon();
   35: use Apache::lonlocal;
   36: use HTML::Entities();
   37: 
   38: my %todayhash;
   39: my %showedcheck;
   40: 
   41: sub editfield {
   42:     my ($r,$start,$end,$text)=@_;
   43:     # Deal with date forms
   44:     my $startdateform = &Apache::lonhtmlcommon::date_setter('anno',
   45:                                                             'startdate',
   46:                                                             $start);
   47:     my $enddateform = &Apache::lonhtmlcommon::date_setter('anno',
   48:                                                           'enddate',
   49:                                                           $end);
   50:     my $help=&Apache::loncommon::help_open_menu('','Calendar Add Announcement','Calendar_Add_Announcement','',274,'Communication Tools');
   51:     $r->print(<<ENDFORM);
   52: $help
   53: <form name="anno" method="post">
   54: <input type="hidden" value=''          name="action"      >
   55: <table><tr><td>Starting date:</td><td>$startdateform</td></tr>
   56: <tr><td>Ending date:</td><td>$enddateform</td></tr></table>
   57: <textarea name="msg" rows="4" cols="60">$text</textarea>
   58: <input type="button" onClick="trysubmit()" value="Post Announcement"><hr />
   59: ENDFORM
   60: }
   61: 
   62: sub readcalendar {
   63:     my $courseid=shift;
   64:     my $coursenum=$ENV{'course.'.$courseid.'.num'};
   65:     my $coursedom=$ENV{'course.'.$courseid.'.domain'};
   66:     my %thiscal=&Apache::lonnet::dump('calendar',$coursedom,$coursenum);
   67:     my %returnhash=();
   68:     foreach (keys %thiscal) {
   69:         unless (($_=~/^error\:/) || ($thiscal{$_}=~/^error\:/)) {
   70: 	   $returnhash{$courseid.'@'.$_}=$thiscal{$_};
   71:         }
   72:     }
   73:     if ($courseid eq $ENV{'request.course.id'}) {
   74: 	my %resourcedata=
   75: 	    &Apache::lonnet::dump('resourcedata',$coursedom,$coursenum);
   76: 	foreach my $thiskey (sort keys %resourcedata) {
   77: 	    if ($resourcedata{$thiskey.'.type'}=~/^date/) {
   78: 		my ($course,$middle,$part,$name)=
   79: 		    ($thiskey=~/^(\w+)\.(?:(.+)\.)*([\w\s]+)\.(\w+)$/);
   80: 		my $section=&mt('All Students');
   81: 		if ($middle=~/^\[(.*)\]\./) {
   82: 		    my $sec=$1;
   83: 		    # if we have a section don't show ones that aren't ours
   84: 		    if ($ENV{'request.course.sec'} &&
   85: 			$ENV{'request.course.sec'} ne $sec) { next; }
   86: 		    # if a student without a section don't show any section ones
   87: 		    if (!$ENV{'request.role.adv'} &&
   88: 			!$ENV{'request.course.sec'}) { next; }
   89: 		    $section=&mt('Group/Section').': '.$1;
   90: 		    $middle=~s/^\[(.*)\]\.//;
   91: 		}
   92: 		$middle=~s/\.$//;
   93: 		my $realm=&mt('All Resources');
   94: 		if ($middle=~/^(.+)\_\_\_\(all\)$/) {
   95: 		    $realm=&mt('Folder/Map').': '.&Apache::lonnet::gettitle($1);
   96: 		} elsif ($middle) {
   97: 		    $realm=&mt('Resource').': '.&Apache::lonnet::gettitle($middle);
   98: 		}
   99: 		my $datetype='';
  100: 		if ($name eq 'duedate') { 
  101: 		    $datetype=&mt('Due'); 
  102: # see if accidentally answerdate is before duedate
  103: 		    my $answerkey=$thiskey;
  104: 		    $answerkey=~s/duedate$/answerdate/;
  105: 		    if ($resourcedata{$thiskey}>$resourcedata{$answerkey}) {
  106: 			$datetype='Due and Answer Available';
  107: 		    }
  108: 		}
  109: 		if ($name eq 'opendate') { $datetype=&mt('Opening'); }
  110: 		if ($name eq 'answerdate') {
  111: # see if accidentally answerdate is before duedate
  112: 		    my $duekey=$thiskey;
  113: 		    $duekey=~s/answerdate$/duedate/;
  114: 		    if ($resourcedata{$duekey}>$resourcedata{$thiskey}) {
  115: # forget it
  116: 			next;
  117: 		    } 
  118: 		    $datetype=&mt('Answer Available'); 
  119: 		}
  120: 		$returnhash{$courseid.'@'.$resourcedata{$thiskey}.'_'.
  121: 			    $resourcedata{$thiskey}}=
  122: 			    'INTERNAL:'.$datetype.': '.$realm.' ('.$section.')';
  123: 	    }
  124: 	}
  125:     }
  126:     return %returnhash;
  127: }
  128: 
  129: sub emptycell {
  130:     return '<td bgcolor="#AAAAAA">&nbsp;</td>';
  131: }
  132: 
  133: sub normalcell {
  134:     my ($day,$month,$year,$text)=@_;
  135:     my $output='';
  136:     foreach (split(/\_\_\_\&\&\&\_\_\_/,$text)) {
  137:         if ($_) {
  138: 	    my $internalflag=0;
  139: 	    my ($courseid,$start,$end,@msg)=split(/\@/,$_);
  140:             my $msg=join('@',@msg);
  141: 	    if ($msg=~/INTERNAL\:/) {
  142: 		$msg=~s/INTERNAL\://gs;
  143: 		$internalflag=1;
  144: 	    }
  145:             my $fullmsg=&mt('Calendar Announcement for ').$ENV{'course.'.$courseid.'.description'}.
  146: 		'\n'.&Apache::lonlocal::locallocaltime($start);
  147: 	    if ($start!=$end) {
  148: 		$fullmsg.=' - '.&Apache::lonlocal::locallocaltime($end);
  149: 	    }
  150: 	    $fullmsg.=':\n'.$msg;
  151:             if ($courseid eq $ENV{'request.course.id'}) {
  152:               if ((&Apache::lonnet::allowed('srm',$ENV{'request.course.id'}))
  153:                && (!$showedcheck{$start.'_'.$end})
  154: 	       && ($ENV{'form.pickdate'} ne 'yes')
  155: 	       && (!$internalflag)) {
  156:                $output.='<input type="checkbox" name="remove_'.$start.'_'.
  157: 		   $end.'">';
  158:                $showedcheck{$start.'_'.$end}=1;
  159: 	      }
  160: 	    }
  161: 	    $fullmsg=~s/[\n\r]/\\n/gs;
  162:             $fullmsg=&HTML::Entities::encode($fullmsg,'<>&"\'');
  163:             $fullmsg=~s/&/\\&/g;
  164:             $output.='<a href="javascript:alert('."'$fullmsg'".')">'.
  165: 	       substr($msg,0,20).'...</a><br />';
  166:        }
  167:     }
  168:     return '<td valign="top"'.
  169: 	((($day eq $todayhash{'day'}) &&
  170:           ($month eq $todayhash{'month'}) &&
  171:           ($year eq $todayhash{'year'}))?' bgcolor="#FFFF00"':'').
  172:            '>'.&tfont('<b>'.&picklink($day,$day,$month,$year).'</b><br />'.$output).'</td>';
  173: }
  174: 
  175: sub plaincell {
  176:     my ($text)=@_;
  177:     my $output='';
  178:     foreach (split(/\_\_\_\&\&\&\_\_\_/,$text)) {
  179:         if ($_) {
  180: 	    my ($courseid,$start,$end,@msg)=split(/\@/,$_);
  181:             my $msg=join('@',@msg);
  182:             my $fullmsg=&mt('Calendar Announcement for ').$ENV{'course.'.$courseid.'.description'}.
  183: 		'\n'.&Apache::lonlocal::locallocaltime($start);
  184: 	    if ($start!=$end) {
  185: 		$fullmsg.=' - '.&Apache::lonlocal::locallocaltime($end);
  186: 	    }
  187: 	    $msg=~s/INTERNAL\://gs;
  188: 	    $fullmsg.=':\n'.$msg;
  189:  	    $fullmsg=~s/[\n\r]/\\n/gs;
  190:             $fullmsg=&HTML::Entities::encode($fullmsg,'<>&"\'');
  191:             $fullmsg=~s/&/\\&/g;
  192:             $output.='<a href="javascript:alert('."'$fullmsg'".')">'.
  193: 	       substr($msg,0,40).'...</a><br />';
  194:        }
  195:     }
  196:     return $output;
  197: }
  198: 
  199: sub listcell {
  200:     my ($text)=@_;
  201:     my $output='';
  202:     foreach (split(/\_\_\_\&\&\&\_\_\_/,$text)) {
  203:         if ($_) {
  204: 	    my ($courseid,$start,$end,@msg)=split(/\@/,$_);
  205:             my $msg=join('@',@msg);
  206: 	    $msg=~s/INTERNAL\://gs;
  207:             my $fullmsg=&Apache::lonlocal::locallocaltime($start);
  208: 	    if ($start!=$end) {
  209: 		$fullmsg.=&mt(' to ').
  210: 		    &Apache::lonlocal::locallocaltime($end);
  211: 	    }
  212:             $fullmsg.=':<br /><b>'.
  213:                $msg.'</b>';
  214:             $output.='<li>'.$fullmsg.'</li>';
  215:        }
  216:     }
  217:     return $output;
  218: }
  219: 
  220: sub nextday {
  221:     my %th=@_;
  222:     $th{'day'}++;
  223:     return (&Apache::loncommon::maketime(%th),$th{'month'});
  224: }
  225: 
  226: sub showday {
  227:     my ($tk,$mode,%allcal)=@_;
  228:     my %th=&Apache::loncommon::timehash($tk);
  229:     my ($nextday,$nextmonth)=&nextday(%th);
  230:     my $outp='';
  231:     if ($mode) {
  232: 	my $oneday=24*3600;
  233: 	$tk-=$oneday;
  234: 	$nextday+=$oneday;
  235:     }
  236:     foreach (keys %allcal) {
  237: 	my ($course,$startdate,$enddate)=($_=~/^(\w+)\@(\d+)\_(\d+)$/);
  238:         if (($startdate<$nextday) && ($enddate>$tk))  {
  239: 	    $outp.='___&&&___'.$course.'@'.$startdate.'@'.$enddate.'@'.
  240:             $allcal{$_};
  241:         }
  242:     }
  243:     unless ($mode) {
  244:        return ($nextday,$nextmonth,&normalcell(
  245:                $th{'day'},$th{'month'},$th{'year'},$outp));
  246:    } elsif ($outp) {
  247:        if ($mode==1) {
  248:           return '<br />'.&plaincell($outp);
  249:       } else {
  250:           return '<ul>'.&listcell($outp).'</ul>';
  251:       }
  252:    } else {
  253:        return '';
  254:    }
  255: }
  256: 
  257: sub tfont {
  258:     my $text=shift;
  259:     if ($ENV{'form.pickdate'} eq 'yes') {
  260: 	return '<font size="1">'.$text.'</font>';
  261:     } else {
  262: 	return $text;
  263:     }
  264: }
  265: 
  266: sub picklink {
  267:     my ($text,$day,$month,$year)=@_;
  268:     if ($ENV{'form.pickdate'} eq 'yes') {
  269: 	return '<a href="javascript:dialin('.$day.','.$month.','.$year.')">'.
  270: 	    $text.'</a>';
  271:     } else {
  272: 	return $text;
  273:     }
  274: }
  275: 
  276: sub dialscript {
  277:     return (<<ENDDIA);
  278: <script language="Javascript">
  279: function dialin(day,month,year) {
  280: 	opener.document.$ENV{'form.formname'}.$ENV{'form.element'}\_year.value=year;
  281:     var slct=opener.document.$ENV{'form.formname'}.$ENV{'form.element'}\_month;
  282:     var i;
  283:     for (i=0;i<slct.length;i++) {
  284:         if (slct.options[i].value==month) { slct.selectedIndex=i; }
  285:     }
  286:     opener.document.$ENV{'form.formname'}.$ENV{'form.element'}\_day.value=day;
  287:     opener.$ENV{'form.element'}\_checkday();
  288:     self.close();
  289: }
  290: </script>
  291: ENDDIA
  292: }
  293: 
  294: sub handler {
  295:     my $r = shift;
  296:     &Apache::loncommon::content_type($r,'text/html');
  297:     $r->send_http_header;
  298:     return OK if $r->header_only;
  299: 
  300: # ---------------------------------------------------------- Get time right now
  301:     my $today=time;
  302:     %todayhash=&Apache::loncommon::timehash($today);
  303: # ----------------------------------------------------------------- Check marks
  304:     %showedcheck=();
  305:     undef %showedcheck;
  306: # ---------------------------------------------------------- Get month and year
  307:     &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
  308:                              ['month','year','pickdate','formname','element']);
  309: # --------------------------------------------------- Decide what month to show
  310:     my $year=$todayhash{'year'};
  311:     if ($ENV{'form.year'}) { $year=$ENV{'form.year'}; }
  312:     my $month=$todayhash{'month'};
  313:     if ($ENV{'form.month'}) { $month=$ENV{'form.month'}; }
  314: 
  315: # ---------------------------------------------- See if we are in pickdate mode
  316:     my $pickdatemode=($ENV{'form.pickdate'} eq 'yes');
  317:     my $pickinfo='&pickdate=yes&formname='.$ENV{'form.formname'}.
  318: 	'&element='.$ENV{'form.element'};
  319: # --------------------------------------------- Find out first day of the month
  320: 
  321:     my %firstday=&Apache::loncommon::timehash(
  322:        &Apache::loncommon::maketime( 'day' => 1, 'month'=> $month,
  323:                                      'year' => $year, 'hours' => 0,
  324: 				     'minutes' => 0, 'seconds' => 0,
  325:                                      'dlsav' => -1 ));
  326:     my $weekday=$firstday{'weekday'};
  327: # ------------------------------------------------------------ Print the screen
  328: 
  329:     $r->print(<<ENDDOCUMENT);
  330: <html>
  331: <head>
  332: <title>The LearningOnline Network with CAPA</title>
  333: <script>
  334: 
  335:     function trysubmit() {
  336:         document.anno.action.value="new";
  337: 	document.anno.submit();
  338:     }
  339: 
  340:     function removesub() {
  341:         document.anno.action.value="del";
  342: 	document.anno.submit();
  343:     }
  344: </script>
  345: </head>
  346: ENDDOCUMENT
  347:     if ($pickdatemode) {
  348: # no big header in pickdate mode
  349: 	$r->print(&Apache::loncommon::bodytag("Pick a Date",'','',1).
  350: 		  &dialscript().
  351: 		  '<font size="1">');
  352:     } else {
  353:        $r->print(&Apache::loncommon::bodytag("Announcements and Calendar"));
  354:     }
  355: # does this user have privileges to post, etc?
  356:     my $allowed=0;
  357:     if ($ENV{'request.course.id'}) {
  358:        $allowed=&Apache::lonnet::allowed('srm',$ENV{'request.course.id'});
  359:     }
  360: # does this user have privileges to post to servers?
  361:     my $serverpost=0;
  362:     if ($ENV{'request.role.domain'}) {
  363: 	$serverpost=&Apache::lonnet::allowed('psa',
  364: 					     $ENV{'request.role.domain'});
  365:     } else {
  366: 	$serverpost=&Apache::lonnet::allowed('psa','/');
  367:     }
  368: # -------------------------------- BUT: do no fancy stuff when in pickdate mode
  369:     if ($pickdatemode) { 
  370: 	$serverpost=0; 
  371: 	$allowed=0;
  372:     }
  373: # ------------------------------------------------------------ Process commands
  374:     if ($serverpost) {
  375: 	if ($ENV{'form.serveraction'}) {
  376: 	    foreach (keys %ENV) {
  377: 		if ($_=~/^form\.postto\_(\w+)/) {
  378: 		    $r->print( 
  379: 			'<br />Posting '.$1.': '.&Apache::lonnet::postannounce
  380: 			($1,$ENV{'form.serverannnounce'}));
  381: 		}
  382: 	    }
  383: 	}
  384: 	$r->print(<<SERVERANNOUNCE);
  385: <form name="serveranno" method="post">
  386: <h3>Post Server Announcements</h3>
  387: Post announcements to the system login and roles screen<br />
  388: <i>(leave blank to delete announcement)</i><br />
  389: <textarea name="serverannnounce" cols="60" rows="5"></textarea><br />
  390: Check machines:<br />
  391: SERVERANNOUNCE
  392: # list servers
  393:     foreach (sort keys %Apache::lonnet::hostname) {
  394: 	if (&Apache::lonnet::allowed('psa',$Apache::lonnet::hostdom{$_})) {
  395: 	    $r->print ('<br /><input type="checkbox" name="postto_'.$_.'" /> '.
  396: 		       $_.' <tt>'.$Apache::lonnet::hostname{$_}.'</tt> '.
  397: 		       '<a href="http://'.$Apache::lonnet::hostname{$_}.
  398: 		       '/announcement.txt" target="annowin">current</a>');
  399: 	}
  400:     }
  401:     $r->print(
  402:   '<br /><input type="submit" name="serveraction" value="Post"></form><hr />');
  403:     }
  404:     if ($allowed) {
  405:         my $coursenum=$ENV{'course.'.$ENV{'request.course.id'}.'.num'};
  406:         my $coursedom=$ENV{'course.'.$ENV{'request.course.id'}.'.domain'};
  407: # ----------------------------------------------------- Store new submitted one
  408:         if ($ENV{'form.action'} eq 'new') {
  409: 	    my $startdate = 
  410: 		&Apache::lonhtmlcommon::get_date_from_form('startdate');
  411: 	    my $enddate   = 
  412: 		&Apache::lonhtmlcommon::get_date_from_form('enddate');
  413: 	    unless ($startdate=~/^\d+$/) { $startdate=time; }
  414:             unless ($enddate=~/^\d+$/) { $enddate=$startdate+1; }
  415:             if ($startdate>$enddate) {
  416: 		my $buffer=$startdate;
  417: 		$startdate=$enddate;
  418: 		$enddate=$buffer;
  419:             }
  420: 	    &Apache::lonnet::put('calendar',{ 
  421: 		$startdate.'_'.$enddate => 
  422: 		    $ENV{'form.msg'} },$coursedom,$coursenum);
  423:         }
  424: # ---------------------------------------------------------------- Remove items
  425:         if ($ENV{'form.action'} eq 'del') {
  426: 	    my @delwhich=();
  427:             foreach (keys %ENV) {
  428: 		if ($_=~/^form\.remove\_(.+)$/) {
  429: 		    push(@delwhich,$1);
  430:                 }
  431:             }
  432:             &Apache::lonnet::del('calendar',\@delwhich,$coursedom,$coursenum);
  433:         }
  434: # -------------------------------------------------------- Form to post new one
  435:         my %tomorrowhash=%todayhash;
  436:         $tomorrowhash{'day'}++;
  437:         my $tomorrow=&Apache::loncommon::maketime(%tomorrowhash);
  438:         
  439:         &editfield($r,$today,$tomorrow,'');
  440:     }
  441: # ----------------------------------------------------- Summarize all calendars
  442:     my %allcal=();
  443:     foreach (&Apache::loncommon::findallcourses()) {
  444: 	%allcal=(%allcal,&readcalendar($_));
  445:     }
  446: 
  447: # ------------------------------- Initialize table and forward backward buttons
  448:     my ($pm,$py,$fm,$fy)=($month-1,$year,$month+1,$year);
  449:     if ($pm<1) { ($pm,$py)=(12,$year-1); }
  450:     if ($fm>12){ ($fm,$fy)=(1,$year+1); }
  451: 
  452:     $r->print('<h1>'.('',&mt('January'),&mt('February'),&mt('March'),
  453: 		      &mt('April'),&mt('May'),
  454: 		      &mt('June'),&mt('July'),&mt('August'),
  455:                       &mt('September'),&mt('October'),
  456:                       &mt('November'),&mt('December'))[$month].' '.
  457: 	              $year.'</h1>');
  458: # Reached the end of times, give up
  459:     if (($year<1970) || ($year>2037)) {
  460: 	$r->print('<h3>No calendar available for this date.</h3>'.
  461:  '<a href="/adm/announcements?month='.$todayhash{'month'}.
  462:  '&year='.$todayhash{'year'}.'">Current Month</a></body></html>');
  463: 	return OK;
  464:     }
  465:     $r->print(
  466:  '<a href="/adm/announcements?month='.$pm.'&year='.$py.
  467:  ($pickdatemode?$pickinfo:'').'">'.&mt('Previous Month').'</a> '.
  468:  '<a href="/adm/announcements?month='.$fm.'&year='.$fy.
  469:  ($pickdatemode?$pickinfo:'').'">'.&mt('Next Month').'</a>'.
  470:  '&nbsp;&nbsp;&nbsp;<a href="/adm/announcements?month='.$todayhash{'month'}.
  471:  '&year='.$todayhash{'year'}.
  472:  ($pickdatemode?$pickinfo:'').'">'.&mt('Current Month').'</a><p>'.
  473:         '<table border="2" cols="7" rows="5"><tr><th>'.
  474: &tfont(&mt('Sun'))
  475: .'</th><th>'.
  476: &tfont(&mt('Mon'))
  477: .'</th><th>'.
  478: &tfont(&mt('Tue'))
  479: .'</th><th>'.
  480: &tfont(&mt('Wed'))
  481: .'</th><th>'.
  482: &tfont(&mt('Thu'))
  483: .'</th><th>'.
  484: &tfont(&mt('Fri'))
  485: .'</th><th>'.
  486: &tfont(&mt('Sat'))
  487: .'</th></tr>');
  488: 
  489:     my $tk=&Apache::loncommon::maketime(%firstday);
  490:     my $outp;
  491:     my $nm;
  492: 
  493: # ---------------------------------------------------------------- Actual table
  494:     $r->print('<tr>');
  495:     for (my $i=0;$i<$weekday;$i++) { $r->print(&emptycell); }
  496:     for (my $i=$weekday;$i<=6;$i++) { 
  497:         ($tk,$nm,$outp)=&showday($tk,0,%allcal);
  498:         $r->print($outp);
  499:     }
  500:     $r->print('</tr>');
  501: 
  502:     for (my $k=0;$k<=4;$k++) {
  503:         $r->print('<tr>');
  504:         for (my $i=0;$i<=6;$i++) {
  505:             ($tk,$nm,$outp)=&showday($tk,0,%allcal);
  506:             if ($month!=$nm) { $outp=&emptycell; }
  507:             $r->print($outp);
  508:         }
  509:         $r->print('</tr>');
  510:     }
  511: # ------------------------------------------------------------------- End table
  512:     $r->print('</table>');
  513: # ----------------------------------------------------------------- Check marks
  514:     %showedcheck=();
  515:     undef %showedcheck;
  516: # --------------------------------------------------------------- Remove button
  517:     if ($allowed) { $r->print('<input type="button" onClick="removesub()" value="Remove Checked Entries">'.
  518: 			      &Apache::loncommon::help_open_topic('Calendar_Remove_Announcement').'</form>'); }
  519:     $r->print('<p>'.
  520:  '<a href="/adm/announcements?month='.$pm.'&year='.$py.
  521:  ($pickdatemode?$pickinfo:'').'">'.&mt('Previous Month').'</a> '.
  522:  '<a href="/adm/announcements?month='.$fm.'&year='.$fy.
  523:  ($pickdatemode?$pickinfo:'').'">'.&mt('Next Month').'</a>'.
  524:  '&nbsp;&nbsp;&nbsp;<a href="/adm/announcements?month='.$todayhash{'month'}.
  525:  '&year='.$todayhash{'year'}.
  526:  ($pickdatemode?$pickinfo:'').'">'.&mt('Current Month').'</a></p>'.
  527:  ($pickdatemode?'</font>':'').
  528:  '</body></html>');
  529:     return OK;
  530: } 
  531: 
  532: 1;
  533: __END__

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>