diff --git a/classes/task/email_certificate_task.php b/classes/task/email_certificate_task.php index d4efc93..846151f 100644 --- a/classes/task/email_certificate_task.php +++ b/classes/task/email_certificate_task.php @@ -112,6 +112,11 @@ class email_certificate_task extends \core\task\scheduled_task { continue; } + // Don't want to email those with the capability to manage the certificate. + if (has_capability('mod/customcert:manage', $context, $enroluser->id)) { + continue; + } + // Only email those with the capability to receive the certificate. if (!has_capability('mod/customcert:receiveissue', $context, $enroluser->id)) { continue;