diff --git a/course/category.php b/course/category.php index 71ea312e7b7..e1df33d1c58 100644 --- a/course/category.php +++ b/course/category.php @@ -61,6 +61,12 @@ $context = $PAGE->context; // And the object has been loaded for us no need for another DB call $category = $PAGE->category; +// This needs to match caps checked in can_edit_in_category below. +$PAGE->set_other_editing_capability(array( + 'moodle/category:manage', + 'moodle/course:create' +)); + $canedit = can_edit_in_category($category->id); if ($canedit) { if ($categoryedit !== -1) {