--- loncom/interface/lonmenu.pm 2012/08/06 03:38:08 1.369.2.19 +++ loncom/interface/lonmenu.pm 2012/09/25 23:01:00 1.369.2.23 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Routines to control the menu # -# $Id: lonmenu.pm,v 1.369.2.19 2012/08/06 03:38:08 raeburn Exp $ +# $Id: lonmenu.pm,v 1.369.2.23 2012/09/25 23:01:00 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -443,8 +443,10 @@ sub secondary_menu { } $menu =~ s/\[uname\]/$$author{user}/g; $menu =~ s/\[udom\]/$$author{dom}/g; - - return ""; + if ($menu) { + $menu = ""; + } + return $menu; } sub create_submenu { @@ -758,7 +760,7 @@ sub innerregister { ### ### # Prepare the rest of the buttons - my ($menuitems,$got_prt,$got_wishlist); + my ($menuitems,$got_prt,$got_wishlist,$cstritems); if ($const_space) { # # We are in construction space @@ -778,12 +780,16 @@ sub innerregister { # Probably should be in mydesk.tab # $menuitems=(< + +$cstrcrumbs ENDREGTHIS } } else { @@ -992,6 +1024,7 @@ var swmenu=null; swmenu.clearbut(8,1); swmenu.clearbut(8,2); swmenu.clearbut(8,3); + swmenu.clearbut(9,1); if (swmenu.currentURL) { swmenu.switchbutton (3,1,'reload.gif','return','location','go(currentURL)'); @@ -1020,10 +1053,6 @@ sub get_inline_text { pparm => 'Content Settings', docs => 'Folder/Page Content', pcstr => 'Edit', - list => 'Directory', - rtrv => 'Retrieve', - pub => 'Publish', - del => 'Delete', prt => 'Print', alnk => 'Stored Links', anot => 'Notes', @@ -1040,10 +1069,6 @@ sub get_rc_text { subm => 'view sub-[_1]', pparm => 'problem[_2]', pcstr => 'edit[_1]', - list => 'list[_1]', - rtrv => 'retrieve[_1]', - pub => 'publish[_1]', - del => 'delete[_1]', prt => 'prepare[_1]', back => 'backward[_1]', forw => 'forward[_1]', @@ -1291,6 +1316,16 @@ sub switch { if ($env{'environment.remote'} eq 'on') { if (($row<1) || ($row>13)) { return ''; } + if ($env{'request.state'} eq 'construct') { + my $text = $top.' '.$bot; + $text=~s/\s*\-\s*//gs; + my $pic = ''.$text.''; + $inlineremote[$idx] = + ''. + $pic.''.$top.' '; + } # Remote $img=~s/\.png$/\.gif/; return "\n". @@ -1940,8 +1975,22 @@ sub roles_selector { } else { $ccrole = 'cc'; } - my $priv; + my ($priv,$gotsymb,$destsymb); my $destinationurl = $ENV{'REQUEST_URI'}; + if ($destinationurl =~ /\?symb=/) { + $gotsymb = 1; + } elsif ($destinationurl =~ m{^/enc/}) { + my $plainurl = &Apache::lonenc::unencrypted($destinationurl); + if ($plainurl =~ /\?symb=/) { + $gotsymb = 1; + } + } + unless ($gotsymb) { + $destsymb = &Apache::lonnet::symbread(); + if ($destsymb ne '') { + $destsymb = &Apache::lonenc::check_encrypt($destsymb); + } + } my $reqprivs = &required_privs(); if (ref($reqprivs) eq 'HASH') { my $destination = $destinationurl; @@ -2029,7 +2078,12 @@ sub roles_selector { $role_selector .= "\n".''; } } - $role_selector .= ''."\n". + $role_selector .= ''."\n"; + if ($destsymb ne '') { + $role_selector .= ''."\n"; + } + $role_selector .= ''."\n". ''."\n".