MDL-59106 report_insights: Fix predicted value styling
authorDavid Monllao <davidm@moodle.com>
Tue, 10 Oct 2017 10:33:26 +0000 (12:33 +0200)
committerDavid Monllao <davidm@moodle.com>
Tue, 10 Oct 2017 10:33:26 +0000 (12:33 +0200)
report/insights/classes/output/insights_list.php

index 158e8be..2015b43 100644 (file)
@@ -109,7 +109,7 @@ class insights_list implements \renderable, \templatable {
                         $preddata = array();
                         $preddata['predictiondisplayvalue'] = $this->model->get_target()->get_display_value($predictedvalue);
                         list($preddata['style'], $preddata['outcomeicon']) =
-                            insight::get_calculation_display($this->model->get_target(), $predictedvalue, $output);
+                            insight::get_calculation_display($this->model->get_target(), floatval($predictedvalue), $output);
                         $predictionvalues[$predictedvalue] = $preddata;
                     }