From 393890e1682955cbbc73e9f6d7340d97747ca2e1 Mon Sep 17 00:00:00 2001 From: Kevin Wiliarty Date: Tue, 26 Apr 2016 13:18:43 -0400 Subject: [PATCH] MDL-54620 ratings: display '0' when aggregate = 0 --- rating/lib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rating/lib.php b/rating/lib.php index b63b5b86d3b..7b3a25741ab 100644 --- a/rating/lib.php +++ b/rating/lib.php @@ -224,7 +224,7 @@ class rating implements renderable { // Only display aggregate if aggregation method isn't COUNT. $aggregatestr = ''; - if ($aggregate && $method != RATING_AGGREGATE_COUNT) { + if (is_numeric($aggregate) && $method != RATING_AGGREGATE_COUNT) { if ($method != RATING_AGGREGATE_SUM && !$this->settings->scale->isnumeric) { // Round aggregate as we're using it as an index.