MDL-38147 bug fix, changed usage of non-existing function

This commit is contained in:
Marina Glancy
2013-03-26 16:17:34 +11:00
parent 290af25434
commit 4e53188a4b
+1 -1
View File
@@ -1242,7 +1242,7 @@ function get_course_category_tree($id = 0, $depth = 0) {
$categories = array();
$categoryids = array();
foreach ($coursecat->get_children() as $child) {
$categories[] = $category = $child->get_db_record();
$categories[] = $category = (object)convert_to_array($child);
$categoryids[$category->id] = $category;
if (empty($CFG->maxcategorydepth) || $depth <= $CFG->maxcategorydepth) {
list($category->categories, $subcategories) = get_course_category_tree($category->id, $depth+1);