--- rat/lonpageflip.pm 2005/03/01 00:22:57 1.52 +++ rat/lonpageflip.pm 2005/11/15 18:39:45 1.60 @@ -2,7 +2,7 @@ # # Page flip handler # -# $Id: lonpageflip.pm,v 1.52 2005/03/01 00:22:57 albertel Exp $ +# $Id: lonpageflip.pm,v 1.60 2005/11/15 18:39:45 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -31,7 +31,7 @@ package Apache::lonpageflip; use strict; use Apache::Constants qw(:common :http REDIRECT); -use Apache::lonnet(); +use Apache::lonnet; use HTML::TokeParser; use GDBM_File; @@ -63,7 +63,7 @@ sub addrid { sub fullmove { my ($rid,$mapurl,$direction)=@_; - if (tie(%hash,'GDBM_File',$ENV{'request.course.fn'}.'.db', + if (tie(%hash,'GDBM_File',$env{'request.course.fn'}.'.db', &GDBM_READER(),0640)) { ($rid,$mapurl)=&move($rid,$mapurl,$direction); untie(%hash); @@ -73,10 +73,14 @@ sub fullmove { sub hash_src { my ($id)=@_; + my ($mapid,$resid)=split(/\./,$id); + my $symb=&Apache::lonnet::encode_symb($hash{'map_id_'.$mapid}, + $resid,$hash{'src_'.$id}); if ($hash{'encrypted_'.$id}) { - return &Apache::lonenc::encrypted($hash{'src_'.$id}); + return (&Apache::lonenc::encrypted($hash{'src_'.$id}), + &Apache::lonenc::encrypted($symb)); } - return $hash{'src_'.$id}; + return ($hash{'src_'.$id},$symb); } sub move { @@ -171,6 +175,28 @@ sub move { return ($next,$mapurl); } +sub navlaunch { + my ($r)=@_; + &Apache::loncommon::content_type($r,'text/html'); + &Apache::loncommon::no_cache($r); + $r->send_http_header; + my $html=&Apache::lonxml::xmlbegin(); + $r->print("$html
\n"); + $r->print(''. + &Apache::loncommon::bodytag('Launched')); + $r->print(<