MDL-41888 allow for a blank string as format to mean not to show stat
authorJamie Pratt <me@jamiep.org>
Tue, 24 Sep 2013 10:03:36 +0000 (17:03 +0700)
committerJamie Pratt <me@jamiep.org>
Fri, 27 Sep 2013 07:08:16 +0000 (14:08 +0700)
as in MDL-41929 which applies to older stable branches.

mod/quiz/report/statistics/classes/calculated.php

index afb7739..302b007 100644 (file)
@@ -128,7 +128,7 @@ class quiz_statistics_calculated {
 
         // The statistics.
         foreach ($todisplay as $property => $format) {
-            if (!isset($this->$property)) {
+            if (!isset($this->$property) || !$format) {
                 continue;
             }
             $value = $this->$property;