--- loncom/interface/statistics/lonstudentassessment.pm 2004/01/27 16:04:27 1.80 +++ loncom/interface/statistics/lonstudentassessment.pm 2004/01/27 16:58:05 1.81 @@ -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 @@ sub excel_outputstudent { &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' ||