]> git.mjollnir.org Git - moodle.git/commit
accesslib:get_child_contexts() reworked to use context.path
authormartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 06:52:34 +0000 (06:52 +0000)
committermartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 06:52:34 +0000 (06:52 +0000)
commit19bb8a0517b2317970d69dcbacf707961559a8d4
tree2dd20b89d14f73854c23adce26476892324b2174
parent17b0efae11390b6aabc387e2c8a618ac81d28bfa
accesslib:get_child_contexts() reworked to use context.path

Using context.path, now get_child_contexts...

 - always takes 1 query
 - populated the context_cache
 - returns full records
 - when called with an category, it won't
   recurse into the children of courses

Also

 - All callers in accesslib changed to the new
   calling convention

A normal course page with a std blocks and a few
activities sees around 100 queries less with this patch.

Note: this commit is slightly different on HEAD/19 and on
MOODLE_18_STABLE, as groups-related tables have changed.
lib/accesslib.php