From: toyomoyo Date: Wed, 26 Sep 2007 07:19:30 +0000 (+0000) Subject: get_default_frontpage_role_access() should prolly not load overrides below course... X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=a6df7ee6fa13a1074cc35e76dbe6c98a3ef8c5fd;p=moodle.git get_default_frontpage_role_access() should prolly not load overrides below course level --- diff --git a/lib/accesslib.php b/lib/accesslib.php index fe151c74c2..ae9228c67d 100755 --- a/lib/accesslib.php +++ b/lib/accesslib.php @@ -265,6 +265,7 @@ function get_default_frontpage_role_access($roleid, $accessdata=NULL) { ON rc.contextid=ctx.id WHERE rc.roleid = {$roleid} AND (ctx.id = ".SYSCONTEXTID." OR ctx.path LIKE '$base/%') + AND ctx.contextlevel <= ".CONTEXT_COURSE." ORDER BY ctx.depth, ctx.path"; if ($rs = get_recordset_sql($sql)) {