Managing roles: Difference between revisions
Mary Cooch (talk | contribs) (added info) |
|||
Line 1: | Line 1: | ||
{{Roles and capabilities}} | {{Roles and capabilities}} | ||
An administrator can manage roles from ''Site administration > Users > Permissions > Define roles'' | |||
This page has four tabs for managing roles, [[Allow role assignments|allowing role assignments]] [[Allow role overrides|allowing role overrides]] and allowing role switches. | |||
The manage roles tab contains a list of roles on your site. The edit column contains icons for editing, deleting roles and copying roles, and for moving them up or down in the list (affecting the way that roles are listed around Moodle). | The manage roles tab contains a list of roles on your site. The edit column contains icons for editing, deleting roles and copying roles, and for moving them up or down in the list (affecting the way that roles are listed around Moodle). | ||
Line 9: | Line 9: | ||
==Predefined roles== | ==Predefined roles== | ||
Moodle comes with 9 predefined roles: | Moodle comes with 9 predefined roles: | ||
*[[Administrator role|Administrator]] | *[[Administrator role|Administrator]] - can "do everything" on the site | ||
*[[Manager role|Manager]] | *[[Manager role|Manager]] - a lesser administrator role. | ||
*[[Course creator role|Course creator]] | *[[Course creator role|Course creator]] - can create courses. | ||
*[[Teacher role|Teacher]] | *[[Teacher role|Teacher]] - can manage and add content to courses | ||
*[[Teacher role| Non-editing teacher]] | *[[Teacher role| Non-editing teacher]] can grade in courses but not edit them | ||
*[[Student role|Student]] | *[[Student role|Student]] - can access and participate in courses | ||
*[[Guest role|Guest]] | *[[Guest role|Guest]] - can view courses but not participate | ||
*[[Authenticated user role|Authenticated user]] | *[[Authenticated user role|Authenticated user]] the role all logged in users have | ||
*[[Authenticated user on the front page role|Authenticated user on the front page]] | *[[Authenticated user on the front page role|Authenticated user on the front page]] a logged in user role for the front page only | ||
==Editing a role== | ==Editing a role== |
Revision as of 08:33, 19 October 2011
Template:Roles and capabilities An administrator can manage roles from Site administration > Users > Permissions > Define roles
This page has four tabs for managing roles, allowing role assignments allowing role overrides and allowing role switches.
The manage roles tab contains a list of roles on your site. The edit column contains icons for editing, deleting roles and copying roles, and for moving them up or down in the list (affecting the way that roles are listed around Moodle).
Predefined roles
Moodle comes with 9 predefined roles:
- Administrator - can "do everything" on the site
- Manager - a lesser administrator role.
- Course creator - can create courses.
- Teacher - can manage and add content to courses
- Non-editing teacher can grade in courses but not edit them
- Student - can access and participate in courses
- Guest - can view courses but not participate
- Authenticated user the role all logged in users have
- Authenticated user on the front page a logged in user role for the front page only
Editing a role
To edit a role:
- Go to Settings>Site administration>Users>Permissions>Define roles.
- Click the edit icon opposite the role you want to edit e.g. student.
- On the edit role page, change permissions as required for each capability.
- Scroll to the bottom of the page and click the "Save changes" button.
Adding a new role
To add a new role:
- Go to Settings>Site Administration>Users>Permissions>Define roles.
- Click the "Add a new role" button.
- On the add a new role page, give the role a name. If you need to name the role for multiple languages you can use multi-lang syntax if you wish, such as
<span lang="en" class="multilang">Teacher</span> <span lang="es_es" class="multilang">Profesor</span>
. If multi-lang syntax is used then Filter all strings should be set in Filter settings. - Give the role a meaningful short name. The short name is necessary for other plugins in Moodle that may need to refer to the role (e.g. when uploading users from a file or setting enrolments via an enrolment plugin).
- Give the role a description (optional).
- Set permissions as required.
- Scroll to the bottom of the page and click the "Create this role" button.
Creating a duplicate role
To create a duplicate role:
- Go to Settings>Site Administration>Users>Permissions>Define roles.
- In the "edit" column on the right, click the "Create a new role by copying" button.
- Give a name and set permissions for your new role; scroll down and click "create this role".
- The list of roles will now show the "... copy 1" at the bottom, for example "Guest copy 1".
Permissions
There are four settings for each capability:
- Not Set
- This is the default value for all permissions when a new role is created.
- Note that if a capability is left as "Not Set," the resulting behavior is that of Prevent, unless otherwise allowed by another role at a higher context. For example, if you mark Not Set for the permission of a Student to Add New Discussions in a forum, they will not be allowed to do so unless they also hold the role of Teacher, Course Creator, or another higher role for which that capability is allowed.
- Allow
- By choosing this you are granting permission for this capability to people who are assigned this role. This permission applies for the context that this role gets assigned plus all "lower" contexts. For example, if this role is a student role assigned to a course, then students will be able to "start new discussions" in all forums in that course, unless some forum contains an override or a new assignment with a Prevent or Prohibit value for this capability.
- Prevent
- By choosing this you are removing permission for this capability, even if the users with this role were allowed that permission in a higher context.
- Prohibit
- This is rarely needed, but occasionally you might want to completely deny permissions to a role in a way that can NOT be overridden at any lower context. An example of when you might need this is when an admin wants to prohibit one person from starting new discussions in any forum on the whole site. In this case they can create a role with that capability set to "Prohibit" and then assign it to that user in the system context.
Role archetypes
A role archetype may be set. If the role is then reset to default, appropriate permissions are set. Thus it provides an alternative method to creating a duplicate of a default role.
If new capabilities are added in future versions of Moodle, the role archetype setting determines any new permissions for the role when the site is upgraded.
New role considerations
A newly-created role does not have the ability to assign or override any other roles. This is true even when the new role is a copy of a role that had such abilities. If such ability is needed, the administrator must grant it explicitly (Site administration -> Users -> Permissions -> Define roles -> Allow role assignments and Allow role overrides tab).
A new role is not automatically listed in course descriptions even if was created by copying a role that is listed, such as Teacher. If you want the new role to appear in the course listing, you must set it explicitly via Administration > Appearance > Course managers.
Testing a new role
Settings > Switch role to Use the "Switch role to" link to see what another role will see in that context.
Since switching roles confines you to those roles you can assign in a course context, this method is only useful for testing course-scoped capabilities (i.e., it will not be useful for testing permissions that apply outside the course context, like moodle/user:edit).
Tip: You can always create test user and assign the new role to them. Then logout as admin and login as the test user. This is really the best way to test a new role.
Example roles
- Inspector - for providing external inspectors with permission to view all courses (without being required to enrol)
- Parent - for providing parents/mentors/tutors with permission to view certain information about their children/mentees/tutees
- Demo teacher - for providing a demonstration teacher account with a password which can't be changed
- Forum moderator - for providing a user with permission in a particular forum to edit or delete forum posts, split discussions and move discussions to other forums
- Calendar editor - for enabling a user to add site or course events to the calendar
- Blogger - for limiting blogging to specific users only
- Quiz user with unlimited time - for allowing a user unlimited time to attempt a quiz which has a time limit set
- Question creator - for enabling students to create questions for use in quizzes
- Keyholder role - someone who manages the Enrolment key in courses
- Course requester role - for restricting users who can make course requests
See also
- How permissions are calculated
- The rolesdebug.php roles debugging script (a contributed script)
- Useful things a teacher can do with roles
Using Moodle forum discussions: