--- loncom/interface/londocs.pm 2023/01/19 16:43:49 1.693
+++ loncom/interface/londocs.pm 2023/03/23 16:45:50 1.696
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.693 2023/01/19 16:43:49 raeburn Exp $
+# $Id: londocs.pm,v 1.696 2023/03/23 16:45:50 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1210,6 +1210,8 @@ sub docs_change_log {
my ($title,$url) = split(/\:/,$docslog{$id}{'logentry'}{'parameter_res'},3);
if ($title eq '') {
($title) = ($url =~ m{/([^/]+)$});
+ } elsif ($is_supp) {
+ $title = &Apache::loncommon::parse_supplemental_title($title);
}
$r->print(&LONCAPA::map::qtescape($title).':
');
foreach my $parameter ('randompick','hiddenresource','encrypturl','randomorder','gradable') {
@@ -4298,7 +4300,7 @@ END
$nomodal = 1;
}
}
- my ($checkencrypt,$shownurl);
+ my $checkencrypt;
if (!$env{'request.role.adv'}) {
if (((&LONCAPA::map::getparameter($orderidx,'parameter_encrypturl'))[0]=~/^yes$/i) ||
($isencrypted) || (&Apache::lonnet::EXT('resource.0.encrypturl',$symb) =~ /^yes$/i)) {
@@ -4318,7 +4320,7 @@ END
my $currenc = $env{'request.enc'};
$env{'request.enc'} = 1;
$shownsymb = &Apache::lonenc::encrypted($symb);
- $shownurl = &Apache::lonenc::encrypted($url);
+ my $shownurl = &Apache::lonenc::encrypted($url);
if (&Apache::lonnet::symbverify($symb,$url)) {
$url = $shownurl;
} else {
@@ -4333,7 +4335,8 @@ END
$url = &Apache::lonnet::clutter($url);
}
}
- $shownurl = $url;
+ } else {
+ $url = '';
}
unless ($env{'request.role.adv'}) {
if ((&LONCAPA::map::getparameter($orderidx,'parameter_hiddenresource'))[0]=~/^yes$/i) {
@@ -4344,8 +4347,8 @@ END
$hiddenres = 1;
}
}
- if ($url ne '') {
- $url = $shownurl.(($shownurl=~/\?/)?'&':'?').'symb='.&escape($shownsymb);
+ if (($url ne '') && ($shownsymb ne '')) {
+ $url .= (($url=~/\?/)?'&':'?').'symb='.&escape($shownsymb);
}
}
} elsif ($supplementalflag) {
@@ -4650,7 +4653,7 @@ $form_end;
my ($enctext,$hidtext,$formhidden,$formurlhidden);
if ((&LONCAPA::map::getparameter($orderidx,'parameter_hiddenresource'))[0]=~/^yes$/i) {
$hidtext = ' checked="checked"';
- if (($ishash) && (ref($filtersref->{'randomorder'}) eq 'ARRAY')) {
+ if (($ishash) && (ref($filtersref->{'hiddenresource'}) eq 'ARRAY')) {
push(@{$filtersref->{'hiddenresource'}},$orderidx);
}
}