]> git.mjollnir.org Git - moodle.git/commit
accesslib: add support for multi-enrolments
authormartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:06:30 +0000 (07:06 +0000)
committermartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:06:30 +0000 (07:06 +0000)
commit6cc59cb21be678cb9baf011316f33304f67441fd
tree4c926ac31edc0502ba74c31bf5c911fcae2b2fc1
parentb1178725a8e9a24013c23e3073ff1261e535b7af
accesslib: add support for multi-enrolments

I had dropped support for multi-enrolments on the same context.

 Oops!

This patch reinstates it, changing the semantics of the 'ra'
array leaves from an int to an array of ints.

So no instead of

   $USER->access['ra']['/1/12/543'] = 5

we have

   $USER->access['ra']['/1/12/543'] = array(5)

the functions that build the array, and the array walkers have
been updated. This touches...

  Writing RAs
    load_all_capabilities()
    get_user_access_sitewide()
    get_user_access_bycontext()

  Reading RAs
    has_cap_fromsess()
    aggr_roles_fromsess()

Thanks to Matt Clarkson for mentioning multi-enrolments!
lib/accesslib.php