[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /homework grades.pm

raeburn raeburn at source.lon-capa.org
Sat May 12 21:43:55 EDT 2012


raeburn		Sun May 13 01:43:55 2012 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/homework	grades.pm 
  Log:
  - For 2.11.
    - Backport part of changes in 1.649, ommitted in 1.596.2.12.2.1.
    - Bacport 1.673.  
  
  
Index: loncom/homework/grades.pm
diff -u loncom/homework/grades.pm:1.596.2.12.2.7 loncom/homework/grades.pm:1.596.2.12.2.8
--- loncom/homework/grades.pm:1.596.2.12.2.7	Wed May  2 17:57:25 2012
+++ loncom/homework/grades.pm	Sun May 13 01:43:54 2012
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # The LON-CAPA Grading handler
 #
-# $Id: grades.pm,v 1.596.2.12.2.7 2012/05/02 17:57:25 raeburn Exp $
+# $Id: grades.pm,v 1.596.2.12.2.8 2012/05/13 01:43:54 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -8069,6 +8069,8 @@
     my $default_form_data=&defaultFormData($symb);
 
     my %scantron_config=&get_scantron_config($env{'form.scantron_format'});
+    my $bubbles_per_row =
+        &bubblesheet_bubbles_per_row(\%scantron_config);
     my ($scanlines,$scan_data)=&scantron_getfile();
     my $classlist=&Apache::loncoursedata::get_classlist();
     my %idmap=&username_to_idmap($classlist);
@@ -8081,7 +8083,7 @@
     my @resources=$navmap->retrieveResources($map,\&scantron_filter,1,0);
     my (%grader_partids_by_symb,%grader_randomlists_by_symb);
     &graders_resources_pass(\@resources,\%grader_partids_by_symb,
-                            \%grader_randomlists_by_symb);
+                            \%grader_randomlists_by_symb,$bubbles_per_row);
     my $resource_error;
     foreach my $resource (@resources) {
         my $ressymb;
@@ -8312,7 +8314,8 @@
 }
 
 sub graders_resources_pass {
-    my ($resources,$grader_partids_by_symb,$grader_randomlists_by_symb) = @_;
+    my ($resources,$grader_partids_by_symb,$grader_randomlists_by_symb,
+        $bubbles_per_row) = @_;
     if ((ref($resources) eq 'ARRAY') && (ref($grader_partids_by_symb)) && 
         (ref($grader_randomlists_by_symb) eq 'HASH')) {
         foreach my $resource (@{$resources}) {
@@ -8638,6 +8641,7 @@
     my %record;
     my %scantron_config =
         &Apache::grades::get_scantron_config($env{'form.scantron_format'});
+    my $bubbles_per_row = &bubblesheet_bubbles_per_row(\%scantron_config);
     my ($scanlines,$scan_data)=&Apache::grades::scantron_getfile();
     my $classlist=&Apache::loncoursedata::get_classlist();
     my %idmap=&Apache::grades::username_to_idmap($classlist);
@@ -8649,7 +8653,8 @@
     my $map=$navmap->getResourceByUrl($sequence);
     my @resources=$navmap->retrieveResources($map,\&scantron_filter,1,0);
     my (%grader_partids_by_symb,%grader_randomlists_by_symb);
-    &graders_resources_pass(\@resources,\%grader_partids_by_symb,                             \%grader_randomlists_by_symb);
+    &graders_resources_pass(\@resources,\%grader_partids_by_symb,
+                            \%grader_randomlists_by_symb,$bubbles_per_row);
 
     my ($uname,$udom);
     my (%scandata,%lastname,%bylast);




More information about the LON-CAPA-cvs mailing list