[LON-CAPA-cvs] cvs: rat / lonpage.pm
raeburn
raeburn at source.lon-capa.org
Wed Jun 29 13:51:10 EDT 2022
raeburn Wed Jun 29 17:51:10 2022 EDT
Modified files:
/rat lonpage.pm
Log:
- Include symb when checking &Apache::lonnet::allowed() for resources in a
.page to eliminate ambiguity for resources with multiple instances.
Index: rat/lonpage.pm
diff -u rat/lonpage.pm:1.139 rat/lonpage.pm:1.140
--- rat/lonpage.pm:1.139 Tue Nov 10 23:55:32 2020
+++ rat/lonpage.pm Wed Jun 29 17:51:10 2022
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Page Handler
#
-# $Id: lonpage.pm,v 1.139 2020/11/10 23:55:32 raeburn Exp $
+# $Id: lonpage.pm,v 1.140 2022/06/29 17:51:10 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -102,7 +102,9 @@
} else {
$sofar++;
if ($hash{'src_'.$rid}) {
- my $brepriv=&Apache::lonnet::allowed('bre',$hash{'src_'.$rid});
+ my ($mapid,$resid)=split(/\./,$rid);
+ my $symb = &Apache::lonnet::encode_symb($hash{'map_id_'.$mapid},$resid,$hash{'src_'.$rid});
+ my $brepriv=&Apache::lonnet::allowed('bre',$hash{'src_'.$rid},$symb);
if (($brepriv eq '2') || ($brepriv eq 'F')) {
if (defined($rows[$sofar])) {
$rows[$sofar].='&'.$rid;
More information about the LON-CAPA-cvs
mailing list