[LON-CAPA-cvs] cvs: loncom /interface lonmenu.pm
raeburn
raeburn at source.lon-capa.org
Fri Jul 14 23:34:40 EDT 2023
raeburn Sat Jul 15 03:34:40 2023 EDT
Modified files:
/loncom/interface lonmenu.pm
Log:
- Stored Links not available for resources published in Course "Authoring"
Space.
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.534 loncom/interface/lonmenu.pm:1.535
--- loncom/interface/lonmenu.pm:1.534 Fri Jul 14 00:54:13 2023
+++ loncom/interface/lonmenu.pm Sat Jul 15 03:34:40 2023
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines to control the menu
#
-# $Id: lonmenu.pm,v 1.534 2023/07/14 00:54:13 raeburn Exp $
+# $Id: lonmenu.pm,v 1.535 2023/07/15 03:34:40 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1130,7 +1130,7 @@
# End course context
# Prepare the rest of the buttons
- my ($menuitems,$got_prt,$got_wishlist);
+ my ($menuitems,$got_prt,$got_wishlist,$crsauthor);
if ($const_space) {
#
# We are in construction space
@@ -1270,8 +1270,12 @@
$got_prt = 1;
if (($env{'user.adv'}) && ($env{'request.uri'} =~ /^\/res/)
&& (!$env{'request.enc'})) {
- my ($cnum,$cdom) = &Apache::loncommon::crsauthor_url($env{'request.uri'});
- unless ($cnum) {
+ my $privurl = $env{'request.uri'};
+ $privurl =~ s{^/res/}{/priv/};
+ my ($cnum,$cdom) = &Apache::loncommon::crsauthor_url($privurl);
+ if ($cnum) {
+ $crsauthor = 1;
+ } else {
# 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);
@@ -1326,7 +1330,7 @@
ENDMENUITEMS
$got_prt = 1;
}
- unless ($got_wishlist) {
+ unless (($got_wishlist) || ($crsauthor)) {
if (($env{'user.adv'}) && (!$env{'request.enc'})) {
# wishlist is only available for users with access to resource-pool
$menuitems .= (<<ENDMENUITEMS);
More information about the LON-CAPA-cvs
mailing list