Skip to content

Commit

Permalink
Merge branch 'master' into feature/changeoverviewtableforteachers
Browse files Browse the repository at this point in the history
  • Loading branch information
NinaHerrmann authored Jun 11, 2024
2 parents e8717cf + 05ff0e2 commit 7b97179
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions step/email/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,17 +119,18 @@ public function post_processing_bulk_operation() {
['instanceid' => $step->id,
'touser' => $user->id, ]);

$parsedsettings = $this->replace_placeholders($settings, $user, $step->id, $mailentries);

$subject = $parsedsettings['subject'];
$content = $parsedsettings['content'];
$contenthtml = $parsedsettings['contenthtml'];
// Software enhancement: use course info to parse content template!
email_to_user($user, \core_user::get_noreply_user(), $subject, $content, $contenthtml);
$DB->delete_records('lifecyclestep_email',
['instanceid' => $step->id,
'touser' => $user->id, ]);
$transaction->allow_commit();
$parsedsettings = $this->replace_placeholders($settings, $user, $step->id, $mailentries);
$subject = $parsedsettings['subject'];
$content = $parsedsettings['content'];
$contenthtml = $parsedsettings['contenthtml'];
// Software enhancement: use course info to parse content template!
$success = email_to_user($user, \core_user::get_noreply_user(), $subject, $content, $contenthtml);
if (!$success) {
mtrace("E-mail to user {$user->id} failed.");
}
$DB->delete_records('lifecyclestep_email',
['instanceid' => $step->id, 'touser' => $user->id, ]);
$transaction->allow_commit();
}
}

Expand Down

0 comments on commit 7b97179

Please sign in to comment.