--- rat/lonpageflip.pm 2002/04/11 19:21:52 1.22 +++ rat/lonpageflip.pm 2002/04/12 13:47:21 1.23 @@ -2,7 +2,7 @@ # # Page flip handler # -# $Id: lonpageflip.pm,v 1.22 2002/04/11 19:21:52 www Exp $ +# $Id: lonpageflip.pm,v 1.23 2002/04/12 13:47:21 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -65,6 +65,7 @@ sub addrid { sub move { my ($rid,$mapurl,$direction)=@_; + my $startoutrid=$rid; my $next=''; @@ -95,11 +96,16 @@ sub move { } } split(/\,/,$posnext); if ($hash{'is_map_'.$next}) { +# This jumps to the beginning of a new map (going down level) if ( $hash{'map_type_'.$hash{'map_pc_'.$hash{'src_'.$next}}} eq 'sequence') { $mapurl=$hash{'src_'.$next}; $next=$hash{'map_start_'.$hash{'src_'.$next}}; } + } elsif + ((split(/\./,$startoutrid))[0]!=(split(/\./,$next))[0]) { +# This comes up from a map (coming up one level); + $mapurl=$hash{'map_id_'.(split(/\./,$next))[0]}; } } elsif ($direction eq 'back') { # ------------------------------------------------------------------- Backwards @@ -133,7 +139,6 @@ sub move { } } } - return ($next,$mapurl); } @@ -205,7 +210,8 @@ sub handler { # ------------------------------------------------------------------------- Yes my ($startoutmap,$mapnum,$thisurl)=split(/\_\_\_/,$position); $cachehash{$startoutmap}{$thisurl}=$mapnum; - $cachehash{$startoutmap}{'last_known'}=&Apache::lonnet::declutter($currenturl); + $cachehash{$startoutmap}{'last_known'}= + &Apache::lonnet::declutter($currenturl); # ============================================================ Tie the big hash if (tie(%hash,'GDBM_File',$ENV{'request.course.fn'}.'.db',