--- rat/lonpage.pm 2002/02/14 20:45:16 1.31 +++ rat/lonpage.pm 2002/05/20 19:05:11 1.37 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Page Handler # -# $Id: lonpage.pm,v 1.31 2002/02/14 20:45:16 albertel Exp $ +# $Id: lonpage.pm,v 1.37 2002/05/20 19:05:11 sakharuk Exp $ # # Copyright Michigan State University Board of Trustees # @@ -34,6 +34,8 @@ # YEAR=2001 # 08/13/01,08/30,10/1 Gerd Kortemeyer # 12/16 Scott Harrison +# YEAR=2002 +# 03/19 Gerd Kortemeyer # ### @@ -150,7 +152,8 @@ sub handler { return OK; } - my $requrl=$r->uri; + my $requrl=$r->uri; + my $target = $ENV{'form.grade_target'}; # ----------------------------------------------------------------- Tie db file if ($ENV{'request.course.fn'}) { my $fn=$ENV{'request.course.fn'}; @@ -329,43 +332,45 @@ sub handler { # ------------------------------------------------------------------ Build page # ---------------------------------------------------------------- Send headers - if ($isxml) { - $r->content_type('text/xml'); - $r->send_http_header; - $r->print($xmlheader); - } else { - $r->content_type('text/html'); - $r->send_http_header; - $r->print(''); - } + unless ($target eq 'tex') { + if ($isxml) { + $r->content_type('text/xml'); + $r->send_http_header; + $r->print($xmlheader); + } else { + $r->content_type('text/html'); + $r->send_http_header; + $r->print(''); + } # ------------------------------------------------------------------------ Head - $r->print("\n
\n".$allmeta); - $allscript=~ - s/\/\/ BEGIN LON\-CAPA Internal.+\/\/ END LON\-CAPA Internal\s//gs; - if ($allscript) { - $r->print("\n\n"); - } - $r->print(&Apache::lonxml::registerurl(1)); - $r->print("\n\n"); + $r->print("\n\n".$allmeta); + $allscript=~ + s/\/\/ BEGIN LON\-CAPA Internal.+\/\/ END LON\-CAPA Internal\s//gs; + if ($allscript) { + $r->print("\n\n"); + } + $r->print(&Apache::lonxml::registerurl(1,undef)); + $r->print("\n\n"); # ------------------------------------------------------------------ Start body - if ($isxml) { - $r->print($xmlbody); - } else { - $r->print( - ''); - } + if ($isxml) { + $r->print($xmlbody); + } else { + $r->print(''); + } # ------------------------------------------------------------------ Start form - if ($nforms) { - $r->print('