mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
MDL-43411 JavaScript: Correct checks for section support to use helper function
This commit is contained in:
parent
2f4e0db7c3
commit
47281f7ede
@ -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',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user