diff --git a/admin/tool/analytics/classes/output/models_list.php b/admin/tool/analytics/classes/output/models_list.php index b0431a35da5..a717cabc428 100644 --- a/admin/tool/analytics/classes/output/models_list.php +++ b/admin/tool/analytics/classes/output/models_list.php @@ -84,7 +84,7 @@ class models_list implements \renderable, \templatable { $data->models = array(); foreach ($this->models as $model) { - $modeldata = $model->export(); + $modeldata = $model->export($output); // Check if there is a help icon for the target to show. $identifier = $modeldata->target->get_identifier(); diff --git a/analytics/classes/model.php b/analytics/classes/model.php index 5113a854c1a..615d6e08716 100644 --- a/analytics/classes/model.php +++ b/analytics/classes/model.php @@ -1438,9 +1438,10 @@ class model { /** * Exports the model data for displaying it in a template. * + * @param \renderer_base $output The renderer to use for exporting * @return \stdClass */ - public function export() { + public function export(\renderer_base $output) { \core_analytics\manager::check_can_manage_models(); diff --git a/analytics/upgrade.txt b/analytics/upgrade.txt index 31316d4973d..2ae086965cc 100644 --- a/analytics/upgrade.txt +++ b/analytics/upgrade.txt @@ -15,6 +15,7 @@ information provided here is intended especially for developers. by updating the lib/db/analytics.php file and bumping the core version. * \core_analytics\model::execute_prediction_callbacks now returns an array with both sample's contexts and the prediction records. +* \core_analytics\model::export() now expects the renderer instance as an argument. * Time splitting methods: * \core_analytics\local\time_splitting\base::append_rangeindex and \core_analytics\local\time_splitting\base::infer_sample_info are now marked as final and can not