Totara Learn Open Discussions

Question about Roles and Permissions

 
? ?
Question about Roles and Permissions
by ? ? - Wednesday, 6 February 2019, 8:51 PM
 

I have two roles in the same context (courses and activity) and the students can have both roles or one of the roles in the class. 

I need the following to occur and I cannot figure out how to get the following scenarios to work:

1. Learner + Limited_Learner Role = to access to all activity types

2. Learner Role = to access to all activity types

3. Limited_Learner Role = only access to Certificate and Feedback activities. 


I have tried to set (for example) the resource view (mod/resource:view) to be the following:

Learner Role = Allow

Limited_Learner = Prevent

These settings work for scenarios for #1 and #2, however, they do not Prevent access to resource activity when the student only have Limited_Learner Role in the class. 


Thank you.

Craig Eves
Re: Question about Roles and Permissions
by Craig Eves (Totara Support) - Thursday, 7 February 2019, 7:23 PM
Group Totara

Hi Varun

The way the roles system works is tricky and discussed here - it involves weighting calculations for the context level - the lower the context the more weight and multiplying this to the sum of the permissions (inherit = 0, allow = 1, prevent = -1, prohibit = -1000) together 

To change the values you can

1) remove the user from learner role in the course, or
2) add overrides for limited learner role in the activity, or
3) assign them a learner's role in the activities

To make the appropriate role win you need to compare the calculations.

regards