mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
MDL-59162 tool_models: Remove dependant models on uninstall
Part of MDL-57791 epic.
This commit is contained in:
parent
9ad87761ef
commit
d16cf374eb
2 changed files with 55 additions and 0 deletions
|
@ -316,6 +316,17 @@ class model {
|
|||
$this->uniqueid = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the model.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public static function delete() {
|
||||
global $DB;
|
||||
$this->clear_model();
|
||||
$DB->delete_record('analytics_models', array('id' => $this->model->id));
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluates the model datasets.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue