--- rat/lonpageflip.pm 2005/08/02 21:15:52 1.55 +++ rat/lonpageflip.pm 2005/08/31 07:38:29 1.56 @@ -2,7 +2,7 @@ # # Page flip handler # -# $Id: lonpageflip.pm,v 1.55 2005/08/02 21:15:52 albertel Exp $ +# $Id: lonpageflip.pm,v 1.56 2005/08/31 07:38:29 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -73,10 +73,14 @@ sub fullmove { sub hash_src { my ($id)=@_; + my ($mapid,$resid)=split(/\./,$id); + my $symb=&Apache::lonnet::encode_symb($hash{'map_id_'.$mapid}, + $resid,$hash{'src_'.$id}); if ($hash{'encrypted_'.$id}) { - return &Apache::lonenc::encrypted($hash{'src_'.$id}); + return (&Apache::lonenc::encrypted($hash{'src_'.$id}), + &Apache::lonenc::encrypted($symb)); } - return $hash{'src_'.$id}; + return ($hash{'src_'.$id},$symb); } sub move { @@ -209,7 +213,7 @@ sub handler { my %cachehash=(); my $multichoice=0; my %multichoicehash=(); - my $redirecturl=''; + my ($redirecturl,$redirectsymb); my $next=''; my @possibilities=(); &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['postdata']); @@ -328,7 +332,7 @@ sub handler { @possibilities=split(/\,/,$next); if ($#possibilities==0) { # ---------------------------------------------- Only one possibility, redirect - $redirecturl=&hash_src($next); + ($redirecturl,$redirectsymb)=&hash_src($next); $cachehash{$endupmap}{$redirecturl}= [$redirecturl,(split(/\./,$next))[1]]; } else { @@ -382,14 +386,16 @@ sub handler { if (($what[0] ne 'con_lost') && ($what[0]!~/^error\:/)) { $redirecturl='/adm/email?critical=display'; + $redirectsymb=''; } } &Apache::lonnet::appenv('user.criticalcheck.time'=>time); } &Apache::loncommon::content_type($r,'text/html'); - $r->header_out(Location => - 'http://'.$ENV{'HTTP_HOST'}.$redirecturl); + my $url='http://'.$ENV{'HTTP_HOST'}.$redirecturl; + if ($redirectsymb ne '') { $url.='?symb='.$redirectsymb; } + $r->header_out(Location => $url); return REDIRECT; } else { # --------------------------------------------------------- There was a problem