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.
   1  <?php
   2  // This file is part of Moodle - http://moodle.org/
   3  //
   4  // Moodle is free software: you can redistribute it and/or modify
   5  // it under the terms of the GNU General Public License as published by
   6  // the Free Software Foundation, either version 3 of the License, or
   7  // (at your option) any later version.
   8  //
   9  // Moodle is distributed in the hope that it will be useful,
  10  // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11  // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12  // GNU General Public License for more details.
  13  //
  14  // You should have received a copy of the GNU General Public License
  15  // along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
  16  
  17  /**
  18   * Add event handlers for the accessibility report
  19   *
  20   * @package    tool_brickfield
  21   * @category   event
  22   * @copyright  2020 Brickfield Education Labs https://www.brickfield.ie
  23   * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
  24   */
  25  
  26  defined('MOODLE_INTERNAL') || die();
  27  
  28  $observers = [
  29      [
  30          'eventname' => '\core\event\course_category_created',
  31          'callback'  => '\tool_brickfield\eventobservers::course_category_created',
  32          'internal'  => false,
  33      ],
  34      [
  35          'eventname' => '\core\event\course_category_deleted',
  36          'callback'  => '\tool_brickfield\eventobservers::course_category_deleted',
  37          'internal'  => false,
  38      ],
  39      [
  40          'eventname' => '\core\event\course_category_restored',
  41          'callback'  => '\tool_brickfield\eventobservers::course_category_restored',
  42          'internal'  => false,
  43      ],
  44      [
  45          'eventname' => '\core\event\course_category_updated',
  46          'callback'  => '\tool_brickfield\eventobservers::course_category_updated',
  47          'internal'  => false,
  48      ],
  49      [
  50          'eventname' => '\core\event\course_created',
  51          'callback'  => '\tool_brickfield\eventobservers::course_created',
  52          'internal'  => false,
  53      ],
  54      [
  55          'eventname' => '\core\event\course_deleted',
  56          'callback'  => '\tool_brickfield\eventobservers::course_deleted',
  57          'internal'  => false,
  58      ],
  59      [
  60          'eventname' => '\core\event\course_restored',
  61          'callback'  => '\tool_brickfield\eventobservers::course_restored',
  62          'internal'  => false,
  63      ],
  64      [
  65          'eventname' => '\core\event\course_updated',
  66          'callback'  => '\tool_brickfield\eventobservers::course_updated',
  67          'internal'  => false,
  68      ],
  69      [
  70          'eventname' => '\core\event\course_section_created',
  71          'callback'  => '\tool_brickfield\eventobservers::course_section_created',
  72          'internal'  => false,
  73      ],
  74      [
  75          'eventname' => '\core\event\course_section_deleted',
  76          'callback'  => '\tool_brickfield\eventobservers::course_section_deleted',
  77          'internal'  => false,
  78      ],
  79      [
  80          'eventname' => '\core\event\course_section_updated',
  81          'callback'  => '\tool_brickfield\eventobservers::course_section_updated',
  82          'internal'  => false,
  83      ],
  84      [
  85          'eventname' => '\core\event\course_module_created',
  86          'callback'  => '\tool_brickfield\eventobservers::course_module_created',
  87          'internal'  => false,
  88      ],
  89      [
  90          'eventname' => '\core\event\course_module_restored',
  91          'callback'  => '\tool_brickfield\eventobservers::course_module_restored',
  92          'internal'  => false,
  93      ],
  94      [
  95          'eventname' => '\core\event\course_module_updated',
  96          'callback'  => '\tool_brickfield\eventobservers::course_module_updated',
  97          'internal'  => false,
  98      ],
  99      [
 100          'eventname' => '\core\event\course_module_deleted',
 101          'callback'  => '\tool_brickfield\eventobservers::course_module_deleted',
 102          'internal'  => false,
 103      ],
 104      [
 105          'eventname' => '\mod_lesson\event\page_created',
 106          'callback'  => '\tool_brickfield\eventobservers::mod_lesson_page_created',
 107          'internal'  => false,
 108      ],
 109      [
 110          'eventname' => '\mod_lesson\event\page_deleted',
 111          'callback'  => '\tool_brickfield\eventobservers::mod_lesson_page_deleted',
 112          'internal'  => false,
 113      ],
 114      [
 115          'eventname' => '\mod_lesson\event\page_updated',
 116          'callback'  => '\tool_brickfield\eventobservers::mod_lesson_page_updated',
 117          'internal'  => false,
 118      ],
 119      [
 120          'eventname' => '\mod_book\event\chapter_created',
 121          'callback'  => '\tool_brickfield\eventobservers::book_chapter_created',
 122          'internal'  => false,
 123      ],
 124      [
 125          'eventname' => '\mod_book\event\chapter_deleted',
 126          'callback'  => '\tool_brickfield\eventobservers::book_chapter_deleted',
 127          'internal'  => false,
 128      ],
 129      [
 130          'eventname' => '\mod_book\event\chapter_updated',
 131          'callback'  => '\tool_brickfield\eventobservers::book_chapter_updated',
 132          'internal'  => false,
 133      ],
 134      [
 135          'eventname' => '\core\event\question_created',
 136          'callback'  => '\tool_brickfield\eventobservers::core_question_created',
 137          'internal'  => false,
 138      ],
 139      [
 140          'eventname' => '\core\event\question_updated',
 141          'callback'  => '\tool_brickfield\eventobservers::core_question_updated',
 142          'internal'  => false,
 143      ],
 144      [
 145          'eventname' => '\core\event\question_deleted',
 146          'callback'  => '\tool_brickfield\eventobservers::core_question_deleted',
 147          'internal'  => false,
 148      ],
 149  ];