Permalink
Browse files

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.
  • Loading branch information...
1 parent e16e230 commit 3aaa1843999eeb1832331ec5c8b30865fdba9710 @andrewnicols andrewnicols committed May 9, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 course/lib.php
View
@@ -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);
}
/**

0 comments on commit 3aaa184

Please sign in to comment.