MDL-64783 analytics: Reset PAGE after analytics processes

This commit is contained in:
David Monllaó
2019-04-09 00:25:24 +02:00
committed by Eloy Lafuente (stronk7)
parent c9382c1d28
commit 78e77fab2e
5 changed files with 35 additions and 4 deletions
@@ -111,6 +111,9 @@ $analyseroptions = array(
// Evaluate its suitability to predict accurately.
$results = $model->evaluate($analyseroptions);
// Reset the page as some indicators may call external functions that overwrite the page context.
\tool_analytics\output\helper::reset_page();
$renderer = $PAGE->get_renderer('tool_analytics');
echo $renderer->render_evaluate_results($results, $model->get_analyser()->get_logs());