Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.6.3, 2.7, 2.8
-
Component/s: Quiz
-
Testing Instructions:
-
Affected Branches:MOODLE_26_STABLE, MOODLE_27_STABLE, MOODLE_28_STABLE
-
Fixed Branches:MOODLE_26_STABLE, MOODLE_27_STABLE
-
Pull from Repository:
-
Pull Master Branch:
-
Pull Master Diff URL:
Description
(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.