Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are 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.