--- loncom/homework/rankresponse.pm 2003/10/27 20:04:34 1.26 +++ loncom/homework/rankresponse.pm 2004/02/10 17:01:20 1.29 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # rank style response # -# $Id: rankresponse.pm,v 1.26 2003/10/27 20:04:34 albertel Exp $ +# $Id: rankresponse.pm,v 1.29 2004/02/10 17:01:20 albertel Exp $ # Copyright Michigan State University Board of Trustees # # This file is part of the LearningOnline Network with CAPA (LON-CAPA). @@ -191,13 +191,13 @@ sub grade_response { if (!defined($ENV{'form.submitted'})) { return; } my %responsehash; my %grade; - my ($temp,$right,$wrong,$ignored)=(0,0,0,0); + 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); - $responsehash{$name}=$response; my $value=shift(@correctorder); if ( $response =~ /[^\s]/) { + $responsehash{$name}=$response; &Apache::lonxml::debug("submitted a $response for $value
\n"); if ($value eq $response) { $grade{$name}='1'; $right++; @@ -256,7 +256,7 @@ sub displayfoils { } } else { my $i = 0; - my $temp=0; + my $temp=1; my $id=$Apache::inputtags::response[-1]; my $part=$Apache::inputtags::part; my $lastresponse=$Apache::lonhomework::history{"resource.$part.$id.submission"};