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

This commit is contained in:
Johannes Burk
2017-09-01 16:45:49 +02:00
parent 77a6a09950
commit 55a0d1d09a
+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");