MDL-59799 course: Include course/lib.php before using move_courses().

This commit is contained in:
Johannes Burk
2017-09-01 16:46:26 +02:00
parent b3cfb01316
commit 1dcd1a071c
+1
View File
@@ -1839,6 +1839,7 @@ class coursecat implements renderable, cacheable_object, IteratorAggregate {
}
if ($coursesids) {
require_once($CFG->dirroot.'/course/lib.php');
if (!move_courses($coursesids, $newparentid)) {
if ($showfeedback) {
echo $OUTPUT->notification("Error moving courses");