Skip to content

Commit 7d4f059

Browse files
committed
fix customfielddelay missing field error message
1 parent 4437a97 commit 7d4f059

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

trigger/customfielddelay/lib.php

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

0 commit comments

Comments
 (0)