diff --git a/mod/data/lib.php b/mod/data/lib.php index d76fd386196..907fdc84b9b 100755 --- a/mod/data/lib.php +++ b/mod/data/lib.php @@ -909,10 +909,6 @@ function data_delete_instance($id) { // takes the dataid $fs = get_file_storage(); $fs->delete_area_files($context->id, 'mod_data'); - // Delete comments - require_once($CFG->dirroot.'/comment/lib.php'); - comment::delete_comments(array('contextid'=>$context->id)); - // Delete ratings //delete ratings require_once($CFG->dirroot.'/rating/lib.php'); diff --git a/mod/glossary/lib.php b/mod/glossary/lib.php index 3b34ef00037..b81cee8f344 100644 --- a/mod/glossary/lib.php +++ b/mod/glossary/lib.php @@ -195,10 +195,6 @@ function glossary_delete_instance($id) { $DB->delete_records_select('glossary_entries_categories', "categoryid IN ($category_select)", array($id)); $DB->delete_records('glossary_categories', array('glossaryid'=>$id)); - // Delete comments - require_once($CFG->dirroot.'/comment/lib.php'); - comment::delete_comments(array('contextid'=>$context->id)); - // delete all files $fs->delete_area_files($context->id);