version 1.49.6.7, 2021/03/04 01:42:20
|
version 1.49.6.8, 2021/12/14 02:44:05
|
Line 64 sub real_handler {
|
Line 64 sub real_handler {
|
|
|
my $reinitresult; |
my $reinitresult; |
|
|
|
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})) { |
|
&grades_blocked($r,$blocktext,$showPoints); |
|
return OK; |
|
} |
|
} |
|
} |
|
|
unless ($cangrade) { |
unless ($cangrade) { |
# Check for critical messages and redirect if present. |
# Check for critical messages and redirect if present. |
my ($redirect,$url) = &Apache::loncommon::critical_redirect(300); |
my ($redirect,$url) = &Apache::loncommon::critical_redirect(300); |
Line 188 ENDCLOSE
|
Line 207 ENDCLOSE
|
return OK; |
return OK; |
} |
} |
|
|
|
sub grades_blocked { |
|
my ($r,$blocktext,$caller) = @_; |
|
my $title = 'Points Display'; |
|
if ($caller eq 'spreadsheet') { |
|
$title = 'Spreadsheet'; |
|
} elsif ($env{'course.'.$env{'request.course.id'}.'.grading'} ne 'standard') { |
|
$title = 'Completed Problems Display'; |
|
} |
|
my $brcrum = [{href=>"/adm/quickgrades",text => $title}]; |
|
&Apache::lonhtmlcommon::clear_breadcrumbs(); |
|
&Apache::lonhtmlcommon::add_breadcrumb({href=>'/adm/quickgrades', |
|
text=> $title}); |
|
my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs($title); |
|
&Apache::loncommon::content_type($r,'text/html'); |
|
&Apache::loncommon::no_cache($r); |
|
$r->send_http_header; |
|
$r->print(&Apache::loncommon::start_page($title). |
|
$breadcrumbs. |
|
$blocktext. |
|
&Apache::loncommon::end_page()); |
|
return; |
|
} |
|
|
# |
# |
# Go through the complete course and collect data |
# Go through the complete course and collect data |
# |
# |