--- loncom/interface/lonannounce.pm 2004/06/12 01:04:10 1.28 +++ loncom/interface/lonannounce.pm 2004/08/27 21:41:39 1.31 @@ -1,7 +1,7 @@ # The LearningOnline Network # Announce # -# $Id: lonannounce.pm,v 1.28 2004/06/12 01:04:10 www Exp $ +# $Id: lonannounce.pm,v 1.31 2004/08/27 21:41:39 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -47,9 +47,7 @@ sub editfield { my $enddateform = &Apache::lonhtmlcommon::date_setter('anno', 'enddate', $end); - my $help=&Apache::loncommon::help_open_topic('Calendar_Add_Announcement'). - &Apache::loncommon::help_open_faq(274). - &Apache::loncommon::help_open_bug('Communication Tools'); + my $help=&Apache::loncommon::help_open_menu('','Calendar Add Announcement','Calendar_Add_Announcement','',274,'Communication Tools'); $r->print(< @@ -81,6 +79,13 @@ sub readcalendar { ($thiskey=~/^(\w+)\.(?:(.+)\.)*([\w\s]+)\.(\w+)$/); my $section=&mt('All Students'); 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; $middle=~s/^\[(.*)\]\.//; } @@ -159,11 +164,11 @@ sub normalcell { substr($msg,0,20).'...
'; } } - return ''.&tfont(''.&picklink($day,$day,$month,$year).'
'.$output).''; + '>'.&tfont(''.&picklink($day,$day,$month,$year).'
'.$output).''; } sub plaincell { @@ -315,7 +320,7 @@ sub handler { &Apache::loncommon::maketime( 'day' => 1, 'month'=> $month, 'year' => $year, 'hours' => 0, 'minutes' => 0, 'seconds' => 0, - 'dlsav' => $todayhash{'dlsav'} )); + 'dlsav' => -1 )); my $weekday=$firstday{'weekday'}; # ------------------------------------------------------------ Print the screen