From: Johannes Burk Date: Sun, 13 Aug 2017 12:42:54 +0000 (+0200) Subject: MDL-59799 course: Include course/lib.php before using move_courses(). X-Git-Tag: v3.4.0-beta~335^2 X-Git-Url: http://git.moodle.org/gw?p=moodle.git;a=commitdiff_plain;h=1dcd1a071cff14abea017d9e4ac383158b2f3635;hp=b3cfb01316b83869c50c4d22078e5fde283178c1;ds=sidebyside MDL-59799 course: Include course/lib.php before using move_courses(). --- diff --git a/lib/coursecatlib.php b/lib/coursecatlib.php index e5edde1a17b..d8c8ef12855 100644 --- a/lib/coursecatlib.php +++ b/lib/coursecatlib.php @@ -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");