[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface lonmenu.pm
raeburn
raeburn at source.lon-capa.org
Fri Dec 13 09:30:50 EST 2013
raeburn Fri Dec 13 14:30:50 2013 EDT
Modified files: (Branch: version_2_11_X)
/loncom/interface lonmenu.pm
Log:
- For 2.11
- Backport 1.422, 1.423.
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.369.2.47 loncom/interface/lonmenu.pm:1.369.2.48
--- loncom/interface/lonmenu.pm:1.369.2.47 Sat Sep 7 21:08:58 2013
+++ loncom/interface/lonmenu.pm Fri Dec 13 14:30:49 2013
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines to control the menu
#
-# $Id: lonmenu.pm,v 1.369.2.47 2013/09/07 21:08:58 raeburn Exp $
+# $Id: lonmenu.pm,v 1.369.2.48 2013/12/13 14:30:49 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -303,8 +303,14 @@
$menu{$position} .= prep_menuitem($menuitem);
}
}
- return ("<ol class=\"LC_primary_menu LC_floatleft\">$menu{'left'}</ol>",
- "<ol class=\"LC_primary_menu LC_floatright LC_right\">$menu{'right'}</ol>");
+ my @output = ('','');
+ if ($menu{'left'} ne '') {
+ $output[0] = "<ol class=\"LC_primary_menu LC_floatleft\">$menu{'left'}</ol>";
+ }
+ if ($menu{'right'} ne '') {
+ $output[1] = "<ol class=\"LC_primary_menu LC_floatright LC_right\">$menu{'right'}</ol>";
+ }
+ return @output;
}
#returns hashref {user=>'',dom=>''} containing:
@@ -851,7 +857,7 @@
# wishlist is only available for users with access to resource-pool
# and links can only be set for resources within the resource-pool
$menuitems .= (<<ENDMENUITEMS);
-s&9&1&alnk.png&$swtext{'alnk'}&linkstor[_1]&set_wishlistlink()&Save a link for this resource in your personal Stored Links repository&&1
+s&9&1&alnk.png&$swtext{'alnk'}&linkstor[_1]&set_wishlistlink()&Save a link for this resource in my personal Stored Links repository&&1
ENDMENUITEMS
$got_wishlist = 1;
}
@@ -874,14 +880,17 @@
s&6&3&catalog.png&$swtext{'catalog'}&info[_1]&catalog_info()&Show Metadata
ENDREALRES
}
- unless ($env{'request.noversionuri'} =~ m{^/uploaded/$match_domain/$match_courseid/docs/}) {
+ unless (($env{'request.noversionuri'} =~ m{^/uploaded/$match_domain/$match_courseid/docs/}) ||
+ ($env{'request.noversionuri'} =~ m{^\Q/adm/wrapper/\E(ext|uploaded)/})) {
$menuitems.=(<<ENDREALRES);
s&8&1&eval.png&$swtext{'eval'}&this[_1]&gopost('/adm/evaluate',currentURL,1)&Provide my evaluation of this resource
ENDREALRES
}
- $menuitems.=(<<ENDREALRES);
+ unless ($env{'request.noversionuri'} =~ m{^\Q/adm/wrapper/\E(ext|uploaded)/}) {
+ $menuitems.=(<<ENDREALRES);
s&8&2&fdbk.png&$swtext{'fdbk'}&discuss[_1]&gopost('/adm/feedback',currentURL,1)&Provide feedback messages or contribute to the course discussion about this resource
ENDREALRES
+ }
}
}
if ($env{'request.uri'} =~ /^\/res/) {
More information about the LON-CAPA-cvs
mailing list