Do not email those who can manage the certificate (#376)

This commit is contained in:
Mark Nelson 2020-09-20 14:24:50 +02:00
parent 60b247f441
commit 46ca744d32

View file

@ -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;