--- rat/lonpageflip.pm 2003/03/03 20:24:25 1.36 +++ rat/lonpageflip.pm 2003/03/08 01:39:29 1.37 @@ -2,7 +2,7 @@ # # Page flip handler # -# $Id: lonpageflip.pm,v 1.36 2003/03/03 20:24:25 www Exp $ +# $Id: lonpageflip.pm,v 1.37 2003/03/08 01:39:29 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -185,6 +185,7 @@ sub handler { my $redirecturl=''; my $next=''; my @possibilities=(); + &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},['postdata']); if (($ENV{'form.postdata'})&&($ENV{'request.course.fn'})) { $ENV{'form.postdata'}=~/(\w+)\:(.*)/; my $direction=$1; @@ -200,10 +201,12 @@ sub handler { my $newloc; 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}; + my ($murl,$fn)=split(/\_\_\_/,$last); + my $id; + ($murl,$id,$fn)=split(/\_\_\_/,&Apache::lonnet::symbread($fn)); + $newloc=$hash{'src_'. + $hash{'map_pc_'.&Apache::lonnet::clutter($murl)}.'.'.$id}; + unless ($newloc) { $newloc='/adm/noidea.html'; } untie %hash; } else { $newloc='/adm/noidea.html'; @@ -331,11 +334,12 @@ sub handler { $r->content_type('text/html'); $r->send_http_header; if ($#possibilities>0) { + my $bodytag= + &Apache::loncommon::bodytag('Multiple Resources'); $r->print(<Choose Next Location - -

LON-CAPA

-There are several possibilities of where to go next. +$bodytag +

There are several possibilities of where to go next

Please click on the the resource you intend to access:

@@ -354,13 +358,17 @@ ENDSTART $r->print(''); return OK; } else { + my $bodytag=&Apache::loncommon::bodytag('No Resource'); $r->print(<Choose Next Location - - -

Sorry!

-

Next resource could not be identified.

-

You probably are at the beginning or the end of the course.

+No Resource +$bodytag +

Next resource could not be identified.

+

You probably are at the beginning or the end of the +course.

+ ENDNONE