2 // This file is part of Moodle - http://moodle.org/
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.
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.
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/>.
18 * Hook listener callbacks.
21 * @copyright 2023 Safat Shahin <safat.shahin@moodle.com>
22 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
25 defined('MOODLE_INTERNAL') ||
die();
29 'hook' => \core_group\hook\after_group_created
::class,
30 'callback' => \core_communication\hook_listener
::class . '::create_group_communication',
33 'hook' => \core_group\hook\after_group_updated
::class,
34 'callback' => \core_communication\hook_listener
::class . '::update_group_communication',
37 'hook' => \core_group\hook\after_group_deleted
::class,
38 'callback' => \core_communication\hook_listener
::class . '::delete_group_communication',
41 'hook' => \core_group\hook\after_group_membership_added
::class,
42 'callback' => \core_communication\hook_listener
::class . '::add_members_to_group_room',
45 'hook' => \core_group\hook\after_group_membership_removed
::class,
46 'callback' => \core_communication\hook_listener
::class . '::remove_members_from_group_room',
49 'hook' => \core_course\hook\after_course_created
::class,
50 'callback' => \core_communication\hook_listener
::class . '::create_course_communication',
53 'hook' => \core_course\hook\after_course_updated
::class,
54 'callback' => \core_communication\hook_listener
::class . '::update_course_communication',
57 'hook' => \core_course\hook\before_course_delete
::class,
58 'callback' => \core_communication\hook_listener
::class . '::delete_course_communication',
61 'hook' => \core_user\hook\before_user_update
::class,
62 'callback' => \core_communication\hook_listener
::class . '::update_user_room_memberships',
65 'hook' => \core_user\hook\before_user_deleted
::class,
66 'callback' => \core_communication\hook_listener
::class . '::delete_user_room_memberships',
69 'hook' => \core\hook\access\after_role_assigned
::class,
70 'callback' => \core_communication\hook_listener
::class . '::update_user_membership_for_role_changes',
73 'hook' => \core\hook\access\after_role_unassigned
::class,
74 'callback' => \core_communication\hook_listener
::class . '::update_user_membership_for_role_changes',
77 'hook' => \core_enrol\hook\after_enrol_instance_status_updated
::class,
78 'callback' => \core_communication\hook_listener
::class . '::update_communication_memberships_for_enrol_status_change',
81 'hook' => \core_enrol\hook\before_enrol_instance_delete
::class,
82 'callback' => \core_communication\hook_listener
::class . '::remove_communication_memberships_for_enrol_instance_deletion',
85 'hook' => \core_enrol\hook\after_user_enrolled
::class,
86 'callback' => \core_communication\hook_listener
::class . '::add_communication_membership_for_enrolled_user',
89 'hook' => \core_enrol\hook\before_user_enrolment_update
::class,
90 'callback' => \core_communication\hook_listener
::class . '::update_communication_membership_for_updated_user_enrolment',
93 'hook' => \core_enrol\hook\before_user_enrolment_remove
::class,
94 'callback' => \core_communication\hook_listener
::class . '::remove_communication_membership_for_unenrolled_user',
97 'hook' => \core\hook\output\before_standard_footer_html_generation
::class,
98 'callback' => \core_userfeedback
::class . '::before_standard_footer_html_generation',
101 'hook' => \core\hook\output\after_standard_main_region_html_generation
::class,
102 'callback' => \core_message\hook_callbacks
::class . '::add_messaging_widget',
106 'hook' => \core\hook\task\after_failed_task_max_delay
::class,
107 'callback' => core\task\failed_task_callbacks
::class . '::send_failed_task_max_delay_message',