version 1.4, 2024/02/12 04:04:06
|
version 1.5, 2024/12/31 19:28:29
|
Line 171 sub handler {
|
Line 171 sub handler {
|
text => "$crstype Index"}); |
text => "$crstype Index"}); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs("$crstype Index")); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs("$crstype Index")); |
&Apache::lonnavdisplay::startContentScreen($r,'courseindex'); |
&Apache::lonnavdisplay::startContentScreen($r,'courseindex'); |
&course_index($r); |
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('index',$clientip,$cnum,$cdom); |
|
if ($blocked) { |
|
my $checkrole = "cm./$cdom/$cnum"; |
|
if ($env{'request.course.sec'} ne '') { |
|
$checkrole .= "/$env{'request.course.sec'}"; |
|
} |
|
if ((&Apache::lonnet::allowed('evb',undef,undef,$checkrole)) && |
|
($env{'request.role'} !~ m{^st\./$cdom/$cnum})) { |
|
undef($blocked); |
|
} |
|
} |
|
if ($blocked) { |
|
$r->print($blocktext); |
|
} else { |
|
&course_index($r); |
|
} |
&Apache::lonnavdisplay::endContentScreen($r); |
&Apache::lonnavdisplay::endContentScreen($r); |
$r->print(&Apache::loncommon::end_page()); |
$r->print(&Apache::loncommon::end_page()); |
return OK; |
return OK; |