mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +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
|
||||
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',
|
||||
|
Loading…
x
Reference in New Issue
Block a user