MDL-38147 bug fix, changed usage of non-existing function
authorMarina Glancy <marina@moodle.com>
Tue, 26 Mar 2013 05:17:34 +0000 (16:17 +1100)
committerMarina Glancy <marina@moodle.com>
Tue, 26 Mar 2013 05:17:34 +0000 (16:17 +1100)
course/lib.php

index e2ec83c..be23171 100644 (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);