[LON-CAPA-cvs] cvs: loncom(version_2_8_X) /homework inputtags.pm
raeburn
raeburn@source.lon-capa.org
Wed, 10 Dec 2008 22:47:32 -0000
raeburn Wed Dec 10 22:47:32 2008 EDT
Modified files: (Branch: version_2_8_X)
/loncom/homework inputtags.pm
Log:
- Backport 1.251.
Index: loncom/homework/inputtags.pm
diff -u loncom/homework/inputtags.pm:1.248 loncom/homework/inputtags.pm:1.248.2.1
--- loncom/homework/inputtags.pm:1.248 Sun Nov 16 02:46:25 2008
+++ loncom/homework/inputtags.pm Wed Dec 10 22:47:31 2008
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# input definitons
#
-# $Id: inputtags.pm,v 1.248 2008/11/16 02:46:25 raeburn Exp $
+# $Id: inputtags.pm,v 1.248.2.1 2008/12/10 22:47:31 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -523,7 +523,7 @@
'UNIT_INVALID_STUDENT', 'UNIT_IRRECONCIBLE',
'UNIT_FAIL', 'NO_UNIT',
'UNIT_NOTNEEDED', 'WANTED_NUMERIC',
- 'BAD_FORMULA', 'SIG_FAIL', 'INCORRECT',
+ 'BAD_FORMULA', 'INTERNAL_ERROR', 'SIG_FAIL', 'INCORRECT',
'MISORDERED_RANK', 'INVALID_FILETYPE',
'EXCESS_FILESIZE', 'DRAFT',
'SUBMITTED', 'ASSIGNED_SCORE',
@@ -538,7 +538,7 @@
'TOO_LONG',
'UNIT_INVALID_INSTRUCTOR', 'UNIT_INVALID_STUDENT',
'UNIT_IRRECONCIBLE', 'UNIT_FAIL', 'NO_UNIT',
- 'UNIT_NOTNEEDED', 'WANTED_NUMERIC', 'BAD_FORMULA',
+ 'UNIT_NOTNEEDED', 'WANTED_NUMERIC', 'BAD_FORMULA', 'INTERNAL_ERROR',
'COMMA_FAIL', 'SIG_FAIL', 'INCORRECT', 'MISORDERED_RANK',
'INVALID_FILETYPE', 'EXCESS_FILESIZE', 'DRAFT', 'SUBMITTED',
'ASSIGNED_SCORE', 'APPROX_ANS', 'EXACT_ANS');
@@ -586,6 +586,9 @@
return ('NO_RESPONSE');
}
}
+
+ if ($Apache::lonxml::internal_error) { $result='INTERNAL_ERROR'; }
+
if (!$final_scantron && defined($result)) { return ($result); }
# if in scantron mode, if the award for any response is
@@ -810,6 +813,10 @@
if ($target ne 'tex') {$message.=&Apache::loncommon::help_open_topic('Formula_Answers')};
$css_class=$possible_class{'not_charged_try'};
$button=1;
+ } elsif ($award eq 'INTERNAL_ERROR') {
+ $message = &mt("An internal error occurred while processing your answer. Please try again later.");
+ $css_class=$possible_class{'not_charged_try'};
+ $button=1;
} elsif ($award eq 'INCORRECT') {
$message = &mt("Incorrect").'.';
$css_class=$possible_class{'charged_try'};