Diff for /rat/lonsequence.pm between versions 1.19 and 1.23

version 1.19, 2004/08/29 16:30:53 version 1.23, 2005/03/01 00:22:57
Line 28 Line 28
 #  #
 # (Handler to resolve ambiguous file locations  # (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;  package Apache::lonsequence;
   
Line 259  sub handler { Line 252  sub handler {
        my $direction='';         my $direction='';
        my $prevmap='';         my $prevmap='';
        if ($last) {         if ($last) {
   ($prevmap,$direction)=(split(/\_\_\_/,$last));     ($prevmap,undef,$direction)=&Apache::lonnet::decode_symb($last);
        }         }
 # ------------------------------------------------------------- Tie big db file  # ------------------------------------------------------------- Tie big db file
        if (tie(%bighash,'GDBM_File',$ENV{'request.course.fn'}.'.db',         if (tie(%bighash,'GDBM_File',$ENV{'request.course.fn'}.'.db',
Line 306  sub handler { Line 299  sub handler {
 # now either disurl is set (going to first page), or we need another display  # now either disurl is set (going to first page), or we need another display
    if ($disurl) {     if ($disurl) {
 # -------------------------------------------------- Has first or last resource  # -------------------------------------------------- Has first or last resource
       &Apache::lonnet::symblist($requrl,$disurl => $dismapid,        &Apache::lonnet::symblist($requrl,$disurl => [$disurl,$dismapid],
                    'last_known' => &Apache::lonnet::declutter($disurl));    'last_known' => [$disurl,$dismapid]); 
       &Apache::loncommon::content_type($r,'text/html');        &Apache::loncommon::content_type($r,'text/html');
       $r->header_out(Location => 'http://'.$ENV{'HTTP_HOST'}.$disurl);        $r->header_out(Location => 'http://'.$ENV{'HTTP_HOST'}.$disurl);
       return REDIRECT;        return REDIRECT;
    } else {     } else {
        &Apache::loncommon::content_type($r,'text/html');         &Apache::loncommon::content_type($r,'text/html');
        $r->send_http_header;         $r->send_http_header;
        if ($exitdisid eq '') {         if ($exitdisid eq '' && $arrow_dir ne '') {
            my %lt =&Apache::lonlocal::texthash(             my %lt =&Apache::lonlocal::texthash(
                    'back' => 'beginning',                     'back' => 'beginning',
                    'forward' => 'end',                     'forward' => 'end',
Line 330  sub handler { Line 323  sub handler {
                $warnmsg .= &mt('preceding the current resource were empty').',';                 $warnmsg .= &mt('preceding the current resource were empty').',';
            }             }
            $warnmsg .= &mt('you have now reached the').' '.$lt{$arrow_dir}.' '.&mt('of the course.');             $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(<<ENDNONE);             $r->print(<<ENDNONE);
 <head><title>$lt{'emfo'}</title></head>  <head><title>$lt{'emfo'}</title></head>
 $bodytag  $bodytag

Removed from v.1.19  
changed lines
  Added in v.1.23


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>