[LON-CAPA-cvs] cvs: loncom /interface/statistics lonstudentassessment.pm
matthew
lon-capa-cvs@mail.lon-capa.org
Fri, 06 Feb 2004 19:29:00 -0000
matthew Fri Feb 6 14:29:00 2004 EDT
Modified files:
/loncom/interface/statistics lonstudentassessment.pm
Log:
Fix bone-headed error which caused generation of xls output to die
(development bug only).
Index: loncom/interface/statistics/lonstudentassessment.pm
diff -u loncom/interface/statistics/lonstudentassessment.pm:1.82 loncom/interface/statistics/lonstudentassessment.pm:1.83
--- loncom/interface/statistics/lonstudentassessment.pm:1.82 Tue Jan 27 14:50:03 2004
+++ loncom/interface/statistics/lonstudentassessment.pm Fri Feb 6 14:29:00 2004
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonstudentassessment.pm,v 1.82 2004/01/27 19:50:03 matthew Exp $
+# $Id: lonstudentassessment.pm,v 1.83 2004/02/06 19:29:00 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1035,11 +1035,16 @@
$seq->{'Excel:endcell'} = $seq->{'Excel:startcell'};
$seq->{'Excel:endcol'} = $seq->{'Excel:startcol'};
} else {
- &Spreadsheet::WriteExcel::Utility::xl_rowcol_to_cell
- ($rows_output,$cols_output-1);
+ $seq->{'Excel:endcell'} =
+ &Spreadsheet::WriteExcel::Utility::xl_rowcol_to_cell
+ ($rows_output,$cols_output-1);
$seq->{'Excel:endcol'} = $cols_output-1;
}
# Create the formula for summing up this sequence
+ if (! exists($seq->{'Excel:endcell'}) ||
+ ! defined($seq->{'Excel:endcell'})) {
+ $seq->{'Excel:endcell'} = $seq->{'Excel:startcell'};
+ }
$seq->{'Excel:sum'}= $excel_sheet->store_formula
('=SUM('.$seq->{'Excel:startcell'}.
':'.$seq->{'Excel:endcell'}.')');