[LON-CAPA-cvs] cvs: loncom /interface lonmsgdisplay.pm
raeburn
raeburn at source.lon-capa.org
Fri Sep 15 18:32:46 EDT 2023
raeburn Fri Sep 15 22:32:46 2023 EDT
Modified files:
/loncom/interface lonmsgdisplay.pm
Log:
- Stop access denied message for "Refers: to" link in course context where:
(i) request.role.adv is not 1
(ii) resource instance had URL hidden set to yes when message was created
(iii) instance in same course currently has URL hidden not set to yes.
Index: loncom/interface/lonmsgdisplay.pm
diff -u loncom/interface/lonmsgdisplay.pm:1.199 loncom/interface/lonmsgdisplay.pm:1.200
--- loncom/interface/lonmsgdisplay.pm:1.199 Wed Sep 13 12:18:13 2023
+++ loncom/interface/lonmsgdisplay.pm Fri Sep 15 22:32:46 2023
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines for messaging display
#
-# $Id: lonmsgdisplay.pm,v 1.199 2023/09/13 12:18:13 raeburn Exp $
+# $Id: lonmsgdisplay.pm,v 1.200 2023/09/15 22:32:46 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -2504,12 +2504,16 @@
$showsymb,$env{'user.domain'},$env{'user.name'});
if ($symb) {
if ($encrypturl =~ /^yes$/i && !$env{'request.role.adv'}) {
- $showsymb = &Apache::lonenc::check_encrypt($symb);
+ unless ($showsymb =~ m{^/enc/}) {
+ $showsymb = &Apache::lonenc::encrypted($showsymb);
+ }
}
$symblink = '?symb='.$showsymb;
}
if ($encrypturl =~ /^yes$/i && !$env{'request.role.adv'}) {
- $showurl = $baseurl;
+ unless ($showurl =~ m{^/enc/}) {
+ $showurl = &Apache::lonenc::encrypted($showurl);
+ }
}
$r->print(&Apache::lonhtmlcommon::row_title(&mt('Refers to'))
.'<a href="'.$showurl.$symblink.'">'.$restitle.'</a>'
More information about the LON-CAPA-cvs
mailing list