-
Improvement
-
Resolution: Won't Do
-
Minor
-
None
-
3.3.1
With this new tool you can create new courses implemented a different template based to moodle version 3.1 and adapted in 3.3 version some modifications are:
when returns the id of a given course category. If autocreatecategory
is set and the category doesn't exist, it creates it and returns the new
id. Otherwise it returns false.
If categoryseparator is set, it can handle subcategories of
any depth. You just need to specify the 'path' of the subcategory
as the identifiers of the categories separated by the value of the
separator. For example, if we use '/' as the separator, we can
specify 'categoryid1/categoryid2/categoryid3' if we are interested
in a category identified by 'category3' that is inside a category
identified by 'category2' that is inside a category identified by
category1' that is a top level category.
If categoryseparator and autocreate are set, it creates the
whole category tree. For example, if we are looking for
categoryname1/categoryname2/categoryname3', and they don't exist, it will
start creating the shallower category (i.e. 'categoryname1'), and it will continue
creating categories for deeper categories, building the tree (the next
category would be 'categoryname1/categoryname2', and so on).