[LON-CAPA-cvs] cvs: rat / lonpageflip.pm

www lon-capa-cvs@mail.lon-capa.org
Fri, 06 Dec 2002 14:06:53 -0000


www		Fri Dec  6 09:06:53 2002 EDT

  Modified files:              
    /rat	lonpageflip.pm 
  Log:
  Hopefully fixes Bug #1026 - climbing up more than one nested map level.
  
  
Index: rat/lonpageflip.pm
diff -u rat/lonpageflip.pm:1.32 rat/lonpageflip.pm:1.33
--- rat/lonpageflip.pm:1.32	Mon Dec  2 09:39:02 2002
+++ rat/lonpageflip.pm	Fri Dec  6 09:06:53 2002
@@ -2,7 +2,7 @@
 #
 # Page flip handler
 #
-# $Id: lonpageflip.pm,v 1.32 2002/12/02 14:39:02 bowersj2 Exp $
+# $Id: lonpageflip.pm,v 1.33 2002/12/06 14:06:53 www Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -83,8 +83,8 @@
               my $posnext='';
               if ($direction eq 'forward') {
 # --------------------------------------------------------------------- Forward
-                  if ($hash{'type_'.$rid} eq 'finish') {
-	             $rid=$hash{'ids_'.&Apache::lonnet::clutter($mapurl)}; 
+                  while ($hash{'type_'.$rid} eq 'finish') {
+	             $rid=$hash{'ids_'.$hash{'map_id_'.(split(/\./,$rid))[0]}};
                   }
                   map {
                       my $thiscond=
@@ -119,9 +119,9 @@
                   }
               } elsif ($direction eq 'back') {
 # ------------------------------------------------------------------- Backwards
-                  if ($hash{'type_'.$rid} eq 'start') {
-	             $rid=$hash{'ids_'.&Apache::lonnet::clutter($mapurl)};
-                  }
+                 while ($hash{'type_'.$rid} eq 'start') {
+	             $rid=$hash{'ids_'.$hash{'map_id_'.(split(/\./,$rid))[0]}};
+		 }
                   map {
                       my $thiscond=
       &Apache::lonnet::directcondval($hash{'condid_'.$hash{'undercond_'.$_}});