Skip to content

Commit

Permalink
Fixed passing incorrect course module id value (#574)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjnelson committed Dec 29, 2023
1 parent ff3dbb8 commit f205a1a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions classes/task/email_certificate_task.php
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ public function execute() {

if ($customcert->emailstudents) {
$renderable = new \mod_customcert\output\email_certificate(true, $userfullname, $courseshortname,
$coursefullname, $certificatename, $customcert->contextid);
$coursefullname, $certificatename, $context->instanceid);

$subject = get_string('emailstudentsubject', 'customcert', $info);
$message = $textrenderer->render($renderable);
Expand All @@ -218,7 +218,7 @@ public function execute() {

if ($customcert->emailteachers) {
$renderable = new \mod_customcert\output\email_certificate(false, $userfullname, $courseshortname,
$coursefullname, $certificatename, $customcert->contextid);
$coursefullname, $certificatename, $context->instanceid);

$subject = get_string('emailnonstudentsubject', 'customcert', $info);
$message = $textrenderer->render($renderable);
Expand All @@ -235,7 +235,7 @@ public function execute() {
$email = trim($email);
if (validate_email($email)) {
$renderable = new \mod_customcert\output\email_certificate(false, $userfullname,
$courseshortname, $coursefullname, $certificatename, $customcert->contextid);
$courseshortname, $coursefullname, $certificatename, $context->instanceid);

$subject = get_string('emailnonstudentsubject', 'customcert', $info);
$message = $textrenderer->render($renderable);
Expand Down

0 comments on commit f205a1a

Please sign in to comment.