version 1.5, 2020/09/22 11:23:08
|
version 1.8, 2024/02/11 20:32:42
|
Line 261 sub checkonthis {
|
Line 261 sub checkonthis {
|
} |
} |
my $href=$url; |
my $href=$url; |
if ($hash{'encrypted_'.$id} && !$env{'request.role.adv'}) { |
if ($hash{'encrypted_'.$id} && !$env{'request.role.adv'}) { |
$href=&Apache::lonenc::encrypted($href) |
$href=&Apache::lonenc::encrypted($href); |
.'?symb='.&Apache::lonenc::encrypted($symb); |
if ($href =~ /\.sequence$/) { |
|
$href .= '?navmap=1'; |
|
} else { |
|
$href .= '?symb='.&Apache::lonenc::encrypted($symb); |
|
} |
} else { |
} else { |
$href.='?symb='.&escape($symb); |
if ($href =~ /\.sequence$/) { |
|
$href .= '?navmap=1'; |
|
} else { |
|
$href .= '?symb='.&escape($symb); |
|
} |
} |
} |
$r->print('<a href="'.$href.'" target="cat">'.($title?$title:$url). |
$r->print('<a href="'.$href.'" target="cat">'.($title?$title:$url). |
'</a><br />'); |
'</a><br />'); |
Line 329 sub handler {
|
Line 337 sub handler {
|
} |
} |
$r->print(&Apache::lonhtmlcommon::breadcrumbs("$crstype Search")); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs("$crstype Search")); |
&Apache::lonnavdisplay::startContentScreen($r,'coursesearch'); |
&Apache::lonnavdisplay::startContentScreen($r,'coursesearch'); |
if ($env{'form.phase'} eq 'results') { |
my $cdom = $env{'course.'.$env{'request.course.id'}.'.domain'}; |
&course_search($r); |
my $cnum = $env{'course.'.$env{'request.course.id'}.'.num'}; |
|
my $clientip = &Apache::lonnet::get_requestor_ip($r); |
|
my ($blocked,$blocktext) = |
|
&Apache::loncommon::blocking_status('search',$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); |
|
} elsif ($env{'form.phase'} eq 'results') { |
|
&course_search($r); |
} else { |
} else { |
$r->print(&menu()); |
$r->print(&menu()); |
} |
} |
&Apache::lonnavdisplay::endContentScreen($r); |
&Apache::lonnavdisplay::endContentScreen($r); |
$r->print(&Apache::loncommon::end_page()); |
$r->print(&Apache::loncommon::end_page()); |