MDL-14561 fixed https issue in IE
This commit is contained in:
@@ -65,9 +65,15 @@ class grade_export_txt extends grade_export {
|
||||
}
|
||||
|
||||
/// Print header to force download
|
||||
@header('Cache-Control: private, must-revalidate, pre-check=0, post-check=0, max-age=0');
|
||||
@header('Expires: '. gmdate('D, d M Y H:i:s', 0) .' GMT');
|
||||
@header('Pragma: no-cache');
|
||||
if (strpos($CFG->wwwroot, 'https://') === 0) { //https sites - watch out for IE! KB812935 and KB316431
|
||||
@header('Cache-Control: max-age=10');
|
||||
@header('Expires: '. gmdate('D, d M Y H:i:s', 0) .' GMT');
|
||||
@header('Pragma: ');
|
||||
} else { //normal http - prevent caching at all cost
|
||||
@header('Cache-Control: private, must-revalidate, pre-check=0, post-check=0, max-age=0');
|
||||
@header('Expires: '. gmdate('D, d M Y H:i:s', 0) .' GMT');
|
||||
@header('Pragma: no-cache');
|
||||
}
|
||||
header("Content-Type: application/download\n");
|
||||
$downloadfilename = clean_filename("{$this->course->shortname} $strgrades");
|
||||
header("Content-Disposition: attachment; filename=\"$downloadfilename.txt\"");
|
||||
|
||||
@@ -107,9 +107,15 @@ class grade_export_xml extends grade_export {
|
||||
$gui->close();
|
||||
$geub->close();
|
||||
|
||||
@header('Cache-Control: private, must-revalidate, pre-check=0, post-check=0, max-age=0');
|
||||
@header('Expires: '. gmdate('D, d M Y H:i:s', 0) .' GMT');
|
||||
@header('Pragma: no-cache');
|
||||
if (strpos($CFG->wwwroot, 'https://') === 0) { //https sites - watch out for IE! KB812935 and KB316431
|
||||
@header('Cache-Control: max-age=10');
|
||||
@header('Expires: '. gmdate('D, d M Y H:i:s', 0) .' GMT');
|
||||
@header('Pragma: ');
|
||||
} else { //normal http - prevent caching at all cost
|
||||
@header('Cache-Control: private, must-revalidate, pre-check=0, post-check=0, max-age=0');
|
||||
@header('Expires: '. gmdate('D, d M Y H:i:s', 0) .' GMT');
|
||||
@header('Pragma: no-cache');
|
||||
}
|
||||
header("Content-type: text/xml; charset=UTF-8");
|
||||
header("Content-Disposition: attachment; filename=\"$downloadfilename\"");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user