--- loncom/interface/lonmenu.pm 2012/08/07 01:35:47 1.369.2.20
+++ 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.20 2012/08/07 01:35:47 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 {
@@ -1031,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',
@@ -1051,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]',
@@ -1302,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 = '';
+ $inlineremote[$idx] =
+ '';
+ }
# Remote
$img=~s/\.png$/\.gif/;
return "\n".
@@ -1951,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;
@@ -2040,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".