Ignore multiple certificate codes (#363)

This commit is contained in:
Mark Nelson 2020-08-08 15:50:14 +02:00
parent a884f948d3
commit c69d4822cc

View file

@ -54,7 +54,7 @@ class element extends \mod_customcert\element {
$customcert = $DB->get_record('customcert', array('templateid' => $page->templateid), '*', MUST_EXIST);
// Now we can get the issue for this user.
$issue = $DB->get_record('customcert_issues', array('userid' => $user->id, 'customcertid' => $customcert->id),
'*', MUST_EXIST);
'*', IGNORE_MULTIPLE);
$code = $issue->code;
}