Custom Certificate: Error when adding Teacher Name to template

Custom Certificate: Error when adding Teacher Name to template

by Floyd Saner -
Number of replies: 1

I am running Moodle 3.5.3+ (Build: 20181116) and using the Custom Certificate plugin, 3.5.5 (2018051706).  When I try to add a Teacher Name field to a template, I get the the error message shown below. It appears the problem occurs because at the template/system level no teachers exist. If I omit the Teacher Name field on the template, then use the template in a course, I can then add the Teacher Name field when editing the certificate at the course level.  However, I have many courses and do not want to add the Teacher Name field at the course level each time I use the template.  Thanks for any assistance you can provide.  Floyd Saner

Debug info: Error code: codingerror

×Stack trace:

line 5393 of /lib/accesslib.php: coding_exception thrown

line 1385 of /lib/enrollib.php: call to context->get_course_context()

line 1305 of /lib/enrollib.php: call to get_enrolled_join()

line 1353 of /lib/enrollib.php: call to get_enrolled_with_capabilities_join()

line 1476 of /lib/enrollib.php: call to get_enrolled_sql()

line 109 of /mod/customcert/element/teachername/classes/element.php: call to get_enrolled_users()

line 45 of /mod/customcert/element/teachername/classes/element.php: call to customcertelement_teachername\element->get_list_of_teachers()

line 67 of /mod/customcert/classes/edit_element_form.php: call to customcertelement_teachername\element->render_form_elements()

line 204 of /lib/formslib.php: call to mod_customcert\edit_element_form->definition()

line 79 of /mod/customcert/edit_element.php: call to moodleform->__construct()


Average of ratings: -