'); }
if ($forcestudent or $target eq 'tex') { $allowed=0; }
if ($allowed) {
@@ -185,17 +184,30 @@ sub handler {
if (($group ne '') && ($env{'form.group'} eq $group)) {
$query_str.='&group='.$group.'&'.$refarg;
}
- $r->print(
- ' '.
- &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') {
+ if ($env{'form.register'}) {
+ $query_str .= '®ister='.$env{'form.register'};
+ }
+ #Function Box for Edit Mode.
+ my $functionbox = &Apache::lonhtmlcommon::start_funclist();
+ $functionbox .= &Apache::lonhtmlcommon::add_item_funclist(
+ ''.&mt('Show Student View').''.
+ &Apache::loncommon::help_open_topic('Uploaded_Templates_PublicView'));
+ $functionbox.=&Apache::lonhtmlcommon::end_funclist();
+ $r->print(&Apache::loncommon::head_subbox($functionbox).&Apache::loncommon::help_open_topic('Uploaded_Templates_TextBoxes',&mt('Help with filling in text boxes')));
+ } elsif ($privileged and $target ne 'tex') {
my $query_str = 'forceedit=edit';
if (($group ne '') && ($env{'form.group'} eq $group)) {
$query_str.='&group='.$group.'&'.$refarg;
}
- $r->print(''
- .&mt('Edit').'');
+ if ($env{'form.register'}) {
+ $query_str .= '®ister='.$env{'form.register'};
+ }
+ #Functionbox for Student view.
+ my $functionbox = &Apache::lonhtmlcommon::start_funclist();
+ $functionbox .= &Apache::lonhtmlcommon::add_item_funclist(
+ "".&mt('Edit')."");
+ $functionbox.=&Apache::lonhtmlcommon::end_funclist();
+ $r->print(&Apache::loncommon::head_subbox($functionbox));
}
if (($env{'form.uploaddoc.filename'}) &&
@@ -206,11 +218,11 @@ sub handler {
}
if ($group ne '') {
$syllabus{'uploaded.photourl'}=
- &Apache::lonnet::userfileupload('uploaddoc',1,
+ &Apache::lonnet::userfileupload('uploaddoc','coursedoc',
'bulletin/'.$group.'/'.$marker);
} else {
$syllabus{'uploaded.photourl'}=
- &Apache::lonnet::userfileupload('uploaddoc',1,
+ &Apache::lonnet::userfileupload('uploaddoc','coursedoc',
'bulletin/'.$marker);
}
}
@@ -228,77 +240,68 @@ sub handler {
&Apache::lonnet::put('bulletinpage_'.$marker,\%syllabus,$dom,$crs);
}
-# ---------------------------------------------------------------- Get syllabus
+# ---------------------------------------------------------------- Get discussion board
if (($syllabus{'uploaded.lastmodified'}) || ($allowed)) {
+ #Print Topic as Heading
+ my $titletext=&HTML::Entities::encode($syllabus{'aaa_title'},'<>&"');;
+ if ($target ne 'tex') {
+ $r->print(''.$titletext.'');
+ } else {
+ $r->print('\\\\\textbf{'.&Apache::lonxml::xmlparse($r,'tex',$titletext).'}\\\\');
+ }
+ #Outputbox and Inputbox for Topic
+ if ($allowed) {
+ $r->print('');
+ $r->print(''.
+ &Apache::lonhtmlcommon::htmlareaselectactive());
+ }
+ if ($target ne 'tex'){
+ $r->print('
');
+ }
+ else {
+ $r->print(&Apache::lonxml::xmlparse($r,'tex','
'));
}
- if ($target ne 'tex') {$r->print('');} else {$r->print('\\\\');}
} else {
- $r->print(''.&mt('No page information provided.').' ');
+ if ($target ne 'tex') {
+ $r->print(''.&mt('No page information provided.').' ');
+ }
}
- if ($target ne 'tex') { $r->print(' |