From 6d0c4160f74c5e19e2c134ac261a3706e9fbcc6b Mon Sep 17 00:00:00 2001 From: mwithheld Date: Mon, 26 Aug 2019 11:15:18 -0700 Subject: [PATCH] Do not fail if multiple certificate issues (#304) Fix another location of this problem. --- element/date/classes/element.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/element/date/classes/element.php b/element/date/classes/element.php index d3693e7..ea0fe1e 100644 --- a/element/date/classes/element.php +++ b/element/date/classes/element.php @@ -141,7 +141,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); if ($dateitem == CUSTOMCERT_DATE_ISSUE) { $date = $issue->timecreated;