--- loncom/xml/lonxml.pm 2007/08/18 00:08:36 1.452
+++ loncom/xml/lonxml.pm 2007/08/31 19:32:54 1.455
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# XML Parser Module
#
-# $Id: lonxml.pm,v 1.452 2007/08/18 00:08:36 albertel Exp $
+# $Id: lonxml.pm,v 1.455 2007/08/31 19:32:54 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1378,7 +1378,7 @@ $addbuttons
HTMLArea._addEvents(editor._doc,
["keypress","mousedown"], unClean);
editor._iframe.id = '$textarea_id';
- resize_textarea('$textarea_id','LC_aftertextarea');";
+ resize_textarea('$textarea_id','LC_aftertextarea');
},300);
}
@@ -1388,7 +1388,7 @@ FULLPAGE
FULLPAGE
@@ -1529,9 +1529,13 @@ ENDNOTFOUND
['editmode']);
}
if (!$env{'form.editmode'} || $env{'form.viewmode'} || $env{'form.discardview'}) {
+ &Apache::structuretags::reset_problem_globals();
$result = &Apache::lonxml::xmlparse($request,$target,$filecontents,
'',%mystyle);
- undef($Apache::lonhomework::parsing_a_task);
+ # .html files may contain or need to clean
+ # up if it did
+ &Apache::structuretags::reset_problem_globals();
+ &Apache::lonhomework::finished_parsing();
&Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'},
['rawmode']);
if ($env{'form.rawmode'}) { $result = $filecontents; }
@@ -1620,12 +1624,28 @@ sub show_error_warn_msg {
}
sub error {
+ my @errors = @_;
+
$errorcount++;
+
+ if (defined($Apache::inputtags::part)) {
+ if ( @Apache::inputtags::response ) {
+ push(@errors,
+ &mt("This error occurred while processing response [_1] in part [_2]",
+ $Apache::inputtags::response[-1],
+ $Apache::inputtags::part));
+ } else {
+ push(@errors,
+ &mt("This error occurred while processing part [_1]",
+ $Apache::inputtags::part));
+ }
+ }
+
if ( &show_error_warn_msg() ) {
# If printing in construction space, put the error inside
push(@Apache::lonxml::error_messages,
$Apache::lonxml::warnings_error_header.
- "ERROR:".join("
\n",@_)."
\n");
+ "ERROR:".join("
\n",@errors)."
\n");
$Apache::lonxml::warnings_error_header='';
} else {
my $errormsg;
@@ -1635,7 +1655,10 @@ sub error {
$errormsg=&mt("An error occured while processing this resource. The author has been notified.");
}
my $host=$Apache::lonnet::perlvar{'lonHostID'};
- my $msg = join('
',(@_,"The error occurred on host $host"));
+ push(@errors, "The error occurred on host $host");
+
+ my $msg = join('
', @errors);
+
#notify author
&Apache::lonmsg::author_res_msg($env{'request.filename'},$msg);
#notify course