Merge branch 'MDL-54620_master' of git://github.com/dmonllao/moodle

This commit is contained in:
Andrew Nicols 2016-05-18 12:04:20 +08:00
commit 134b6485e2

View File

@ -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.