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 submission_created 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 submission_created 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 submission_created extends \mod_assign\event\submission_created { |
|
|
|
|
39
|
|
|
|
40
|
|
|
/** |
41
|
|
|
* Init method. |
42
|
|
|
*/ |
43
|
|
|
protected function init() { |
44
|
|
|
parent::init(); |
45
|
|
|
$this->data['objecttable'] = 'assignsubmission_edulegit'; |
|
|
|
|
46
|
|
|
} |
47
|
|
|
|
48
|
|
|
/** |
49
|
|
|
* Returns non-localised description of what happened. |
50
|
|
|
* |
51
|
|
|
* @return string |
52
|
|
|
*/ |
53
|
|
|
public function get_description() { |
54
|
|
|
$descriptionstring = "The user with id '$this->userid' created EduLegit submission " . |
55
|
|
|
"in the assignment with course module id " . |
56
|
|
|
"'$this->contextinstanceid'"; |
57
|
|
|
if (!empty($this->other['groupid'])) { |
58
|
|
|
$descriptionstring .= " for the group with id '{$this->other['groupid']}'."; |
59
|
|
|
} else { |
60
|
|
|
$descriptionstring .= "."; |
61
|
|
|
} |
62
|
|
|
|
63
|
|
|
return $descriptionstring; |
64
|
|
|
} |
65
|
|
|
|
66
|
|
|
/** |
67
|
|
|
* Get objectid mapping. |
68
|
|
|
* |
69
|
|
|
* @return array |
70
|
|
|
*/ |
71
|
|
|
public static function get_objectid_mapping(): array { |
72
|
|
|
// No mapping available for 'assignsubmission_edulegit'. |
73
|
|
|
return ['db' => 'assignsubmission_edulegit', 'restore' => \core\event\base::NOT_MAPPED]; |
|
|
|
|
74
|
|
|
} |
75
|
|
|
} |
76
|
|
|
|
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