--- loncom/xml/lonxml.pm 2002/01/02 13:18:26 1.144
+++ loncom/xml/lonxml.pm 2002/01/07 18:11:57 1.146
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# XML Parser Module
#
-# $Id: lonxml.pm,v 1.144 2002/01/02 13:18:26 matthew Exp $
+# $Id: lonxml.pm,v 1.146 2002/01/07 18:11:57 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -54,6 +54,8 @@
# Dec Guy Albertelli
# YEAR=2002
# 1/1 Gerd Kortemeyer
+# 1/2 Matthew Hall
+# 1/3 Gerd Kortemeyer
#
package Apache::lonxml;
@@ -288,11 +290,14 @@ sub printtokenheader {
$reply{'generation'};
if ($target eq 'web') {
+ my %idhash=&Apache::lonnet::idrget($tudom,($tuname));
return
''.
'Checked out for '.$plainname.
'
User: '.$tuname.' at '.$tudom.
+ '
ID: '.$idhash{$tuname}.
'
CourseID: '.$tcrsid.
+ '
Course: '.$ENV{'course.'.$tcrsid.'.description'}.
'
DocID: '.$token.
'
Time: '.localtime().'
';
} else {
@@ -1111,17 +1116,18 @@ ENDNOTFOUND
sub debug {
if ($Apache::lonxml::debug eq 1) {
- print("DEBUG:".$_[0]."
\n");
+ $|=1;
+ print("DEBUG:".join('
',@_)."
\n");
}
}
sub error {
if (($Apache::lonxml::debug eq 1) || ($ENV{'request.state'} eq 'construct') ) {
- print "ERROR:".$_[0]."
\n";
+ print "ERROR:".join('
',@_)."
\n";
} else {
print "An Error occured while processing this resource. The instructor has been notified.
";
#notify author
- &Apache::lonmsg::author_res_msg($ENV{'request.filename'},$_[0]);
+ &Apache::lonmsg::author_res_msg($ENV{'request.filename'},join('
',@_));
#notify course
if ( $ENV{'request.course.id'} ) {
my $users=$ENV{'course.'.$ENV{'request.course.id'}.'.comment.email'};
@@ -1129,19 +1135,19 @@ sub error {
foreach my $user (split /\,/, $users) {
($user,my $domain) = split /:/, $user;
&Apache::lonmsg::user_normal_msg($user,$domain,
- "Error [$declutter]",$_[0]);
+ "Error [$declutter]",join('
',@_));
}
}
#FIXME probably shouldn't have me get everything forever.
- &Apache::lonmsg::user_normal_msg('albertel','msu',"Error in $ENV{'request.filename'}",$_[0]);
+ &Apache::lonmsg::user_normal_msg('albertel','msu',"Error in $ENV{'request.filename'}",join('
',@_));
#&Apache::lonmsg::user_normal_msg('albertel','103',"Error in $ENV{'request.filename'}",$_[0]);
}
}
sub warning {
if ($ENV{'request.state'} eq 'construct') {
- print "WARNING:".$_[0]."
\n";
+ print "WARNING:".join('
',@_)."
\n";
}
}