[LON-CAPA-cvs] cvs: loncom /xml lonxml.pm

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 11 Apr 2006 14:07:34 -0000


albertel		Tue Apr 11 10:07:34 2006 EDT

  Modified files:              
    /loncom/xml	lonxml.pm 
  Log:
  - adding the machine id of the computer that is throwing the error message
  
  
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.402 loncom/xml/lonxml.pm:1.403
--- loncom/xml/lonxml.pm:1.402	Thu Mar 23 18:48:10 2006
+++ loncom/xml/lonxml.pm	Tue Apr 11 10:07:33 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # XML Parser Module 
 #
-# $Id: lonxml.pm,v 1.402 2006/03/23 23:48:10 albertel Exp $
+# $Id: lonxml.pm,v 1.403 2006/04/11 14:07:33 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1579,9 +1579,11 @@
 	if ( !$symb ) {
 	    #public or browsers
 	    $errormsg=&mt("An error occured while processing this resource. The author has been notified.");
-	} 
+	}
+	my $msg = join('<br />',@_)." <p>this error occurred on machine ".
+	    $perlvar{'lonHostID'}."</p>";
 	#notify author
-	&Apache::lonmsg::author_res_msg($env{'request.filename'},join('<br />',@_));
+	&Apache::lonmsg::author_res_msg($env{'request.filename'},$msg);
 	#notify course
 	if ( $symb && $env{'request.course.id'} ) {
 	    my $cnum=$env{'course.'.$env{'request.course.id'}.'.num'};
@@ -1599,7 +1601,7 @@
 		my $now=time;
 		if ($now-$lastnotified{$key}>86400) {
 		    &Apache::lonmsg::user_normal_msg($user,$domain,
-						 "Error [$declutter]",join('<br />',@_));
+						 "Error [$declutter]",$msg);
 		    &Apache::lonnet::put('nohist_xmlerrornotifications',
 					 {$key => $now},
 					 $cdom,$cnum);