X7ROOT File Manager
Current Path:
/home/cbholdings/pasukulu/mod/quiz/classes/event
home
/
cbholdings
/
pasukulu
/
mod
/
quiz
/
classes
/
event
/
📁
..
📄
attempt_abandoned.php
(3.23 KB)
📄
attempt_autosaved.php
(3.79 KB)
📄
attempt_becameoverdue.php
(3.42 KB)
📄
attempt_deleted.php
(3.06 KB)
📄
attempt_manual_grading_completed.php
(2.31 KB)
📄
attempt_preview_started.php
(3.09 KB)
📄
attempt_question_restarted.php
(4.29 KB)
📄
attempt_regraded.php
(3.37 KB)
📄
attempt_reopened.php
(2.66 KB)
📄
attempt_reviewed.php
(3.06 KB)
📄
attempt_started.php
(2.89 KB)
📄
attempt_submitted.php
(3.3 KB)
📄
attempt_summary_viewed.php
(3.12 KB)
📄
attempt_updated.php
(3.74 KB)
📄
attempt_viewed.php
(3.45 KB)
📄
course_module_instance_list_viewed.php
(1.33 KB)
📄
course_module_viewed.php
(1.58 KB)
📄
edit_page_viewed.php
(2.67 KB)
📄
group_override_created.php
(3.21 KB)
📄
group_override_deleted.php
(3.21 KB)
📄
group_override_updated.php
(3.2 KB)
📄
page_break_created.php
(3.03 KB)
📄
page_break_deleted.php
(3.03 KB)
📄
question_manually_graded.php
(3.47 KB)
📄
quiz_grade_updated.php
(2.88 KB)
📄
quiz_repaginated.php
(2.63 KB)
📄
report_viewed.php
(2.97 KB)
📄
section_break_created.php
(3.68 KB)
📄
section_break_deleted.php
(3.45 KB)
📄
section_shuffle_updated.php
(3.32 KB)
📄
section_title_updated.php
(3.54 KB)
📄
slot_created.php
(3.17 KB)
📄
slot_deleted.php
(2.95 KB)
📄
slot_displaynumber_updated.php
(3.5 KB)
📄
slot_mark_updated.php
(3.24 KB)
📄
slot_moved.php
(3.68 KB)
📄
slot_requireprevious_updated.php
(3.07 KB)
📄
user_override_created.php
(3.07 KB)
📄
user_override_deleted.php
(3.08 KB)
📄
user_override_updated.php
(3.07 KB)
Editing: attempt_reopened.php
<?php // This file is part of Moodle - http://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 <http://www.gnu.org/licenses/>. namespace mod_quiz\event; use coding_exception; use core\event\base; use moodle_url; /** * Event fired when a quiz attempt is reopened. * * @property-read array $other { * Extra information about event. * * - int submitterid: id of submitter (null when triggered by CLI script). * - int quizid: (optional) id of the quiz. * } * * @package mod_quiz * @since Moodle 4.2 * @copyright 2023 The Open University * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ class attempt_reopened extends base { protected function init() { $this->data['objecttable'] = 'quiz_attempts'; $this->data['crud'] = 'u'; $this->data['edulevel'] = self::LEVEL_TEACHING; } public function get_description(): string { return "The user with id '$this->relateduserid' has had their attempt with id '$this->objectid'" . "for the quiz with course module id '$this->contextinstanceid' re-opened by the user with id '$this->userid'."; } public static function get_name(): string { return get_string('eventquizattemptreopened', 'mod_quiz'); } public function get_url(): moodle_url { return new moodle_url('/mod/quiz/review.php', ['attempt' => $this->objectid]); } protected function validate_data(): void { parent::validate_data(); if (!isset($this->relateduserid)) { throw new coding_exception('The \'relateduserid\' must be set.'); } if (!array_key_exists('submitterid', $this->other)) { throw new coding_exception('The \'submitterid\' value must be set in other.'); } } public static function get_objectid_mapping(): array { return ['db' => 'quiz_attempts', 'restore' => 'quiz_attempt']; } public static function get_other_mapping(): array { return [ 'submitterid' => ['db' => 'user', 'restore' => 'user'], 'quizid' => ['db' => 'quiz', 'restore' => 'quiz'], ]; } }
Upload File
Create Folder