--- rat/lonpageflip.pm 2003/01/14 18:47:50 1.34 +++ rat/lonpageflip.pm 2003/03/03 20:24:25 1.36 @@ -2,7 +2,7 @@ # # Page flip handler # -# $Id: lonpageflip.pm,v 1.34 2003/01/14 18:47:50 www Exp $ +# $Id: lonpageflip.pm,v 1.36 2003/03/03 20:24:25 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -198,8 +198,13 @@ sub handler { untie(%hash); } my $newloc; - if ($last) { - $newloc=&Apache::lonnet::clutter((split(/\_\_\_/,$last))[1]); + if (($last) && (tie(%hash,'GDBM_File',$ENV{'request.course.fn'}.'.db', + &GDBM_READER(),0640))) { + my ($murl,$mid,$fn)=split(/\_\_\_/,$last); + $newloc=$hash{'src_'. + $hash{'map_pc_'.&Apache::lonnet::clutter($murl)}. + '.'.$mid}; + untie %hash; } else { $newloc='/adm/noidea.html'; } @@ -211,7 +216,10 @@ sub handler { } $currenturl=~s/^http\:\/\///; $currenturl=~s/^[^\/]+//; - unless ($currenturl=~/^\/(res|adm\/wrapper|public|adm\/coursedocs)\//) { +# +# Is the current URL on the map? If not, start with last known URL +# + unless (&Apache::lonnet::is_on_map($currenturl)) { my $last; if (tie(%hash,'GDBM_File',$ENV{'request.course.fn'}.'_symb.db', &GDBM_READER(),0640)) {