[LON-CAPA-cvs] cvs: loncom /homework structuretags.pm /localize/localize newphrases.txt /xml lonxml.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Fri, 21 Nov 2003 20:21:20 -0000
albertel Fri Nov 21 15:21:20 2003 EDT
Modified files:
/loncom/xml lonxml.pm
/loncom/homework structuretags.pm
/loncom/localize/localize newphrases.txt
Log:
- BUG#2400, message about Edit errors may only be edit modde errors
Index: loncom/xml/lonxml.pm
diff -u loncom/xml/lonxml.pm:1.294 loncom/xml/lonxml.pm:1.295
--- loncom/xml/lonxml.pm:1.294 Fri Nov 21 13:54:10 2003
+++ loncom/xml/lonxml.pm Fri Nov 21 15:21:20 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# XML Parser Module
#
-# $Id: lonxml.pm,v 1.294 2003/11/21 18:54:10 albertel Exp $
+# $Id: lonxml.pm,v 1.295 2003/11/21 20:21:20 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -167,6 +167,9 @@
#should we do the postag variable interpolation
$Apache::lonxml::post_evaluate=1;
+#a header message to emit in the case of any generated warning or errors
+$Apache::lonxml::warnings_error_header='';
+
sub xmlbegin {
my $output='';
if ($ENV{'browser.mathml'}) {
@@ -625,6 +628,7 @@
@Apache::lonxml::extlinks=();
@Apache::lonxml::ssi_info=();
$Apache::lonxml::post_evaluate=1;
+ $Apache::lonxml::warnings_error_header='';
if ($target eq 'meta') {
$Apache::lonxml::redirection = 0;
$Apache::lonxml::metamode = 1;
@@ -1301,7 +1305,9 @@
$errorcount++;
if (($Apache::lonxml::debug eq 1) || ($ENV{'request.state'} eq 'construct') ) {
# If printing in construction space, put the error inside <pre></pre>
- print "<b>ERROR:</b>".join("\n",@_)."\n";
+ print $Apache::lonxml::warnings_error_header.
+ "<b>ERROR:</b>".join("\n",@_)."\n";
+ $Apache::lonxml::warnings_error_header='';
} else {
print "<b>An Error occured while processing this resource. The instructor has been notified.</b> <br />";
#notify author
@@ -1324,13 +1330,15 @@
}
sub warning {
- $warningcount++;
+ $warningcount++;
- if ($ENV{'form.grade_target'} ne 'tex') {
- if ($ENV{'request.state'} eq 'construct' || $Apache::lonxml::debug) {
- print "<b>W</b>ARNING<b>:</b>".join('<br />',@_)."<br />\n";
- }
- }
+ if ($ENV{'form.grade_target'} ne 'tex') {
+ if ($ENV{'request.state'} eq 'construct' || $Apache::lonxml::debug) {
+ print $Apache::lonxml::warnings_error_header.
+ "<b>W</b>ARNING<b>:</b>".join('<br />',@_)."<br />\n";
+ $Apache::lonxml::warnings_error_header='';
+ }
+ }
}
sub get_param {
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.225 loncom/homework/structuretags.pm:1.226
--- loncom/homework/structuretags.pm:1.225 Thu Nov 6 01:54:51 2003
+++ loncom/homework/structuretags.pm Fri Nov 21 15:21:20 2003
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# definition of tags that give a structure to a document
#
-# $Id: structuretags.pm,v 1.225 2003/11/06 06:54:51 albertel Exp $
+# $Id: structuretags.pm,v 1.226 2003/11/21 20:21:20 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -503,6 +503,8 @@
} elsif ($target eq 'edit') {
$result.=$head_tag_start."</head>".$body_tag_start.$form_tag_start.
&problem_edit_header();
+ $Apache::lonxml::warnings_error_header=
+ &mt("Editor Errors - these errors might not effect the running of the problem, but they will likely cause problems with further use of the Edit mode. Please use the EditXML mode to fix these errors.")."<br />";
my $temp=&Apache::edit::insertlist($target,$token);
$result.=$temp;
} elsif ($target eq 'modified') {
Index: loncom/localize/localize/newphrases.txt
diff -u loncom/localize/localize/newphrases.txt:1.21 loncom/localize/localize/newphrases.txt:1.22
--- loncom/localize/localize/newphrases.txt:1.21 Thu Nov 20 15:21:17 2003
+++ loncom/localize/localize/newphrases.txt Fri Nov 21 15:21:20 2003
@@ -117,3 +117,5 @@
Grant/revoke role of Scantron Operator
Upload Scantron data
None Found
+
+Editor Errors - these errors might not effect the running of the problem, but they will likely cause problems with further use of the Edit mode. Please use the EditXML mode to fix these errors.
\ No newline at end of file