Note: You are currently viewing documentation for Moodle 1.9. Up-to-date documentation for the latest stable version is available here: Role permissions.

Role permissions: Difference between revisions

From MoodleDocs
(copied over ride Permission section. Added intro and picture.)
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Roles}}
{{Roles}}{{Moodle 1.7}}Roles and capabilities in Moodle 1.7 onwards enable possibilities such as teachers being given permission to override permissions for other roles.
{{Moodle 1.7}}
Permission are one of the elements which help define a role.  A single permission type is associated with each capability in a defined role. For example, the default role of Teacher (editingteacher) can backup a course because this role has the capability "Backup courses" permission set to "allow".


Generally speaking, permissions are set for specific roles via the site administration block, under Users>Permissions>Define Roles and then using the edit icon next to an existing role to view and change permissions.  CAUTION: This is a very powerful and complicated tool, that requires careful thought before editing anything. Not only can it effect a site's security, but it can unexpectedly disrupt the functions. 
==Role capabilities==


[[Image:Permission_Teacher_example1_9.png]]
==Permissions==
There are four settings for each capability:
;Inherit
:The default setting. If a capability is set to inherit, the user's permissions remain the same as they are in a less specific context, or another role where the capability is defined. For example, if a student is allowed to attempt quiz questions at the course level, their role in a specific quiz will inherit this setting.
;Allow
:This enables a user to use a capability in a given context. This permission applies for the context that the role gets assigned plus all lower contexts. For example, if a user is assigned the role of student in a course, they will be able to start new discussions in all forums in that course (unless a forum contains an override with a prevent or prohibit value for the 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.
==Examples of capabilities==
The following capabilities are related to roles:
The following capabilities are related to roles:


Line 30: Line 8:
* [[Capabilities/moodle/role:manage|moodle/role:manage]]
* [[Capabilities/moodle/role:manage|moodle/role:manage]]
* [[Capabilities/moodle/role:override|moodle/role:override]]
* [[Capabilities/moodle/role:override|moodle/role:override]]
* [[Capabilities/moodle/role:safeoverride|moodle/role:safeoverride]] (1.9.3 onwards)
* [[Capabilities/moodle/role:switchroles|moodle/role:switchroles]]
* [[Capabilities/moodle/role:switchroles|moodle/role:switchroles]]
* [[Capabilities/moodle/role:unassignself|moodle/role:unassignself]]
* [[Capabilities/moodle/role:unassignself|moodle/role:unassignself]]
* [[Capabilities/moodle/role:viewhiddenassigns|moodle/role:viewhiddenassigns]]
* [[Capabilities/moodle/role:viewhiddenassigns|moodle/role:viewhiddenassigns]]


[[Category:Roles]]
==Enabling teachers to override permissions==
{{stub}}
 
By default, only administrators are able to override permissions. To enable teachers to do so:
#Access ''Administration > Users > Permissions > Define roles''.
#Edit the teacher role and change the capability [[Capabilities/moodle/role:override|moodle/role:override]] (or [[Capabilities/moodle/role:safeoverride|moodle/role:safeoverride]] in Moodle 1.9.3 onwards) to allow.
#Click the button "Save changes".
#Click the tab "[[Allow role overrides]]" (in ''Administration > Users > Permissions > Define roles'').
#Check the appropriate box(s) in the teacher row to set which role(s) teachers can override. Most likely it will just be the student role (you don't want teachers to be able to override admins!), so check the box where the teacher row intersects with the student column.
#Click the button "Save changes".
 
==Student unenrolment==
 
By default, students are unable to unenrol themselves from courses.
 
To enable students to unenrol themselves from any course on the site that they are enrolled on:
#Access ''Administration > Users > Permissions > Define roles''.
#Click the edit icon opposite the student role.
#Change the [[Capabilities/moodle/role:unassignself|moodle/role:unassignself]] capability from not set to allow.
#Click the "Save changes" button at the bottom of the page.
 
To enable students to unenrol themselves from a particular course:
#Follow the Assign roles link in the course administration block.
#Follow the "Override permissions" tab. (Prior to Moodle 1.9, there is an "Override roles" link, rather than a tab.)
#Select the Student role.
#Set the capability [[Capabilities/moodle/role:unassignself|moodle/role:unassignself]] to allow.
#Click the "Save changes" button at the bottom of the page.
 
Note: Role changes will take effect immediately in Moodle 1.9, or when students next login in Moodle 1.7 and 1.8. Students will have an "Unenrol me from the course" link in the course administration block and an "Unenrol me from the course" button on their profile page.


[[eu:Rolen_baimenak]]
[[eu:Rolen_baimenak]]
[[ja:ロールパーミッション]]
[[ja:ロールパーミッション]]
[[de:Rollenspezifische Fähigkeiten]]

Latest revision as of 10:08, 29 July 2008

Moodle1.7

Roles and capabilities in Moodle 1.7 onwards enable possibilities such as teachers being given permission to override permissions for other roles.

Role capabilities

The following capabilities are related to roles:

Enabling teachers to override permissions

By default, only administrators are able to override permissions. To enable teachers to do so:

  1. Access Administration > Users > Permissions > Define roles.
  2. Edit the teacher role and change the capability moodle/role:override (or moodle/role:safeoverride in Moodle 1.9.3 onwards) to allow.
  3. Click the button "Save changes".
  4. Click the tab "Allow role overrides" (in Administration > Users > Permissions > Define roles).
  5. Check the appropriate box(s) in the teacher row to set which role(s) teachers can override. Most likely it will just be the student role (you don't want teachers to be able to override admins!), so check the box where the teacher row intersects with the student column.
  6. Click the button "Save changes".

Student unenrolment

By default, students are unable to unenrol themselves from courses.

To enable students to unenrol themselves from any course on the site that they are enrolled on:

  1. Access Administration > Users > Permissions > Define roles.
  2. Click the edit icon opposite the student role.
  3. Change the moodle/role:unassignself capability from not set to allow.
  4. Click the "Save changes" button at the bottom of the page.

To enable students to unenrol themselves from a particular course:

  1. Follow the Assign roles link in the course administration block.
  2. Follow the "Override permissions" tab. (Prior to Moodle 1.9, there is an "Override roles" link, rather than a tab.)
  3. Select the Student role.
  4. Set the capability moodle/role:unassignself to allow.
  5. Click the "Save changes" button at the bottom of the page.

Note: Role changes will take effect immediately in Moodle 1.9, or when students next login in Moodle 1.7 and 1.8. Students will have an "Unenrol me from the course" link in the course administration block and an "Unenrol me from the course" button on their profile page.