Permalink
Browse files

MDL-7971 check in get_categories if user can see hidden categories us…

…es specific capability not course:create
  • Loading branch information...
1 parent f7bbe3d commit 5d10a560d7d365bd2dc0493bf9a1611588e75929 jmg324 committed Jul 16, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/datalib.php
View
@@ -1235,7 +1235,7 @@ function get_categories($parent='none', $sort=NULL, $shallow=true) {
if( $rs = get_recordset_sql($sql) ){
while ($cat = rs_fetch_next_record($rs)) {
$cat = make_context_subobj($cat);
- if ($cat->visible || has_capability('moodle/course:create',$cat->context)) {
+ if ($cat->visible || has_capability('moodle/category:visibility',$cat->context)) {
$categories[$cat->id] = $cat;
}
}

0 comments on commit 5d10a56

Please sign in to comment.