--- loncom/interface/lonsearchcourse.pm 2021/11/30 15:55:37 1.7
+++ loncom/interface/lonsearchcourse.pm 2024/07/04 17:30:17 1.8.2.1
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Search Course
#
-# $Id: lonsearchcourse.pm,v 1.7 2021/11/30 15:55:37 raeburn Exp $
+# $Id: lonsearchcourse.pm,v 1.8.2.1 2024/07/04 17:30:17 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -136,11 +136,12 @@ sub course_search {
foreach (sort(keys(%hash))) {
if ($c->aborted()) { last; }
if (($_=~/^src\_(.+)$/)) {
- if ($hash{'randomout_'.$1} & !$env{'request.role.adv'}) {
+ my $rid = $1;
+ if ($hash{'randomout_'.$rid} & !$env{'request.role.adv'}) {
next;
}
- my $symb=&make_symb($1);
- &checkonthis($r,$1,$hash{$_},0,&Apache::lonnet::gettitle($symb),
+ my $symb=&make_symb($rid);
+ &checkonthis($r,$rid,$hash{$_},0,&Apache::lonnet::gettitle($symb),
$fulltext,$symb,@allwords);
}
}
@@ -261,10 +262,18 @@ sub checkonthis {
}
my $href=$url;
if ($hash{'encrypted_'.$id} && !$env{'request.role.adv'}) {
- $href=&Apache::lonenc::encrypted($href)
- .'?symb='.&Apache::lonenc::encrypted($symb);
+ $href=&Apache::lonenc::encrypted($href);
+ if ($href =~ /\.sequence$/) {
+ $href .= '?navmap=1';
+ } else {
+ $href .= '?symb='.&Apache::lonenc::encrypted($symb);
+ }
} else {
- $href.='?symb='.&escape($symb);
+ if ($href =~ /\.sequence$/) {
+ $href .= '?navmap=1';
+ } else {
+ $href .= '?symb='.&escape($symb);
+ }
}
$r->print(''.($title?$title:$url).
'
');