1
0
mirror of https://github.com/moodle/moodle.git synced 2025-03-14 20:50:21 +01:00

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

@ -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");