From 7001130bac0cc8181bdacca1cdfc620ae6eae4e3 Mon Sep 17 00:00:00 2001 From: moodler Date: Sat, 17 Apr 2004 03:24:42 +0000 Subject: [PATCH] Fixed possible prblems with Excel names bug 1243 --- mod/quiz/report/fullstat/report.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mod/quiz/report/fullstat/report.php b/mod/quiz/report/fullstat/report.php index 9ebd0c7670..d73cf98f42 100755 --- a/mod/quiz/report/fullstat/report.php +++ b/mod/quiz/report/fullstat/report.php @@ -299,7 +299,8 @@ class quiz_report extends quiz_default_report { require_once("$CFG->libdir/excel/Worksheet.php"); require_once("$CFG->libdir/excel/Workbook.php"); header("Content-type: application/vnd.ms-excel"); - header("Content-Disposition: attachment; filename=$course->shortname ".$quiz->name.".xls"); + $downloadfilename = clean_filename("$course->shortname $quiz->name"); + header("Content-Disposition: attachment; filename=$downloadfilename.xls"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0,pre-check=0"); header("Pragma: public"); -- 2.39.5