version 1.80.8.8, 2015/03/23 12:49:10
|
version 1.80.8.9, 2016/08/05 21:48:38
|
Line 83 sub hash_src {
|
Line 83 sub hash_src {
|
my ($mapid,$resid)=split(/\./,$id); |
my ($mapid,$resid)=split(/\./,$id); |
my $symb=&Apache::lonnet::encode_symb($hash{'map_id_'.$mapid}, |
my $symb=&Apache::lonnet::encode_symb($hash{'map_id_'.$mapid}, |
$resid,$hash{'src_'.$id}); |
$resid,$hash{'src_'.$id}); |
|
my $anchor; |
|
if ($hash{'ext_'.$id} eq 'true:') { |
|
if ($hash{'src_'.$id} =~ /(\#.+)$/) { |
|
$anchor = $1; |
|
} |
|
} |
if ($hash{'encrypted_'.$id}) { |
if ($hash{'encrypted_'.$id}) { |
return (&Apache::lonenc::encrypted($hash{'src_'.$id}), |
return (&Apache::lonenc::encrypted($hash{'src_'.$id}), |
&Apache::lonenc::encrypted($symb)); |
&Apache::lonenc::encrypted($symb), |
|
$hash{'encrypted_'.$id},$anchor); |
} |
} |
return ($hash{'src_'.$id},$symb); |
return ($hash{'src_'.$id},$symb,$hash{'encrypted_'.$id},$anchor); |
} |
} |
|
|
sub move { |
sub move { |
Line 264 sub handler {
|
Line 271 sub handler {
|
my %cachehash=(); |
my %cachehash=(); |
my $multichoice=0; |
my $multichoice=0; |
my %multichoicehash=(); |
my %multichoicehash=(); |
my ($redirecturl,$redirectsymb); |
my ($redirecturl,$redirectsymb,$enc,$anchor); |
my $next=''; |
my $next=''; |
my @possibilities=(); |
my @possibilities=(); |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['postdata']); |
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['postdata']); |
Line 404 sub handler {
|
Line 411 sub handler {
|
@possibilities=split(/\,/,$next); |
@possibilities=split(/\,/,$next); |
if ($#possibilities==0) { |
if ($#possibilities==0) { |
# ---------------------------------------------- Only one possibility, redirect |
# ---------------------------------------------- Only one possibility, redirect |
($redirecturl,$redirectsymb)=&hash_src($next); |
($redirecturl,$redirectsymb,$enc,$anchor)=&hash_src($next); |
$cachehash{$endupmap}{$redirecturl}= |
$cachehash{$endupmap}{$redirecturl}= |
[$redirecturl,(split(/\./,$next))[1]]; |
[$redirecturl,(split(/\./,$next))[1]]; |
} else { |
} else { |
Line 453 sub handler {
|
Line 460 sub handler {
|
my ($redirect, $url) = &Apache::loncommon::critical_redirect(300); |
my ($redirect, $url) = &Apache::loncommon::critical_redirect(300); |
unless ($redirect) { |
unless ($redirect) { |
$url=&Apache::lonnet::absolute_url().$redirecturl; |
$url=&Apache::lonnet::absolute_url().$redirecturl; |
|
my $addanchor; |
|
if (($anchor ne '') && (!$enc || $env{'request.role.adv'})) { |
|
$addanchor = 1; |
|
$url =~ s/\#.+$//; |
|
} |
$url = &add_get_param($url, { 'symb' => $redirectsymb}); |
$url = &add_get_param($url, { 'symb' => $redirectsymb}); |
|
if ($addanchor) { |
|
$url .= $anchor; |
|
} |
} |
} |
&Apache::loncommon::content_type($r,'text/html'); |
&Apache::loncommon::content_type($r,'text/html'); |
$r->header_out(Location => $url); |
$r->header_out(Location => $url); |