MDL-45660 question statistics: make comparison more robust.
authorTim Hunt <T.J.Hunt@open.ac.uk>
Thu, 22 May 2014 15:13:00 +0000 (16:13 +0100)
committerTim Hunt <T.J.Hunt@open.ac.uk>
Thu, 22 May 2014 16:30:34 +0000 (17:30 +0100)
question/classes/statistics/responses/analysis_for_class.php

index 872f020..efb7d7b 100644 (file)
@@ -145,7 +145,7 @@ class analysis_for_class {
             return true;
         } else if (count($actualresponses) === 1) {
             $singleactualresponse = reset($actualresponses);
-            return (string)$singleactualresponse != $this->modelresponse;
+            return (string)$singleactualresponse !== (string)$this->modelresponse;
         }
         return false;
     }