Do not email those who can manage the certificate (#376)
This commit is contained in:
parent
4a5b000c59
commit
1f1b2f7689
1 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue