--- rat/lonsequence.pm 2004/08/29 16:30:53 1.19 +++ rat/lonsequence.pm 2005/03/01 00:22:57 1.23 @@ -2,7 +2,7 @@ # # Sequence Handler # -# $Id: lonsequence.pm,v 1.19 2004/08/29 16:30:53 raeburn Exp $ +# $Id: lonsequence.pm,v 1.23 2005/03/01 00:22:57 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -28,13 +28,6 @@ # # (Handler to resolve ambiguous file locations # -# (TeX Content Handler -# -# 05/29/00,05/30,10/11 Gerd Kortemeyer) -# -# 10/11,10/12 Gerd Kortemeyer) -# -# 10/16 Gerd Kortemeyer package Apache::lonsequence; @@ -259,7 +252,7 @@ sub handler { my $direction=''; my $prevmap=''; if ($last) { - ($prevmap,$direction)=(split(/\_\_\_/,$last)); + ($prevmap,undef,$direction)=&Apache::lonnet::decode_symb($last); } # ------------------------------------------------------------- Tie big db file if (tie(%bighash,'GDBM_File',$ENV{'request.course.fn'}.'.db', @@ -306,15 +299,15 @@ sub handler { # now either disurl is set (going to first page), or we need another display if ($disurl) { # -------------------------------------------------- Has first or last resource - &Apache::lonnet::symblist($requrl,$disurl => $dismapid, - 'last_known' => &Apache::lonnet::declutter($disurl)); + &Apache::lonnet::symblist($requrl,$disurl => [$disurl,$dismapid], + 'last_known' => [$disurl,$dismapid]); &Apache::loncommon::content_type($r,'text/html'); $r->header_out(Location => 'http://'.$ENV{'HTTP_HOST'}.$disurl); return REDIRECT; } else { &Apache::loncommon::content_type($r,'text/html'); $r->send_http_header; - if ($exitdisid eq '') { + if ($exitdisid eq '' && $arrow_dir ne '') { my %lt =&Apache::lonlocal::texthash( 'back' => 'beginning', 'forward' => 'end', @@ -330,7 +323,7 @@ sub handler { $warnmsg .= &mt('preceding the current resource were empty').','; } $warnmsg .= &mt('you have now reached the').' '.$lt{$arrow_dir}.' '.&mt('of the course.'); - my $bodytag=&Apache::loncommon::bodytag(&mt('emfo')); + my $bodytag=&Apache::loncommon::bodytag('Empty Folder/Sequence'); $r->print(<$lt{'emfo'} $bodytag