MDL-64679 tool_analytics: Allow trained models to be cleared

This commit is contained in:
David Monllaó
2019-02-15 08:43:13 +01:00
parent 124999563a
commit e40af65c87
@@ -247,7 +247,7 @@ class models_list implements \renderable, \templatable {
}
// Clear model.
if (!empty($predictioncontexts)) {
if (!empty($predictioncontexts) || $model->is_trained()) {
$actionid = 'clear-' . $model->get_id();
$PAGE->requires->js_call_amd('tool_analytics/model', 'confirmAction', [$actionid, 'clear']);
$urlparams['action'] = 'clear';