[LON-CAPA-cvs] cvs: loncom /homework inputtags.pm optionresponse.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Mon, 01 Apr 2002 21:26:57 -0000
albertel Mon Apr 1 16:26:57 2002 EDT
Modified files:
/loncom/homework inputtags.pm optionresponse.pm
Log:
- if some parts of the <optionresponse> are not submitted don't count a try
fixes BUG#191
Index: loncom/homework/inputtags.pm
diff -u loncom/homework/inputtags.pm:1.55 loncom/homework/inputtags.pm:1.56
--- loncom/homework/inputtags.pm:1.55 Mon Mar 11 16:37:55 2002
+++ loncom/homework/inputtags.pm Mon Apr 1 16:26:57 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# input definitons
#
-# $Id: inputtags.pm,v 1.55 2002/03/11 21:37:55 albertel Exp $
+# $Id: inputtags.pm,v 1.56 2002/04/01 21:26:57 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -195,6 +195,9 @@
}
}
if ($blankcount == ($#_ + 1)) { $result = 'NO_RESPONSE'; }
+ }
+ if ($result eq '' ) {
+ foreach $award (@_) { if ($award eq 'MISSING_ANSWER') {$result='MISSING_ANSWER'; last;}}
}
if ($result eq '' ) {
foreach $award (@_) { if ($award eq 'ERROR') {$result='ERROR'; last;}}
Index: loncom/homework/optionresponse.pm
diff -u loncom/homework/optionresponse.pm:1.35 loncom/homework/optionresponse.pm:1.36
--- loncom/homework/optionresponse.pm:1.35 Fri Mar 29 14:19:21 2002
+++ loncom/homework/optionresponse.pm Mon Apr 1 16:26:57 2002
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# option list style responses
#
-# $Id: optionresponse.pm,v 1.35 2002/03/29 19:19:21 albertel Exp $
+# $Id: optionresponse.pm,v 1.36 2002/04/01 21:26:57 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -204,7 +204,11 @@
} elsif ($wrong==0 && $right==0) {
#nothing submitted
} else {
- $ad='INCORRECT';
+ if ($ignored==0) {
+ $ad='INCORRECT';
+ } else {
+ $ad='MISSING_ANSWER';
+ }
}
$Apache::lonhomework::results{"resource.$part.$id.submission"}=
$responsestr;