--- loncom/interface/spreadsheet/Spreadsheet.pm 2003/09/05 01:06:45 1.22 +++ loncom/interface/spreadsheet/Spreadsheet.pm 2003/09/05 01:57:54 1.23 @@ -1,5 +1,5 @@ # -# $Id: Spreadsheet.pm,v 1.22 2003/09/05 01:06:45 matthew Exp $ +# $Id: Spreadsheet.pm,v 1.23 2003/09/05 01:57:54 matthew Exp $ # # Copyright Michigan State University Board of Trustees # @@ -231,6 +231,16 @@ sub initialize { # the descendents of the spreadsheet class. } +sub clear_package { + # This method is here to remind you that it will be overridden by + # the descendents of the spreadsheet class. +} + +sub cleanup { + my $self = shift(); + $self->clear_package(); +} + sub initialize_spreadsheet_package { &load_spreadsheet_expirationdates(); &clear_spreadsheet_definition_cache(); @@ -1341,6 +1351,7 @@ sub create_excel_spreadsheet { sub outsheet_excel { my $self = shift; my ($r) = @_; + my $connection = $r->connection(); $r->print("

Preparing Excel Spreadsheet

"); # # Create excel worksheet @@ -1364,7 +1375,7 @@ sub outsheet_excel { $self->excel_output_row($worksheet,0,$rows_output++,'Summary'); $rows_output++; # skip a line # - $self->excel_rows($worksheet,$cols_output,$rows_output); + $self->excel_rows($connection,$worksheet,$cols_output,$rows_output); # # # Close the excel file @@ -1382,6 +1393,7 @@ sub outsheet_excel { sub outsheet_csv { my $self = shift; my ($r) = @_; + my $connection = $r->connection(); my $csvdata = ''; my @Values; # @@ -1405,7 +1417,7 @@ sub outsheet_csv { } # # Output the body of the spreadsheet - $self->csv_rows($file); + $self->csv_rows($connection,$file); # # Close the csv file close($file);