Diff for /rat/lonpageflip.pm between versions 1.50 and 1.51

version 1.50, 2004/11/11 19:43:22 version 1.51, 2005/02/17 09:09:57
Line 26 Line 26
 #  #
 # http://www.lon-capa.org/  # http://www.lon-capa.org/
 #  #
 # (Page Handler  
 #  
 # (TeX Content Handler  
 #  
 # 05/29/00,05/30 Gerd Kortemeyer)  
 # 08/30,08/31,09/06,09/14,09/15,09/16,09/19,09/20,09/21,09/23,  
 # 10/02 Gerd Kortemeyer)  
 #  
 # 10/03,10/05,10/06,10/07,10/09,10/10,10/11,10/16,10/17,  
 # 11/14,11/16,  
 # 10/01/01,05/01,05/28,07/05 Gerd Kortemeyer  
   
 package Apache::lonpageflip;  package Apache::lonpageflip;
   
Line 190  sub handler { Line 179  sub handler {
 # ------------------------------------------- Set document type for header only  # ------------------------------------------- Set document type for header only
   
   if ($r->header_only) {    if ($r->header_only) {
      $r->content_type('text/html');        &Apache::loncommon::content_type($r,'text/html');
      $r->send_http_header;        $r->send_http_header;
      return OK;        return OK;
   }    }
   
   my %cachehash=();     my %cachehash=(); 
Line 226  sub handler { Line 215  sub handler {
             ($murl,$id,$fn)=&Apache::lonnet::decode_symb(&Apache::lonnet::symbread($fn));              ($murl,$id,$fn)=&Apache::lonnet::decode_symb(&Apache::lonnet::symbread($fn));
     $id=$hash{'map_pc_'.&Apache::lonnet::clutter($murl)}.'.'.$id;      $id=$hash{'map_pc_'.&Apache::lonnet::clutter($murl)}.'.'.$id;
     $newloc=$hash{'src_'.$id};      $newloc=$hash{'src_'.$id};
     &Apache::lonnet::logthis(" hrrm 1 ");  
     if ($newloc) {      if ($newloc) {
  if ($hash{'encrypted_'.$id}) { $newloc=&Apache::lonenc::encrypted($newloc); }   if ($hash{'encrypted_'.$id}) { $newloc=&Apache::lonenc::encrypted($newloc); }
               
Line 237  sub handler { Line 225  sub handler {
          } else {           } else {
     $newloc='/adm/noidea.html';      $newloc='/adm/noidea.html';
          }             }  
  $r->content_type('text/html');   &Apache::loncommon::content_type($r,'text/html');
          $r->header_out(Location =>            $r->header_out(Location => 
  'http://'.$ENV{'HTTP_HOST'}.$newloc);   'http://'.$ENV{'HTTP_HOST'}.$newloc);
                                                                 
Line 258  sub handler { Line 246  sub handler {
          if ($last) {           if ($last) {
      $currenturl=&Apache::lonnet::clutter((&Apache::lonnet::decode_symb($last))[1]);       $currenturl=&Apache::lonnet::clutter((&Apache::lonnet::decode_symb($last))[1]);
  } else {   } else {
      $r->content_type('text/html');       &Apache::loncommon::content_type($r,'text/html');
              $r->header_out(Location =>                $r->header_out(Location => 
                                'http://'.$ENV{'HTTP_HOST'}.'/adm/noidea.html');                                 'http://'.$ENV{'HTTP_HOST'}.'/adm/noidea.html');
              return REDIRECT;               return REDIRECT;
Line 358  sub handler { Line 346  sub handler {
                      &Apache::lonnet::appenv('user.criticalcheck.time'=>time);                       &Apache::lonnet::appenv('user.criticalcheck.time'=>time);
   }    }
   
   $r->content_type('text/html');    &Apache::loncommon::content_type($r,'text/html');
                   $r->header_out(Location =>                     $r->header_out(Location => 
                                 'http://'.$ENV{'HTTP_HOST'}.$redirecturl);                                  'http://'.$ENV{'HTTP_HOST'}.$redirecturl);
                   return REDIRECT;                    return REDIRECT;
       } else {        } else {
 # --------------------------------------------------------- There was a problem  # --------------------------------------------------------- There was a problem
                   $r->content_type('text/html');                    &Apache::loncommon::content_type($r,'text/html');
                   $r->send_http_header;                    $r->send_http_header;
                   if ($#possibilities>0) {                    if ($#possibilities>0) {
       my $bodytag=        my $bodytag=

Removed from v.1.50  
changed lines
  Added in v.1.51


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