Permalink
Browse files

cleaned download filename SC#69

  • Loading branch information...
1 parent 157d945 commit 642f1e22ed56ef7fa10c232c18725da904707fc3 skodak committed Jan 29, 2005
Showing with 4 additions and 2 deletions.
  1. +4 −2 mod/quiz/report/simplestat/report.php
@@ -541,7 +541,8 @@ function display($quiz, $cm, $course) { /// This function just displays the
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");
@@ -600,7 +601,8 @@ function display($quiz, $cm, $course) { /// This function just displays the
/// Print header to force download
header("Content-Type: application/download\n");
- header("Content-Disposition: attachment; filename=$course->shortname ".$quiz->name.".txt");
+ $downloadfilename = clean_filename("$course->shortname $quiz->name");
+ header("Content-Disposition: attachment; filename=$downloadfilename.txt");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0,pre-check=0");
header("Pragma: public");

0 comments on commit 642f1e2

Please sign in to comment.