File:  [LON-CAPA] / rat / lonpage.pm
Revision 1.51: download - view: text, annotated - select for diffs
Fri Apr 18 13:58:44 2003 UTC (21 years, 2 months ago) by www
Branches: MAIN
CVS tags: version_0_99_3, version_0_99_2, version_0_99_1, version_0_99_0, conference_2003, HEAD
Inline menu on .page resources

    1: # The LearningOnline Network with CAPA
    2: # Page Handler
    3: #
    4: # $Id: lonpage.pm,v 1.51 2003/04/18 13:58:44 www Exp $
    5: #
    6: # Copyright Michigan State University Board of Trustees
    7: #
    8: # This file is part of the LearningOnline Network with CAPA (LON-CAPA).
    9: #
   10: # LON-CAPA is free software; you can redistribute it and/or modify
   11: # it under the terms of the GNU General Public License as published by
   12: # the Free Software Foundation; either version 2 of the License, or
   13: # (at your option) any later version.
   14: #
   15: # LON-CAPA is distributed in the hope that it will be useful,
   16: # but WITHOUT ANY WARRANTY; without even the implied warranty of
   17: # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   18: # GNU General Public License for more details.
   19: #
   20: # You should have received a copy of the GNU General Public License
   21: # along with LON-CAPA; if not, write to the Free Software
   22: # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
   23: #
   24: # /home/httpd/html/adm/gpl.txt
   25: #
   26: # http://www.lon-capa.org/
   27: #
   28: # (TeX Content Handler
   29: #
   30: # YEAR=2000
   31: # 05/29/00,05/30 Gerd Kortemeyer)
   32: # 08/30,08/31,09/06,09/14,09/15,09/16,09/19,09/20,09/21,09/23,
   33: # 10/02,10/10,10/14,10/16,10/18,10/19,10/31,11/6,11/14,11/16,
   34: # YEAR=2001
   35: # 08/13/01,08/30,10/1 Gerd Kortemeyer
   36: # YEAR=2002
   37: # 03/19 Gerd Kortemeyer
   38: #
   39: ###
   40: 
   41: package Apache::lonpage;
   42: 
   43: use strict;
   44: use Apache::Constants qw(:common :http);
   45: use Apache::lonnet();
   46: use Apache::loncommon();
   47: use Apache::lonxml();
   48: use Apache::lonmenu;
   49: use HTML::TokeParser;
   50: use GDBM_File;
   51: use Apache::lonsequence;
   52: 
   53: # -------------------------------------------------------------- Module Globals
   54: my %hash;
   55: my @rows;
   56: 
   57: # ------------------------------------------------------------------ Euclid gcd
   58: 
   59: sub euclid {
   60:     my ($e,$f)=@_;
   61:     my $a; my $b; my $r;
   62:     if ($e>$f) { $b=$e; $r=$f; } else { $r=$e; $b=$f; }
   63:     while ($r!=0) {
   64: 	$a=$b; $b=$r;
   65:         $r=$a%$b;
   66:     }
   67:     return $b;
   68: }
   69: 
   70: # ------------------------------------------------------------ Build page table
   71: 
   72: sub tracetable {
   73:     my ($sofar,$rid,$beenhere)=@_;
   74:     my $further=$sofar;
   75:     unless ($beenhere=~/\&$rid\&/) {
   76:        $beenhere.=$rid.'&';  
   77: 
   78:        if (defined($hash{'is_map_'.$rid})) {
   79:            if ((defined($hash{'map_start_'.$hash{'src_'.$rid}})) &&
   80:                (defined($hash{'map_finish_'.$hash{'src_'.$rid}}))) {
   81:               my $frid=$hash{'map_finish_'.$hash{'src_'.$rid}};
   82: 	      $sofar=
   83:                 &tracetable($sofar,$hash{'map_start_'.$hash{'src_'.$rid}},
   84:                 '&'.$frid.'&');
   85:               $sofar++;
   86:               if ($hash{'src_'.$frid}) {
   87:                my $brepriv=&Apache::lonnet::allowed('bre',$hash{'src_'.$frid});
   88:                if (($brepriv eq '2') || ($brepriv eq 'F')) {
   89:                  if (defined($rows[$sofar])) {
   90:                    $rows[$sofar].='&'.$frid;
   91:                  } else {
   92:                    $rows[$sofar]=$frid;
   93:                  }
   94: 	       }
   95: 	      }
   96: 	   }
   97:        } else {
   98:           $sofar++;
   99:           if ($hash{'src_'.$rid}) {
  100:            my $brepriv=&Apache::lonnet::allowed('bre',$hash{'src_'.$rid});
  101:            if (($brepriv eq '2') || ($brepriv eq 'F')) {
  102:              if (defined($rows[$sofar])) {
  103:                $rows[$sofar].='&'.$rid;
  104:              } else {
  105:                $rows[$sofar]=$rid;
  106:              }
  107: 	   }
  108:           }
  109:        }
  110: 
  111:        if (defined($hash{'to_'.$rid})) {
  112: 	  my $mincond=1;
  113:           my $next='';
  114:           foreach (split(/\,/,$hash{'to_'.$rid})) {
  115:               my $thiscond=
  116:       &Apache::lonnet::directcondval($hash{'condid_'.$hash{'undercond_'.$_}});
  117:               if ($thiscond>=$mincond) {
  118: 		  if ($next) {
  119: 		      $next.=','.$_.':'.$thiscond;
  120:                   } else {
  121:                       $next=$_.':'.$thiscond;
  122: 		  }
  123:                   if ($thiscond>$mincond) { $mincond=$thiscond; }
  124: 	      }
  125:           }
  126:           foreach (split(/\,/,$next)) {
  127:               my ($linkid,$condval)=split(/\:/,$_);
  128:               if ($condval>=$mincond) {
  129:                 my $now=&tracetable($sofar,$hash{'goesto_'.$linkid},$beenhere);
  130:                 if ($now>$further) { $further=$now; }
  131: 	      }
  132:           }
  133: 
  134:        }
  135:     }
  136:     return $further;
  137: }
  138: 
  139: # ================================================================ Main Handler
  140: 
  141: sub handler {
  142:   my $r=shift;
  143: 
  144: # ------------------------------------------- Set document type for header only
  145: 
  146:   if ($r->header_only) {
  147:        if ($ENV{'browser.mathml'}) {
  148:            $r->content_type('text/xml');
  149:        } else {
  150:            $r->content_type('text/html'); 
  151:        }
  152:        $r->send_http_header;
  153:        return OK;
  154:    }
  155:   
  156:    &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
  157:                                           ['forceselect','launch']);
  158:   my $number_of_columns = 1;
  159:   my $requrl=$r->uri;  
  160:   my $target = $ENV{'form.grade_target'};
  161: # ----------------------------------------------------------------- Tie db file
  162:   if (($ENV{'request.course.fn'}) && (!$ENV{'form.forceselect'})) {
  163:       my $fn=$ENV{'request.course.fn'};
  164:       if (-e "$fn.db") {
  165:           if (tie(%hash,'GDBM_File',"$fn.db",&GDBM_READER(),0640)) {
  166: # ------------------------------------------------------------------- Hash tied
  167:               my $firstres=$hash{'map_start_'.$requrl};
  168:               my $lastres=$hash{'map_finish_'.$requrl};
  169:               if (($firstres) && ($lastres)) {
  170: # ----------------------------------------------------------------- Render page
  171: 
  172:                   @rows=();
  173: 
  174:                   &tracetable(0,$firstres,'&');
  175: 
  176: # ------------------------------------------------------------ Add to symb list
  177: 
  178:                   my $i;
  179:                   my %symbhash=();
  180:                   for ($i=0;$i<=$#rows;$i++) {
  181: 		     if ($rows[$i]) {
  182:                         my @colcont=split(/\&/,$rows[$i]);
  183:                         foreach (@colcont) {
  184:                            $symbhash{$hash{'src_'.$_}}='';
  185: 		        }
  186: 		     }
  187: 		  }
  188:                   &Apache::lonnet::symblist($requrl,%symbhash);
  189: 
  190: # ------------------------------------------------------------------ Page parms
  191: 
  192:                   my $j;
  193:                   my $lcm=1;
  194:                   my $contents=0;
  195:                   my $nforms=0;
  196:                   
  197:                   my %ssibody=();
  198:                   my %ssibgcolor=();
  199:                   my %ssitext=();
  200:                   my %ssilink=();
  201:                   my %ssivlink=();
  202:                   my %ssialink=();
  203:      
  204:                   my %metalink=();
  205: 
  206:                   my %cellemb=();
  207: 
  208:                   my $allscript='';
  209:                   my $allmeta='';
  210: 
  211:                   my $isxml=0;
  212:                   my $xmlheader='';
  213:                   my $xmlbody='';
  214: 
  215: # --------------------------------------------- Get SSI output, post parameters
  216: 
  217:                   for ($i=0;$i<=$#rows;$i++) {
  218: 		     if ($rows[$i]) {
  219: 		      $contents++;
  220:                       my @colcont=split(/\&/,$rows[$i]);
  221:                       $lcm*=($#colcont+1)/euclid($lcm,($#colcont+1));
  222:                       foreach (@colcont) {
  223:                           my $src=$hash{'src_'.$_};
  224:                           $src=~/\.(\w+)$/;
  225:                           $metalink{$_}=$src.'.meta';
  226:                           $cellemb{$_}=Apache::loncommon::fileembstyle($1);
  227:                           if ($cellemb{$_} eq 'ssi') {
  228: # --------------------------------------------------------- This is an SSI cell
  229: 			      my $prefix=$_.'_';
  230:                               my %posthash=('request.prefix' => $prefix);
  231:                               if (($ENV{'form.'.$prefix.'submit'}) 
  232:                                || ($ENV{'form.all_submit'})) {
  233:                                foreach (keys %ENV) {
  234: 				  if ($_=~/^form.$prefix/) {
  235: 				      my $name=$_;
  236:                                       $name=~s/^form.$prefix//;
  237:                                       $posthash{$name}=$ENV{$_};
  238:                                   }
  239:                                }
  240: 			      }
  241:                               my $output=Apache::lonnet::ssi($src,%posthash);
  242: 			      $output=~
  243: 	    s/\/\/ BEGIN LON\-CAPA Internal.+\/\/ END LON\-CAPA Internal\s//gs;
  244:                               if ($target eq 'tex') {
  245: 				  $output =~ s/^([^&]+)\\begin{document}//;
  246: 				  $output =~ s/\\end{document}//;
  247: 				  $output = '\parbox{\minipagewidth}{ '.$output.' }';
  248:                                   #some additional cleanup necessary for LateX (due to limitations of table environment 
  249: 				  $output =~ s/(\\vskip\s*\d+mm)\s*(\\\\)+/$1/g;
  250: 			      }
  251:                               my $parser=HTML::TokeParser->new(\$output);
  252:                               my $token;
  253:                               my $thisdir=$src;
  254:                               my $bodydef=0;
  255:                               my $thisxml=0;
  256:                               my @rlinks=();
  257:                               if ($output=~/\?xml/) {
  258:                                  $isxml=1;
  259:                                  $thisxml=1;
  260:                                  $output=~
  261:          /((?:\<(?:\?xml|\!DOC|html)[^\>]*(?:\>|\>\]\>)\s*)+)\<body[^\>]*\>/si;
  262:                                  $xmlheader=$1;
  263: 			      }
  264:                               while ($token=$parser->get_token) {
  265: 				if ($token->[0] eq 'S') {
  266:                                   if ($token->[1] eq 'a') {
  267: 				      if ($token->[2]->{'href'}) {
  268:                                          $rlinks[$#rlinks+1]=
  269: 					     $token->[2]->{'href'};
  270: 				      }
  271: 				  } elsif ($token->[1] eq 'img') {
  272:                                          $rlinks[$#rlinks+1]=
  273: 					     $token->[2]->{'src'};
  274: 				  } elsif ($token->[1] eq 'embed') {
  275:                                          $rlinks[$#rlinks+1]=
  276: 					     $token->[2]->{'src'};
  277: 				  } elsif ($token->[1] eq 'base') {
  278: 				      $thisdir=$token->[2]->{'href'};
  279: 				  } elsif ($token->[1] eq 'body') {
  280: 				      $bodydef=1;
  281:                                       $ssibgcolor{$_}=$token->[2]->{'bgcolor'};
  282:                                       $ssitext{$_}=$token->[2]->{'text'};
  283:                                       $ssilink{$_}=$token->[2]->{'link'};
  284:                                       $ssivlink{$_}=$token->[2]->{'vlink'};
  285:                                       $ssialink{$_}=$token->[2]->{'alink'};
  286:                                       if ($thisxml) {
  287: 					  $xmlbody=$token->[4];
  288:                                       }
  289:                                   } elsif ($token->[1] eq 'meta') {
  290: 				    if ($token->[4] !~ m:/>$:) {
  291: 				      $allmeta.="\n".$token->[4].'</meta>';
  292: 				    } else {
  293: 				      $allmeta.="\n".$token->[4];
  294: 				    }
  295:                                   } elsif (($token->[1] eq 'script') &&
  296:                                            ($bodydef==0)) {
  297: 				      $allscript.="\n\n"
  298:                                                 .$parser->get_text('/script');
  299:                                   }
  300: 			        }
  301: 			      }
  302:                               if ($output=~/\<body[^\>]*\>(.*)/si) {
  303:                                  $output=$1; 
  304:                               }
  305:                               $output=~s/\<\/body\>.*//si;
  306:                               if ($output=~/\<form/si) {
  307: 				  $nforms++;
  308:                                   $output=~s/\<form[^\>]*\>//gsi;
  309:                                   $output=~s/\<\/form[^\>]*\>//gsi;
  310:                                   $output=~
  311: 				      s/\<((?:input|select|button|textarea)[^\>]+)name\s*\=\s*[\'\"]*([\w\.\:]+)[\'\"]*([^\>]*)\>/\<$1 name="$prefix$2" $3\>/gsi;
  312:                               }
  313:                               $thisdir=~s/\/[^\/]*$//;
  314: 			      foreach (@rlinks) {
  315: 				  unless (($_=~/^http:\/\//i) ||
  316: 					  ($_=~/^\//) ||
  317: 					  ($_=~/^javascript:/i) ||
  318: 					  ($_=~/^mailto:/i) ||
  319: 					  ($_=~/^\#/)) {
  320: 				      my $newlocation=
  321: 				    &Apache::lonnet::hreflocation($thisdir,$_);
  322:                      $output=~s/(\"|\'|\=\s*)$_(\"|\'|\s|\>)/$1$newlocation$2/;
  323: 				  }
  324: 			      }
  325: # -------------------------------------------------- Deal with Applet codebases
  326:   $output=~s/(\<applet[^\>]+)(codebase\=[^\S\>]+)*([^\>]*)\>/$1.($2?$2:' codebase="'.$thisdir.'"').$3.'>'/gei;
  327: 			      $ssibody{$_}=$output;
  328: # ---------------------------------------------------------------- End SSI cell
  329:                           }
  330:                       }
  331:                      } 
  332:                   }
  333:                   unless ($contents) {
  334:                       $r->content_type('text/html');
  335:                       $r->send_http_header;
  336:                       $r->print('<html><body>Empty page.</body></html>');
  337:                   } else {
  338: # ------------------------------------------------------------------ Build page
  339: 
  340: # ---------------------------------------------------------------- Send headers
  341: 		      unless ($target eq 'tex') {
  342: 			  if ($isxml) {
  343: 			      $r->content_type('text/xml');
  344: 			      $r->send_http_header;
  345: 			      $r->print($xmlheader);
  346: 			  } else {
  347: 			      $r->content_type('text/html');
  348: 			      $r->send_http_header;
  349: 			      $r->print('<html>');
  350: 			  }
  351: # ------------------------------------------------------------------------ Head
  352: 			  $r->print("\n<head>\n".$allmeta);
  353: 			  if ($allscript) {
  354: 			      $r->print("\n<script language='JavaScript'>\n".
  355: 					$allscript."\n</script>\n");
  356: 			  }
  357: 			  $r->print(&Apache::lonmenu::registerurl(1,undef));
  358: 			  $r->print("\n</head>\n");
  359: # ------------------------------------------------------------------ Start body
  360: 			  if ($isxml) {
  361: 			      $r->print($xmlbody);
  362: 			  } else {
  363: 			      $r->print(
  364:                '<body bgcolor="#FFFFFF" onLoad="'.&Apache::lonmenu::loadevents.
  365:                '" onUnload="'.&Apache::lonmenu::unloadevents.'">'.
  366:                               &Apache::lonmenu::menubuttons(undef,$target,1)
  367: 					);
  368: 			  }
  369: # ------------------------------------------------------------------ Start form
  370: 			  if ($nforms) {
  371: 			      $r->print('<form method="post" action="'.
  372: 					$requrl.'">');
  373: 			  }
  374: 		      } else {
  375: 			  $r->print('\documentclass{article}
  376:                                  \newcommand{\keephidden}[1]{}           
  377:                                  \usepackage[dvips]{graphicx}
  378:                                  \usepackage{epsfig}
  379:                                  \usepackage{calc}
  380:                                  \usepackage{longtable}
  381:                                  \begin{document}');
  382: 		      }
  383: # ----------------------------------------------------------------- Start table
  384: 		      if ($target eq 'tex') {
  385: 			  $r->print('\begin{longtable}INSERTTHEHEADOFLONGTABLE\endfirsthead\endhead ');
  386: 			  if ($number_of_columns le $lcm) {$number_of_columns=$lcm;};
  387: 		      } else {
  388: 			  $r->print('<table cols="'.$lcm.'" border="0">');
  389: 		      }
  390:                       for ($i=0;$i<=$#rows;$i++) {
  391: 			if ($rows[$i]) {
  392: 			    unless ($target eq 'tex') {
  393: 				$r->print("\n<tr>");
  394: 			    }
  395:                           my @colcont=split(/\&/,$rows[$i]);
  396:                           my $avespan=$lcm/($#colcont+1);
  397:                           for ($j=0;$j<=$#colcont;$j++) {
  398:                               my $rid=$colcont[$j];
  399:                               my $metainfo='<a href="'.
  400:                                     $metalink{$rid}.'" target="LONcatInfo">'.
  401:                           '<img src="/adm/lonMisc/cat_button.gif" border=0>'.
  402: 			  '</img></a><a href="/adm/evaluate?postdata='.
  403:       &Apache::lonnet::escape(&Apache::lonnet::declutter($hash{'src_'.$rid}))
  404:       .'" target="LONcatInfo">'.
  405:                           '<img src="/adm/lonMisc/eval_button.gif" border=0>'.
  406:                           '</img></a>';
  407:                               if (
  408:  ($hash{'src_'.$rid}=~/\.(problem|exam|quiz|assess|survey|form)$/) &&
  409:  (&Apache::lonnet::allowed('mgr',$ENV{'request.course.id'}))) {
  410: 				  my ($mapid,$resid)=split(/\./,$rid);
  411:                                  my $symb=
  412:                 &Apache::lonnet::declutter($hash{'map_id_'.$mapid}).
  413:                 '___'.$resid.'___'.
  414: 		&Apache::lonnet::declutter($hash{'src_'.$rid});
  415:                                  $metainfo.=
  416:                   '<a href="/adm/grades?symb='.&Apache::lonnet::escape($symb).
  417:                   '&command=submission" target="LONcatInfo">'.
  418:                           '<img src="/adm/lonMisc/subm_button.gif" border=0>'.
  419: 			  '</img></a>'.
  420:                   '<a href="/adm/grades?symb='.&Apache::lonnet::escape($symb).
  421:                   '&command=gradingmenu" target="LONcatInfo">'.
  422:                           '<img src="/adm/lonMisc/pgrd_button.gif" border=0>'.
  423: 			  '</img></a>'.
  424:                   '<a href="/adm/parmset?symb='.&Apache::lonnet::escape($symb).
  425:                           '" target="LONcatInfo">'.
  426:                           '<img src="/adm/lonMisc/pprm_button.gif" border=0>'.
  427: 			      '</img></a>';
  428:                               }
  429:                               $metainfo.='<br></br>';
  430: 			    unless ($target eq 'tex') {
  431: 				$r->print('<td colspan="'.$avespan.'"');
  432: 			    }
  433:                               if ($cellemb{$rid} eq 'ssi') {
  434: 				  unless ($target eq 'tex') {
  435: 				      if ($ssibgcolor{$rid}) {
  436: 					  $r->print(' bgcolor="'.
  437: 						    $ssibgcolor{$rid}.'"');
  438: 				      }
  439: 				      $r->print('>'.$metainfo.'<font');
  440: 		    
  441: 				      if ($ssitext{$rid}) {
  442: 					  $r->print(' text="'.$ssitext{$rid}.'"');
  443: 				      }
  444: 				      if ($ssilink{$rid}) {
  445: 					  $r->print(' link="'.$ssilink{$rid}.'"');
  446: 				      }
  447: 				      if ($ssitext{$rid}) {
  448: 					  $r->print(' vlink="'.$ssivlink{$rid}.'"');
  449: 				      }
  450: 				      if ($ssialink{$rid}) {
  451: 					  $r->print(' alink="'.$ssialink{$rid}.'"');
  452: 				      }             
  453: 				      $r->print('>');
  454: 				  }
  455:                                   $r->print($ssibody{$rid});	
  456: 				  unless ($target eq 'tex') {
  457: 				      $r->print('</font>');
  458:                                   }
  459:                                   if ($ENV{'course.'.
  460:                                       $ENV{'request.course.id'}.
  461:                                       '.pageseparators'} eq 'yes') {
  462:                                       unless($target eq 'tex') {
  463:                                           $r->print('<hr />');
  464:                                       } else {
  465:                                           $r->print('\hline');
  466:                                       }
  467: 				  }
  468: 			      } elsif ($cellemb{$rid} eq 'img') {
  469:                                   $r->print('>'.$metainfo.'<img src="'.
  470:                                     $hash{'src_'.$rid}.'"></img>');
  471: 			      } elsif ($cellemb{$rid} eq 'emb') {
  472:                                   $r->print('>'.$metainfo.'<embed src="'.
  473:                                     $hash{'src_'.$rid}.'"></embed>');
  474:                               }
  475: 			      unless ($target eq 'tex') {
  476: 				  $r->print('</td>');
  477: 			      } else {
  478:                                   for (my $incol=1;$incol<=$avespan;$incol++) {
  479: 				      $r->print(' & ');
  480: 				  }
  481: 			      }
  482:                           }
  483: 			      unless ($target eq 'tex') {
  484: 				  $r->print('</tr>');
  485: 			      } else {
  486: 				  $r->print('REMOVETHEHEADOFLONGTABLE\\\\');
  487: 			      }
  488: 		        }
  489:                       }
  490: 		      unless ($target eq 'tex') {
  491: 			  $r->print("\n</table>");
  492: 		      } else {
  493: 			  $r->print('\end{longtable}\strut');
  494: 		      }
  495: # ---------------------------------------------------------------- Submit, etc.
  496:                       if ($nforms) {
  497:                           $r->print(
  498: 	                  '<input name="all_submit" value="Submit All" type="'.
  499: 			  (($nforms>1)?'submit':'hidden').'"></input></form>');
  500:                       }
  501: 		      unless ($target eq 'tex') {
  502: 			  $r->print('</body>'.&Apache::lonxml::xmlend());
  503: 		      } else {
  504: 			  $r->print('\end{document}'.$number_of_columns);
  505: 		      }
  506: # -------------------------------------------------------------------- End page
  507:                   }                  
  508: # ------------------------------------------------------------- End render page
  509:               } else {
  510:                   $r->content_type('text/html');
  511:                   $r->send_http_header;
  512:                   &Apache::lonsequence::viewmap($r,$requrl);
  513:               }
  514: # ------------------------------------------------------------------ Untie hash
  515:               unless (untie(%hash)) {
  516:                    &Apache::lonnet::logthis("<font color=blue>WARNING: ".
  517:                        "Could not untie coursemap $fn (browse).</font>"); 
  518:               }
  519: # -------------------------------------------------------------------- All done
  520: 	      return OK;
  521: # ----------------------------------------------- Errors, hash could no be tied
  522:           }
  523:       } 
  524:   }
  525:   $r->content_type('text/html');
  526:   $r->send_http_header;
  527:   &Apache::lonsequence::viewmap($r,$requrl);
  528:   return OK; 
  529: }
  530: 
  531: 1;
  532: __END__
  533: 
  534: =head1 NAME
  535: 
  536: Apache::lonpage - Page Handler
  537: 
  538: =head1 SYNOPSIS
  539: 
  540: Invoked by /etc/httpd/conf/srm.conf:
  541: 
  542:  <LocationMatch "^/res/.*\.page$>
  543:  SetHandler perl-script
  544:  PerlHandler Apache::lonpage
  545:  </LocationMatch>
  546: 
  547: =head1 INTRODUCTION
  548: 
  549: This module renders a .page resource.
  550: 
  551: This is part of the LearningOnline Network with CAPA project
  552: described at http://www.lon-capa.org.
  553: 
  554: =head1 HANDLER SUBROUTINE
  555: 
  556: This routine is called by Apache and mod_perl.
  557: 
  558: =over 4
  559: 
  560: =item *
  561: 
  562: set document type for header only
  563: 
  564: =item *
  565: 
  566: tie db file
  567: 
  568: =item *
  569: 
  570: render page
  571: 
  572: =item *
  573: 
  574: add to symb list
  575: 
  576: =item *
  577: 
  578: page parms
  579: 
  580: =item *
  581: 
  582: Get SSI output, post parameters
  583: 
  584: =item *
  585: 
  586: SSI cell rendering
  587: 
  588: =item *
  589: 
  590: Deal with Applet codebases
  591: 
  592: =item *
  593: 
  594: Build page
  595: 
  596: =item *
  597: 
  598: send headers
  599: 
  600: =item *
  601: 
  602: start body
  603: 
  604: =item *
  605: 
  606: start form
  607: 
  608: =item *
  609: 
  610: start table
  611: 
  612: =item *
  613: 
  614: submit element, etc, render page, untie hash
  615: 
  616: =back
  617: 
  618: =head1 OTHER SUBROUTINES
  619: 
  620: =over 4
  621: 
  622: =item *
  623: 
  624: euclid() : Euclid's method for determining the greatest common denominator.
  625: 
  626: =item *
  627: 
  628: tracetable() : Build page table.
  629: 
  630: =back
  631: 
  632: =cut
  633: 
  634: 
  635: 
  636: 

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>
500 Internal Server Error

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.