--- loncom/xml/lonxml.pm 2005/03/10 19:10:31 1.362 +++ loncom/xml/lonxml.pm 2005/03/16 19:09:44 1.365 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.362 2005/03/10 19:10:31 matthew Exp $ +# $Id: lonxml.pm,v 1.365 2005/03/16 19:09:44 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1056,7 +1056,8 @@ sub get_all_text { sub newparser { my ($parser,$contentref,$dir) = @_; push (@$parser,HTML::LCParser->new($contentref)); - $$parser['-1']->xml_mode('1'); + $$parser[-1]->xml_mode(1); + $$parser[-1]->marked_sections(1); if ( $dir eq '' ) { push (@Apache::lonxml::pwd, $Apache::lonxml::pwd[$#Apache::lonxml::pwd]); } else { @@ -1297,14 +1298,12 @@ sub handler { $Apache::lonxml::debug=$ENV{'user.debug'}; - if ($ENV{'browser.mathml'}) { - &Apache::loncommon::content_type($request,'text/xml'); - } else { - &Apache::loncommon::content_type($request,'text/html'); - } + &Apache::loncommon::content_type($request,'text/html'); &Apache::loncommon::no_cache($request); - $request->set_last_modified(&Apache::lonnet::metadata($request->uri, - 'lastrevisiondate')); + if ($ENV{'request.state'} eq 'published') { + $request->set_last_modified(&Apache::lonnet::metadata($request->uri, + 'lastrevisiondate')); + } $request->send_http_header; return OK if $request->header_only;