-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathsubplugin_lookup_test_step.php
More file actions
91 lines (81 loc) · 2.62 KB
/
subplugin_lookup_test_step.php
File metadata and controls
91 lines (81 loc) · 2.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<?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 trigger_testplugin\steps\lookups;
use tool_trigger\steps\lookups\base_lookup_step;
/**
* A lookup step for testing purposes.
*
* @package trigger_testplugin
* @copyright 2025 Moodle US
* @author Oscar Nadjar <oscar.nadjar@moodle.com>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class subplugin_lookup_test_step extends base_lookup_step {
/**
* The fields supplied by this step.
* A string containing all the cohorts a user is assigned to.
*
* @var array
*/
private static $stepfields = array(
'testlookupresult'
);
protected function init() {
}
/**
* {@inheritDoc}
* @see \tool_trigger\steps\base\base_step::execute()
*/
public function execute($step, $trigger, $event, $stepresults) {
global $DB;
$stepresults = [ 'testlookupresult' => 'test' ];
return [true, $stepresults];
}
/**
* {@inheritDoc}
* @see \tool_trigger\steps\base\base_step::form_definition_extra()
*/
public function form_definition_extra($form, $mform, $customdata) {
}
/**
* {@inheritDoc}
* @see \tool_trigger\steps\base\base_step::get_step_desc()
*/
public static function get_step_desc() {
return get_string('subplugin_lookup_test_step_desc', 'trigger_testplugin');
}
/**
* {@inheritDoc}
* @see \tool_trigger\steps\base\base_step::get_step_name()
*/
public static function get_step_name() {
return get_string('subplugin_lookup_test_step_name', 'trigger_testplugin');
}
/**
* {@inheritDoc}
* @see \tool_trigger\steps\base\base_step::get_privacyfields()
*/
public static function get_privacyfields() {
}
/**
* Get a list of fields this step provides.
*
* @return array $stepfields The fields this step provides.
*/
public static function get_fields() {
return self::$stepfields;
}
}