MDL-62769 quiz statistics: graph should show all, not last, variant
authorTim Hunt <T.J.Hunt@open.ac.uk>
Thu, 21 Jun 2018 11:55:43 +0000 (12:55 +0100)
committerTim Hunt <T.J.Hunt@open.ac.uk>
Thu, 21 Jun 2018 11:55:43 +0000 (12:55 +0100)
mod/quiz/report/statistics/report.php

index 5c8838e..36cc053 100644 (file)
@@ -529,7 +529,8 @@ class quiz_statistics_report extends quiz_default_report {
         $questions = quiz_report_get_significant_questions($quiz);
 
         // Only load main question not sub questions.
-        $questionstatistics = $DB->get_records_select('question_statistics', 'hashcode = ? AND slot IS NOT NULL',
+        $questionstatistics = $DB->get_records_select('question_statistics',
+                'hashcode = ? AND slot IS NOT NULL AND variant IS NULL',
             [$qubaids->get_hash_code()]);
 
         // Configure what to display.