mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
MDL-29538 core_condition: delete the course modules records in the course_module_avail_fields table when deleted
This commit is contained in:
parent
5fa220fbf3
commit
af2ce7806b
1 changed files with 1 additions and 0 deletions
|
@ -2929,6 +2929,7 @@ function delete_course_module($id) {
|
|||
// very quick on an empty table)
|
||||
$DB->delete_records('course_modules_completion', array('coursemoduleid' => $cm->id));
|
||||
$DB->delete_records('course_modules_availability', array('coursemoduleid'=> $cm->id));
|
||||
$DB->delete_records('course_modules_avail_fields', array('coursemoduleid'=> $cm->id));
|
||||
$DB->delete_records('course_completion_criteria', array('moduleinstance' => $cm->id,
|
||||
'criteriatype' => COMPLETION_CRITERIA_TYPE_ACTIVITY));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue