[LON-CAPA-cvs] cvs: loncom /interface/statistics lonstudentsubmissions.pm

raeburn raeburn at source.lon-capa.org
Mon Sep 19 00:02:20 EDT 2011


raeburn		Mon Sep 19 04:02:20 2011 EDT

  Modified files:              
    /loncom/interface/statistics	lonstudentsubmissions.pm 
  Log:
  - Bug 6243.
    - Delay writing student name information in initial column(s) in a row,
      until results got from loncoursedata::get_response_data_by_student() 
      for the student.
    - Avoid incomplete last row for a student without submissions.
    - Remove unused scalar: $last_student_col (last used in rev 1.30).
  
  
Index: loncom/interface/statistics/lonstudentsubmissions.pm
diff -u loncom/interface/statistics/lonstudentsubmissions.pm:1.62 loncom/interface/statistics/lonstudentsubmissions.pm:1.63
--- loncom/interface/statistics/lonstudentsubmissions.pm:1.62	Mon Jan 17 00:19:41 2011
+++ loncom/interface/statistics/lonstudentsubmissions.pm	Mon Sep 19 04:02:20 2011
@@ -1,6 +1,6 @@
 # The LearningOnline Network with CAPA
 #
-# $Id: lonstudentsubmissions.pm,v 1.62 2011/01/17 00:19:41 www Exp $
+# $Id: lonstudentsubmissions.pm,v 1.63 2011/09/19 04:02:20 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -898,15 +898,8 @@
         $cols_output = 0;
         my $student_row = $max_row;
         foreach my $field (@StudentColumns) {
-            if ($show_named) {
-                $worksheet->write($student_row,$cols_output++,
-                                  $student->{$field});
-            } else {
-                $worksheet->write($student_row,$cols_output++,
-                                      &mt('Anonymized'));
-            }
+            $cols_output ++;
         }
-        my $last_student_col = $cols_output-1;
         foreach my $prob (@$Problems) {
             my $symb = $prob->symb();
             foreach my $partid (@{$prob->parts}) {
@@ -961,8 +954,8 @@
                 }
             }
         }
-        # Fill in the remaining rows with the students data
-        for (my $row = $student_row+1;$row<$max_row;$row++) {
+        # Prepend current student's user information to all rows  
+        for (my $row = $student_row;$row<$max_row;$row++) {
             my $cols = 0;
             foreach my $field (@StudentColumns) {
                 if ($show_named) {




More information about the LON-CAPA-cvs mailing list