-
-
Notifications
You must be signed in to change notification settings - Fork 192
Description
Steps to reproduce issue
- Create a course.
- Enrol a student.
- Add a custom certificate instance.
- Add a date element to the certificate set to "Issued date".
- Log in as the student and view the certificate.
Expected results
The certificate is displayed.
Actual results
On page mod/customcert/view.php?id=10&downloadown=1:
Exception - mod_customcert\element_helper::get_date_format_string(): Argument #1 ($date) must be of type int, string given, called in [dirroot]/mod/customcert/element/date/classes/element.php on line 274
More information about this error
Debug info:
Error code: generalexceptionmessageDismiss this notification
Stack trace:
line 788 of /public/mod/customcert/classes/element_helper.php: TypeError thrown
line 274 of /public/mod/customcert/element/date/classes/element.php: call to mod_customcert\element_helper::get_date_format_string()
line 68 of /public/mod/customcert/classes/service/pdf_renderer.php: call to customcertelement_date\element->render()
line 123 of /public/mod/customcert/classes/local/preview_renderer.php: call to mod_customcert\service\pdf_renderer->render_pdf()
line 112 of /public/mod/customcert/classes/service/pdf_generation_service.php: call to mod_customcert\local\preview_renderer->render_pdf_page()
line 253 of /public/mod/customcert/view.php: call to mod_customcert\service\pdf_generation_service->generate_pdf()
Environment
Tested with Moodle 5.2dev (Build: 20260306) and mod_customcert 2025122800 (commit 0cc3c13).