]> git.mjollnir.org Git - moodle.git/commit
accesslib: make_context_subobj() now expects ctxlevel, and fix all callers
authormartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:54:37 +0000 (07:54 +0000)
committermartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:54:37 +0000 (07:54 +0000)
commit45ea1afb16e99153d836f27c232a0159d1cdd148
tree055ed5d780d5ae1077f36c5e433c853e983cd001
parentb1cff118c7626d44156bad7f8435346086b1b79e
accesslib: make_context_subobj() now expects ctxlevel, and fix all callers

make_context_subobj() was not providing a contextlevel property, and
no callers fetched the field. This comes from its humble origins where
it was only ever called for course objects. These days it's used in
many other situations, so this patch DTRT and

 - fixes make_context_subobj() expect a cxtlevel and turn it into
   contextlevel

 - fixes all callers (accesslib, datalib) to provide it
lib/accesslib.php
lib/datalib.php