]> git.mjollnir.org Git - moodle.git/commit
accesslib: Draft get_context_users_byrole()
authormartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:05:21 +0000 (07:05 +0000)
committermartinlanghoff <martinlanghoff>
Wed, 19 Sep 2007 07:05:21 +0000 (07:05 +0000)
commitb5a645b4ebd89bf1c305cf01b7eabe4ff556b042
treefedf979ed1162802f7eeea20d28241c095f9067a
parent352f6f74fc62d4ec5099d71c2bd6580171559c88
accesslib: Draft get_context_users_byrole()

 Draft - use for the course participants list page

 Uses 1 DB query (cheap too - 2~7ms).

 TODO:
 - implement additional where clauses
 - sorting
 - get course participants list to use it!

 returns a users array, both sorted _and_ keyed
 on id (as get_my_courses() does)

 as a bonus, every user record comes with its own
 personal context, as our callers need it straight away
 {save 1 dbquery per user! yay!}
lib/accesslib.php