Moodle™ is a registered trademark.
Privacy | Cookies | Contact
As the comment above the function explains, it does not work when a user has two roles, one with a prevent, and one with an allow. See also MDL-12451.
sorting of users within a role
Sitewide non-admin roles appear in group potential members list
get_users_by_capability() silently dying when choice answers