[LON-CAPA-cvs] cvs: loncom /interface londocs.pm
raeburn
raeburn at source.lon-capa.org
Thu Mar 23 12:45:50 EDT 2023
raeburn Thu Mar 23 16:45:50 2023 EDT
Modified files:
/loncom/interface londocs.pm
Log:
- Re-instate pre-rev 1.680 functionality in Course Editor whereby the message:
"re-initialize course to access" is displayed (instead of a link) for any
resource with an unverifiable symb, after regression in rev. 1.680.
Index: loncom/interface/londocs.pm
diff -u loncom/interface/londocs.pm:1.695 loncom/interface/londocs.pm:1.696
--- loncom/interface/londocs.pm:1.695 Sat Mar 11 21:58:18 2023
+++ loncom/interface/londocs.pm Thu Mar 23 16:45:50 2023
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.695 2023/03/11 21:58:18 raeburn Exp $
+# $Id: londocs.pm,v 1.696 2023/03/23 16:45:50 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -4300,7 +4300,7 @@
$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)) {
@@ -4320,7 +4320,7 @@
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 {
@@ -4335,7 +4335,8 @@
$url = &Apache::lonnet::clutter($url);
}
}
- $shownurl = $url;
+ } else {
+ $url = '';
}
unless ($env{'request.role.adv'}) {
if ((&LONCAPA::map::getparameter($orderidx,'parameter_hiddenresource'))[0]=~/^yes$/i) {
@@ -4346,8 +4347,8 @@
$hiddenres = 1;
}
}
- if ($url ne '') {
- $url = $shownurl.(($shownurl=~/\?/)?'&':'?').'symb='.&escape($shownsymb);
+ if (($url ne '') && ($shownsymb ne '')) {
+ $url .= (($url=~/\?/)?'&':'?').'symb='.&escape($shownsymb);
}
}
} elsif ($supplementalflag) {
More information about the LON-CAPA-cvs
mailing list