From 3aaa1843999eeb1832331ec5c8b30865fdba9710 Mon Sep 17 00:00:00 2001 From: Andrew Robert Nicols Date: Wed, 9 May 2012 15:31:41 +0100 Subject: [PATCH] MDL-32881 Prevent course/view.php from being cached This should prevent browser caching which will ensure that changes made using the course javascript (e.g. drag/drop, show/hide) will not be 'lost' by using the browser back button. --- course/lib.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/course/lib.php b/course/lib.php index 5b7f13a0b05..5bca7147db0 100644 --- a/course/lib.php +++ b/course/lib.php @@ -4516,6 +4516,9 @@ function include_course_ajax($course, $modules = array(), $config = null) { foreach ($modules as $module => $modname) { $PAGE->requires->string_for_js('pluginname', $module); } + + // Prevent caching of this page to stop confusion when changing page after making AJAX changes + $PAGE->set_cacheable(false); } /** -- 2.43.0