Merge branch 'MDL-43411-master' of git://github.com/andrewnicols/moodle
authorDamyon Wiese <damyon@moodle.com>
Tue, 7 Jan 2014 04:53:07 +0000 (12:53 +0800)
committerDamyon Wiese <damyon@moodle.com>
Tue, 7 Jan 2014 04:53:07 +0000 (12:53 +0800)
1  2 
course/lib.php

diff --combined course/lib.php
@@@ -43,12 -43,15 +43,12 @@@ define('COURSE_MAX_COURSES_PER_DROPDOWN
  // Max users in log dropdown before switching to optional.
  define('COURSE_MAX_USERS_PER_DROPDOWN', 1000);
  define('FRONTPAGENEWS', '0');
 -define('FRONTPAGECOURSELIST', '1'); // Not used. TODO MDL-38832 remove.
  define('FRONTPAGECATEGORYNAMES', '2');
 -define('FRONTPAGETOPICONLY', '3'); // Not used. TODO MDL-38832 remove.
  define('FRONTPAGECATEGORYCOMBO', '4');
  define('FRONTPAGEENROLLEDCOURSELIST', '5');
  define('FRONTPAGEALLCOURSELIST', '6');
  define('FRONTPAGECOURSESEARCH', '7');
  // Important! Replaced with $CFG->frontpagecourselimit - maximum number of courses displayed on the frontpage.
 -define('FRONTPAGECOURSELIMIT',    200); // TODO MDL-38832 remove.
  define('EXCELROWS', 65535);
  define('FIRSTUSEDEXCELROW', 3);
  
@@@ -3207,7 -3210,7 +3207,7 @@@ function include_course_ajax($course, $
      );
  
      // 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,
              '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',