MoodleScript: ADD CAPABILITY

MoodleScript Script Engine

Effect

Grants a permission for a capability on an existing role. This changes the central definition of the role. It does not create a local override.

Syntax

  ADD CAPABILITY <capabilityname> TO <roleidentifier> HAVING
  permisssion: <permission>

Minimal instruction:

  ADD CAPABILITY <capablityname> IN <roleidentifier>

Examples

  ADD CAPABILITY moodle/course:manageactivities IN shortname:teacher2 HAVING
  permission: allow

Specific attributes

Default values

Other defaults

None

Back to the language index - Back to the component index