Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.11.x will end 14 Nov 2022 (12 months plus 6 months extension).
  • Bug fixes for security issues in 3.11.x will end 13 Nov 2023 (18 months plus 12 months extension).
  • PHP version: minimum PHP 7.3.0 Note: minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is supported too.

Event monitor data generator

Copyright: 2014 onwards Simey Lameze <simey@moodle.com>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 200 lines (7 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

tool_monitor_generator:: (4 methods):
  create_rule()
  create_subscription()
  create_event_entries()
  create_history()


Class: tool_monitor_generator  - X-Ref

Event monitor data generator class

create_rule($record = null)   X-Ref
Function to generate rule data.

param: \stdClass|array $record data to insert as rule entry.
return: \tool_monitor\rule An instance of rule class.

create_subscription($record = null)   X-Ref
Function to generate subscription data.

param: \stdClass|array $record data to insert as subscription entry.
return: \tool_monitor\subscription An instance of the subscription class.

create_event_entries($record = null)   X-Ref
Function to generate event entries.

param: \stdClass|array $record data to insert as event entry.
return: \stdClass $record An object representing the newly created event entry.

create_history($record = null)   X-Ref
Function to generate history data.

param: \stdClass|array $record data to insert as history entry.
return: \stdClass $record An object representing the newly created history entry.