Diff for /rat/lonpage.pm between versions 1.37 and 1.39

version 1.37, 2002/05/20 19:05:11 version 1.39, 2002/05/27 12:04:36
Line 48  use Apache::loncommon(); Line 48  use Apache::loncommon();
 use Apache::lonxml();  use Apache::lonxml();
 use HTML::TokeParser;  use HTML::TokeParser;
 use GDBM_File;  use GDBM_File;
   use Apache::lonsequence;
   
 # -------------------------------------------------------------- Module Globals  # -------------------------------------------------------------- Module Globals
 my %hash;  my %hash;
Line 151  sub handler { Line 152  sub handler {
        $r->send_http_header;         $r->send_http_header;
        return OK;         return OK;
    }     }
    
      &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
                                             ['forceselect','launch']);
   
   my $requrl=$r->uri;      my $requrl=$r->uri;  
   my $target = $ENV{'form.grade_target'};    my $target = $ENV{'form.grade_target'};
 # ----------------------------------------------------------------- Tie db file  # ----------------------------------------------------------------- Tie db file
   if ($ENV{'request.course.fn'}) {    if (($ENV{'request.course.fn'}) && (!$ENV{'form.forceselect'})) {
       my $fn=$ENV{'request.course.fn'};        my $fn=$ENV{'request.course.fn'};
       if (-e "$fn.db") {        if (-e "$fn.db") {
           if (tie(%hash,'GDBM_File',"$fn.db",&GDBM_READER,0640)) {            if (tie(%hash,'GDBM_File',"$fn.db",&GDBM_READER,0640)) {
Line 397  sub handler { Line 401  sub handler {
                           '<img src="/adm/lonMisc/subm_button.gif" border=0>'.                            '<img src="/adm/lonMisc/subm_button.gif" border=0>'.
   '</img></a>'.    '</img></a>'.
                   '<a href="/adm/grades?symb='.&Apache::lonnet::escape($symb).                    '<a href="/adm/grades?symb='.&Apache::lonnet::escape($symb).
                   '&command=viewgrades" target="LONcatInfo">'.                    '&command=gradingmenu" target="LONcatInfo">'.
                           '<img src="/adm/lonMisc/pgrd_button.gif" border=0>'.                            '<img src="/adm/lonMisc/pgrd_button.gif" border=0>'.
   '</img></a>'.    '</img></a>'.
                   '<a href="/adm/parmset?symb='.&Apache::lonnet::escape($symb).                    '<a href="/adm/parmset?symb='.&Apache::lonnet::escape($symb).
Line 467  sub handler { Line 471  sub handler {
               } else {                } else {
                   $r->content_type('text/html');                    $r->content_type('text/html');
                   $r->send_http_header;                    $r->send_http_header;
   $r->print('<html><body>Page undefined.</body></html>');                    &Apache::lonsequence::viewmap($r,$requrl);
               }                }
 # ------------------------------------------------------------------ Untie hash  # ------------------------------------------------------------------ Untie hash
               unless (untie(%hash)) {                unless (untie(%hash)) {
Line 480  sub handler { Line 484  sub handler {
           }            }
       }         } 
   }    }
   $ENV{'user.error.msg'}="$requrl:bre:0:0:Course not initialized";    $r->content_type('text/html');
   return HTTP_NOT_ACCEPTABLE;     $r->send_http_header;
     &Apache::lonsequence::viewmap($r,$requrl);
     return OK; 
 }  }
   
 1;  1;

Removed from v.1.37  
changed lines
  Added in v.1.39


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