--- loncom/interface/lonannounce.pm 2005/11/17 19:54:49 1.35 +++ loncom/interface/lonannounce.pm 2005/11/17 21:33:40 1.36 @@ -1,7 +1,7 @@ # The LearningOnline Network # Announce # -# $Id: lonannounce.pm,v 1.35 2005/11/17 19:54:49 www Exp $ +# $Id: lonannounce.pm,v 1.36 2005/11/17 21:33:40 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -33,6 +33,7 @@ use Apache::Constants qw(:common); use Apache::loncommon; use Apache::lonhtmlcommon(); use Apache::lonlocal; +use Apache::lonrss(); use Apache::lonnet; use HTML::Entities(); @@ -49,14 +50,21 @@ sub editfield { 'enddate', $end); my $help=&Apache::loncommon::help_open_menu('','Calendar Add Announcement','Calendar_Add_Announcement','',274,'Communication Tools'); + my %lt=&Apache::lonlocal::texthash('post' => 'Post Announcement', + 'start' => 'Starting date', + 'end' => 'Ending date', + 'incrss' => 'Include in course newsfeed'); + $r->print(< - - -
Starting date:$startdateform
Ending date:$enddateform
+ + +
$lt{'start'}:$startdateform
$lt{'end'}:$enddateform
-
+
+ +

ENDFORM } @@ -421,6 +429,13 @@ SERVERANNOUNCE &Apache::lonnet::put('calendar',{ $startdate.'_'.$enddate => $env{'form.msg'} },$coursedom,$coursenum); + if ($env{'form.rsspost'}) { + &Apache::lonrss::addentry($coursenum,$coursedom,'Course_Announcements', + &mt('Event from [_1] to [_2]', + &Apache::lonlocal::locallocaltime($startdate), + &Apache::lonlocal::locallocaltime($enddate)), + $env{'form.msg'},'/adm/announcements','public'); + } } # ---------------------------------------------------------------- Remove items if ($env{'form.action'} eq 'del') {