-
Improvement
-
Resolution: Fixed
-
Minor
-
2.1.1
-
Any
-
MOODLE_21_STABLE
-
MOODLE_23_STABLE
-
MDL-29044-master-3 -
Easy
-
As requested by Petr in MDL-28516, we ideally need to move course category creation to a separate function to support creating course categories in enrolment plugins (and anywhere else too).
This patch creates a new function in course/lib.php called create_course_category().
At present it marks the created context as dirty, but does not call fix_course_sortorder. This is because course/editcategory.php (which is the only place which calls this code) calls this regardless of whether a course category is created, or edited.