AI creator roles
Creating a course with AI requires a specific set of capabilities (see Permissions). To make setup easier, the plugin creates two roles that already contain them. This page explains what each role is for and how to assign it.
Roles created by the plugin
When the plugin is installed, or upgraded to version 2.0.8 or later, it creates two roles. Both are based on the Teacher (editing teacher) archetype and add the following capabilities to its defaults:
| Role | Short name | Adds to the Teacher (editing teacher) defaults | Use it for |
|---|---|---|---|
| AI course creator (editing teacher) | editingteachercoursegenai | moodle/course:create, moodle/course:view, local/coursegen:createcoursewithai, local/coursegen:createactivitywithai | Users who create new courses with AI. |
| AI course creator and importer | editingteachercoursegenimportai | The same, plus moodle/backup:userinfo and moodle/restore:userinfo | Users who also import generated courses into existing courses. |
The roles exist after installation, but no one has them until you assign them.
Assign the roles
- Log in to your Moodle site as an administrator and go to
Site administration > Users > Permissions > Assign system roles. - Select AI course creator (editing teacher) or AI course creator and importer.
- Select the users in the Potential users list, click Add and confirm.
Why assign them in the System context
local/coursegen:createcoursewithai is checked in the System context. Both roles can also be assigned in courses and activities, but a course-level or activity-level assignment does not let users create courses with AI: assign them in the System context.
Because the roles are assigned site-wide, their holders get editing teacher capabilities in every course of the site. Only assign them to users you trust with that access. If that scope is too broad, see Custom roles.
Things to know
-
Assignable roles. Each role can assign different roles:
- AI course creator (editing teacher): Non-editing teacher and Student. This role cannot import into existing courses, so this list does not affect imports.
- AI course creator and importer: Teacher (editing teacher), Non-editing teacher and Student. When its holders import into an existing course, the editing teachers of that course keep their role in the imported course.
If a role with the importer's short name already existed before the plugin was installed, the plugin leaves it unchanged. In that case, check that it can assign Teacher (editing teacher) in
Site administration > Users > Permissions > Define roles > Allow role assignments. See How roles are copied to the imported course. -
Role names. Names and descriptions use the site language at the moment the roles are created. On a Spanish site, for example, they are called Profesor Creador de curso IA and Importador Creador de curso IA. You can rename them in
Site administration > Users > Permissions > Define roles. -
Created only if missing. The plugin creates each role only if no role with the same short name exists. If a role with that short name already exists, it is left as it is.
-
Never modified. The plugin never modifies or deletes these roles after creating them, so your changes are kept on future upgrades.
-
Not recreated. If you delete one of these roles, the plugin does not create it again.
Custom roles
If the site-wide scope of the roles above is too broad, you can build your own setup with the same capabilities:
- Grant
local/coursegen:createcoursewithaiwith a role assigned in the System context. - Grant the rest of the creation set (
moodle/course:create,moodle/course:view,local/coursegen:createactivitywithaiand the Teacher (editing teacher) defaults) with a role that can be assigned in the Category context, and assign it only in the categories where the users should create courses. - To allow importing into courses of those categories, add
moodle/backup:userinfoandmoodle/restore:userinfoto that category role, and allow it to assign Teacher (editing teacher) so editing teachers keep their role in imported courses.
See Permissions for the full list of capabilities and the contexts where they are checked.