--- loncom/interface/lonmenu.pm 2009/11/10 13:58:55 1.301
+++ loncom/interface/lonmenu.pm 2009/11/19 10:26:15 1.305
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines to control the menu
#
-# $Id: lonmenu.pm,v 1.301 2009/11/10 13:58:55 droeschl Exp $
+# $Id: lonmenu.pm,v 1.305 2009/11/19 10:26:15 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -689,10 +689,22 @@ sub innerregister {
}
# Finally, turn the button on or off
if ($cfile && !$const_space) {
- $editbutton=&switch
- ('','',6,1,'pcstr.gif','edit[_1]','resource[_2]',
+ my $nocrsedit;
+ # Suppress display where CC has switched to student role.
+ if ($env{'request.course.id'}) {
+ unless(&Apache::lonnet::allowed('mdc',
+ $env{'request.course.id'})) {
+ $nocrsedit = 1;
+ }
+ }
+ if ($nocrsedit) {
+ $editbutton=&clear(6,1);
+ } else {
+ $editbutton=&switch
+ ('','',6,1,'pcstr.gif','edit[_1]','resource[_2]',
"go('".$cfile."');","Edit this resource");
- $noeditbutton = 0;
+ $noeditbutton = 0;
+ }
} elsif ($editbutton eq '') {
$editbutton=&clear(6,1);
}
@@ -820,6 +832,7 @@ ENDMENUITEMS
if ($addremote) {
#SD START (work in progress!)
+ Apache::lonhtmlcommon::clear_breadcrumb_tools();
# Arrows for navigation
Apache::lonhtmlcommon::add_breadcrumb_tool( 'A', $inlineremote[21] );
Apache::lonhtmlcommon::add_breadcrumb_tool( 'A', $inlineremote[23] );
@@ -893,11 +906,11 @@ ENDMENUITEMS
$timesync
$breadcrumb
-
-
-
+
+
+
$newmail
-
+
@@ -1255,7 +1268,7 @@ sub switch {
my $pic=
'
';
+ '" align="'.($nobreak==3?'right':'left').'" class="LC_icon" />';
if ($env{'browser.interface'} eq 'faketextual') {
# Main Menu
if ($nobreak==3) {