accesslib: get_user_access_sitewide() was skipping rdefs
The SQL query that would fetch rdefs not associated with any ra was not being executed. Duh! For example, a user with a teacher RA sitewide would never be affected by a role override at the category level, because it was not being loaded into accessdata.
This commit is contained in:
@@ -1242,6 +1242,8 @@ function get_user_access_sitewide($userid) {
|
||||
WHERE ra.userid = $userid
|
||||
AND sctx.contextlevel <= ".CONTEXT_COURSE."
|
||||
ORDER BY sctx.depth, sctx.path, ra.roleid";
|
||||
|
||||
$rs = get_recordset_sql($sql);
|
||||
if ($rs->RecordCount()) {
|
||||
while ($rd = rs_fetch_next_record($rs)) {
|
||||
$k = "{$rd->path}:{$rd->roleid}";
|
||||
|
||||
Reference in New Issue
Block a user