David Mudrak 4868e95f58 Use defaultrequestcategory for new course from print_courses() if no other category is available
print_courses() produced PHP notice (Trying to get property of
non-object) and generated an invalid button to create a new course in this
case: (1) Passed paramater $category is 0 to display all categores (as in
case of home page, for example) and (2) get_child_categories(0) returns
more than one record. In such case, $categories is still a plain
integer, does not contain ->id property and the called /course/edit.php
exits with error.
This patch uses $CFG->defaultrequestcategory as category id in this
case.
2010-05-14 14:06:39 +00:00
..
2010-04-30 03:13:07 +00:00
2010-02-10 10:22:25 +00:00