[LON-CAPA-cvs] cvs: loncom /interface lonchatfetch.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Mon, 23 Jun 2003 21:30:42 -0000
albertel Mon Jun 23 17:30:42 2003 EDT
Modified files:
/loncom/interface lonchatfetch.pm
Log:
- BUG# 1779, if TeX throws errors in chat mode show a generic error message to all, show the tTex error messages to the person who wrote it.
Index: loncom/interface/lonchatfetch.pm
diff -u loncom/interface/lonchatfetch.pm:1.10 loncom/interface/lonchatfetch.pm:1.11
--- loncom/interface/lonchatfetch.pm:1.10 Mon Jun 23 15:59:54 2003
+++ loncom/interface/lonchatfetch.pm Mon Jun 23 17:30:42 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Chat Fetching
#
-# $Id: lonchatfetch.pm,v 1.10 2003/06/23 19:59:54 www Exp $
+# $Id: lonchatfetch.pm,v 1.11 2003/06/23 21:30:42 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -96,7 +96,12 @@
&Apache::lonnet::unescape($msg));
$contrib=&Apache::lonnet::unescape($contrib);
$contrib=~s/\n/\<br \/\>/g;
- $contrib=&Apache::lontexconvert::msgtexconverted($contrib);
+ ($contrib,my $errors)=&Apache::lontexconvert::msgtexconverted($contrib);
+ if ($errors) { $contrib.="[Message not fully displayed due to incorrect embedded TeX]"; }
+ if ($errors && $snum eq $ENV{'user.name'} &&
+ $sdom eq $ENV{'user.domain'} ) {
+ $contrib.="<br />[TeX error message: $errors]";
+ }
$contrib=~s/\n/ /g;
$contrib=~s/\'/\&\#39\;/g;
my $sender='';