We want our Teachers to be able to switch their view to a student view using Switch Roles, but we do not want them to be able to Assign users into that student role. It seems to me that the 2 functions are connected - you can't give someone the ability to Switch to a different role unless you give them the ability to also assign that role to a user. Is this correct, or is there a way to give someone the ability to switch roles without giving them the ability to assign that role?
We're using ver 1.8.
Grant ability to Switch Role without granting ability to Assign Role
על ידי Clint Lalonde בתאריך
מספר תגובות: 5
בתגובה ל: Clint Lalonde
Re: Grant ability to Switch Role without granting ability to Assign Role
על ידי Séverin Terrier בתאריך
Yes, you're right. As said in the doc, you can't switch to roles you can't assign.
I would also, like you, be interested to allow some roles to switch roles, but not assign them...
I would also, like you, be interested to allow some roles to switch roles, but not assign them...
בתגובה ל: Séverin Terrier
Re: Grant ability to Switch Role without granting ability to Assign Role
על ידי Clint Lalonde בתאריך
Thanks for the reply Severin.
בתגובה ל: Séverin Terrier
Re: Grant ability to Switch Role without granting ability to Assign Role
על ידי Tim Hunt בתאריך
You might hope that if you turned off the Assign roles to users (moodle/role:assign) capability from teachers, but left them with the Switch to other roles (moodle/role:switchroles) capability, then it would work as you want, but it doesn't. I wonder why?
Well that is what the documentation says anyway. It might be worth testing to see if it is true.
Well that is what the documentation says anyway. It might be worth testing to see if it is true.
בתגובה ל: Tim Hunt
Re: Grant ability to Switch Role without granting ability to Assign Role
על ידי Clint Lalonde בתאריך
Thanks for responding, Tim. I've tested this and the documented behaviour is correct. Seems that you can't give the ability to switch roles without also giving the ability to assign that role.
בתגובה ל: Tim Hunt
Re: Grant ability to Switch Role without granting ability to Assign Role
על ידי Brett Hinton בתאריך
The answer I think lies in this bug report in the tracker:
http://tracker.moodle.org/browse/MDL-11313
It seems that the switch role function is not tied only to the switch role capability, but also the assign role capability. Without both of them the ability to switch roles doesn't function.
http://tracker.moodle.org/browse/MDL-11313
It seems that the switch role function is not tied only to the switch role capability, but also the assign role capability. Without both of them the ability to switch roles doesn't function.