From 950a11e8dfff1c230752189c31173dbfea686b95 Mon Sep 17 00:00:00 2001 From: Andrew Robert Nicols Date: Mon, 12 Mar 2012 12:57:46 +0000 Subject: [PATCH] MDL-32004 Set the defaultrequestcategory correctly when deleting/creating the default category --- course/index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/course/index.php b/course/index.php index e87312848e2..ce1466a494f 100644 --- a/course/index.php +++ b/course/index.php @@ -177,6 +177,7 @@ if (!$categories = get_categories()) { /// No category yet! $tempcat->context = get_context_instance(CONTEXT_COURSECAT, $tempcat->id); mark_context_dirty('/'.SYSCONTEXTID); fix_course_sortorder(); // Required to build course_categories.depth and .path. + set_config('defaultrequestcategory', $tempcat->id); } /// Move a category to a new parent if required @@ -394,4 +395,4 @@ function print_category_edit($category, $displaylist, $parentslist, $depth=-1, $ print_category_edit($cat, $displaylist, $parentslist, $depth+1, $up, $down); } } -} \ No newline at end of file +}