#48 Make required time check more robust
This commit is contained in:
parent
4f4be1f918
commit
7d2664991f
1 changed files with 5 additions and 3 deletions
|
@ -117,10 +117,12 @@ class email_certificate_task extends \core\task\scheduled_task {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check that they have passed the required time.
|
// Check that they have passed the required time.
|
||||||
|
if (!empty($customcert->requiredtime)) {
|
||||||
if (\mod_customcert\certificate::get_course_time($customcert->courseid,
|
if (\mod_customcert\certificate::get_course_time($customcert->courseid,
|
||||||
$enroluser->id) < ($customcert->requiredtime * 60)) {
|
$enroluser->id) < ($customcert->requiredtime * 60)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Ok, issue them the certificate.
|
// Ok, issue them the certificate.
|
||||||
$customcertissue = new \stdClass();
|
$customcertissue = new \stdClass();
|
||||||
|
|
Loading…
Reference in a new issue