What does assign roles in a user profile do?

What does assign roles in a user profile do?

by Howard Miller -
Number of replies: 3
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
The user profile page(s) has a roles tab where one can assign roles. I can't think/understand what affect this might have. What context are we in here?
Average of ratings: -
In reply to Howard Miller

Re: What does assign roles in a user profile do?

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Howard,

The roles tab in a user profile page is for assigning a role in the user context. The Parent role is an example of a role assigned in the user context.
In reply to Helen Foster

Re: What does assign roles in a user profile do?

by Heather P -
Hello
Do you know how to get that roles tab appear on a user profile? I'm in version 1.9.1 I'm trying to make it so that a teacher can add a Personal tutor to a learner where a Personal tutor is a role I have created to use with the ILP module and added to the student via the Mentees thing.

I can only see the roles tab when I log in as an administrator. I've tried adjusting the teacher role at site level (Users - edit user profile - allow).
Thanks
In reply to Heather P

Re: What does assign roles in a user profile do?

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators
Hi Heather,

The reason why the roles tab doesn't appear when teachers view user profiles is because the user context is outside/separate from the course context. Users are generally assigned the role of teacher in the course context.

To enable a non-admin user to view the roles tab in a user profile page, you would need to create a new role with permission to assign roles and then assign it as a system role (via Site Administration > Users > Permissions > Assign system roles). You would also need to select which role(s) the user could assign on the "Allow role assignments" page.