diff --git a/mod/quiz/report/statistics/qstats.php b/mod/quiz/report/statistics/qstats.php
index <HASH>..<HASH> 100644
--- a/mod/quiz/report/statistics/qstats.php
+++ b/mod/quiz/report/statistics/qstats.php
@@ -89,12 +89,6 @@ class qstats{
         $stats->covariancemaxsum += $sortedgradedifference * $sortedothergradedifference;
         $stats->covariancewithoverallgradesum += $gradedifference * $overallgradedifference;
 
-        if ($stats->subquestion){
-            $question =& $this->subquestions[$stats->questionid];
-        } else {
-            $question =& $this->questions[$stats->questionid];
-        }
-
     }
 
     function add_response_detail_to_array($responsedetail){
MDL-<I> "quiz stats report:Seperation of functionality and unit tests for calculations" forgot to remove this, now redundant, piece of code.