#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,9 +117,11 @@ class email_certificate_task extends \core\task\scheduled_task {
|
|||
}
|
||||
|
||||
// Check that they have passed the required time.
|
||||
if (\mod_customcert\certificate::get_course_time($customcert->courseid,
|
||||
$enroluser->id) < ($customcert->requiredtime * 60)) {
|
||||
continue;
|
||||
if (!empty($customcert->requiredtime)) {
|
||||
if (\mod_customcert\certificate::get_course_time($customcert->courseid,
|
||||
$enroluser->id) < ($customcert->requiredtime * 60)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// Ok, issue them the certificate.
|
||||
|
|
Loading…
Reference in a new issue