Skip to content

Commit

Permalink
MDL-54620 ratings: display '0' when aggregate = 0
Browse files Browse the repository at this point in the history
  • Loading branch information
kwiliarty authored and David Monllao committed May 17, 2016
1 parent 33892ed commit 393890e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rating/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ public function get_aggregate_string() {

// 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.
Expand Down

0 comments on commit 393890e

Please sign in to comment.