--- loncom/xml/lonxml.pm 2001/01/05 19:45:03 1.44 +++ loncom/xml/lonxml.pm 2001/01/12 20:38:05 1.48 @@ -3,6 +3,7 @@ # # last modified 06/26/00 by Alexander Sakharuk # 11/6 Gerd Kortemeyer +# 6/1/1 Gerd Kortemeyer package Apache::lonxml; use vars @@ -12,6 +13,7 @@ use HTML::TokeParser; use Safe; use Safe::Hole; use Opcode; +use Apache::Constants qw(:common); sub register { my $space; @@ -22,6 +24,13 @@ sub register { $Apache::lonxml::alltags{$temptag}=$space; } } + +sub printalltags { + my $temp; + foreach $temp (sort keys %Apache::lonxml::alltags) { + &Apache::lonxml::debug("$temp -- $Apache::lonxml::alltags{$temp}"); + } +} use Apache::style; use Apache::lontexconvert; @@ -42,10 +51,14 @@ sub xmlparse { if ($target eq 'meta') { $Apache::lonxml::textredirection = 0; $Apache::lonxml::on_offimport = 1; + } elsif ($target eq 'grade') { + $Apache::lonxml::textredirection = 0; + $Apache::lonxml::on_offimport = 0; } else { $Apache::lonxml::textredirection = 1; $Apache::lonxml::on_offimport = 0; } + #&printalltags(); my @pars = (); @Apache::lonxml::pwd=(); my $pwd=$ENV{'request.filename'}; @@ -341,7 +354,7 @@ sub handler { my $request=shift; my $target='web'; -# $Apache::lonxml::debug=1; + $Apache::lonxml::debug=0; if ($ENV{'browser.mathml'}) { $request->content_type('text/xml'); } else { @@ -358,7 +371,7 @@ sub handler { # &Apache::lonhomework::send_header($request); $request->send_http_header; - return 'OK' if $request->header_only; + return OK if $request->header_only; $request->print(&Apache::lontexconvert::header()); @@ -373,7 +386,7 @@ sub handler { $request->print(''); $request->print(&Apache::lontexconvert::footer()); writeallows($request->uri); - return 'OK'; + return OK; } $Apache::lonxml::debug=0;