--- loncom/interface/lonbulletin.pm 2006/07/17 21:59:24 1.37
+++ loncom/interface/lonbulletin.pm 2008/03/03 11:25:59 1.46
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Bulletin Board Handler
#
-# $Id: lonbulletin.pm,v 1.37 2006/07/17 21:59:24 raeburn Exp $
+# $Id: lonbulletin.pm,v 1.46 2008/03/03 11:25:59 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -36,6 +36,7 @@ use Apache::lontexconvert;
use Apache::lonfeedback;
use Apache::lonlocal;
use Apache::lonhtmlcommon;
+use HTML::Entities();
use LONCAPA;
sub handler {
@@ -180,7 +181,7 @@ sub handler {
}
$r->print(
'
'.
-&Apache::loncommon::help_open_topic('Uploaded_Templates_TextBoxes','Help with filling in text boxes').' '.&mt('Show Student View').''.
+&Apache::loncommon::help_open_topic('Uploaded_Templates_TextBoxes',&mt('Help with filling in text boxes')).' '.&mt('Show Student View').''.
&Apache::loncommon::help_open_topic('Uploaded_Templates_PublicView').'
');
} elsif ($privileged and $target ne 'tex') {
my $query_str = 'forceedit=edit';
@@ -197,18 +198,25 @@ sub handler {
if ($syllabus{'uploaded.photourl'}) {
&Apache::lonnet::removeuploadedurl($syllabus{'uploaded.photourl'});
}
- $syllabus{'uploaded.photourl'}=
- &Apache::lonnet::userfileupload('uploaddoc',1,'bulletin');
+ if ($group ne '') {
+ $syllabus{'uploaded.photourl'}=
+ &Apache::lonnet::userfileupload('uploaddoc',1,
+ 'bulletin/'.$group.'/'.$marker);
+ } else {
+ $syllabus{'uploaded.photourl'}=
+ &Apache::lonnet::userfileupload('uploaddoc',1,
+ 'bulletin/'.$marker);
+ }
}
$syllabus{'uploaded.lastmodified'}=time;
&Apache::lonnet::put('bulletinpage_'.$marker,\%syllabus,$dom,$crs);
}
if (($allowed) && ($env{'form.storesyl'})) {
- foreach (keys %syllabusfields) {
- my $field=$env{'form.'.$_};
+ foreach my $syl_field (keys(%syllabusfields)) {
+ my $field=$env{'form.'.$syl_field};
$field=~s/\s+$//s;
$field=&Apache::lonfeedback::clear_out_html($field,1);
- $syllabus{$_}=$field;
+ $syllabus{$syl_field}=$field;
}
$syllabus{'uploaded.lastmodified'}=time;
&Apache::lonnet::put('bulletinpage_'.$marker,\%syllabus,$dom,$crs);
@@ -229,11 +237,12 @@ sub handler {
'