--- rat/lonpage.pm 2007/09/25 23:47:54 1.85 +++ rat/lonpage.pm 2009/10/06 11:01:35 1.91.2.1 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Page Handler # -# $Id: lonpage.pm,v 1.85 2007/09/25 23:47:54 albertel Exp $ +# $Id: lonpage.pm,v 1.91.2.1 2009/10/06 11:01:35 foxr Exp $ # # Copyright Michigan State University Board of Trustees # @@ -27,6 +27,9 @@ # ### + + + package Apache::lonpage; use strict; @@ -78,7 +81,7 @@ sub tracetable { my $frid=$hash{'map_finish_'.$hash{'src_'.$rid}}; $sofar= &tracetable($sofar,$hash{'map_start_'.$hash{'src_'.$rid}}, - '&'.$frid.'&'); + '&'.$frid.$beenhere); $sofar++; if ($hash{'src_'.$frid}) { my $brepriv=&Apache::lonnet::allowed('bre',$hash{'src_'.$frid}); @@ -271,7 +274,7 @@ sub handler { if ($target eq 'tex') { $output =~ s/^([^&]+)\\begin{document}//; $output =~ s/\\end{document}//; - $output = '\parbox{\minipagewidth}{ '.$output.' }'; +# $output = '\parbox{\minipagewidth}{ '.$output.' }'; #some additional cleanup necessary for LateX (due to limitations of table environment $output =~ s/(\\vskip\s*\d+mm)\s*(\\\\)+/$1/g; } @@ -339,7 +342,7 @@ sub handler { } $thisdir=~s/\/[^\/]*$//; foreach (@rlinks) { - unless (($_=~/^http:\/\//i) || + unless (($_=~/^https?\:\/\//i) || ($_=~/^\//) || ($_=~/^javascript:/i) || ($_=~/^mailto:/i) || @@ -389,22 +392,26 @@ sub handler { 'bgcolor' => '#ffffff',})); # ------------------------------------------------------------------ Start form if ($nforms) { - $r->print('
'); } } elsif ($target eq 'tex') { - $r->print('\documentclass{article} - \newcommand{\keephidden}[1]{} - \usepackage[dvips]{graphicx} - \usepackage{epsfig} - \usepackage{calc} - \usepackage{longtable} - \begin{document}'); + # I think this is not needed as the header + # will be put in for each of the page parts + # by the londefdef.pm now that we are opening up + # the parts of a page. + #$r->print('\documentclass{article} + # \newcommand{\keephidden}[1]{} + # \usepackage[dvips]{graphicx} + # \usepackage{epsfig} + # \usepackage{calc} + # \usepackage{longtable} + # \begin{document}'); } # ----------------------------------------------------------------- Start table if ($target eq 'tex') { - $r->print('\begin{longtable}INSERTTHEHEADOFLONGTABLE\endfirsthead\endhead '); +# # $r->print('\begin{longtable}INSERTTHEHEADOFLONGTABLE\endfirsthead\endhead '); if ($number_of_columns le $lcm) {$number_of_columns=$lcm;}; } else { $r->print(''); @@ -590,6 +597,7 @@ sub get_buttons { 1; __END__ + =head1 NAME Apache::lonpage - Page Handler @@ -691,5 +699,3 @@ tracetable() : Build page table. =cut - -