use clean_filename for filename of text file download

This commit is contained in:
gbateson 2006-01-17 13:24:13 +00:00
parent 47edd30ca7
commit c5e66883ed

View File

@ -544,8 +544,9 @@ class hotpot_default_report {
}
}
function print_text_start(&$course, &$hotpot, &$options) {
$downloadfilename = clean_filename("$course->shortname $hotpot->name.txt");
header("Content-Type: application/download\n");
header("Content-Disposition: attachment; filename=$course->shortname-$hotpot->name.txt");
header("Content-Disposition: attachment; filename=$downloadfilename");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0,pre-check=0");
header("Pragma: public");