[LON-CAPA-cvs] cvs: loncom /homework grades.pm response.pm

foxr lon-capa-cvs-allow@mail.lon-capa.org
Tue, 06 Nov 2007 11:48:48 -0000


foxr		Tue Nov  6 06:48:48 2007 EDT

  Modified files:              
    /loncom/homework	grades.pm response.pm 
  Log:
  BZ4074 - Complete testing of single question exams for bubble sheets
  in number and positional format.. removed log spew where needed.
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.482 loncom/homework/grades.pm:1.483
--- loncom/homework/grades.pm:1.482	Tue Nov  6 06:21:21 2007
+++ loncom/homework/grades.pm	Tue Nov  6 06:48:48 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.482 2007/11/06 11:21:21 foxr Exp $
+# $Id: grades.pm,v 1.483 2007/11/06 11:48:48 foxr Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -5453,8 +5453,9 @@
 	    } elsif (scalar(@array) le 2) {
 
 		my $location      = length($array[0]);
-		my $line_num      = $location / $$scantron_config{'Qlength'};
+		my $line_num      = int($location / $$scantron_config{'Qlength'});
 		my $bubble        = $alphabet[$location % $$scantron_config{'Qlength'}];
+		
 
 		for (my $ans = 0; $ans < $answers_needed; $ans++) {
 		    if ($ans eq $line_num) {
Index: loncom/homework/response.pm
diff -u loncom/homework/response.pm:1.182 loncom/homework/response.pm:1.183
--- loncom/homework/response.pm:1.182	Mon Nov  5 06:46:08 2007
+++ loncom/homework/response.pm	Tue Nov  6 06:48:48 2007
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # various response type definitons response definition
 #
-# $Id: response.pm,v 1.182 2007/11/05 11:46:08 foxr Exp $
+# $Id: response.pm,v 1.183 2007/11/06 11:48:48 foxr Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -907,7 +907,6 @@
 	# save bubbled letter for later
 	$Apache::lonhomework::results{"resource.$part.$id.scantron"}.=
 	    $response;
-
 	if ($resulttype ne 'letter') {
 	    if ($resulttype eq 'A is 1') {
 		$response = $let_to_num{$response}+1;