--- loncom/xml/lontexconvert.pm 2004/03/04 15:40:22 1.31 +++ loncom/xml/lontexconvert.pm 2004/03/04 15:46:43 1.33 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # TeX Conversion Module # -# $Id: lontexconvert.pm,v 1.31 2004/03/04 15:40:22 albertel Exp $ +# $Id: lontexconvert.pm,v 1.33 2004/03/04 15:46:43 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -42,12 +42,13 @@ package Apache::lontexconvert; use strict; -use tth; +use tth(); use vars qw($errorstring); use Apache(); -use Apache::lonmsg; -use Apache::lonxml; -use Apache::lonmenu; +use Apache::lonmsg(); +use Apache::lonxml(); +use Apache::lonmenu(); +use Apache::lonlocal; # ====================================================================== Header @@ -86,9 +87,9 @@ sub header { $Apache::lontexconvert::messedup=0; sub converted { my $texstring=shift; - my $xmlstring='[UNDISPLAYABLE]'; + my $xmlstring=&mt('[UNDISPLAYABLE]'); if ($Apache::lontexconvert::messedup) { - return '[TeX Unconverted Due To Previous Errors]'; + return &mt('[TeX Unconverted Due To Previous Errors]'); } eval(<<'ENDCONV'); { @@ -108,6 +109,10 @@ sub converted { $xmlstring=~s/\s*$//; } ENDCONV + if ($@) { + $errorstring.=&mt("Evaluation Error ").$@; + $Apache::lontexconvert::messedup=1; + } if ($Apache::lontexconvert::messedup || &tth::tthmessedup()) { &Apache::lonnet::logthis("Trying to kill myself"); $Apache::lontexconvert::messedup=1;