[LON-CAPA-cvs] cvs: loncom /interface/statistics lonproblemstatistics.pm
matthew
lon-capa-cvs@mail.lon-capa.org
Mon, 08 Dec 2003 19:37:44 -0000
matthew Mon Dec 8 14:37:44 2003 EDT
Modified files:
/loncom/interface/statistics lonproblemstatistics.pm
Log:
Use Apache::loncommon::clean_excel_name() to avoid crashes on course names
with illegal characters in them.
Index: loncom/interface/statistics/lonproblemstatistics.pm
diff -u loncom/interface/statistics/lonproblemstatistics.pm:1.61 loncom/interface/statistics/lonproblemstatistics.pm:1.62
--- loncom/interface/statistics/lonproblemstatistics.pm:1.61 Tue Nov 11 17:14:28 2003
+++ loncom/interface/statistics/lonproblemstatistics.pm Mon Dec 8 14:37:44 2003
@@ -1,6 +1,6 @@
# The LearningOnline Network with CAPA
#
-# $Id: lonproblemstatistics.pm,v 1.61 2003/11/11 22:14:28 matthew Exp $
+# $Id: lonproblemstatistics.pm,v 1.62 2003/12/08 19:37:44 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -51,6 +51,7 @@
use strict;
use Apache::lonnet();
+use Apache::loncommon();
use Apache::lonhtmlcommon;
use Apache::loncoursedata;
use Apache::lonstatistics;
@@ -529,7 +530,9 @@
if (length($sheetname) > 31) {
$sheetname = substr($sheetname,0,31);
}
- $excel_sheet = $excel_workbook->addworksheet($sheetname);
+ $excel_sheet = $excel_workbook->addworksheet(
+ &Apache::loncommon::clean_excel_name($sheetname)
+ );
#
# Put the course description in the header
$excel_sheet->write($rows_output,$cols_output++,