Affects Version/s: 3.5.3, 3.6.1
Fix Version/s: None
Affected Branches:MOODLE_35_STABLE, MOODLE_36_STABLE
An issue has been found when using the select all / deselect all button on the question bank list of questions when the first question on the list is selected/deselected. The logic is based on the state of the first question. This will bring unexpected results when clicking select all and deselect all.
Steps to replicate.
1. Create a course.
2. Turn editing on.
3. Add a quiz activity.
4. Add 3 questions.
5. Go to Question bank page.
Select All: not ticked
Q1: not ticked
Q2: not ticked
Q3: not ticked
6. Tick Q1 only.
7. Next, tick the "Select all" checkbox.
Q1: From ticked to not ticked.
Q2. not ticked (no change)
Q3. not ticked (no change)
Remarks: This should tick Q1, Q2, and Q3.
8. Tick "Select all" checkbox. This should tick Q1, Q2, and Q3.
9. Untick Q1 only. Then tick "Deselect all" checkbox.
Result: Q1, Q2, and Q3 are ticked. They should all be deselected.