Diff for /rat/lonpage.pm between versions 1.83 and 1.88

version 1.83, 2007/06/25 23:27:10 version 1.88, 2008/11/20 13:11:43
Line 27 Line 27
 #  #
 ###  ###
   
   =head1 NAME
   
   Apache::lonpage - Page Handler
   
   =head1 SYNOPSIS
   
   Invoked by /etc/httpd/conf/srm.conf:
   
    <LocationMatch "^/res/.*\.page$>
    SetHandler perl-script
    PerlHandler Apache::lonpage
    </LocationMatch>
   
   =head1 INTRODUCTION
   
   This module renders a .page resource.
   
   This is part of the LearningOnline Network with CAPA project
   described at http://www.lon-capa.org.
   
   =head1 HANDLER SUBROUTINE
   
   This routine is called by Apache and mod_perl.
   
   =over 4
   
   =item *
   
   set document type for header only
   
   =item *
   
   tie db file
   
   =item *
   
   render page
   
   =item *
   
   add to symb list
   
   =item *
   
   page parms
   
   =item *
   
   Get SSI output, post parameters
   
   =item *
   
   SSI cell rendering
   
   =item *
   
   Deal with Applet codebases
   
   =item *
   
   Build page
   
   =item *
   
   send headers
   
   =item *
   
   start body
   
   =item *
   
   start form
   
   =item *
   
   start table
   
   =item *
   
   submit element, etc, render page, untie hash
   
   =back
   
   =head1 OTHER SUBROUTINES
   
   =over 4
   
   =item *
   
   euclid() : Euclid's method for determining the greatest common denominator.
   
   =item *
   
   tracetable() : Build page table.
   
   =back
   
   =cut
   
   
 package Apache::lonpage;  package Apache::lonpage;
   
 use strict;  use strict;
Line 78  sub tracetable { Line 179  sub tracetable {
                     my $frid=$hash{'map_finish_'.$hash{'src_'.$rid}};                      my $frid=$hash{'map_finish_'.$hash{'src_'.$rid}};
             $sofar=              $sofar=
                        &tracetable($sofar,$hash{'map_start_'.$hash{'src_'.$rid}},                         &tracetable($sofar,$hash{'map_start_'.$hash{'src_'.$rid}},
                        '&'.$frid.'&');                         '&'.$frid.$beenhere);
                     $sofar++;                      $sofar++;
                     if ($hash{'src_'.$frid}) {                      if ($hash{'src_'.$frid}) {
                         my $brepriv=&Apache::lonnet::allowed('bre',$hash{'src_'.$frid});                          my $brepriv=&Apache::lonnet::allowed('bre',$hash{'src_'.$frid});
Line 378  sub handler { Line 479  sub handler {
   $r->send_http_header;    $r->send_http_header;
 # ------------------------------------------------------------------------ Head  # ------------------------------------------------------------------------ Head
   if ($allscript) {    if ($allscript) {
       $allscript .=         $allscript = 
   "\n<script type=\"text/javascript\">\n".    "\n".'<script type="text/javascript">'."\n".
   $allscript."\n</script>\n";    $allscript.
     "\n</script>\n";
   }    }
 # ------------------------------------------------------------------ Start body  # ------------------------------------------------------------------ Start body
   $r->print(&Apache::loncommon::start_page(undef,undef,    $r->print(&Apache::loncommon::start_page(undef,$allscript,
    {'force_register' => 1,     {'force_register' => 1,
     'bgcolor'        => '#ffffff',}));      'bgcolor'        => '#ffffff',}));
 # ------------------------------------------------------------------ Start form  # ------------------------------------------------------------------ Start form
   if ($nforms) {    if ($nforms) {
       $r->print('<form method="post" action="'.        $r->print('<form name="lonhomework" method="post"  enctype="multipart/form-data" action="'.
  &Apache::lonenc::check_encrypt($requrl)   &Apache::lonenc::check_encrypt($requrl)
  .'">');   .'">');
   }    }
Line 589  sub get_buttons { Line 691  sub get_buttons {
 1;  1;
 __END__  __END__
   
 =head1 NAME  
   
 Apache::lonpage - Page Handler  
   
 =head1 SYNOPSIS  
   
 Invoked by /etc/httpd/conf/srm.conf:  
   
  <LocationMatch "^/res/.*\.page$>  
  SetHandler perl-script  
  PerlHandler Apache::lonpage  
  </LocationMatch>  
   
 =head1 INTRODUCTION  
   
 This module renders a .page resource.  
   
 This is part of the LearningOnline Network with CAPA project  
 described at http://www.lon-capa.org.  
   
 =head1 HANDLER SUBROUTINE  
   
 This routine is called by Apache and mod_perl.  
   
 =over 4  
   
 =item *  
   
 set document type for header only  
   
 =item *  
   
 tie db file  
   
 =item *  
   
 render page  
   
 =item *  
   
 add to symb list  
   
 =item *  
   
 page parms  
   
 =item *  
   
 Get SSI output, post parameters  
   
 =item *  
   
 SSI cell rendering  
   
 =item *  
   
 Deal with Applet codebases  
   
 =item *  
   
 Build page  
   
 =item *  
   
 send headers  
   
 =item *  
   
 start body  
   
 =item *  
   
 start form  
   
 =item *  
   
 start table  
   
 =item *  
   
 submit element, etc, render page, untie hash  
   
 =back  
   
 =head1 OTHER SUBROUTINES  
   
 =over 4  
   
 =item *  
   
 euclid() : Euclid's method for determining the greatest common denominator.  
   
 =item *  
   
 tracetable() : Build page table.  
   
 =back  
   
 =cut  
   
   
   

Removed from v.1.83  
changed lines
  Added in v.1.88


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