Skip to content

Commit

Permalink
explicitly call the 'text' key for the ->recompletionemailbody to cap…
Browse files Browse the repository at this point in the history
…ture the text
  • Loading branch information
davidpesce committed Jan 19, 2024
1 parent 9489d6d commit 1898959
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions classes/task/check_recompletion.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 1898959

Please sign in to comment.