Skip to content

Commit 869d7bc

Browse files
anieminenmdjnelson
authored andcommitted
Fix issuing certificate when there are no issues yet (#659)
1 parent ba65827 commit 869d7bc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

classes/task/issue_certificates_task.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function execute() {
8383
// Add condition based on certificate execution period.
8484
if ($certificateexecutionperiod > 0) {
8585
// Include courses with no end date or end date greater than the specified period.
86-
$sql .= " AND (co.enddate > :enddate OR (co.enddate = 0 AND ci.timecreated > :enddate2))";
86+
$sql .= " AND (co.enddate > :enddate OR (co.enddate = 0 AND (ci.timecreated > :enddate2 OR ci.timecreated IS NULL)))";
8787
$params['enddate'] = time() - $certificateexecutionperiod;
8888
$params['enddate2'] = $params['enddate'];
8989
}

0 commit comments

Comments
 (0)