diff --git a/course/view.php b/course/view.php index 41cf7a80af3..87be2b6aad0 100644 --- a/course/view.php +++ b/course/view.php @@ -268,6 +268,9 @@ // inclusion we pass parameters around this way.. $displaysection = $section; + // Include course AJAX + include_course_ajax($course, $modnamesused); + // Include the actual course format. require($CFG->dirroot .'/course/format/'. $course->format .'/format.php'); // Content wrapper end. @@ -279,9 +282,6 @@ // anything after that point. course_view(context_course::instance($course->id), $section); - // Include course AJAX - include_course_ajax($course, $modnamesused); - // If available, include the JS to prepare the download course content modal. if ($candownloadcourse) { $PAGE->requires->js_call_amd('core_course/downloadcontent', 'init');