[LON-CAPA-cvs] cvs: loncom /lonnet/perl lonnet.pm
raeburn
raeburn at source.lon-capa.org
Sun Nov 7 22:02:14 EST 2021
raeburn Mon Nov 8 03:02:14 2021 EDT
Modified files:
/loncom/lonnet/perl lonnet.pm
Log:
- Use correct format for 'user.priv...' key in %env in check for 'evb' priv
Index: loncom/lonnet/perl/lonnet.pm
diff -u loncom/lonnet/perl/lonnet.pm:1.1469 loncom/lonnet/perl/lonnet.pm:1.1470
--- loncom/lonnet/perl/lonnet.pm:1.1469 Tue Nov 2 20:46:56 2021
+++ loncom/lonnet/perl/lonnet.pm Mon Nov 8 03:02:14 2021
@@ -1,7 +1,7 @@
# The LearningOnline Network
# TCP networking package
#
-# $Id: lonnet.pm,v 1.1469 2021/11/02 20:46:56 raeburn Exp $
+# $Id: lonnet.pm,v 1.1470 2021/11/08 03:02:14 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -8855,7 +8855,11 @@
my ($blocks) = @_;
my %blockers = ();
return %blockers unless ($env{'request.course.id'});
- return %blockers if ($env{'user.priv.'.$env{'request.role'}} =~/evb\&([^\:]*)/);
+ my $courseurl = &courseid_to_courseurl($env{'request.course.id'});
+ if ($env{'request.course.sec'}) {
+ $courseurl .= '/'.$env{'request.course.sec'};
+ }
+ return %blockers if ($env{'user.priv.'.$env{'request.role'}.'.'.$courseurl} =~/evb\&([^\:]*)/);
my %commblocks;
if (ref($blocks) eq 'HASH') {
%commblocks = %{$blocks};
@@ -8979,8 +8983,12 @@
my @blockers;
return unless ($env{'request.course.id'});
return unless ($priv eq 'bre');
- return if ($env{'user.priv.'.$env{'request.role'}} =~/evb\&([^\:]*)/);
return if ($env{'request.state'} eq 'construct');
+ my $courseurl = &courseid_to_courseurl($env{'request.course.id'});
+ if ($env{'request.course.sec'}) {
+ $courseurl .= '/'.$env{'request.course.sec'};
+ }
+ return if ($env{'user.priv.'.$env{'request.role'}.'.'.$courseurl} =~/evb\&([^\:]*)/);
my %blockinfo;
if (ref($blocks) eq 'HASH') {
%blockinfo = &get_commblock_resources($blocks);
More information about the LON-CAPA-cvs
mailing list