--- loncom/xml/lontexconvert.pm 2004/03/19 17:54:17 1.36 +++ loncom/xml/lontexconvert.pm 2004/07/22 23:18:00 1.38 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # TeX Conversion Module # -# $Id: lontexconvert.pm,v 1.36 2004/03/19 17:54:17 albertel Exp $ +# $Id: lontexconvert.pm,v 1.38 2004/07/22 23:18:00 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -95,6 +95,7 @@ sub convert_real { my ($xmlstring,$errorstring); local $SIG{SEGV}=sub { $Apache::lontexconvert::messedup=1; die; }; local $SIG{ALRM}=sub { + &Apache::lonnet::logthis("ALRM"); $xmlstring='['.&mt("TeX unconverted due to errors").']'; $Apache::lontexconvert::messedup=1; die &mt("TeX unconverted due to errors"); @@ -130,7 +131,8 @@ ENDCONV $errorstring.=&mt("Evaluation Error: ").$@; $Apache::lontexconvert::messedup=1; } - if ($Apache::lontexconvert::messedup || &tth::tthmessedup()) { + if ($Apache::lontexconvert::messedup || &tth::tthmessedup() || + $errorstring) { &Apache::lonnet::logthis("Trying to kill myself"); $Apache::lontexconvert::messedup=1; my $request=Apache->request(); @@ -188,12 +190,16 @@ sub smiley { } sub msgtexconverted { - my $message=shift; - my $email=shift; + my ($message,$email,$priorversions) = @_; $errorstring=''; &init_tth(); my $outmessage=''; my $tex=0; + if ($priorversions > 0) { + if ($message =~ /::::\d+::::(.+)$/) { + $message = $1; + } + } foreach (split(/(?:\<\;|\<)\/*m\s*(?:\>\;|\>)/i,$message)) { if ($tex) { if ($email) {