Obsolete:Role overrides revisited
From MoodleDocs
Originally the user capabilities were calculated as a sum of role capabilities/overrides in all parent contexts. In 1.9 it was completely rewritten.
Summary of problems in 1.9.x
- overrides in one role affect evaluation of resulting capabilities from other roles
- very hard to explain to normal people (including most of the developers, sorry)
- relies heavily on PHP code and is nearly impossible to optimise with SQL especially when fetching list of courses where user is participating
Proposed solution
Change evaluation algorithm, instead of aggregation caps from all roles in each step, calculate resulting capability for each role and use OR logical operation on the result. The prohibit would work the same way as before.