The {blog_association} is not defined but it is still referenced in the
core functions. This seems to be some blog subsystem mess that prevents
the core from removing any activity module and the context. I am sorry
Nico if I break something in your current work...
}
delete_context(CONTEXT_MODULE, $cm->id);
- return $DB->delete_records('course_modules', array('id'=>$cm->id)) &&
- $DB->delete_records('blog_association', array('contextid'=>$context->id));
+ return $DB->delete_records('course_modules', array('id'=>$cm->id));
}
function delete_mod_from_section($mod, $section) {
$result = $DB->delete_records('role_assignments', array('contextid'=>$context->id)) &&
$DB->delete_records('role_capabilities', array('contextid'=>$context->id)) &&
$DB->delete_records('context', array('id'=>$context->id)) &&
- $DB->delete_records('role_names', array('contextid'=>$context->id)) &&
- $DB->delete_records('blog_association', array('contextid'=>$context->id));
-
+ $DB->delete_records('role_names', array('contextid'=>$context->id));
// do not mark dirty contexts if parents unknown
if (!is_null($context->path) and $context->depth > 0) {