version 1.35, 2005/11/17 19:54:49
|
version 1.38, 2005/11/22 16:16:53
|
Line 33 use Apache::Constants qw(:common);
|
Line 33 use Apache::Constants qw(:common);
|
use Apache::loncommon; |
use Apache::loncommon; |
use Apache::lonhtmlcommon(); |
use Apache::lonhtmlcommon(); |
use Apache::lonlocal; |
use Apache::lonlocal; |
|
use Apache::lonrss(); |
use Apache::lonnet; |
use Apache::lonnet; |
use HTML::Entities(); |
use HTML::Entities(); |
|
|
Line 49 sub editfield {
|
Line 50 sub editfield {
|
'enddate', |
'enddate', |
$end); |
$end); |
my $help=&Apache::loncommon::help_open_menu('','Calendar Add Announcement','Calendar_Add_Announcement','',274,'Communication Tools'); |
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 RSS newsfeed'); |
|
|
$r->print(<<ENDFORM); |
$r->print(<<ENDFORM); |
$help |
$help |
<form name="anno" method="post"> |
<form name="anno" method="post"> |
<input type="hidden" value='' name="action" > |
<input type="hidden" value='' name="action" /> |
<table><tr><td>Starting date:</td><td>$startdateform</td></tr> |
<table><tr><td>$lt{'start'}:</td><td>$startdateform</td></tr> |
<tr><td>Ending date:</td><td>$enddateform</td></tr></table> |
<tr><td>$lt{'end'}:</td><td>$enddateform</td></tr></table> |
<textarea name="msg" rows="4" cols="60">$text</textarea> |
<textarea name="msg" rows="4" cols="60">$text</textarea> |
<input type="button" onClick="trysubmit()" value="Post Announcement"><hr /> |
<br /> |
|
<!-- <label><input type="checkbox" name="rsspost" /> $lt{'incrss'}</label> --> |
|
<br /><input type="button" onClick="trysubmit()" value="$lt{'post'}" /><hr /> |
ENDFORM |
ENDFORM |
} |
} |
|
|
Line 421 SERVERANNOUNCE
|
Line 429 SERVERANNOUNCE
|
&Apache::lonnet::put('calendar',{ |
&Apache::lonnet::put('calendar',{ |
$startdate.'_'.$enddate => |
$startdate.'_'.$enddate => |
$env{'form.msg'} },$coursedom,$coursenum); |
$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 |
# ---------------------------------------------------------------- Remove items |
if ($env{'form.action'} eq 'del') { |
if ($env{'form.action'} eq 'del') { |