Skip to content

Commit 38c17c5

Browse files
committed
exclude trigger: show excluded 0 as well
1 parent c7287d2 commit 38c17c5

File tree

4 files changed

+4
-2
lines changed

4 files changed

+4
-2
lines changed

trigger/customfielddelay/lang/de/lifecycletrigger_customfielddelay.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
$string['customfield_help'] = 'Der Trigger prüft den Wert dieses nutzerdefinierten Kursfeldes vom Typ Datum.';
2828
$string['delay'] = 'Zeitraum nach dem Datum des nutzerdefinierten Kursfeldes';
2929
$string['delay_help'] = 'Der Prozess startet sobald der angegebene Zeitraum nach dem nutzerdefinierten Kursfeld-Datum abgelaufen ist.';
30+
$string['missingfield'] = 'Nutzerdefiniertes Kursfeld "{$a}" vom Typ Datum ist in diesem Moodle nicht vorhanden und muss zuerst angelegt werden.';
3031
$string['plugindescription'] = 'Der Trigger löst aus sobald der angegebene Zeitraum nach dem nutzerdefinierten Kursfeld-Datum abgelaufen ist.';
3132
$string['pluginname'] = 'Nutzerdefiniertes Kursfeld Typ Datum - Trigger';
3233
$string['privacy:metadata'] = 'Dieses Subplugin speichert keine persönlichen Daten.';

trigger/customfielddelay/lang/en/lifecycletrigger_customfielddelay.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
$string['customfield_help'] = 'The trigger checks the value saved in the course for this customfield of type date.';
2828
$string['delay'] = 'Delay from customfield date of course until starting a process';
2929
$string['delay_help'] = 'The trigger will be invoked if the time passed since the customfield date of the course is longer than this delay.';
30+
$string['missingfield'] = 'Customfield "{$a}" of type date is missing in this Moodle. Please create it first.';
3031
$string['plugindescription'] = 'Triggers if the value of a specifiable datetype customfield is after a point in the future.';
3132
$string['pluginname'] = 'Customfield date delay trigger';
3233
$string['privacy:metadata'] = 'The lifecycletrigger_customfielddelay plugin does not store any personal data.';

trigger/customfielddelay/lib.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function get_course_recordset_where($triggerid) {
5858
$fieldname = settings_manager::get_settings($triggerid, settings_type::TRIGGER)['customfield'];
5959
if (!($field = $DB->get_record('customfield_field', ['shortname' => $fieldname, 'type' => 'date']))) {
6060
throw new \moodle_exception('missingfield',
61-
'moodle', '', $fieldname);
61+
'lifecycletrigger_customfielddelay', '', $fieldname);
6262
}
6363
$where = "{course}.id in (select cxt.instanceid from {context} cxt join {customfield_data} d " .
6464
"ON d.contextid = cxt.id AND cxt.contextlevel=" . CONTEXT_COURSE . " " .

workflowoverview.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@
277277
$trigger->classfires = "border-danger";
278278
}
279279
$trigger->tooltip = "";
280-
if ($trigger->excludedcourses = $amounts[$trigger->sortindex]->excluded) {
280+
if ($trigger->excludedcourses = $amounts[$trigger->sortindex]->excluded || $trigger->exclude) {
281281
$trigger->tooltip = get_string('courses_will_be_excluded',
282282
'tool_lifecycle', $trigger->excludedcourses);
283283
} else {

0 commit comments

Comments
 (0)