<?php
// This file is part of Moodle - https://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle.  If not, see <https://www.gnu.org/licenses/>.

/**
 * Event observers.
 *
 * @package     local_assign_ai
 * @copyright   2025 Datacurso
 * @license     https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 */

defined('MOODLE_INTERNAL') || die();

$observers = [
    [
        'eventname' => '\mod_assign\event\submission_created',
        'callback' => 'local_assign_ai\observer\submission::submission_created',
        'includefile' => '/local/assign_ai/classes/observer/submission.php',
        'internal' => false,
        'priority' => 9999,
    ],
    [
        'eventname' => '\mod_assign\event\submission_graded',
        'callback' => 'local_assign_ai\observer\submission::submission_graded',
        'includefile' => '/local/assign_ai/classes/observer/submission.php',
        'internal' => false,
        'priority' => 9999,
    ],
    [
        'eventname' => '\mod_assign\event\submission_updated',
        'callback' => 'local_assign_ai\observer\submission::submission_updated',
        'includefile' => '/local/assign_ai/classes/observer/submission.php',
        'internal' => false,
        'priority' => 9999,
    ],
    [
        'eventname' => '\mod_assign\event\assessable_submitted',
        'callback' => '\local_assign_ai\observer\submission::assessable_submitted',
        'includefile' => '/local/assign_ai/classes/observer/submission.php',
        'internal' => false,
        'priority' => 9999,
    ],
    [
        'eventname' => '\mod_assign\event\submission_removed',
        'callback' => '\local_assign_ai\observer\submission::submission_removed',
        'includefile' => '/local/assign_ai/classes/observer/submission.php',
        'internal' => false,
        'priority' => 9999,
    ],
    [
        'eventname'   => '\core\event\course_module_deleted',
        'callback'    => '\local_assign_ai\observer\module::course_module_deleted',
        'includefile' => '/local/assign_ai/classes/observer/module.php',
        'internal' => false,
        'priority'    => 9999,
    ],
];
