Skip to content

Commit

Permalink
MDL-43411 JavaScript: Correct checks for section support to use helpe…
Browse files Browse the repository at this point in the history
…r function
  • Loading branch information
andrewnicols committed Dec 23, 2013
1 parent 2f4e0db commit 47281f7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions course/lib.php
Expand Up @@ -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,
Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit 47281f7

Please sign in to comment.