version 1.61.6.2, 2013/08/09 23:05:18
|
version 1.61.6.3, 2021/12/14 12:59:21
|
Line 241 sub handler {
|
Line 241 sub handler {
|
} |
} |
|
|
# |
# |
|
# Check if display of course gradebook is blocked |
|
# |
|
|
|
if ($env{'request.course.id'}) { |
|
my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
|
my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; |
|
my $clientip = &Apache::lonnet::get_requestor_ip($r); |
|
my ($blocked,$blocktext) = |
|
&Apache::loncommon::blocking_status('grades',$clientip,$cnum,$cdom); |
|
if ($blocked) { |
|
my $checkrole = "cm./$cdom/$cnum"; |
|
if ($env{'request.course.sec'} ne '') { |
|
$checkrole .= "/$env{'request.course.sec'}"; |
|
} |
|
unless ((&Apache::lonnet::allowed('evb',undef,undef,$checkrole)) && |
|
($env{'request.role'} !~ m{^st\./$cdom/$cnum})) { |
|
&Apache::lonquickgrades::grades_blocked($r,$blocktext,'spreadsheet'); |
|
return OK; |
|
} |
|
} |
|
} |
|
|
|
# |
# Do not allow users without vgr or mgr priv to continue unless |
# Do not allow users without vgr or mgr priv to continue unless |
# grading type is set to spreadsheet. |
# grading type is set to spreadsheet. |
# |
# |