MDL-53719 competency: Delete content upon course and cm delete/reset

This commit is contained in:
Frederic Massart 2016-04-11 18:21:11 +08:00
parent e0c2d7c02e
commit 56537316f6
6 changed files with 240 additions and 1 deletions

View file

@ -1770,6 +1770,9 @@ function course_delete_module($cmid) {
core_tag_tag::delete_instances('mod_' . $modulename, null, $modcontext->id);
core_tag_tag::remove_all_item_tags('core', 'course_modules', $cm->id);
// Notify the competency subsystem.
\core_competency\api::hook_course_module_deleted($cm);
// Delete the context.
context_helper::delete_instance(CONTEXT_MODULE, $cm->id);