--- loncom/interface/lonannounce.pm 2009/11/04 20:01:24 1.80
+++ loncom/interface/lonannounce.pm 2012/04/18 16:22:31 1.84
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Announce
#
-# $Id: lonannounce.pm,v 1.80 2009/11/04 20:01:24 raeburn Exp $
+# $Id: lonannounce.pm,v 1.84 2012/04/18 16:22:31 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -62,7 +62,7 @@ sub editfield {
'end' => 'Ending date',
'incrss' => 'Include in course RSS newsfeed');
if ($crstype eq 'Community') {
- $lt{'anon'} = &mt('Community Announcements');
+ $lt{'annon'} = &mt('Community Announcements');
$lt{'incrss'} = &mt('Include in community RSS newsfeed');
}
@@ -420,6 +420,7 @@ sub picklink {
sub dialscript {
return (<
Posting '.$1.': '.&Apache::lonnet::postannounce
- ($1,$env{'form.serverannnounce'}));
- }
- }
- }
+ if ($env{'form.serveraction'}) {
+ my $rc;
+ my $message;
+ foreach my $key (keys(%env)) {
+ if ($key=~/^form\.postto\_(\w+[\w|-]*)/) {
+ $rc = &Apache::lonnet::postannounce
+ ($1,$env{'form.serverannnounce'});
+ if ($rc eq 'ok') {
+ $message .=
+ &Apache::lonhtmlcommon::confirm_success(
+ &mt('Announcement posted to [_1]',$1))
+ .'
';
+ } else {
+ $message .=
+ &Apache::lonhtmlcommon::confirm_success(
+ &mt('Posting announcement to [_1] failed: [_2]'
+ ,$1,$rc), 1)
+ .'
';
+ }
+ }
+ }
+ $r->print(&Apache::loncommon::confirmwrapper($message));
+ }
$r->print('
'. - '
'.&mt($localdays[$i]).' | '); } @@ -753,22 +771,23 @@ ENDDOCUMENT } } # ------------------------------------------------------------------- End table - $r->print('
---|
'. - ''.&mt('Previous Month').' '. - ''.&mt('Next Month').''. ' '.&mt('Current Month').'
'. - ($pickdatemode?'':'').&Apache::loncommon::end_page()); - $r->print(''.&mt('Download your Calendar as iCalendar File').''); + ($pickdatemode?'':''). + ''.&mt('Download your Calendar as iCalendar File').''. + &Apache::loncommon::end_page()); return OK; }