From 22690d6d7146e97138f0be2e43922fc2954b4263 Mon Sep 17 00:00:00 2001 From: Issam Taboubi Date: Tue, 13 Sep 2016 10:52:57 -0400 Subject: [PATCH] MDL-55760 tool_lp: Wrong rating display when more than one scale set --- admin/tool/lp/classes/output/plan_page.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/admin/tool/lp/classes/output/plan_page.php b/admin/tool/lp/classes/output/plan_page.php index e156a975b31..f490f3b959c 100644 --- a/admin/tool/lp/classes/output/plan_page.php +++ b/admin/tool/lp/classes/output/plan_page.php @@ -95,13 +95,15 @@ class plan_page implements renderable, templatable { // Get the scale. $scaleid = $comp->get_scaleid(); + $compscale = $comp->get_scale(); if ($scaleid === null) { $scaleid = $framework->get_scaleid(); + $compscale = $framework->get_scale(); } - if (!isset($scales[$framework->get_scaleid()])) { - $scales[$framework->get_scaleid()] = $framework->get_scale(); + if (!isset($scales[$scaleid])) { + $scales[$scaleid] = $compscale; } - $scale = $scales[$framework->get_scaleid()]; + $scale = $scales[$scaleid]; // Prepare the data. $record = new stdClass();