[LON-CAPA-cvs] cvs: loncom /xml lonxml.pm
raeburn
raeburn@source.lon-capa.org
Mon, 30 Nov 2009 23:22:48 -0000
raeburn Mon Nov 30 23:22:48 2009 EDT
Modified files:
/loncom/xml lonxml.pm
Log:
- Bug 4936.
- Allow publication of raw .tex files in Construction Space.
Work in progress
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.502 loncom/xml/lonxml.pm:1.503
--- loncom/xml/lonxml.pm:1.502 Mon Nov 30 21:29:41 2009
+++ loncom/xml/lonxml.pm Mon Nov 30 23:22:47 2009
@@ -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 @@
&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('<html><body>'.$result.'</body></html>')) {
+ $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') {