MDL-38314 repository: Delete repository instances on context deletion
This commit is contained in:
@@ -5284,6 +5284,10 @@ abstract class context extends stdClass implements IteratorAggregate {
|
||||
$fs = get_file_storage();
|
||||
$fs->delete_area_files($this->_id);
|
||||
|
||||
// Delete all repository instances attached to this context.
|
||||
require_once($CFG->dirroot . '/repository/lib.php');
|
||||
repository::delete_all_for_context($this->_id);
|
||||
|
||||
// delete all advanced grading data attached to this context
|
||||
require_once($CFG->dirroot.'/grade/grading/lib.php');
|
||||
grading_manager::delete_all_for_context($this->_id);
|
||||
|
||||
Reference in New Issue
Block a user