Skip to content

Events

This document defines all events that are emitted by the archiving system to the Moodle Events API.

Work in Progress (WIP)

This section is still under active development. Information and specifications can still be changed in the future.

Check subplugin frankenstyle naming

It needs to be verified how the frankenstyle names of subplugins are generated. Adjust class names accordingly.

Archive Jobs

The following events are related to the top-level archiving jobs.

Class name Trigger CRUD Payload Record snapshot
\local_archive\event\archive_job_created A new archive job was created create Archive job
\local_archive\event\archive_job_updated An archive job was updated update Updated fields Archive job
\local_archive\event\archive_job_completed An archive job completed successfully update Archive job
\local_archive\event\archive_job_failed An archive job failed update Cause Archive job
\local_archive\event\archive_job_aborted An archive job was aborted gracefully update Cause Archive job
\local_archive\event\archive_job_deleted An archive job was deleted delete Archive job

Activity Archiving Tasks

The following events are used for the communication with the activity archiving drivers.

Class name Trigger CRUD Payload Record snapshot
\local_archive_archiver_<activity>\event\task_created An archive job requests data from an activity of type activity to be archived create Activity metadata, Activity-specific configs Task metadata
\local_archive_archiver_<activity>\event\task_updated An archive task for an activity of type activity was updated update Updated fields Task metadata
\local_archive_archiver_<activity>\event\task_completed An archive task for an activity of type activity was completed successfully update Task metadata
\local_archive_archiver_<activity>\event\task_failed An archive task for an activity of type activity failed update Cause Task metadata
\local_archive_archiver_<activity>\event\task_aborted An archive task for an activity of type activity was aborted gracefully update Cause Task metadata

External Event Connectors

The following events are used for communication with external event connectors.

Class name Trigger CRUD Payload Record snapshot
\local_archive_exteventcon_<eec>\event\transmission_completed Transmission of an event via an external event connector of type eec was successful update Service-specific metadata (optional) Event object
\local_archive_exteventcon_<eec>\event\transmission_failed Transmission of an event via an external event connector of type eec failed update Service-specific metadata (optional) Event object

Storage Tasks

The following events are used for the communication with the storage drivers.

Class name Trigger CRUD Payload Record snapshot
\local_archive_store_<storage>\event\read_task_created Retrieval of an artifact from a storage of type storage was requested create Source, Destination Task metadata
\local_archive_store_<storage>\event\read_task_updated A read task for a storage of type storage was updated update Updated fields Task metadata
\local_archive_store_<storage>\event\read_task_completed An artifact was successfully retrieved from a storage of type storage update Source, Destination Task metadata
\local_archive_store_<storage>\event\read_task_failed A read from a storage of type storage failed update Cause Task metadata
\local_archive_store_<storage>\event\read_task_aborted A read from a storage of type storage was aborted gracefully update Cause Task metadata
Class name Trigger CRUD Payload Record snapshot
\local_archive_store_<storage>\event\write_task_created Transfer of an artifact to a storage of type storage was requested create Source, Destination Task metadata
\local_archive_store_<storage>\event\write_task_updated A write task for a storage of type storage was updated update Updated fields Task metadata
\local_archive_store_<storage>\event\write_task_completed An artifact was successfully transferred to a storage of type storage update Source, Destination Task metadata
\local_archive_store_<storage>\event\write_task_failed A transfer to a storage of type storage failed update Cause Task metadata
\local_archive_store_<storage>\event\write_task_aborted A transfer to a storage of type storage was aborted gracefully update Cause Task metadata

Worker Services

Worker services communicate via the Moodle external API and do not emit any events. Communication is handled directly within the respective activity archiving drivers.