--- rat/lonpageflip.pm 2000/11/16 11:58:30 1.13 +++ rat/lonpageflip.pm 2001/01/10 19:51:01 1.14 @@ -11,7 +11,8 @@ # 10/02 Gerd Kortemeyer) # # 10/03,10/05,10/06,10/07,10/09,10/10,10/11,10/16,10/17, -# 11/14,11/16 Gerd Kortemeyer +# 11/14,11/16, +# 10/01/01 Gerd Kortemeyer package Apache::lonpageflip; @@ -110,11 +111,15 @@ sub handler { if (tie(%hash,'GDBM_File',$ENV{'request.course.fn'}.'.db', &GDBM_READER,0640)) { my $rid=$hash{'map_pc_/res/'.$mapurl}.'.'.$mapnum; + my $next=''; my $mincond=1; my $posnext=''; if ($direction eq 'forward') { # --------------------------------------------------------------------- Forward + if ($hash{'type_'.$rid} eq 'finish') { + $rid=$hash{'ids_/res/'.$mapurl}; + } map { my $thiscond= &Apache::lonnet::directcondval($hash{'condid_'.$hash{'undercond_'.$_}}); @@ -134,8 +139,18 @@ sub handler { $hash{'condid_'.$hash{'undercond_'.$linkid}}); } } split(/\,/,$posnext); + if ($hash{'is_map_'.$next}) { + if ( + $hash{'map_type_'.$hash{'map_pc_'.$hash{'src_'.$next}}} eq 'sequence') { + $mapurl=$hash{'src_'.$next}; + $next=$hash{'map_start_'.$hash{'src_'.$next}}; + } + } } elsif ($direction eq 'back') { # ------------------------------------------------------------------- Backwards + if ($hash{'type_'.$rid} eq 'start') { + $rid=$hash{'ids_/res/'.$mapurl}; + } map { my $thiscond= &Apache::lonnet::directcondval($hash{'condid_'.$hash{'undercond_'.$_}}); @@ -155,6 +170,13 @@ sub handler { $hash{'condid_'.$hash{'undercond_'.$linkid}}); } } split(/\,/,$posnext); + if ($hash{'is_map_'.$next}) { + if ( + $hash{'map_type_'.$hash{'map_pc_'.$hash{'src_'.$next}}} eq 'sequence') { + $mapurl=$hash{'src_'.$next}; + $next=$hash{'map_finish_'.$hash{'src_'.$next}}; + } + } } elsif ($direction eq 'up') { # -------------------------------------------------------------------------- Up } elsif ($direction eq 'down') {