--- rat/lonsequence.pm 2000/10/17 10:36:17 1.3 +++ rat/lonsequence.pm 2000/10/17 17:06:15 1.4 @@ -64,24 +64,36 @@ sub handler { if (tie(%bighash,'GDBM_File',$ENV{'request.course.fn'}.'.db', &GDBM_READER,0640)) { my $disid=''; + my $whatend=''; if ($direction eq 'back') { $disid=$bighash{'map_finish_'.$requrl}; + $whatend='End'; } else { $disid=$bighash{'map_start_'.$requrl}; + $whatend='Beginning'; } my $disurl=''; + my $dismapid=''; if ($disid) { $disurl=$bighash{'src_'.$disid}; + $dismapid=(split(/\./,$disid))[1]; } my $symb=''; + my $sequencetitle=''; unless($disurl) { if ($symb=&Apache::lonnet::symbread()) { + my ($mapurl,$mapid)=split(/\_\_\_/,$symb); + $sequencetitle=$bighash{'title_'. + $bighash{'map_pc_/res/'.$mapurl}.'.'. + $mapid}; } } # --------------------------------------- Untie hash, make sure to come by here untie(%bighash); if ($disurl) { # -------------------------------------------------- Has first or last resource + &Apache::lonnet::symblist($requrl,$disurl => $dismapid, + 'last_known' => &Apache::lonnet::declutter($disurl)); $r->content_type('text/html'); $r->header_out(Location => 'http://'.$ENV{'HTTP_HOST'}.$disurl); return REDIRECT; @@ -93,7 +105,9 @@ sub handler { $r->content_type('text/html'); $r->send_http_header; $r->print(< + +

$whatend of

+

$sequencetitle

ENDSYMB return OK