Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Roles: Difference between revisions

From MoodleDocs
Line 3: Line 3:
==Roles and Capabilities==
==Roles and Capabilities==


Roles and Capabilities are planned to be included in Moodle 1.7. For now, we have some basic ideas of how to implement such a structure in Moodle. Please note that non of the following is finalised.
Roles and Capabilities are planned to be included in Moodle 1.7. For now, we have some basic ideas of how to implement such a structure in Moodle. Please note that none of the following is finalised.




Line 20: Line 20:
[[The new Roles and Capability System]]
[[The new Roles and Capability System]]


The new system will allow authorized users to define arbitray number of Roles. Each role can have a customizable set of capabilities in every context. A context can be the whole moodle site, a course, or a module instance, e.g. quiz 5 in 'Introduction to Photography'.
The new system will allow authorized users to define arbitray number of Roles. Each role can have a customizable set of capabilities in every context. A context can be the whole moodle site, a course, or a module instance, e.g. quiz 5 in 'Introduction to Photography'. An authorized user will be able to assign an arbitray number of roles to each user. Since the capabilities in each roles could be different, there could be conflict in capabilities. This is resolved by giving roles different 'priorities'. For example, to disallow a naughty student from posting, one could assign him a 'naughty student' role that does not allow him to do any postings. This role should have a priority higher than that of a normal 'student' role.
 
To facilitate certain exceptional cases in roles and capabilities, we can use exception rules. For example, we can specify a rule saying that all students are able to mark/read other student's assignment in this particular course. Note that such rules needs to have a priority as well. The capability of a user, in any context is then resolved by finding the highest priority role/rule.


==See also==
==See also==

Revision as of 06:11, 15 May 2006


Roles and Capabilities

Roles and Capabilities are planned to be included in Moodle 1.7. For now, we have some basic ideas of how to implement such a structure in Moodle. Please note that none of the following is finalised.


Definitions

By roles, we mean an identifier of the user's status, for example, 'Teacher', 'Student', and 'Forum Moderator' are examples of Roles.

A capability is a permission to access some particular Moodle feature. Capabilities are associated with roles. For example, can_read_forum_post is a capability.


The Existing Roles and Capabilities System

Currently in Moodle, we have a fixed set of Roles. For example, we have the primarty admin, admins, course creators, editting teachers, non-editting teachers, students, and guests. For each role, the capability or actions that they can performed are fixed. For example, the role student will allow the user to submit an assignment, but not allowing the user to browse/edit some other user's work. However, by using this setup, we limit ourselves to a rather rigid set of capabilities for each role. If we want, say a particular student or group to be able to mark assignments in a particular course, we can't do that without giving these users all teacher privilages.


The new Roles and Capability System

The new system will allow authorized users to define arbitray number of Roles. Each role can have a customizable set of capabilities in every context. A context can be the whole moodle site, a course, or a module instance, e.g. quiz 5 in 'Introduction to Photography'. An authorized user will be able to assign an arbitray number of roles to each user. Since the capabilities in each roles could be different, there could be conflict in capabilities. This is resolved by giving roles different 'priorities'. For example, to disallow a naughty student from posting, one could assign him a 'naughty student' role that does not allow him to do any postings. This role should have a priority higher than that of a normal 'student' role.

To facilitate certain exceptional cases in roles and capabilities, we can use exception rules. For example, we can specify a rule saying that all students are able to mark/read other student's assignment in this particular course. Note that such rules needs to have a priority as well. The capability of a user, in any context is then resolved by finding the highest priority role/rule.

See also