Dynamic rules Technical: Difference between revisions
No edit summary |
|||
| Line 19: | Line 19: | ||
* [[Capabilities/enrol/dynamicrule:unenrol|'''enrol/dynamicrule:unenrol''']]: Unenrol user using course unenrol action or manually | * [[Capabilities/enrol/dynamicrule:unenrol|'''enrol/dynamicrule:unenrol''']]: Unenrol user using course unenrol action or manually | ||
* [[Capabilities/tool/dynamicrule:manage|'''tool/dynamicrule:manage''']]: Manage dynamic rules | * [[Capabilities/tool/dynamicrule:manage|'''tool/dynamicrule:manage''']]: Manage dynamic rules | ||
==Development resources== | |||
Dynamic rules conditions and actions for plugin developers | |||
<iframe width="560" height="315" src="https://www.youtube.com/embed/JWU_16hJ9MY?si=bUmr5am8Ct-V8GkN" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe> | |||
Revision as of 14:02, 8 July 2025
Limiting the number of rules
A site administrator can restrict the number of dynamic rules that can be created per site and/or tenant by adding the following setting(s) to the site configuration file. Note, archived rules are counted towards the limit; however, rules created automatically by other plugins (for example, programs and certifications) are not counted towards the limit:
$CFG->tool_dynamicrule_limitsenabled = true;
$CFG->tool_dynamicrule_sitelimit = <VALUE>;
$CFG->tool_dynamicrule_tenantlimit = <VALUE>;
Omitting this configuration, or setting tool_dynamicrule_limitsenabled value to false, indicates that no limit should be applied to the number of dynamic rules that can be created (default). Note that the tenant limit cannot exceed the site limit. Setting limit values to 0 will effectively disable rules creation.
Dynamic rules manager role
The role allows the creation and management of dynamic rules within the current tenant.
The role is created automatically when Moodle Workplace is installed.
Capabilities
The following capabilities are available for handling dynamic rules:
- enrol/dynamicrule:config: Configure dynamicrule enrol instances
- enrol/dynamicrule:enrol: Enrol user using course enrol action
- enrol/dynamicrule:unenrol: Unenrol user using course unenrol action or manually
- tool/dynamicrule:manage: Manage dynamic rules
Development resources
Dynamic rules conditions and actions for plugin developers <iframe width="560" height="315" src="https://www.youtube.com/embed/JWU_16hJ9MY?si=bUmr5am8Ct-V8GkN" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>