]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-9224 - Score sometimes relealed, even when the quiz settings say it should not...
authortjhunt <tjhunt>
Thu, 5 Apr 2007 13:54:20 +0000 (13:54 +0000)
committertjhunt <tjhunt>
Thu, 5 Apr 2007 13:54:20 +0000 (13:54 +0000)
mod/quiz/locallib.php

index d2e545997d2bea625454e5313cdfb01876d1cfbe..014ff457bf122f358534ec7235dc1e2fd43e5ef8 100644 (file)
@@ -727,8 +727,10 @@ function quiz_get_combined_reviewoptions($quiz, $attempts, $context=null) {
     }
     foreach ($attempts as $attempt) {
         $attemptoptions = quiz_get_reviewoptions($quiz, $attempt, $context);
-        $someoptions->$field = $someoptions->$field || $attemptoptions->$field;
-        $alloptions->$field = $someoptions->$field && $attemptoptions->$field;
+        foreach ($fields as $field) {
+            $someoptions->$field = $someoptions->$field || $attemptoptions->$field;
+            $alloptions->$field = $alloptions->$field && $attemptoptions->$field;
+        }
     }
     return array($someoptions, $alloptions);
 }