Permalink
Browse files

MDL-43411 JavaScript: Correct checks for section support to use helpe…

…r function
  • Loading branch information...
1 parent 32d89e0 commit 076792a3f1cd34c368d1981448d5966b67300ad2 @andrewnicols andrewnicols committed with damyon Dec 23, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 course/lib.php
View
@@ -4569,7 +4569,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,
@@ -4614,8 +4614,8 @@ function include_course_ajax($course, $usedmodules = array(), $enabledmodules =
'movesection',
), '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',

0 comments on commit 076792a

Please sign in to comment.