[LON-CAPA-cvs] cvs: loncom /interface lonquickgrades.pm
raeburn
raeburn at source.lon-capa.org
Wed May 20 12:55:52 EDT 2020
raeburn Wed May 20 16:55:52 2020 EDT
Modified files:
/loncom/interface lonquickgrades.pm
Log:
- Support section-specific roles which have vgr or mgr privs.
Index: loncom/interface/lonquickgrades.pm
diff -u loncom/interface/lonquickgrades.pm:1.114 loncom/interface/lonquickgrades.pm:1.115
--- loncom/interface/lonquickgrades.pm:1.114 Tue Nov 13 03:59:00 2018
+++ loncom/interface/lonquickgrades.pm Wed May 20 16:55:52 2020
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Quick Student Grades Display
#
-# $Id: lonquickgrades.pm,v 1.114 2018/11/13 03:59:00 raeburn Exp $
+# $Id: lonquickgrades.pm,v 1.115 2020/05/20 16:55:52 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -293,9 +293,18 @@
$env{'course.'.$env{'request.course.id'}.'.grading'} eq 'externalnototals';
my $showCategories=
$env{'course.'.$env{'request.course.id'}.'.grading'} eq 'categories';
+
+ my $allowed_to_view = &Apache::lonnet::allowed('vgr',$env{'request.course.id'});
+ if ((!$allowed_to_view) && ($env{'request.course.sec'} ne '')) {
+ $allowed_to_view = &Apache::lonnet::allowed('vgr',
+ "$env{'request.course.id'}/$env{'request.course.sec'}");
+ }
- my $allowed_to_view = &Apache::lonnet::allowed('vgr',$env{'request.course.id'});
- my $allowed_to_edit = &Apache::lonnet::allowed('mgr',$env{'request.course.id'});
+ my $allowed_to_edit = &Apache::lonnet::allowed('mgr',$env{'request.course.id'});
+ if (!$allowed_to_edit) && ($env{'request.course.sec'} ne '')) {
+ $allowed_to_edit = &Apache::lonnet::allowed('mgr',
+ "$env{'request.course.id'}/$env{'request.course.sec'}");
+ }
if ($allowed_to_view) {
my @notes;
More information about the LON-CAPA-cvs
mailing list