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

matthew lon-capa-cvs@mail.lon-capa.org
Thu, 21 Nov 2002 19:05:18 -0000


matthew		Thu Nov 21 14:05:18 2002 EDT

  Modified files:              
    /loncom/interface	lonspreadsheet.pm 
  Log:
  Fix bug which caused students spreadsheets to be written into the
  recursive excel sheet in the wrong order.
  
  
Index: loncom/interface/lonspreadsheet.pm
diff -u loncom/interface/lonspreadsheet.pm:1.145 loncom/interface/lonspreadsheet.pm:1.146
--- loncom/interface/lonspreadsheet.pm:1.145	Thu Nov 21 13:56:36 2002
+++ loncom/interface/lonspreadsheet.pm	Thu Nov 21 14:05:18 2002
@@ -1,5 +1,5 @@
 #
-# $Id: lonspreadsheet.pm,v 1.145 2002/11/21 18:56:36 matthew Exp $
+# $Id: lonspreadsheet.pm,v 1.146 2002/11/21 19:05:18 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -1530,10 +1530,9 @@
 END
     $r->rflush();
     my $starttime = time;
-    foreach (keys(%f)) {
-	next if ($_!~/^A(\d+)/ || $1 == 0 || ($f{$_}=~/^[!~-]/));
+    foreach my $rownum (&sort_indicies($sheet)) {
         $count++;
-        my ($sname,$sdom) = split(':',$f{$_});
+        my ($sname,$sdom) = split(':',$f{'A'.$rownum});
         my $student_excel_worksheet=$workbook->addworksheet($sname.'@'.$sdom);
         # Create a new spreadsheet
         my $studentsheet = &makenewsheet($sname,$sdom,'studentcalc',undef);