-
Bug
-
Resolution: Fixed
-
Major
-
2.6.3, 2.7, 2.8
-
MOODLE_26_STABLE, MOODLE_27_STABLE, MOODLE_28_STABLE
-
MOODLE_26_STABLE, MOODLE_27_STABLE
-
(11:12:16 AM) Rajesh Taneja: +++ b/mod/quiz/editlib.php
|
@@ -882,8 +882,8 @@ function quiz_print_randomquestion(&$question, &$pageurl, &$quiz, $quiz_qbanktoo
|
|
// Then list them.
|
echo '<ul>';
|
- foreach ($questionstoshow as $question) {
|
- echo '<li>' . quiz_question_tostring($question, true) . '</li>';
|
+ foreach ($questionstoshow as $question1) {
|
+ echo '<li>' . quiz_question_tostring($question1, true) . '</li>';
|
}
|
(11:12:40 AM) Rajesh Taneja: This was updating reference and causing the problem...
|
Note that the loop changes $question, which is passed into the function by reference.