--- loncom/interface/statistics/lonstudentassessment.pm 2005/01/14 21:15:09 1.109 +++ loncom/interface/statistics/lonstudentassessment.pm 2005/01/21 18:52:40 1.110 @@ -1,6 +1,6 @@ # The LearningOnline Network with CAPA # -# $Id: lonstudentassessment.pm,v 1.109 2005/01/14 21:15:09 matthew Exp $ +# $Id: lonstudentassessment.pm,v 1.110 2005/01/21 18:52:40 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -358,7 +358,7 @@ sub CreateInterface { &mt('Clear Caches').'" />'; $Str .= ' 'x5; $Str .= - &mt('Status [_1]', + &mt('Status[_1]', ''); $Str .= '
'; return $Str; @@ -1204,16 +1204,15 @@ sub excel_initialize { # if ($chosen_output->{'sequence_sum'} && $chosen_output->{'every_problem'}) { - my %replaceCells; - $replaceCells{$seq->{'Excel:startcell'}} = - &Spreadsheet::WriteExcel::Utility::xl_rowcol_to_cell - ($maximum_data_row,$seq->{'Excel:startcol'}); - $replaceCells{$seq->{'Excel:endcell'}} = - &Spreadsheet::WriteExcel::Utility::xl_rowcol_to_cell - ($maximum_data_row,$seq->{'Excel:endcol'}); + my %replaceCells= + ('^'.$seq->{'Excel:startcell'}.':'. + $seq->{'Excel:endcell'}.'$' => + &Spreadsheet::WriteExcel::Utility::xl_rowcol_to_cell($maximum_data_row,$seq->{'Excel:startcol'}).':'. + &Spreadsheet::WriteExcel::Utility::xl_rowcol_to_cell($maximum_data_row,$seq->{'Excel:endcol'})); $excel_sheet->repeat_formula($maximum_data_row,$cols_output++, $seq->{'Excel:sum'},undef, - %replaceCells); + %replaceCells); + } elsif ($chosen_output->{'sequence_sum'}) { $excel_sheet->write($maximum_data_row,$cols_output++,$max); } @@ -1383,23 +1382,16 @@ sub excel_outputstudent { if ($chosen_output->{'sequence_sum'} && $chosen_output->{'every_problem'}) { # Write a formula for the sum of this sequence - my %replaceCells; - $replaceCells{$seq->{'Excel:startcell'}} = - &Spreadsheet::WriteExcel::Utility::xl_rowcol_to_cell - ($rows_output,$seq->{'Excel:startcol'}); - $replaceCells{$seq->{'Excel:endcell'}} = - &Spreadsheet::WriteExcel::Utility::xl_rowcol_to_cell - ($rows_output,$seq->{'Excel:endcol'}); - # The undef is for the format - 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); - } + my %replaceCells= + ('^'.$seq->{'Excel:startcell'}.':'.$seq->{'Excel:endcell'}.'$' + => + &Spreadsheet::WriteExcel::Utility::xl_rowcol_to_cell($rows_output,$seq->{'Excel:startcol'}).':'. + &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); } elsif ($chosen_output->{'sequence_sum'}) { if ($score eq ' ') { $cols_output++;