Dynamic rules Technical

From MoodleDocs
This feature is part of Moodle Workplace™, which is available through Moodle Certified Partners and Service Providers only.

This page is intended for Administrators


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:

Development resources

The following video explains in details how to develop dynamic rules conditions and actions. It is targeted at plugin developers:

Dynamic rules conditions and actions for plugin developers