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.

Class: eventobservers  - X-Ref

Observer class containing methods monitoring various events.

course_event_should_be_handled(int $courseid)   X-Ref
For course events to be handled, the accessibility tool needs to be enabled, and if a courseid is specified, the course
has to have been added to the scheduler.

param: int $courseid
return: bool

area_altered(base $event)   X-Ref
Content area altered event observer.

param: base $event The area altered event.

course_created(\core\event\course_created $event)   X-Ref
Course created event observer.

param: \core\event\course_created $event The course created event.

course_deleted(\core\event\course_deleted $event)   X-Ref
Course deleted event observer.

param: \core\event\course_deleted $event The course deleted event.

course_restored(\core\event\course_restored $event)   X-Ref
Course restored event observer.

param: \core\event\course_restored $event The course restored event.

course_updated(\core\event\course_updated $event)   X-Ref
Course update event observer.

param: \core\event\course_updated $event The course updated event.

course_altered(base $event)   X-Ref
Course update event observer. This is called on both course_created and course_updated, so use the base class as a type hint.

param: base $event The course updated event.

course_section_created(\core\event\course_section_created $event)   X-Ref
Course section created event observer.

param: \core\event\course_section_created $event The course section created event.

course_section_deleted(\core\event\course_section_deleted $event)   X-Ref
Course section deleted event observer.

param: \core\event\course_section_deleted $event The course section deleted event.

course_section_updated(\core\event\course_section_updated $event)   X-Ref
Course section update event observer.

param: \core\event\course_section_updated $event The course section updated event.

course_module_created(\core\event\course_module_created $event)   X-Ref
Course module created event observer.

param: \core\event\course_module_created $event The course module created event.

course_module_deleted(\core\event\course_module_deleted $event)   X-Ref
Course module deleted event observer.

param: \core\event\course_module_deleted $event The course module deleted event.

course_module_restored(\core\event\course_module_restored $event)   X-Ref
Course module restored event observer.

param: \core\event\course_module_restored $event The course module restored event.

course_module_updated(\core\event\course_module_updated $event)   X-Ref
Course module updated event observer.

param: \core\event\course_module_updated $event The course module updated event.

course_category_created(\core\event\course_category_created $event)   X-Ref
course_category created event observer.

param: \core\event\course_category_created $event The course_category created event.

course_category_deleted(\core\event\course_category_deleted $event)   X-Ref
course_category deleted event observer.

param: \core\event\course_category_deleted $event The course_category deleted event.

course_category_updated(\core\event\course_category_updated $event)   X-Ref
course_category update event observer.

param: \core\event\course_category_updated $event The course_category updated event.

mod_lesson_page_created(\mod_lesson\event\page_created $event)   X-Ref
mod_lesson_page created event observer.

param: \mod_lesson\event\page_created $event The mod_lesson page created event.

mod_lesson_page_deleted(\mod_lesson\event\page_deleted $event)   X-Ref
mod_lesson_page deleted event observer.

param: \mod_lesson\event\page_deleted $event The mod_lesson page deleted event.

mod_lesson_page_updated(\mod_lesson\event\page_updated $event)   X-Ref
mod_lesson_page updated event observer.

param: \mod_lesson\event\page_updated $event The mod_lesson page updated event.

core_question_created(\core\event\question_created $event)   X-Ref
core_question created observer

param: \core\event\question_created $event The core_question created event.

core_question_updated(\core\event\question_updated $event)   X-Ref
core_question updated observer

param: \core\event\question_updated $event The core_question created event.

core_question_deleted(\core\event\question_deleted $event)   X-Ref
core_question deleted observer

param: \core\event\question_deleted $event The core_question deleted event.

book_chapter_created(\mod_book\event\chapter_created $event)   X-Ref
Book chapter created event observer.

param: \mod_book\event\chapter_created $event The book chapter created event.

book_chapter_deleted(\mod_book\event\chapter_deleted $event)   X-Ref
Book chapter deleted event observer.

param: \mod_book\event\chapter_deleted $event The book chapter deleted event.

book_chapter_updated(\mod_book\event\chapter_updated $event)   X-Ref
Book chapter update event observer.

param: \mod_book\event\chapter_updated $event The book chapter updated event.

observer_insert(stdClass $data)   X-Ref
Add an observer record if appropriate.

param: stdClass $data