]> git.mjollnir.org Git - moodle.git/commitdiff
Nasty hack fix for MDL-16567 - I am hoping Jamie will come up with a proper fix soon...
authortjhunt <tjhunt>
Thu, 18 Sep 2008 12:47:12 +0000 (12:47 +0000)
committertjhunt <tjhunt>
Thu, 18 Sep 2008 12:47:12 +0000 (12:47 +0000)
mod/quiz/report/statistics/qstats.php

index 15dfe71e985d1461c4f040739c32ac18ec7a1394..07a00c54958a74b6ac3d3bfd4ccd2c5d33ee0080 100644 (file)
@@ -55,6 +55,12 @@ class qstats{
         if ($this->states === false){
             print_error('errorstatisticsquestions', 'quiz_statistics');
         }
+        // Nasty hack fix for MDL-16567 - TODO a proper fix.
+        foreach ($this->states as $id => $state) {
+            if (!isset($this->questions[$state->question])) {
+                unset($this->states[$id]);
+            }
+        }
     }
     
     function _initial_states_walker($state, &$stats, $positionstat = true){