version 1.667, 2020/03/01 15:39:17
|
version 1.668, 2020/03/03 01:16:35
|
Line 4157 END
|
Line 4157 END
|
my ($editlink,$extresform,$anchor,$hiddenres,$nomodal); |
my ($editlink,$extresform,$anchor,$hiddenres,$nomodal); |
my $orig_url = $url; |
my $orig_url = $url; |
$orig_url=~s{http(:|:)//https(:|:)//}{https$2//}; |
$orig_url=~s{http(:|:)//https(:|:)//}{https$2//}; |
$url=~s{^http(|s)(:|:)//}{/adm/wrapper/ext/}; |
if ($container eq 'page') { |
|
$url=~s{^http(|s)(:|:)//}{/ext/}; |
|
} else { |
|
$url=~s{^http(|s)(:|:)//}{/adm/wrapper/ext/}; |
|
} |
if (!$supplementalflag && $residx && $symb) { |
if (!$supplementalflag && $residx && $symb) { |
if ((!$isfolder) && (!$ispage)) { |
if ((!$isfolder) && (!$ispage)) { |
(undef,undef,$url)=&Apache::lonnet::decode_symb($symb); |
(undef,undef,$url)=&Apache::lonnet::decode_symb($symb); |
$url=&Apache::lonnet::clutter($url); |
if (($url =~ m{^ext/}) && ($container eq 'page')) { |
|
$url=&Apache::lonnet::clutter_with_no_wrapper($url); |
|
} else { |
|
$url=&Apache::lonnet::clutter($url); |
|
} |
if ($url=~/^\/*uploaded\//) { |
if ($url=~/^\/*uploaded\//) { |
$url=~/\.(\w+)$/; |
$url=~/\.(\w+)$/; |
my $embstyle=&Apache::loncommon::fileembstyle($1); |
my $embstyle=&Apache::loncommon::fileembstyle($1); |
Line 4175 END
|
Line 4183 END
|
} elsif ($url=~m{^(|/adm/wrapper)/ext/([^#]+)}) { |
} elsif ($url=~m{^(|/adm/wrapper)/ext/([^#]+)}) { |
my $wrapped = $1; |
my $wrapped = $1; |
my $exturl = $2; |
my $exturl = $2; |
if ($wrapped eq '') { |
if (($wrapped eq '') && ($container ne 'page')) { |
$url='/adm/wrapper'.$url; |
$url='/adm/wrapper'.$url; |
} |
} |
if (($ENV{'SERVER_PORT'} == 443) && ($exturl !~ /^https:/)) { |
if (($ENV{'SERVER_PORT'} == 443) && ($exturl !~ /^https:/)) { |
Line 4201 END
|
Line 4209 END
|
my $escan = &escape('#'); |
my $escan = &escape('#'); |
$shownsymb =~ s/^([^\#]+)#([^\#]+)$/$1$escan$2/; |
$shownsymb =~ s/^([^\#]+)#([^\#]+)$/$1$escan$2/; |
} |
} |
|
if ($container eq 'page') { |
|
$url = &Apache::lonnet::clutter($url); |
|
} |
} |
} |
unless ($env{'request.role.adv'}) { |
unless ($env{'request.role.adv'}) { |
if ((&LONCAPA::map::getparameter($orderidx,'parameter_hiddenresource'))[0]=~/^yes$/i) { |
if ((&LONCAPA::map::getparameter($orderidx,'parameter_hiddenresource'))[0]=~/^yes$/i) { |