--- loncom/interface/spreadsheet/studentcalc.pm 2003/05/23 19:36:04 1.6
+++ loncom/interface/spreadsheet/studentcalc.pm 2003/05/23 21:03:29 1.7
@@ -1,5 +1,5 @@
#
-# $Id: studentcalc.pm,v 1.6 2003/05/23 19:36:04 matthew Exp $
+# $Id: studentcalc.pm,v 1.7 2003/05/23 21:03:29 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -312,10 +312,30 @@ sub modify_cell {
return;
}
-sub outsheet_csv {
+sub csv_rows {
+ # writes the meat of the spreadsheet to an excel worksheet. Called
+ # by Spreadsheet::outsheet_excel;
my $self = shift;
- my ($r) = @_;
- $r->print('
csv output is not supported yet
');
+ my ($filehandle) = @_;
+ #
+ # Write a header row
+ $self->csv_output_row($filehandle,undef,
+ ('Container','Assessment title'));
+ #
+ # Write each assessments row
+ if (scalar(@Sequences)< 1) {
+ &initialize_sequence_cache();
+ }
+ foreach my $Sequence (@Sequences) {
+ next if ($Sequence->{'num_assess'} < 1);
+ foreach my $resource (@{$Sequence->{'contents'}}) {
+ my $rownum = $self->get_row_number_from_key($resource->{'symb'});
+ my @assessdata = ($Sequence->{'title'},
+ $resource->{'title'});
+ $self->csv_output_row($filehandle,$rownum,@assessdata);
+ }
+ }
+ return;
}
sub excel_rows {