--- loncom/xml/lonxml.pm 2009/11/30 21:29:41 1.502 +++ loncom/xml/lonxml.pm 2009/12/02 18:33:43 1.504 @@ -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.504 2009/12/02 18:33:43 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1549,22 +1549,27 @@ sub renderingoptions { } my $output; unless ($env{'form.forceedit'}) { - $output .= ' - '. + $output .= + ''. &mt('Language:').' '. - &Apache::loncommon::select_form($env{'form.languages'},'languages', - %langchoices).' - '; + &Apache::loncommon::select_form( + $env{'form.languages'}, + 'languages', + &Apache::lonlocal::texthash(%langchoices)). + ''; } - $output .= ' - '. + $output .= + ' '. &mt('Math Rendering:').' '. - &Apache::loncommon::select_form($env{'form.texengine'},'texengine', - ('' => '', - 'tth' => 'tth (TeX to HTML)', - 'jsMath' => 'jsMath', - 'mimetex' => 'mimetex (Convert to Images)')).' - '; + &Apache::loncommon::select_form( + $env{'form.texengine'}, + 'texengine', + &Apache::lonlocal::texthash + ('' => '', + 'tth' => 'tth (TeX to HTML)', + 'jsMath' => 'jsMath', + 'mimetex' => 'mimetex (Convert to Images)')). + ''; return $output; } @@ -1820,14 +1825,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') {