--- loncom/interface/lonsyllabus.pm 2009/09/02 12:39:26 1.94 +++ loncom/interface/lonsyllabus.pm 2009/09/20 22:04:57 1.97 @@ -1,7 +1,7 @@ # The LearningOnline Network # Syllabus # -# $Id: lonsyllabus.pm,v 1.94 2009/09/02 12:39:26 droeschl Exp $ +# $Id: lonsyllabus.pm,v 1.97 2009/09/20 22:04:57 amueller Exp $ # # Copyright Michigan State University Board of Trustees # @@ -141,7 +141,7 @@ ENDSCRIPT } my $start_page = &Apache::loncommon::start_page("Syllabus", $rss_link.$js, - {'function' => $forcestudent, + {'function' => undef, 'domain' => $cdom, 'force_register' => $env{'form.register'},}); @@ -232,17 +232,31 @@ ENDSCRIPT #--------Functions if( ($allowed || $privileged) && $target ne 'tex') { my $functions=&Apache::lonhtmlcommon::start_funclist(); - if ($allowed) { - $functions.=&Apache::lonhtmlcommon::add_item_funclist( + #if you have the register flag, keep it + if($env{'form.register'} == 1) { + $functions.=&Apache::lonhtmlcommon::add_item_funclist( + '' + .&mt('Show Public View').'' + .&Apache::loncommon::help_open_topic( + 'Uploaded_Templates_PublicView')); + } else { + $functions.=&Apache::lonhtmlcommon::add_item_funclist( '' .&mt('Show Public View').'' .&Apache::loncommon::help_open_topic( 'Uploaded_Templates_PublicView')); + } } elsif ($privileged) { - $functions.=&Apache::lonhtmlcommon::add_item_funclist( + if($env{'form.register'} == 1) { + $functions.=&Apache::lonhtmlcommon::add_item_funclist( + '' + .&mt('Edit').''); + } else { + $functions.=&Apache::lonhtmlcommon::add_item_funclist( '' .&mt('Edit').''); + } } $functions.=&Apache::lonhtmlcommon::end_funclist(); @@ -259,8 +273,8 @@ ENDSCRIPT .' '.&Apache::loncommon::help_open_topic('Syllabus_ExtLink') .'

' .'

' - .&mt('Instead of using this template you can specify an external URL as Syllabus in the [_1]Course Parameters[_2].' - ,'','') + .&mt('Instead of using this template you can specify an external URL as Syllabus in the [_1]Course Configuration[_2].' + ,'','') .'

' ); #-Print Help Text @@ -363,7 +377,7 @@ ENDSCRIPT # ---------------------------------------------------------------- Get syllabus if (($syllabus{'uploaded.lastmodified'}) || ($allowed)) { if ($allowed) { - $r->print('
'. + $r->print(''. ''); } my @htmlids=(); @@ -406,9 +420,6 @@ ENDSCRIPT } $message=&Apache::lontexconvert::msgtexconverted($message); if ($target ne 'tex') { - if ($allowed) { - $r->print('

'); - } &Apache::lontemplate::print_template($r, $syllabusfields{$field}, $message,$allowed,'LC_Box'); } else { $r->print('\\\\\textbf{'.$syllabusfields{$field}.'}\\\\'. @@ -418,7 +429,6 @@ ENDSCRIPT } if ($allowed) { if ($target ne 'tex') { - $r->print('

'); &Apache::lontemplate::print_editbox_template($r, $syllabus{$field}, $field); } }