[LON-CAPA-cvs] cvs: loncom /interface lonsimplepage.pm
foxr
lon-capa-cvs-allow@mail.lon-capa.org
Mon, 28 Jan 2008 10:32:48 -0000
foxr Mon Jan 28 05:32:48 2008 EDT
Modified files:
/loncom/interface lonsimplepage.pm
Log:
BZ5548 - Don't interpret latex -> html if the output's going to be
latex anyway. This prevents that sort of infinite looping.
Index: loncom/interface/lonsimplepage.pm
diff -u loncom/interface/lonsimplepage.pm:1.53 loncom/interface/lonsimplepage.pm:1.54
--- loncom/interface/lonsimplepage.pm:1.53 Fri Jan 18 11:41:27 2008
+++ loncom/interface/lonsimplepage.pm Mon Jan 28 05:32:47 2008
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Simple Page Editor
#
-# $Id: lonsimplepage.pm,v 1.53 2008/01/18 16:41:27 raeburn Exp $
+# $Id: lonsimplepage.pm,v 1.54 2008/01/28 10:32:47 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -299,7 +299,11 @@
if ($allowed) {
$message=&Apache::lonspeller::markeduptext($message);
}
- $message=&Apache::lontexconvert::msgtexconverted($message);
+ &Apache::lonnet::logthis("Prior to texconvert: '$message'");
+ if ($target ne 'tex') {
+ $message=&Apache::lontexconvert::msgtexconverted($message);
+ }
+ &Apache::lonnet::logthis("After texconvert: '$message'");
if ($field eq 'abb_links' && $group ne '') {
$r->print('<br /><input type="hidden" name="'.$field.
'" value="'.$syllabus{$field}.'" />');
@@ -327,8 +331,10 @@
} else {
if (($field ne 'bbb_content') || ($allowed)) {
if ($target ne 'tex') {
+ &Apache::lonnet::logthis("contents in web presentation '$syllabusfields{$field}'");
$r->print('<h3>'.$syllabusfields{$field}.'</h3>');
} else {
+ &Apache::lonnet::logthis("contents in tex presentation '$syllabusfields{$field}'");
my $safeinit;
$r->print(&Apache::lonxml::xmlparse($r,'tex','<h3>'.$syllabusfields{$field}.'</h3>'));
}