mdjnelson / moodle-mod_customcert

Enables the creation of dynamically generated certificates with complete customisation via the web browser.
https://moodle.org/plugins/mod_customcert
GNU General Public License v3.0
89 stars 157 forks source link

571 Delete customcert_pages rows after elements #572

Closed leonstr closed 6 months ago

leonstr commented 1 year ago

Previously template->delete_page() deleted the corresponding mdl_customcert_pages row, and then called element->delete() for each element on the page. But the latter then called element_deleted::create_from_element() which relied on that mdl_customcert_pages row to obtain the contextid for the event.

Now element->delete() is called for each element on the page, then the mdl_customcert_pages row is deleted.

mdjnelson commented 6 months ago

Cherry-picked, thanks!