Observer class containing methods monitoring various events.
More...
|
| process_buffer () |
| This method process all events stored in the buffer.
|
|
|
| buffer_event (\core\event\base $event) |
| Api to buffer events to store, to reduce db queries.
|
|
| flush () |
| Protected method that flushes the buffer of events and writes them to the database.
|
|
|
array | $buffer = array() |
| $buffer buffer of events.
|
|
int | $count = 0 |
| Number of entries in the buffer.
|
|
Observer class containing methods monitoring various events.
- Since
- Moodle 2.8
- Copyright
- 2014 onwards Ankit Agarwal ankit.nosp@m..agr.nosp@m.r@gma.nosp@m.il.c.nosp@m.om
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ buffer_event()
Api to buffer events to store, to reduce db queries.
- Parameters
-
◆ course_deleted()
static tool_monitor\eventobservers::course_deleted |
( |
\core\event\course_deleted | $event | ) |
|
|
static |
Course delete event observer.
This observer monitors course delete event, and when a course is deleted it deletes any rules and subscriptions associated with it, so no orphan data is left behind.
- Parameters
-
core\event\course_deleted | $event | The course deleted event. |
◆ course_module_deleted()
Observer that monitors course module deleted event and delete user subscriptions.
- Parameters
-
◆ flush()
tool_monitor\eventobservers::flush |
( |
| ) |
|
|
protected |
Protected method that flushes the buffer of events and writes them to the database.
- Return values
-
array | a copy of the events buffer. |
◆ process_buffer()
tool_monitor\eventobservers::process_buffer |
( |
| ) |
|
This method process all events stored in the buffer.
This is a multi purpose api. It does the following:-
- Write event data to tool_monitor_events
- Find out users that need to be notified about rule completion and schedule a task to send them messages.
◆ process_event()
static tool_monitor\eventobservers::process_event |
( |
\core\event\base | $event | ) |
|
|
static |
The observer monitoring all the events.
This observers puts small event objects in buffer for later writing to the database. At the end of the request the buffer is cleaned up and all data dumped into the tool_monitor_events table.
- Parameters
-
◆ user_deleted()
Observer that monitors user deleted event and delete user subscriptions.
- Parameters
-
The documentation for this class was generated from the following file:
- admin/tool/monitor/classes/eventobservers.php