mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-60277 report_insights: Pass the prediction as a float
This commit is contained in:
parent
23ab0d7788
commit
7c37e56fde
@ -87,8 +87,8 @@ class insight implements \renderable, \templatable {
|
|||||||
$predictedvalue = $this->prediction->get_prediction_data()->prediction;
|
$predictedvalue = $this->prediction->get_prediction_data()->prediction;
|
||||||
$predictionid = $this->prediction->get_prediction_data()->id;
|
$predictionid = $this->prediction->get_prediction_data()->id;
|
||||||
$data->predictiondisplayvalue = $this->model->get_target()->get_display_value($predictedvalue);
|
$data->predictiondisplayvalue = $this->model->get_target()->get_display_value($predictedvalue);
|
||||||
list($data->style, $data->outcomeicon) = $this->get_calculation_display($this->model->get_target(), $predictedvalue,
|
list($data->style, $data->outcomeicon) = $this->get_calculation_display($this->model->get_target(),
|
||||||
$output);
|
floatval($predictedvalue), $output);
|
||||||
|
|
||||||
$actions = $this->model->get_target()->prediction_actions($this->prediction, $this->includedetailsaction);
|
$actions = $this->model->get_target()->prediction_actions($this->prediction, $this->includedetailsaction);
|
||||||
if ($actions) {
|
if ($actions) {
|
||||||
@ -124,8 +124,8 @@ class insight implements \renderable, \templatable {
|
|||||||
$obj = new \stdClass();
|
$obj = new \stdClass();
|
||||||
$obj->name = call_user_func(array($calculation->indicator, 'get_name'));
|
$obj->name = call_user_func(array($calculation->indicator, 'get_name'));
|
||||||
$obj->displayvalue = $calculation->indicator->get_display_value($calculation->value, $calculation->subtype);
|
$obj->displayvalue = $calculation->indicator->get_display_value($calculation->value, $calculation->subtype);
|
||||||
list($obj->style, $obj->outcomeicon) = $this->get_calculation_display($calculation->indicator, $calculation->value,
|
list($obj->style, $obj->outcomeicon) = $this->get_calculation_display($calculation->indicator,
|
||||||
$output, $calculation->subtype);
|
floatval($calculation->value), $output, $calculation->subtype);
|
||||||
|
|
||||||
$data->calculations[] = $obj;
|
$data->calculations[] = $obj;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user