MDL-43411 JavaScript: Correct checks for section support to use helper function

This commit is contained in:
Andrew Nicols 2013-12-23 09:26:25 +08:00
parent 2f4e0db7c3
commit 47281f7ede

View File

@ -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',