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
@@ -60,6 +60,10 @@ class predict_models extends \core\task\scheduled_task {
foreach ($models as $model) {
$result = $model->predict();
// Reset the page as some indicators may call external functions that overwrite the page context.
\tool_analytics\output\helper::reset_page();
if ($result) {
echo $OUTPUT->heading(get_string('modelresults', 'tool_analytics', $model->get_target()->get_name()));
$renderer = $PAGE->get_renderer('tool_analytics');