Skip to content

Commit 6e6352e

Browse files
committed
customcert fixed errors.
1 parent 8876d20 commit 6e6352e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

db/install.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
</KEYS>
5858
<INDEXES>
5959
<INDEX NAME="userid-customcertid" UNIQUE="false" FIELDS="userid, customcertid"/>
60-
<INDEX NAME="code" UNIQUE="true" FIELDS="code"/>
60+
<INDEX NAME="code" UNIQUE="false" FIELDS="code"/>
6161
</INDEXES>
6262
</TABLE>
6363
<TABLE NAME="customcert_pages" COMMENT="Stores each page of a custom cert">

element/qrcode/classes/element.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,8 @@ public function render($pdf, $preview, $user) {
158158
$context = \context::instance_by_id($issue->contextid);
159159

160160
$urlparams = [
161-
'certId' => $code,
161+
'code' => $code,
162+
'qrcode' => 1,
162163
];
163164

164165
// We only add the 'contextid' to the link if the site setting for verifying all certificates is off,
@@ -172,7 +173,7 @@ public function render($pdf, $preview, $user) {
172173
$urlparams['contextid'] = $issue->contextid;
173174
}
174175

175-
$qrcodeurl = new \moodle_url('https://app.pacificmedicaltraining.com/verify', $urlparams);
176+
$qrcodeurl = new \moodle_url('/mod/customcert/verify_certificate.php', $urlparams);
176177
$qrcodeurl = $qrcodeurl->out(false);
177178
}
178179

0 commit comments

Comments
 (0)