MDL-59799 course: Include course/lib.php before using move_courses().
authorJohannes Burk <me@jojoob.de>
Sun, 13 Aug 2017 12:42:54 +0000 (14:42 +0200)
committerJohannes Burk <me@jojoob.de>
Fri, 1 Sep 2017 14:46:26 +0000 (16:46 +0200)
lib/coursecatlib.php

index e5edde1..d8c8ef1 100644 (file)
@@ -1839,6 +1839,7 @@ class coursecat implements renderable, cacheable_object, IteratorAggregate {
         }
 
         if ($coursesids) {
         }
 
         if ($coursesids) {
+            require_once($CFG->dirroot.'/course/lib.php');
             if (!move_courses($coursesids, $newparentid)) {
                 if ($showfeedback) {
                     echo $OUTPUT->notification("Error moving courses");
             if (!move_courses($coursesids, $newparentid)) {
                 if ($showfeedback) {
                     echo $OUTPUT->notification("Error moving courses");