MDL-9224 - Score sometimes relealed, even when the quiz settings say it should not be. Merged from OU Moodle.

This commit is contained in:
tjhunt
2007-04-05 13:54:20 +00:00
parent eb674f8b21
commit 7d014bf582
+4 -2
View 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);
}