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 // 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', $PAGE->requires->yui_module('moodle-course-dragdrop', 'M.course.init_section_dragdrop',
array(array( array(array(
'courseid' => $course->id, 'courseid' => $course->id,
@ -3248,8 +3248,8 @@ function include_course_ajax($course, $usedmodules = array(), $enabledmodules =
'emptydragdropregion' 'emptydragdropregion'
), 'moodle'); ), 'moodle');
// Include format-specific strings // Include section-specific strings for formats which support sections.
if ($course->id != $SITE->id) { if (course_format_uses_sections($course->format)) {
$PAGE->requires->strings_for_js(array( $PAGE->requires->strings_for_js(array(
'showfromothers', 'showfromothers',
'hidefromothers', 'hidefromothers',