Diff for /rat/lonpageflip.pm between versions 1.41 and 1.48

version 1.41, 2003/09/09 18:46:28 version 1.48, 2004/10/18 22:24:00
Line 120  sub move { Line 120  sub move {
       $hash{'map_type_'.$hash{'map_pc_'.$hash{'src_'.$next}}} eq 'sequence') {        $hash{'map_type_'.$hash{'map_pc_'.$hash{'src_'.$next}}} eq 'sequence') {
   $mapurl=$hash{'src_'.$next};    $mapurl=$hash{'src_'.$next};
   $next=$hash{'map_start_'.$hash{'src_'.$next}};    $next=$hash{'map_start_'.$hash{'src_'.$next}};
                        } elsif (
   # This jumps back up from an empty sequence, to a page up one level
                            $hash{'map_type_'.$hash{'map_pc_'.$hash{'src_'.$next}}} eq 'page') {
                            $mapurl=$hash{'map_id_'.(split(/\./,$next))[0]};
                      }                       }
                   } elsif                     } elsif 
                     ((split(/\./,$startoutrid))[0]!=(split(/\./,$next))[0]) {                      ((split(/\./,$startoutrid))[0]!=(split(/\./,$next))[0]) {
Line 156  sub move { Line 160  sub move {
       $hash{'map_type_'.$hash{'map_pc_'.$hash{'src_'.$next}}} eq 'sequence') {        $hash{'map_type_'.$hash{'map_pc_'.$hash{'src_'.$next}}} eq 'sequence') {
   $mapurl=$hash{'src_'.$next};    $mapurl=$hash{'src_'.$next};
   $next=$hash{'map_finish_'.$hash{'src_'.$next}};    $next=$hash{'map_finish_'.$hash{'src_'.$next}};
                      }                        } elsif (
         $hash{'map_type_'.$hash{'map_pc_'.$hash{'src_'.$next}}} eq 'page') {
   # This jumps back up from an empty sequence, to a page up one level
                             $mapurl=$hash{'map_id_'.(split(/\./,$next))[0]};
                         }
                   } elsif                     } elsif 
                     ((split(/\./,$startoutrid))[0]!=(split(/\./,$next))[0]) {                      ((split(/\./,$startoutrid))[0]!=(split(/\./,$next))[0]) {
 # This comes back up from a map (going up one level);  # This comes back up from a map (going up one level);
Line 190  sub handler { Line 198  sub handler {
       $ENV{'form.postdata'}=~/(\w+)\:(.*)/;        $ENV{'form.postdata'}=~/(\w+)\:(.*)/;
       my $direction=$1;        my $direction=$1;
       my $currenturl=$2;        my $currenturl=$2;
         $currenturl=~s/\.\d+\.(\w+)$/\.$1/;
       if ($direction eq 'return') {        if ($direction eq 'return') {
 # -------------------------------------------------------- Return to last known  # -------------------------------------------------------- Return to last known
          my $last;           my $last;
Line 259  sub handler { Line 268  sub handler {
 # -------------------------------------- Do we have one and only one empty URL?  # -------------------------------------- Do we have one and only one empty URL?
               my $safecount=0;                my $safecount=0;
               while (($next) && ($next!~/\,/) &&                 while (($next) && ($next!~/\,/) && 
                      ((!$hash{'src_'.$next}) || ($hash{'randomout_'.$next}))                       ((!$hash{'src_'.$next}) || 
         ($ENV{'request.role.adv'}) && $hash{'randomout_'.$next}))
                      && ($safecount<10000)) {                       && ($safecount<10000)) {
                   ($next,$endupmap)=&move($next,$endupmap,$direction);                    ($next,$endupmap)=&move($next,$endupmap,$direction);
                   $safecount++;                    $safecount++;
Line 388  ENDNONE Line 398  ENDNONE
           }            }
       } else {        } else {
 # ---------------------------------------- No, could not determine where we are  # ---------------------------------------- No, could not determine where we are
          $r->internal_redirect('/adm/ambiguous');    if ( &Apache::lonnet::mod_perl_version() == 2 ) {
         &Apache::lonnet::cleanenv();
     }
     $r->internal_redirect('/adm/ambiguous');
       }        }
   } else {    } else {
 # -------------------------- Class was not initialized or page fliped strangely  # -------------------------- Class was not initialized or page fliped strangely

Removed from v.1.41  
changed lines
  Added in v.1.48


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