Diff for /rat/lonpageflip.pm between versions 1.55 and 1.56

version 1.55, 2005/08/02 21:15:52 version 1.56, 2005/08/31 07:38:29
Line 73  sub fullmove { Line 73  sub fullmove {
   
 sub hash_src {  sub hash_src {
     my ($id)=@_;      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}) {      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 {  sub move {
Line 209  sub handler { Line 213  sub handler {
   my %cachehash=();     my %cachehash=(); 
   my $multichoice=0;    my $multichoice=0;
   my %multichoicehash=();    my %multichoicehash=();
   my $redirecturl='';    my ($redirecturl,$redirectsymb);
   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 328  sub handler { Line 332  sub handler {
                   @possibilities=split(/\,/,$next);                    @possibilities=split(/\,/,$next);
                   if ($#possibilities==0) {                    if ($#possibilities==0) {
 # ---------------------------------------------- Only one possibility, redirect  # ---------------------------------------------- Only one possibility, redirect
               $redirecturl=&hash_src($next);                ($redirecturl,$redirectsymb)=&hash_src($next);
                       $cachehash{$endupmap}{$redirecturl}=                        $cachehash{$endupmap}{$redirecturl}=
   [$redirecturl,(split(/\./,$next))[1]];    [$redirecturl,(split(/\./,$next))[1]];
                   } else {                    } else {
Line 382  sub handler { Line 386  sub handler {
                 if (($what[0] ne 'con_lost') &&                   if (($what[0] ne 'con_lost') && 
                             ($what[0]!~/^error\:/)) {                              ($what[0]!~/^error\:/)) {
                    $redirecturl='/adm/email?critical=display';                     $redirecturl='/adm/email?critical=display';
      $redirectsymb='';
                         }                          }
                      }                       }
                      &Apache::lonnet::appenv('user.criticalcheck.time'=>time);                       &Apache::lonnet::appenv('user.criticalcheck.time'=>time);
   }    }
   
   &Apache::loncommon::content_type($r,'text/html');    &Apache::loncommon::content_type($r,'text/html');
                   $r->header_out(Location =>     my $url='http://'.$ENV{'HTTP_HOST'}.$redirecturl;
                                 'http://'.$ENV{'HTTP_HOST'}.$redirecturl);    if ($redirectsymb ne '') { $url.='?symb='.$redirectsymb; }
                     $r->header_out(Location => $url);
                   return REDIRECT;                    return REDIRECT;
       } else {        } else {
 # --------------------------------------------------------- There was a problem  # --------------------------------------------------------- There was a problem

Removed from v.1.55  
changed lines
  Added in v.1.56


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>