--- rat/lonpage.pm 2004/11/12 00:25:23 1.62 +++ rat/lonpage.pm 2005/02/17 09:09:57 1.67 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Page Handler # -# $Id: lonpage.pm,v 1.62 2004/11/12 00:25:23 albertel Exp $ +# $Id: lonpage.pm,v 1.67 2005/02/17 09:09:57 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -25,17 +25,6 @@ # # http://www.lon-capa.org/ # -# (TeX Content Handler -# -# YEAR=2000 -# 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,10/10,10/14,10/16,10/18,10/19,10/31,11/6,11/14,11/16, -# YEAR=2001 -# 08/13/01,08/30,10/1 Gerd Kortemeyer -# YEAR=2002 -# 03/19 Gerd Kortemeyer -# ### package Apache::lonpage; @@ -241,8 +230,12 @@ sub handler { &Apache::loncommon::fileembstyle($extension); if ($cellemb{$_} eq 'ssi') { # --------------------------------------------------------- This is an SSI cell + my ($mapid,$resid)=split(/\./,$_); + my $symb=&Apache::lonnet::encode_symb($hash{'map_id_'.$mapid},$resid,$src); + my $prefix=$_.'_'; - my %posthash=('request.prefix' => $prefix); + my %posthash=('request.prefix' => $prefix, + 'symb' => $symb); if ($ENV{'form.grade_target'} eq 'tex') { $posthash{'grade_target'}=$ENV{'form.grade_target'}; $posthash{'textwidth'}=$ENV{'form.textwidth'}; @@ -417,7 +410,7 @@ sub handler { $r->print('\begin{longtable}INSERTTHEHEADOFLONGTABLE\endfirsthead\endhead '); if ($number_of_columns le $lcm) {$number_of_columns=$lcm;}; } else { - $r->print(''); + $r->print('
'); } for ($i=0;$i<=$#rows;$i++) { if ($rows[$i]) { @@ -430,11 +423,14 @@ sub handler { my $rid=$colcont[$j]; my $metainfo = ''; my $esrc=&Apache::lonnet::declutter($hash{'src_'.$rid}); + my ($mapid,$resid)=split(/\./,$rid); + my $symb=&Apache::lonnet::encode_symb($hash{'map_id_'.$mapid},$resid,$hash{'src_'.$rid}); if ($hash{'encrypted_'.$rid}) { + $symb=&Apache::lonenc::encrypted($symb); $esrc=&Apache::lonenc::encrypted($esrc); } unless ($hash{'src_'.$rid} =~ m-^/uploaded/-) { - $metainfo =''. + $metainfo =''. ''. ''. ''; @@ -551,11 +547,12 @@ sub handler { } else { $r->print('\end{document}'.$number_of_columns); } + &Apache::lonnet::symblist($requrl,%symbhash); # -------------------------------------------------------------------- End page } # ------------------------------------------------------------- End render page } else { - $r->content_type('text/html'); + &Apache::loncommon::content_type($r,'text/html'); $r->send_http_header; &Apache::lonsequence::viewmap($r,$requrl); } @@ -570,7 +567,7 @@ sub handler { } } } - $r->content_type('text/html'); + &Apache::loncommon::content_type($r,'text/html'); $r->send_http_header; &Apache::lonsequence::viewmap($r,$requrl); return OK; 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.