--- loncom/interface/lonsyllabus.pm 2009/09/07 18:31:50 1.96
+++ 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.96 2009/09/07 18:31:50 raeburn 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();