From 18989595b4a60861c950793ef3b70d5778aa65a7 Mon Sep 17 00:00:00 2001 From: David Date: Fri, 19 Jan 2024 15:02:58 -0500 Subject: [PATCH] explicitly call the 'text' key for the ->recompletionemailbody to capture the text --- classes/task/check_recompletion.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/task/check_recompletion.php b/classes/task/check_recompletion.php index 59b4bc1..f9962a0 100644 --- a/classes/task/check_recompletion.php +++ b/classes/task/check_recompletion.php @@ -207,8 +207,8 @@ protected function notify_user($userid, $course, $config) { $a->coursename = format_string($course->fullname, true, ['context' => $context]); $a->profileurl = "$CFG->wwwroot/user/view.php?id=$userrecord->id&course=$course->id"; $a->link = course_get_url($course)->out(); - if (trim($config->recompletionemailbody) !== '') { - $message = $config->recompletionemailbody; + if (trim($config->recompletionemailbody['text']) !== '') { + $message = $config->recompletionemailbody['text']; $key = ['{$a->coursename}', '{$a->profileurl}', '{$a->link}', '{$a->fullname}', '{$a->email}']; $value = [$a->coursename, $a->profileurl, $a->link, fullname($userrecord), $userrecord->email]; $message = str_replace($key, $value, $message);