[LON-CAPA-cvs] cvs: loncom /homework grades.pm response.pm
foxr
lon-capa-cvs-allow@mail.lon-capa.org
Mon, 05 Nov 2007 11:46:11 -0000
foxr Mon Nov 5 06:46:11 2007 EDT
Modified files:
/loncom/homework grades.pm response.pm
Log:
BZ4074 - I think the grades finally work full circle for at least a single
question exam.
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.479 loncom/homework/grades.pm:1.480
--- loncom/homework/grades.pm:1.479 Mon Nov 5 05:19:03 2007
+++ loncom/homework/grades.pm Mon Nov 5 06:46:08 2007
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# The LON-CAPA Grading handler
#
-# $Id: grades.pm,v 1.479 2007/11/05 10:19:03 foxr Exp $
+# $Id: grades.pm,v 1.480 2007/11/05 11:46:08 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -5179,10 +5179,8 @@
} else {
substr($answer,$args->{'response'},1)=$on;
}
- my $before = Dumper($scan_data);
&scan_data($scan_data,
"$whichline.no_bubble.".$args->{'question'},undef,'1');
- my $after = Dumper($scan_data);
for (my $l = 0; $l < $bubble_count; $l++) {
if ($l eq $bubble_line) {
$final_answer .= $answer;
@@ -6520,7 +6518,6 @@
foreach my $question (@{$arg}) {
my $selected = &get_response_bubbles($scan_record, $question);
my @select_array = split(/:/,$selected);
- &Apache::lonnet::logthis("Questnum: $question, bubbles: $selected scanline $i");
&scantron_bubble_selector($r,$scan_config,$question,
@select_array);
}
@@ -6800,7 +6797,6 @@
my ($scanlines,$scan_data)=&scantron_getfile();
&scantron_get_maxbubble(); # parse needs the bubble line array.
- &Apache::lonnet::logthis("validate_double_bubble");
for (my $i=0;$i<=$scanlines->{'count'};$i++) {
my $line=&scantron_get_line($scanlines,$scan_data,$i);
@@ -6808,7 +6804,6 @@
my $scan_record=&scantron_parse_scanline($line,$i,\%scantron_config,
$scan_data);
if (!defined($$scan_record{'scantron.doubleerror'})) { next; }
- &Apache::lonnet::logthis("Double found for line $i : $line");
&scantron_get_correction($r,$i,$scan_record,\%scantron_config,$line,
'doublebubble',
$$scan_record{'scantron.doubleerror'});
Index: loncom/homework/response.pm
diff -u loncom/homework/response.pm:1.181 loncom/homework/response.pm:1.182
--- loncom/homework/response.pm:1.181 Tue Oct 16 20:22:51 2007
+++ loncom/homework/response.pm Mon Nov 5 06:46:08 2007
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# various response type definitons response definition
#
-# $Id: response.pm,v 1.181 2007/10/17 00:22:51 albertel Exp $
+# $Id: response.pm,v 1.182 2007/11/05 11:46:08 foxr Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -898,7 +898,7 @@
$response = $env{'scantron.'.
($Apache::lonxml::counter+$offset-1+$line).
'.answer'};
- if ($response ne "") {
+ if ((defined($response)) && ($response ne " ")) {
last;
}