From 5c7d7dec73e4cf1210c8ac616011768723cf6224 Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Mon, 23 Dec 2013 09:26:25 +0800 Subject: [PATCH] MDL-43411 JavaScript: Correct checks for section support to use helper function --- course/lib.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/course/lib.php b/course/lib.php index 2f3ef230a0d..05b8efed4a3 100644 --- a/course/lib.php +++ b/course/lib.php @@ -3210,7 +3210,7 @@ function include_course_ajax($course, $usedmodules = array(), $enabledmodules = ); // Include course dragdrop - if ($course->id != $SITE->id) { + if (course_format_uses_sections($course->format)) { $PAGE->requires->yui_module('moodle-course-dragdrop', 'M.course.init_section_dragdrop', array(array( 'courseid' => $course->id, @@ -3248,8 +3248,8 @@ function include_course_ajax($course, $usedmodules = array(), $enabledmodules = 'emptydragdropregion' ), 'moodle'); - // Include format-specific strings - if ($course->id != $SITE->id) { + // Include section-specific strings for formats which support sections. + if (course_format_uses_sections($course->format)) { $PAGE->requires->strings_for_js(array( 'showfromothers', 'hidefromothers',