[LON-CAPA-cvs] cvs: loncom /interface/spreadsheet assesscalc.pm studentcalc.pm

matthew lon-capa-cvs@mail.lon-capa.org
Mon, 08 Dec 2003 19:58:40 -0000


matthew		Mon Dec  8 14:58:40 2003 EDT

  Modified files:              
    /loncom/interface/spreadsheet	assesscalc.pm studentcalc.pm 
  Log:
  Fix parameters passed in to excel_rows and csv_rows.  Should go in 1.1
  
  
Index: loncom/interface/spreadsheet/assesscalc.pm
diff -u loncom/interface/spreadsheet/assesscalc.pm:1.29 loncom/interface/spreadsheet/assesscalc.pm:1.30
--- loncom/interface/spreadsheet/assesscalc.pm:1.29	Mon Nov 17 14:55:41 2003
+++ loncom/interface/spreadsheet/assesscalc.pm	Mon Dec  8 14:58:39 2003
@@ -1,5 +1,5 @@
 #
-# $Id: assesscalc.pm,v 1.29 2003/11/17 19:55:41 matthew Exp $
+# $Id: assesscalc.pm,v 1.30 2003/12/08 19:58:39 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -531,7 +531,7 @@
     # writes the meat of the spreadsheet to an excel worksheet.  Called
     # by Spreadsheet::outsheet_excel;
     my $self = shift;
-    my ($filehandle) = @_;
+    my ($connection,$filehandle) = @_;
     #
     # Write a header row
     $self->csv_output_row($filehandle,undef,
@@ -554,12 +554,13 @@
     # writes the meat of the spreadsheet to an excel worksheet.  Called
     # by Spreadsheet::outsheet_excel;
     my $self = shift;
-    my ($worksheet,$cols_output,$rows_output) = @_;
+    my ($connection,$worksheet,$cols_output,$rows_output) = @_;
+    return if (! ref($worksheet));
     #
     # Write a header row
     $cols_output = 0;
     foreach my $value ('Parameter','Description','Value') {
-        $worksheet->write($rows_output,$cols_output++,&mt($value));
+        $worksheet->write($rows_output,$cols_output++,$value);
     }
     $rows_output++;    
     #
Index: loncom/interface/spreadsheet/studentcalc.pm
diff -u loncom/interface/spreadsheet/studentcalc.pm:1.24 loncom/interface/spreadsheet/studentcalc.pm:1.25
--- loncom/interface/spreadsheet/studentcalc.pm:1.24	Mon Nov 17 14:55:41 2003
+++ loncom/interface/spreadsheet/studentcalc.pm	Mon Dec  8 14:58:39 2003
@@ -1,5 +1,5 @@
 #
-# $Id: studentcalc.pm,v 1.24 2003/11/17 19:55:41 matthew Exp $
+# $Id: studentcalc.pm,v 1.25 2003/12/08 19:58:39 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -363,7 +363,7 @@
     # writes the meat of the spreadsheet to an excel worksheet.  Called
     # by Spreadsheet::outsheet_excel;
     my $self = shift;
-    my ($filehandle) = @_;
+    my ($connection,$filehandle) = @_;
     #
     # Write a header row
     $self->csv_output_row($filehandle,undef,
@@ -389,7 +389,7 @@
     # writes the meat of the spreadsheet to an excel worksheet.  Called
     # by Spreadsheet::outsheet_excel;
     my $self = shift;
-    my ($worksheet,$cols_output,$rows_output) = @_;
+    my ($connection,$worksheet,$cols_output,$rows_output) = @_;
     #
     # Write a header row
     $cols_output = 0;