-/**
- * Returns full course categories trees to be used in html_writer::select()
- *
- * Calls {@link core_course_category::make_categories_list()} to build the tree and
- * adds whitespace to denote nesting
- *
- * @return array array mapping course category id to the display name
- */
-function make_categories_options() {
- $cats = core_course_category::make_categories_list('', 0, ' / ');
- foreach ($cats as $key => $value) {
- // Prefix the value with the number of spaces equal to category depth (number of separators in the value).
- $cats[$key] = str_repeat(' ', substr_count($value, ' / ')). $value;
- }
- return $cats;
-}
-