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
|
|
|
* The assignsubmission_edulegit assessable uploaded event. |
19
|
|
|
* |
20
|
|
|
* @package assignsubmission_edulegit |
21
|
|
|
* @author Alex Crosby <[email protected]> |
22
|
|
|
* @copyright @2024 EduLegit.com |
23
|
|
|
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
24
|
|
|
*/ |
25
|
|
|
|
26
|
|
|
namespace assignsubmission_edulegit\event; |
27
|
|
|
|
28
|
|
|
defined('MOODLE_INTERNAL') || die(); |
29
|
|
|
|
30
|
|
|
/** |
31
|
|
|
* The assignsubmission_edulegit assessable uploaded event class. |
32
|
|
|
* |
33
|
|
|
* @package assignsubmission_edulegit |
34
|
|
|
* @author Alex Crosby <[email protected]> |
35
|
|
|
* @copyright @2024 EduLegit.com |
36
|
|
|
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
37
|
|
|
*/ |
38
|
|
|
class assessable_uploaded extends \core\event\assessable_uploaded { |
|
|
|
|
39
|
|
|
|
40
|
|
|
/** |
41
|
|
|
* Returns description of what happened. |
42
|
|
|
* |
43
|
|
|
* @return string |
44
|
|
|
*/ |
45
|
|
|
public function get_description(): string { |
46
|
|
|
return "The user with id '$this->userid' has saved an EduLegit submission with id '$this->objectid' " . |
47
|
|
|
"in the assignment activity with course module id '$this->contextinstanceid'."; |
48
|
|
|
} |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* Return localised event name. |
52
|
|
|
* |
53
|
|
|
* @return string |
54
|
|
|
*/ |
55
|
|
|
public static function get_name(): string { |
56
|
|
|
return get_string('eventassessableuploaded', 'assignsubmission_edulegit'); |
|
|
|
|
57
|
|
|
} |
58
|
|
|
|
59
|
|
|
/** |
60
|
|
|
* Get URL related to the action. |
61
|
|
|
* |
62
|
|
|
* @return \moodle_url |
63
|
|
|
*/ |
64
|
|
|
public function get_url(): \moodle_url { |
|
|
|
|
65
|
|
|
return new \moodle_url('/mod/assign/view.php', ['id' => $this->contextinstanceid]); |
66
|
|
|
} |
67
|
|
|
|
68
|
|
|
/** |
69
|
|
|
* Init method. |
70
|
|
|
* |
71
|
|
|
* @return void |
72
|
|
|
*/ |
73
|
|
|
protected function init(): void { |
74
|
|
|
parent::init(); |
75
|
|
|
$this->data['objecttable'] = 'assign_submission'; |
|
|
|
|
76
|
|
|
} |
77
|
|
|
|
78
|
|
|
/** |
79
|
|
|
* Get objectid mapping. |
80
|
|
|
* |
81
|
|
|
* @return array |
82
|
|
|
*/ |
83
|
|
|
public static function get_objectid_mapping(): array { |
84
|
|
|
return ['db' => 'assign_submission', 'restore' => 'submission']; |
85
|
|
|
} |
86
|
|
|
} |
87
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths