Diff for /rat/lonpageflip.pm between versions 1.58 and 1.59

version 1.58, 2005/11/09 11:39:00 version 1.59, 2005/11/10 19:16:02
Line 401  sub handler { Line 401  sub handler {
 # --------------------------------------------------------- There was a problem  # --------------------------------------------------------- There was a problem
                   &Apache::loncommon::content_type($r,'text/html');                    &Apache::loncommon::content_type($r,'text/html');
                   $r->send_http_header;                    $r->send_http_header;
     my %lt=&Apache::lonlocal::texthash('title' => 'End of Sequence',
        'explain' =>
        'You have reached the end of the sequence of materials.',
        'back' => 'Go Back',
        'nav' => 'Navigate Course Content',
        'wherenext' =>
        'There are several possibilities of where to go next',
        'pick' =>
        'Please click on the the resource you intend to access',
        'titleheader' => 'Title',
        'type' => 'Type');
                   if ($#possibilities>0) {                    if ($#possibilities>0) {
       my $bodytag=        my $bodytag=
                              &Apache::loncommon::bodytag('Multiple Resources');                               &Apache::loncommon::bodytag('Multiple Resources');
                      $r->print(<<ENDSTART);                       $r->print(<<ENDSTART);
 <head><title>Choose Next Location</title></head>  <head><title>Choose Next Location</title></head>
 $bodytag  $bodytag
 <h3>There are several possibilities of where to go next</h3>  <h3>$lt{'wherenext'}</h3>
 <p>  <p>
 Please click on the the resource you intend to access:  $lt{'pick'}:
 <p>  <p>
 <table border=2>  <table border=2>
 <tr><th>Title</th><th>Type</th></tr>  <tr><th>$lt{'titleheader'}</th><th>$lt{'type'}</th></tr>
 ENDSTART  ENDSTART
                      foreach (@possibilities) {                       foreach (@possibilities) {
                         $r->print(                          $r->print(
Line 423  ENDSTART Line 434  ENDSTART
                               '</a></td><td>'.$multichoicehash{'type_'.$_}.                                '</a></td><td>'.$multichoicehash{'type_'.$_}.
       '</td></tr>');        '</td></tr>');
                      }                       }
                      $r->print('</table></body></html>');                       $r->print('</table>');
      return OK;  
                   } else {                    } else {
       my $bodytag=&Apache::loncommon::bodytag('No Resource');        my $bodytag=&Apache::loncommon::bodytag('No Resource');
                      $r->print(<<ENDNONE);        $r->print(<<ENDNONE);
 <head><title>No Resource</title></head>  <head><title>No Resource</title></head>
 $bodytag  $bodytag
 <h3>Next resource could not be identified.</h3>  <h3>$lt{'title'}</h3>
 <p>You probably are at the <b>beginning</b> or the <b>end</b> of the   <p>$lt{'explain'}</p>
 course.</p>  
 <ul>  
 <li><a href="/adm/flip?postdata=return:">Go Back</a></li>  
 <li><a href="/adm/navmaps">Navigate Course Content</a></li>  
 </ul>  
 </body>  
 </html>  
 ENDNONE  ENDNONE
                      return OK;    }
          }    $r->print(<<ENDMENU);
      }  <ul>
   <li><a href="/adm/flip?postdata=return:">$lt{'back'}</a></li>
   <li><a href="/adm/navmaps">$lt{'nav'}</a></li>
   </ul></body></html>
   ENDMENU
                     return OK;
         }
   } else {    } else {
 # ------------------------------------------------- Problem, could not tie hash  # ------------------------------------------------- Problem, could not tie hash
               $env{'user.error.msg'}="/adm/flip:bre:0:1:Course Data Missing";                $env{'user.error.msg'}="/adm/flip:bre:0:1:Course Data Missing";

Removed from v.1.58  
changed lines
  Added in v.1.59


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