From 0a4dd3ab6bc0bba4f5d0f590be5ff47153ddcdae 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 7bdeb28a43c..bf88367588b 100644 --- a/course/lib.php +++ b/course/lib.php @@ -2997,7 +2997,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, @@ -3032,8 +3032,8 @@ function include_course_ajax($course, $usedmodules = array(), $enabledmodules = 'movesection', ), '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',