I can't add a date to the certificate

I can't add a date to the certificate

by Ana Belen Escrihuela -
Number of replies: 5

Hello!


When I try to add the date to a certificate, I get the following warning
"Invalid course module ID"


Does anyone know why and how to fix it?


Regards, and thank you very much.


Average of ratings: -
In reply to Ana Belen Escrihuela

Re: I can't add a date to the certificate

by Mark Nelson -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Can you turn debugging (https://docs.moodle.org/310/en/Debugging) on so I can see the full message please? Thanks.
In reply to Mark Nelson

Re: I can't add a date to the certificate

by Ana Belen Escrihuela -
Hello Mark.

Thank you very much for the quick answer.

I've turned on debugging so you can see the full message.

I await your response or further instructions.

A greeting and thank you very much again.
In reply to Mark Nelson

Re: I can't add a date to the certificate

by Ana Belen Escrihuela -
I attach the information provided.

Thanks a lot.

ID de módulo de curso no válida

Más información sobre este error

×Información de depuración: SELECT id,course FROM {course_modules} WHERE id IS NULL
[array (
)]
Error code: invalidcoursemodule
×Trazado de la pila (stack):
line 1599 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown
line 1575 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
line 7281 of /lib/accesslib.php: call to moodle_database->get_record()
line 477 of /mod/customcert/classes/element_helper.php: call to context_module::instance()
line 102 of /mod/customcert/element/date/classes/element.php: call to mod_customcert\element_helper::get_grade_items()
line 68 of /mod/customcert/classes/edit_element_form.php: call to customcertelement_date\element->render_form_elements()
line 214 of /lib/formslib.php: call to mod_customcert\edit_element_form->definition()
line 79 of /mod/customcert/edit_element.php: call to moodleform->__construct()
×Buffer de salida:
Notice: Trying to get property 'id' of non-object in /home/miformat/public_html/campusvirtual/mod/customcert/classes/element_helper.php on line 477
In reply to Ana Belen Escrihuela

Re: I can't add a date to the certificate

by Mark Nelson -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Try selecting another date element and seeing if that works. According to the error it can not find the course module associated with the grade item.
In reply to Mark Nelson

Re: I can't add a date to the certificate

by Ana Belen Escrihuela -
Hello again.

I have verified that the error is only in one of the courses. In other courses I can add the "date" field without problems.

What could be happening?

By the way, if it is useful, I have the version of moodle 3.9.2.

Greetings and I await your response.