Closed berthelemy closed 1 year ago
The same error appears when I try to go to Participants and Grades.
Try changing the following 4 lines in mod/customcert/lib.php:
342 if (has_capability('mod/customcert:manage', $PAGE->cm->context)) {
⋮
344 $templateid = $DB->get_field('customcert', 'templateid', array('id' => $PAGE->cm->instance));
⋮
352 if (has_capability('mod/customcert:verifycertificate', $PAGE->cm->context)) {
⋮
354 new moodle_url('/mod/customcert/verify_certificate.php', array('contextid' => $PAGE->cm->context->id)),
to:
342 if (has_capability('mod/customcert:manage', $settings->get_page()->cm->context)) {
⋮
344 $templateid = $DB->get_field('customcert', 'templateid', array('id' => $settings->get_page()->cm->instance));
⋮
352 if (has_capability('mod/customcert:verifycertificate', $settings->get_page()->cm->context)) {
⋮
354 new moodle_url('/mod/customcert/verify_certificate.php', array('contextid' => $settings->get_page()->cm->context->id)),
Fixed. Thanks to all involved.
I want to use the Custom Cert module to allow people to claim a certificate after attending face-to-face training, using an "enrolment key" provided by the instructor.
I have created the certificate within a course, using the Topics format. I am system administrator.
Now the certificate is ready, I switched the course format to: Single Activity
I can still view and edit the certificate. However, when I go to change the course settings, I get this error:
Using Moodle 4.1