--- loncom/xml/lonxml.pm 2005/06/24 21:09:31 1.378
+++ loncom/xml/lonxml.pm 2005/07/08 10:39:49 1.380
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# XML Parser Module
#
-# $Id: lonxml.pm,v 1.378 2005/06/24 21:09:31 albertel Exp $
+# $Id: lonxml.pm,v 1.380 2005/07/08 10:39:49 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -180,8 +180,8 @@ sub xmlend {
$status=$Apache::inputtags::status[-1];
}
my $discussion;
- &Apache::loncommon::get_unprocessed_cgi
- ($env{'query_string'},['LONCAPA_INTERNAL_no_discussion']);
+ &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
+ ['LONCAPA_INTERNAL_no_discussion']);
if (! exists($env{'form.LONCAPA_INTERNAL_no_discussion'}) ||
$env{'form.LONCAPA_INTERNAL_no_discussion'} ne 'true') {
$discussion=&Apache::lonfeedback::list_discussion($mode,$status);
@@ -818,7 +818,7 @@ sub startredirection {
sub endredirection {
if (!$Apache::lonxml::redirection) {
- &Apache::lonxml::error("Endredirection was called, before a startredirection, perhaps you have unbalanced tags. Some debuging information:".join ":",caller);
+ &Apache::lonxml::error("Endredirection was called before a startredirection, perhaps you have unbalanced tags. Some debugging information:".join ":",caller);
return '';
}
$Apache::lonxml::redirection--;
@@ -1432,14 +1432,26 @@ sub error {
&Apache::lonmsg::author_res_msg($env{'request.filename'},join('
',@_));
#notify course
if ( $symb && $env{'request.course.id'} ) {
+ my $cnum=$env{'course.'.$env{'request.course.id'}.'.num'};
+ my $cdom=$env{'course.'.$env{'request.course.id'}.'.domain'};
my (undef,%users)=&Apache::lonfeedback::decide_receiver(undef,0,1,1,1);
my $declutter=&Apache::lonnet::declutter($env{'request.filename'});
my @userlist;
foreach (keys %users) {
my ($user,$domain) = split(/:/, $_);
push(@userlist,"$user\@$domain");
- &Apache::lonmsg::user_normal_msg($user,$domain,
+ my $key=$declutter.'_'.$user.'_'.$domain;
+ my %lastnotified=&Apache::lonnet::get('nohist_xmlerrornotifications',
+ [$key],
+ $cdom,$cnum);
+ my $now=time;
+ if ($now-$lastnotified{$key}>86400) {
+ &Apache::lonmsg::user_normal_msg($user,$domain,
"Error [$declutter]",join('
',@_));
+ &Apache::lonnet::put('nohist_xmlerrornotifications',
+ {$key => $now},
+ $cdom,$cnum);
+ }
}
if ($env{'request.role.adv'}) {
$errormsg=&mt("An error occured while processing this resource. The course personnel ([_1]) and the author have been notified.",join(', ',@userlist));