From 53cbf662e933449e9f059f7cf1331fc463b8f01a Mon Sep 17 00:00:00 2001 From: Chiew Wei Chieng Date: Wed, 3 Apr 2019 08:48:47 +0800 Subject: [PATCH] Fix new instance notification settings --- edit.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/edit.php b/edit.php index 6e84ffb..318b91c 100644 --- a/edit.php +++ b/edit.php @@ -90,8 +90,9 @@ if ($mform->is_cancelled()) { } // Convert back to string for storing in enrol table. //$data->customtext2 = implode(',', $notify); + $notify = implode(",", $notify); + if ($instance->id) { - $notify = implode(",", $notify); $instance->status = $data->status; $instance->name = $data->name; $instance->customtext1 = $data->customtext1; @@ -116,6 +117,7 @@ if ($mform->is_cancelled()) { 'customint6' => $data->customint6, 'customtext1' => $data->customtext1, 'customtext2' => $data->customtext2, + 'customtext3' => $notify, 'enrolperiod' => $data->enrolperiod ); $plugin->add_instance($course, $fields);