MDL-64739 analytics: No need for a fully set model on edit

This commit is contained in:
David Monllaó 2019-10-22 10:48:29 +08:00
parent a188424bb4
commit 5da60daa1a

View File

@ -122,7 +122,6 @@ switch ($action) {
$invalidcurrenttimesplitting = $model->invalid_timesplitting_selected();
$potentialtimesplittings = $model->get_potential_timesplittings();
$analyser = $model->get_analyser();
$customdata = array(
'id' => $model->get_id(),
@ -134,7 +133,7 @@ switch ($action) {
'indicators' => $model->get_potential_indicators(),
'timesplittings' => $potentialtimesplittings,
'predictionprocessors' => \core_analytics\manager::get_all_prediction_processors(),
'supportscontexts' => ($analyser)::context_restriction_support(),
'supportscontexts' => ($model->get_analyser(['notimesplitting' => true]))::context_restriction_support(),
'contexts' => $model->get_contexts(),
);
$mform = new \tool_analytics\output\form\edit_model(null, $customdata);