[LON-CAPA-cvs] cvs: loncom /homework rankresponse.pm
albertel
lon-capa-cvs@mail.lon-capa.org
Fri, 03 Sep 2004 18:35:52 -0000
albertel Fri Sep 3 14:35:52 2004 EDT
Modified files:
/loncom/homework rankresponse.pm
Log:
- scantron <rankresponse> was being misgraded BUG#3434
Index: loncom/homework/rankresponse.pm
diff -u loncom/homework/rankresponse.pm:1.36 loncom/homework/rankresponse.pm:1.37
--- loncom/homework/rankresponse.pm:1.36 Wed Aug 25 16:00:31 2004
+++ loncom/homework/rankresponse.pm Fri Sep 3 14:35:52 2004
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# rank style response
#
-# $Id: rankresponse.pm,v 1.36 2004/08/25 20:00:31 albertel Exp $
+# $Id: rankresponse.pm,v 1.37 2004/09/03 18:35:52 albertel Exp $
# Copyright Michigan State University Board of Trustees
#
# This file is part of the LearningOnline Network with CAPA (LON-CAPA).
@@ -198,7 +198,8 @@
my ($temp,$right,$wrong,$ignored)=(1,0,0,0);
my @correctorder=&get_correct_order($tol,@whichfoils);
foreach my $name (@whichfoils) {
- my $response = &Apache::response::getresponse($temp);
+ # get response returns a=>0, when we want a=>1
+ my $response = &Apache::response::getresponse($temp)+1;
my $value=shift(@correctorder);
if ( $response =~ /[^\s]/) {
$responsehash{$name}=$response;