Is it presently possible, within v11 core, to display which role(s) are currently in effect for a user on a page by page basis? For example, have the role listed somewhere on the page at load.
Best practice forum (Archived)
Active Roles
Hi John
It is possible to check permissions for an activity and select the user. Does this provide the information you were wanting?
I was thinking more of a display of which role is the one with precedence on any page for the current user. Display the role either through a hot key combo or debug message. If it isn't already available, then it would or could help with determining which role is or could be overriding preferred actions on a page.
Hi John
I can't think of a way to show which capability has precedence when a user has more than one role.
The precedence is calculated using numeric values assigned to each capabilty (inherit = 0, allow = 1, prevent = -1, prohibit = -1000) and multiplying by the context level - the lower context has higher value than lower. The capability with the highest value wins.
If there are problems with the precedence then overriding or assigning to a lower context should help the precedence of the capability.
Try and keep the assigning of multiple roles and overrides to a minimum as they are difficult to sort out .maybe consider creating a user with the separate admin role that people can login to rather than having users with multiple roles. Users who have a learner and an admin role in the same course will be able to change their own grades.
regards