--- rat/lonpage.pm 2003/04/18 01:20:25 1.50 +++ rat/lonpage.pm 2003/10/21 20:40:10 1.54 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Page Handler # -# $Id: lonpage.pm,v 1.50 2003/04/18 01:20:25 www Exp $ +# $Id: lonpage.pm,v 1.54 2003/10/21 20:40:10 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -145,9 +145,9 @@ sub handler { if ($r->header_only) { if ($ENV{'browser.mathml'}) { - $r->content_type('text/xml'); + &Apache::loncommon::content_type($r,'text/xml'); } else { - $r->content_type('text/html'); + &Apache::loncommon::content_type($r,'text/html'); } $r->send_http_header; return OK; @@ -158,6 +158,12 @@ sub handler { my $number_of_columns = 1; my $requrl=$r->uri; my $target = $ENV{'form.grade_target'}; + &Apache::lonnet::logthis("Got a target of $target"); + if ($target eq 'meta') { + &Apache::loncommon::content_type($r,'text/html'); + $r->send_http_header; + return OK; + } # ----------------------------------------------------------------- Tie db file if (($ENV{'request.course.fn'}) && (!$ENV{'form.forceselect'})) { my $fn=$ENV{'request.course.fn'}; @@ -331,20 +337,20 @@ sub handler { } } unless ($contents) { - $r->content_type('text/html'); + &Apache::loncommon::content_type($r,'text/html'); $r->send_http_header; - $r->print('Empty page.'); + $r->print(''.&mt('Empty page').'.'); } else { # ------------------------------------------------------------------ Build page # ---------------------------------------------------------------- Send headers unless ($target eq 'tex') { if ($isxml) { - $r->content_type('text/xml'); + &Apache::loncommon::content_type($r,'text/xml'); $r->send_http_header; $r->print($xmlheader); } else { - $r->content_type('text/html'); + &Apache::loncommon::content_type($r,'text/html'); $r->send_http_header; $r->print(''); } @@ -360,7 +366,11 @@ sub handler { if ($isxml) { $r->print($xmlbody); } else { - $r->print(''); + $r->print( + ''. + &Apache::lonmenu::menubuttons(undef,$target,1) + ); } # ------------------------------------------------------------------ Start form if ($nforms) { @@ -410,15 +420,18 @@ sub handler { &Apache::lonnet::declutter($hash{'src_'.$rid}); $metainfo.= ''. +# '&command=submission" target="LONcatInfo">'. + '&command=submission">'. ''. ''. ''. +# '&command=gradingmenu" target="LONcatInfo">'. + '&command=gradingmenu">'. ''. ''. ''. +# '" target="LONcatInfo">'. + '" >'. ''. ''; }