Note: You are currently viewing documentation for Moodle 3.11. Up-to-date documentation for the latest stable version of Moodle may be available here: Role export and import.

Role export and import

From MoodleDocs


Export role definition to file

To export role definition:

  1. Go to Site administration > Users > Permissions > Define roles.
  2. Click on a role name
  3. Click "Export" button
  4. XML file containing definition of the role is downloaded to your computer.

The definition file includes following data:

  • role name and description
  • allowed context levels
  • allow settings for role assignments, overrides and role switching
  • list of permissions at the system level

Create new role (import) from definition

To create new role (to import a previously exported role definition):

  1. Go to Site administration > Users > Permissions > Define roles.
  2. Click "Add a new role button"
  3. Upload preset
  4. Click "Continue"
  5. Review new role and scroll down and click "Create this role"

Import changes to existing role definition

To reset or change an existing role by importing a definition you exported elsewhere:

  1. Go to Site administration > Users > Permissions > Define roles.
  2. Click on a role name
  3. Click "Reset" button
  4. Upload preset
  5. Select required reset options
  6. Click "Continue"
  7. Review changes of role definition and scroll down and click "Save changes"