-
Notifications
You must be signed in to change notification settings - Fork 30
Learning mode
Learning mode captures the fields that events produce when they are triggered. These learnt events will then be used to display datafields in the workflow step fields.
Note: Enabling learning mode will capture data about every triggered event in Moodle every time it occurs. This can have a negative performance effect on busy Moodle sites. Only enable learning mode when it is required.
Learning Mode is not enabled by default, it can be enabled via the Tool Trigger plugin settings.
To enable Learning Mode:
- Go to the Tool Trigger plugin settings: Site administration > Plugins > Admin tools > Event Trigger > Plugin Settings
- Click on the: *Enable learning mode * to enable learning mode.
- Click the: save changes button.
Learning Mode will now start learning the available fields for each Moodle Event. Fields for learnt Events will automatically display in the Workflow Step forms.
NOTE: Fields for learnt events are only processed once per day. So there will be a delay of up to 24 hours before learnt fields display.
Learnt event fields can be exported to a JSON file via a CLI script, so that they can then be contributed back to the project.
To export the fields for learnt events to a JSON file, run the following CLI script from your Moodle wwwroot directory:
php admin/tool/trigger/cli/export_fields.php
Learnt event filds can be imported from a JSON file into the Moodle database via a CLI script.
To import the fields for learnt events from a JSON file, run the following CLI script from your Moodle wwwroot directory:
php admin/tool/trigger/cli/import_csv_records.php
**Note: ** This process is generally not required by end users. This is becasuse the fields are imported from the JSON file on plugin install and upgrade.