]> git.mjollnir.org Git - moodle.git/commit
accesslib: get_user_access_bycontext() fetches all relevant rdefs
authormartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:53:49 +0000 (07:53 +0000)
committermartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:53:49 +0000 (07:53 +0000)
commit53fb75dc1f1fcf59899b2f295368ede0fc808764
tree778d7e44879027c1988eca6851958c8caf2199ec
parent37875ac5b748b5ddfd208860f2d9aed45de6c68a
accesslib: get_user_access_bycontext() fetches all relevant rdefs

get_user_access_bycontext() was narrowing down too much the rdefs it
was fetching. With this patch, it now correctly retrieves the rdefs for
new roles assigned in lower contexts, and also correctly retrieves
rdefs present in the course context (fixing MDL-11220).

This also means that we now do the job in 2 DB queries (instead of 3),
and we move a bit more data, but those rows are actually needed ;-)
lib/accesslib.php