--- loncom/xml/lonxml.pm 2009/11/30 21:29:41 1.502 +++ loncom/xml/lonxml.pm 2009/11/30 23:22:47 1.503 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.502 2009/11/30 21:29:41 raeburn Exp $ +# $Id: lonxml.pm,v 1.503 2009/11/30 23:22:47 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1820,14 +1820,22 @@ ENDNOTFOUND &Apache::structuretags::reset_problem_globals(); &Apache::lonhomework::finished_parsing(); } elsif ($filetype eq 'tex') { - $result .= &Apache::lontexconvert::converted(\$filecontents); + $result = &Apache::lontexconvert::converted(\$filecontents, + $env{'form.texengine'}); + if ($env{'form.return_only_error_and_warning_counts'}) { + if (&verify_html(''.$result.'')) { + $errorcount++; + } + $result = "$errorcount:$warningcount"; + } } else { $result = $filecontents; } &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, ['rawmode']); if ($env{'form.rawmode'}) { $result = $filecontents; } - if ($filetype ne 'html') { + if (($filetype ne 'html') && + (!$env{'form.return_only_error_and_warning_counts'})) { my $nochgview = 1; my $controls = ''; if ($env{'request.state'} eq 'construct') {