From 5485d902e94721d3b47c39f1963fc0c2dfbbfe9c Mon Sep 17 00:00:00 2001 From: Sebastian Marcet Date: Fri, 19 Feb 2016 14:26:50 -0300 Subject: [PATCH] Fix on AVG feedback calculation Change-Id: Icf09f3891f1b4f9d778826750f6ea591fdaf4f09 --- app/Libs/utils/JsonUtils.php | 2 +- app/Models/summit/Presentation.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/Libs/utils/JsonUtils.php b/app/Libs/utils/JsonUtils.php index 06e60fe4..0e9036d1 100644 --- a/app/Libs/utils/JsonUtils.php +++ b/app/Libs/utils/JsonUtils.php @@ -59,7 +59,7 @@ abstract class JsonUtils public static function toJsonFloat($value) { if(empty($value)) return null; - return number_format(floatval($value),2); + return floatval(number_format(floatval($value),2)); } /** diff --git a/app/Models/summit/Presentation.php b/app/Models/summit/Presentation.php index 8e288bc4..43ef4774 100644 --- a/app/Models/summit/Presentation.php +++ b/app/Models/summit/Presentation.php @@ -46,6 +46,8 @@ class Presentation extends SummitEvent 'ModeratorID' => 'moderator_speaker_id:json_int', 'Level' => 'level', 'AllowFeedBack' => 'allow_feedback:json_boolean', + 'AvgFeedbackRate' => 'avg_feedback_rate:json_float', + 'Published' => 'is_published:json_boolean', ); /**