[LON-CAPA-cvs] cvs: loncom /interface/statistics lonstudentassessment.pm
matthew
lon-capa-cvs@mail.lon-capa.org
Tue, 27 Jan 2004 16:58:05 -0000
matthew Tue Jan 27 11:58:05 2004 EDT
Modified files:
/loncom/interface/statistics lonstudentassessment.pm
Log:
Fix bug seen at conference: When producing excel output for courses which
have a folder containing one problem part, sums for the folder containing
the part are incorrect. A must-have for the next 1.1.x release.
Index: loncom/interface/statistics/lonstudentassessment.pm
diff -u loncom/interface/statistics/lonstudentassessment.pm:1.80 loncom/interface/statistics/lonstudentassessment.pm:1.81
--- loncom/interface/statistics/lonstudentassessment.pm:1.80 Tue Jan 27 11:04:27 2004
+++ loncom/interface/statistics/lonstudentassessment.pm Tue Jan 27 11:58:05 2004
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonstudentassessment.pm,v 1.80 2004/01/27 16:04:27 matthew Exp $
+# $Id: lonstudentassessment.pm,v 1.81 2004/01/27 16:58:05 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -1207,9 +1207,15 @@
&Spreadsheet::WriteExcel::Utility::xl_rowcol_to_cell
($rows_output,$seq->{'Excel:endcol'});
# The undef is for the format
- $excel_sheet->repeat_formula($rows_output,$cols_output++,
- $seq->{'Excel:sum'},undef,
- %replaceCells);
+ if (scalar(keys(%replaceCells)) == 1) {
+ $excel_sheet->repeat_formula($rows_output,$cols_output++,
+ $seq->{'Excel:sum'},undef,
+ %replaceCells,%replaceCells);
+ } else {
+ $excel_sheet->repeat_formula($rows_output,$cols_output++,
+ $seq->{'Excel:sum'},undef,
+ %replaceCells);
+ }
#
$excel_sheet->write($rows_output,$cols_output++,$seq_max);
} elsif ($data eq 'sum and total' || $data eq 'sum only' ||