-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathtool_trigger.php
327 lines (318 loc) · 21.6 KB
/
tool_trigger.php
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
<?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/>.
/**
* Plugin strings are defined here.
*
* @package tool_trigger
* @category string
* @copyright Matt Porritt <[email protected]>
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
$string['pluginname'] = 'Event Trigger';
$string['pluginname_help'] = 'Event Triggering for Moodle';
$string['action'] = 'Action';
$string['actionscurrent'] = 'Current configuration';
$string['actionshistoric'] = 'Historic configuration';
$string['active'] = 'Active';
$string['addworkflow'] = 'Add new trigger workflow';
$string['areatomonitor'] = 'Area to monitor';
$string['areatomonitor_help'] = 'The Moodle area that contains the event to trigger workflow on.';
$string['assigncohortactionstepname'] = 'Assign cohort';
$string['assigncohortactionstepdesc'] = 'A step that allows for assigning a user to a cohort';
$string['autorerun'] = 'Enable auto re-run';
$string['autorerun_help'] = '';
$string['autorerunduration'] = 'Minimum duration before re-run attempted';
$string['autorerunduration_help'] = 'The duration between re-running an errored attempt.';
$string['autorerunmaxtries'] = 'Number of re-runs attempted';
$string['autorerunmaxtries_help'] = 'The maximum number to retry the runs that are in an errored state.';
$string['autorerunsettings'] = 'Auto re-run';
$string['autorerunsettingsdesc'] = '';
$string['availablefields'] = 'Available fields';
$string['badsteptype'] = 'Incorrect step type';
$string['badstepclass'] = 'Incorrect step class name';
$string['cachedef_eventsubscriptions'] = 'Tool Trigger event subscription cache';
$string['cleanupsettings'] = 'Clean up settings';
$string['cleanupsettingsdesc'] = 'The following settings control the cleanup tasks for this plugin.';
$string['cli_extractfields'] = 'Extracting fields for learnt events from database...';
$string['cli_filefail'] = 'Failed to write file: {$a}';
$string['cli_filesummary'] = 'File written to: {$a}';
$string['cli_writingfile'] = 'Writing {$a} event field definitions to file...';
$string['cohortidfield'] = 'Cohort ID';
$string['core'] = 'Core';
$string['debounce'] = 'Debounce';
$string['debounce_desc'] = 'The debounce step is a special step that queues up the workflow to be run after a certain period of time, using only the latest instance of the workflow to occur in the period, with a period reset occuring at each new workflow instance trigger.';
$string['debouncecontext'] = 'Debounce match fields';
$string['debouncecontext_help'] = 'The fields to match in an event to start a debounce. All selected fields must match in order to be debounced.';
$string['debounceduration'] = 'Duration to debounce events';
$string['deferred'] = 'Deferred';
$string['deleterule'] = 'Delete rule';
$string['deletestep'] = 'Delete step';
$string['description'] = 'Description';
$string['downloadrule'] = 'Download rule';
$string['downloadworkflow'] = 'Download workflow history';
$string['downloadrundetails'] = 'Download run details';
$string['draft'] = 'Draft';
$string['draftmode'] = 'Draft mode';
$string['draftmode_help'] = 'Use draft mode to test workflow with firing triggers.';
$string['duplicaterule'] = 'Duplicate rule';
$string['duplicatedworkflowname'] = '{$a} (copy)';
$string['editrule'] = 'Edit rule';
$string['editsettings'] = 'Workflow settings';
$string['editstep'] = 'Edit step';
$string['editworkflow'] = 'Edit trigger workflow';
$string['emailsubject'] = 'Subject';
$string['emailsubject_help'] = 'The text to use in the subject of the e-mail';
$string['emailto'] = 'To';
$string['emailto_help'] = 'Who to send the email to';
$string['emailcontent'] = 'Content';
$string['emailcontent_help'] = 'The content to use in the email';
$string['emailactionstepname'] = 'Email';
$string['emailactionstepdesc'] = 'A step to allow an e-mail to be sent';
$string['erroronfail'] = 'Error on failure';
$string['erroronfail_help'] = 'Set the step to error instead of fail';
$string['event'] = 'Event';
$string['eventdescription'] = 'Event description';
$string['eventfields'] = 'Event fields';
$string['eventid'] = 'Event ID';
$string['eventtomonitor'] = 'Event to monitor';
$string['eventtomonitor_help'] = 'The Moodle event to trigger workflow on.';
$string['erroreditstep'] = 'Something went wrong while attempting to save the workflow step. Please try again.';
$string['errorimportworkflow'] = 'Something went wrong while importing the workflow. Please try again.';
$string['errorsavingworkflow'] = 'Something went wrong while attempting to save the workflow. Please try again.';
$string['errorstep'] = 'Errored step {$a}';
$string['errorstepretrypending'] = '(Pending retry {$a})';
$string['executenext'] = 'Execute following step';
$string['executenextconfirm'] = 'Are you sure you wish to execute following step? It will execute based on the data from this step.';
$string['expectedresponse'] = 'Expected response code';
$string['expectedresponse_help'] = 'Enter the HTTP Response code you expect to receive from the step. Any other response header will cause the step to error.';
$string['failedstep'] = 'Failed step {$a}';
$string['filter'] = 'Filter';
$string['filtercancelled'] = 'Cancelled';
$string['filterdeferred'] = 'Deferred';
$string['filtererrored'] = 'Errored';
$string['filterfailed'] = 'Failed';
$string['filterpassed'] = 'Passed';
$string['filterlabelrunstatus'] = 'Filter by run status';
$string['filterlabeluser'] = 'Filter by user name OR user ID';
$string['filterreset'] = 'Reset';
$string['filtersubmit'] = 'Filter';
$string['historyduration'] = 'Duration to store trigger instances';
$string['historydurationdesc'] = 'This is the duration to store detailed trigger instances. After this period, it is no longer possible to rerun steps of the instance, or view step data.';
$string['historysettings'] = 'Workflow history settings';
$string['historysettingsdesc'] = 'These settings provide control over how the history of a workflow is stored.';
$string['httpostactionurl'] = 'URL';
$string['httpostactionurl_help'] = 'The URL to post the data to.';
$string['httpostmethod'] = 'HTTP method';
$string['httpostmethod_help'] = 'HTTP method for the given request.';
$string['httpostactionheaders'] = 'Headers';
$string['httpostactionheaders_help'] = 'The requests headers to send.';
$string['httpostactionparams'] = 'Parameters';
$string['httpostactionparams_help'] = 'The parameters to send with the request.';
$string['httppostactionstepname'] = 'HTTP request';
$string['httppostactionstepdesc'] = 'A step to allow Moodle workflows to send data to a HTTP/S endpoint.';
$string['importmodaltitle'] = 'Import workflow from file';
$string['importworkflow'] = 'Import a workflow';
$string['inputprefixuser'] = 'Prefix used for user lookup';
$string['inputprefixrole'] = 'Prefix used for role lookup';
$string['invalidjson'] = 'The workflow import file contains invalid JSON and could not be imported';
$string['invalidversion'] = 'The workflow import file is not valid with this version of the plugin';
$string['jsonencode'] = 'JSON encode parameters';
$string['jsonencode_help'] = 'If enabled values in the Parameter field will be JSON encoded.';
$string['lasttriggered'] = 'Last triggered';
$string['learning'] = 'Enable learning mode';
$string['learning_help'] = 'Learning mode will collect data about available fields for fired events';
$string['learningsettings'] = 'Learning mode settings';
$string['learningsettingsdesc'] = 'Every Moodle event provides a set of fields that can be used as placeholders in the workflow that is triggered for that event.<br/>
This plugin comes with a predefined set of placeholders for some Moodle core events. Enabling learning mode dynamically updates the list of placeholders availble for Moodle events.<br/><br/>
This setting can cause Moodle performance issues and should only be enabled when there are events such as those in plugins that do not have existing
placeholder definitions available. <br/>
Please refer to the plugin documentation for more information.';
$string['lookup'] = 'Lookup';
$string['manage'] = 'Manage';
$string['manageworkflow'] = 'Manage workflow';
$string['messageprovider:tool_trigger'] = 'Event trigger notifications';
$string['modaltitle'] = 'Add workflow step.';
$string['movestepup'] = 'Move step towards start';
$string['movestepdown'] = 'Move step towards end';
$string['name'] = 'Name';
$string['newrunfailed'] = 'Run {$a->prev} was rerun as run {$a->new} and errored.';
$string['noavailablefields'] = 'No fields available, consider turning on learning mode.';
$string['noworkflowfile'] = 'No workflow file found';
$string['numsteps'] = 'Steps';
$string['outputprefix'] = 'Prefix for added fields';
$string['pluginsettings'] = 'Plugin Settings';
$string['prevstep'] = 'Previous step ID';
$string['privacy:path:events'] = '';
$string['privacy:metadata:events'] = 'Data from monitored Moodle events';
$string['privacy:metadata:events:anonymous'] = 'Whether the event was flagged as anonymous';
$string['privacy:metadata:events:eventname'] = 'The event name';
$string['privacy:metadata:events:ip'] = 'The IP address used at the time of the event';
$string['privacy:metadata:events:origin'] = 'The origin of the event';
$string['privacy:metadata:events:other'] = 'Additional information about the event';
$string['privacy:metadata:events:realuserid'] = 'The ID of the real user behind the event, when masquerading a user.';
$string['privacy:metadata:events:relateduserid'] = 'The ID of a user related to this event';
$string['privacy:metadata:events:timecreated'] = 'The time at which the event occurred';
$string['privacy:metadata:events:userid'] = 'The ID of the user who triggered this event';
$string['privacy:path:learnevents'] = '';
$string['privacy:metadata:learnevents'] = 'Data from monitored Moodle learn events';
$string['privacy:metadata:learnevents:anonymous'] = 'Whether the learn event was flagged as anonymous';
$string['privacy:metadata:learnevents:eventname'] = 'The learn event name';
$string['privacy:metadata:learnevents:ip'] = 'The IP address used at the time of the learn event';
$string['privacy:metadata:learnevents:origin'] = 'The origin of the learn event';
$string['privacy:metadata:learnevents:other'] = 'Additional information about the learn event';
$string['privacy:metadata:learnevents:realuserid'] = 'The ID of the real user behind the learn event, when masquerading a user.';
$string['privacy:metadata:learnevents:relateduserid'] = 'The ID of a user related to this learn event';
$string['privacy:metadata:learnevents:timecreated'] = 'The time at which the learn event occurred';
$string['privacy:metadata:learnevents:userid'] = 'The ID of the user who triggered this learn event';
$string['privacy:metadata:runhistory'] = 'This table stores historical data of trigger runs steps, in order to allow for replaying trigger runs.';
$string['privacy:metadata:runhistory:executed'] = 'The time that this step was executed.';
$string['privacy:metadata:runhistory:results'] = 'An encoded set of results from the step execution.';
$string['privacy:metadata:workflowhistory'] = 'This table stores historical data of trigger runs, in order to allow for replaying trigger runs.';
$string['privacy:metadata:workflowhistory:event'] = 'An encoded event entry that triggered the trigger run.';
$string['privacy:metadata:workflowhistory:timecreated'] = 'The time that the trigger run was executed.';
$string['queuelimit'] = 'Queue limit';
$string['queuelimitdesc'] = 'Max number of tasks to try and process in a queue.';
$string['queuesettings'] = 'Workflow queue settings';
$string['queuesettingsdesc'] = 'These settings control how the queue is managed.';
$string['realtime'] = 'Real time';
$string['rerunallcurr'] = 'Rerun all errored runs with current configuration';
$string['rerunallcurrconfirm'] = 'Are you sure you wish to re-run all errored runs using the current workflow configuration?';
$string['rerunallhist'] = 'Rerun all errored runs with historic configuration';
$string['rerunallhistconfirm'] = 'Are you sure you wish to re-run all errored runs using a historic workflow configuration?';
$string['rerunstep'] = 'Re-run step';
$string['rerunstepandfinish'] = 'Re-run step and finish run';
$string['rerunstepandfinishconfirm'] = 'Are you sure you wish to re-run this step, and perform all steps until completing the run?';
$string['rerunstepandnext'] = 'Re-run step and next';
$string['rerunstepandnextconfirm'] = 'Are you sure you wish to re-run this step, and perform the next step in the workflow?';
$string['rerunstepconfirm'] = 'Are you sure you wish to re-run step? This will perform all actions from the step.';
$string['rerunworkflow'] = 'Re-run workflow';
$string['rerunworkflowconfirm'] = 'Are you sure you wish to re-run workflow with current workflow configuration? This will execute all steps based on the original event.';
$string['roleassignactionstepname'] = 'Role assignment';
$string['roleassignactionstepdesc'] = 'Assign a role to a user in the given context';
$string['roleunassignactionstepname'] = 'Role unassignment';
$string['roleunassignactionstepdesc'] = 'Unassign a role to a user in the given context';
$string['stepclass'] = 'Step';
$string['stepclass_help'] = 'Choose the step to apply.';
$string['stepdescription'] = 'Step description';
$string['stepdescription_help'] = 'A meaningful description for this step.';
$string['stepid'] = 'Step ID';
$string['sttepidembed'] = 'Step ID: {$a}';
$string['stepmodalbutton'] = 'Add workflow step';
$string['stepname'] = 'Step name';
$string['stepname_help'] = 'The name of this step.';
$string['steprequired'] = 'The workflow must have at least one step.';
$string['stepresults'] = 'Step results:';
$string['steptype'] = 'Step type';
$string['steptype_help'] = 'The type of step to apply.';
$string['step_filter_fail_desc'] = 'A step that always fails. (Mostly useful for testing.)';
$string['step_filter_fail_name'] = 'Fail';
$string['step_lookup_cohort_desc'] = 'This step looks up cohort data for a user.';
$string['step_lookup_cohort_name'] = 'Cohort lookup';
$string['step_lookup_course:privacy:coursedata_desc'] = 'Data about courses, including id, course name, start and end dates, etc.';
$string['step_lookup_course:privacy:categorydata_desc'] = 'Data about course categories, including name, description etc.';
$string['step_lookup_course_desc'] = 'This step looks up data about a course.';
$string['step_lookup_course_name'] = 'Course lookup';
$string['step_lookup_course_courseidfield'] = 'Course id data field';
$string['courseidfield'] = 'Course id data field';
$string['courseidfield_help'] = 'You can use course id as a number or as a filed name from the workflow data';
$string['step_lookup_category_desc'] = 'This step looks up data about a category.';
$string['step_lookup_category_name'] = 'Category lookup';
$string['step_lookup_category_categoryidfield'] = 'Category id data field';
$string['categoryidfield'] = 'Category id data field';
$string['categoryidfield_help'] = 'You can use category id as a number or as a filed name from the workflow data';
$string['step_lookup_user:privacy:userdata_desc'] = 'Personal data about users, such as usernames, names, email addresses, etc.';
$string['step_lookup_user_desc'] = 'This step looks up data about a user.';
$string['step_lookup_user_nodeleted'] = 'Exit if user has been deleted?';
$string['step_lookup_user_name'] = 'User lookup';
$string['step_lookup_user_useridfield'] = 'User id data field';
$string['step_lookup_roles:privacy:userdata_desc'] = 'Data about user roles in various contexts.';
$string['step_lookup_roles_desc'] = 'This step looks up user roles.';
$string['step_lookup_roles_name'] = 'User roles lookup';
$string['step_action_email:privacy:desc'] = 'This plugin may be configured to send emails containing data from Moodle.';
$string['step_action_httppost:privacy:desc'] = 'This plugin may be configured to send HTTP requests to external addresses, containing data from Moodle.';
$string['step_action_logdump_desc'] = 'This step prints the event and workflow steps data to the cron log. (Mostly useful for testing.)';
$string['step_action_logdump_name'] = 'Cron log';
$string['step_action_role_assign_useridfield'] = 'User id data field';
$string['step_action_role_unassign_useridfield'] = 'User id data field';
$string['step_action_webservice:privacy:desc'] = 'This plugin may be configured to call webservice functions directly and so may handle data from Moodle depending on the function called.';
$string['useridfield'] = 'User id data field';
$string['useridfield_help'] = 'You can use user id as a number or as a filed name from the workflow data';
$string['step_action_role_assign_roleidfield'] = 'Role id data field';
$string['step_action_role_unassign_roleidfield'] = 'Role id data field';
$string['rerunerrors'] = 'All error runs have been rerun.';
$string['roleidfield'] = 'Role id data field';
$string['roleidfield_help'] = 'You can use role id as a number or as a filed name from the workflow data';
$string['runid'] = 'Run ID';
$string['runpassed'] = 'Passed step {$a}';
$string['runpassednonum'] = 'Passed';
$string['runstatus'] = 'Run status';
$string['step_action_role_assign_contextidfield'] = 'Context id data field';
$string['step_action_role_unassign_contextidfield'] = 'Context id data field';
$string['stepnotfound'] = 'Step not found';
$string['stepnumber'] = 'Step Number';
$string['contextidfield'] = 'Context id data field';
$string['contextidfield_help'] = 'You can use context id as a number or as a filed name from the workflow data';
$string['taskcleanup'] = 'Delete old processed events';
$string['taskcleanuphistory'] = 'Delete historical trigger data';
$string['taskemptyhistoryconfig'] = 'Error: missing configuration for history duration. Exiting...';
$string['tasklearn'] = 'Learn about the fields in stored events.';
$string['tasklearnstart'] = 'Starting event field extraction processing...';
$string['taskprocessworkflows'] = 'Process workflows scheduled task.';
$string['triggerhistory'] = 'History';
$string['triggernumber'] = 'Trigger Number';
$string['triggernumberembed'] = 'Trigger Number: {$a}';
$string['trigger:exportrundetails'] = 'Download exported event-triggered run step history';
$string['trigger:exportworkflowhistory'] = 'Download exported event-triggered workflow history';
$string['trigger:manageworkflows'] = 'Create and configure automatic event-triggered workflows';
$string['timeexecuted'] = 'Time executed';
$string['timetocleanup'] = 'Time to cleanup old events';
$string['timetocleanup_help'] = 'This setting sets the time sucessfully executed workflows remain in the Moodle database prior to being removed.';
$string['update_trigger_helper_task'] = 'Adhoc task to offload upgrade processing work.';
$string['warningdebugging'] = 'Debug mode is disabled for the current workflow. To be able to record the history, you should <a href = "/admin/tool/trigger/edit.php?workflowid={$a}">enable debugging for the workflow</a>.';
$string['webserviceactionfunctionname'] = 'Function';
$string['webserviceactionfunctionname_help'] = 'The webservice function to be called. See the <a href="/admin/webservice/documentation.php">API Documentation</a>';
$string['webserviceactionusername'] = 'Who';
$string['webserviceactionusername_help'] = 'The user (username) who this step will be performed in the context of. This defaults to the main admin user if not explicitly set';
$string['webserviceactionparams'] = 'Parameters';
$string['webserviceactionparams_help'] = 'The function parameters - currently with support for JSON.';
$string['webserviceactionstepname'] = 'Webservice Function';
$string['webserviceactionstepdesc'] = 'A step allowing the workflow to trigger web service functions.';
$string['workflowactive'] = 'Workflow active';
$string['workflowactive_help'] = 'Only active workflows will be processed when an event is triggered.';
$string['workflowrealtime'] = 'Real time processing';
$string['workflowrealtime_help'] = 'When enabled this workflow will be triggered synchronously as part of the event. Use caution when enabling as long running workflows will block the user interface.';
$string['workflowcopysuccess'] = 'Workflow successfully duplicated';
$string['workflowdebug'] = 'Debug mode';
$string['workflowdebug_help'] = 'Debug mode stores historical data about this workflow, for use in refining the workflow.';
$string['workflowdeleteareyousure'] = 'Are you sure you want to delete the workflow "{$a}"?';
$string['workflowdeletesuccess'] = 'Workflow successfully deleted';
$string['workflowdescription'] = 'Description';
$string['workflowdescription_help'] = 'A short description of this workflows purpose.';
$string['workflowid'] = 'Workflow ID: {$a}';
$string['workflowimported'] = 'Workflow successfully imported';
$string['workflowfile'] = 'Workflow file';
$string['workflowname'] = 'Name';
$string['workflowname_help'] = 'The human readable name for this workflow.';
$string['workflowoverview'] = 'Workflow overview';
$string['workflowviewhistory'] = 'View workflow history';
$string['viewtriggerrun'] = 'View run';
$string['viewdetailedrun'] = 'View run details';
$string['viewstepinfo'] = 'View step information';
$string['roleunassignactionstepname'] = 'Role unassignment';
$string['roleunassignactionstepdesc'] = 'A step to unassign a specific user role assignment.';
$string['rolesunassignactionstepname'] = 'Roles unassignment';
$string['rolesunassignactionstepdesc'] = 'A step to unassign all user role assignments.';