[LON-CAPA-cvs] cvs: loncom /interface lonsyllabus.pm
amueller
amueller@source.lon-capa.org
Sun, 20 Sep 2009 22:04:57 -0000
amueller Sun Sep 20 22:04:57 2009 EDT
Modified files:
/loncom/interface lonsyllabus.pm
Log:
closed bug 6010
-Course Coordinator keeps his colour (actually green) when switching between Edit Mode and Public-View Mode.
vice versa
-The Main Menu doesn't disappear now when switching between Edit Mode and Public-View Mode.
Index: loncom/interface/lonsyllabus.pm
diff -u loncom/interface/lonsyllabus.pm:1.96 loncom/interface/lonsyllabus.pm:1.97
--- loncom/interface/lonsyllabus.pm:1.96 Mon Sep 7 18:31:50 2009
+++ loncom/interface/lonsyllabus.pm Sun Sep 20 22:04:57 2009
@@ -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 @@
}
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 @@
#--------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(
+ '<a href="'.$r->uri.'?forcestudent=1®ister=1">'
+ .&mt('Show Public View').'</a>'
+ .&Apache::loncommon::help_open_topic(
+ 'Uploaded_Templates_PublicView'));
+ } else {
+ $functions.=&Apache::lonhtmlcommon::add_item_funclist(
'<a href="'.$r->uri.'?forcestudent=1">'
.&mt('Show Public View').'</a>'
.&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(
+ '<a href="'.$r->uri.'?forceedit=1®ister=1">'
+ .&mt('Edit').'</a>');
+ } else {
+ $functions.=&Apache::lonhtmlcommon::add_item_funclist(
'<a href="'.$r->uri.'?forceedit=1">'
.&mt('Edit').'</a>');
+ }
}
$functions.=&Apache::lonhtmlcommon::end_funclist();