[LON-CAPA-cvs] cvs: loncom /homework response.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Mon, 04 Dec 2006 21:12:58 -0000
albertel Mon Dec 4 16:12:58 2006 EDT
Modified files:
/loncom/homework response.pm
Log:
- scripts must return a valid award string '1' and '0' aren'a valid award strings
Index: loncom/homework/response.pm
diff -u loncom/homework/response.pm:1.150 loncom/homework/response.pm:1.151
--- loncom/homework/response.pm:1.150 Mon Dec 4 15:35:06 2006
+++ loncom/homework/response.pm Mon Dec 4 16:12:57 2006
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# various response type definitons response definition
#
-# $Id: response.pm,v 1.150 2006/12/04 20:35:06 www Exp $
+# $Id: response.pm,v 1.151 2006/12/04 21:12:57 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -516,14 +516,8 @@
my $award = &Apache::run::run('{ my $submission=$LONCAPA::mathresponse_submission;'.$Apache::response::custom_answer.'}',$safeeval);
if (!&Apache::inputtags::valid_award($award)) {
- if ($award==1) {
- $award='EXACT_ANS';
- } elsif ($award==0) {
- $award='INCORRECT';
- } else {
- $error = $award;
- $award = 'ERROR';
- }
+ $error = $award;
+ $award = 'ERROR';
}
&Apache::response::handle_previous(\%previous,$award);
$Apache::lonhomework::results{"resource.$part.$id.awarddetail"}=