-
Bug
-
Resolution: Duplicate
-
Minor
-
4.3.6, 4.4.1
-
MOODLE_403_STABLE, MOODLE_404_STABLE
-
MOODLE_404_STABLE, MOODLE_405_STABLE, MOODLE_500_STABLE
Assumptions:
- Question bank has at least two categories with more than 20 questions each
- Moodle 4.3.6 or 4.4 (on the current sandbox site)
Steps to reproduce:
- (optional) Use the attached question bank backup with 2 categories with 40 questions each: Question Bank Test Questions-20240813-0819.xml
- See attached video (taken from the current sandbox.moodledemo.net after importing questions) Add Question from Question Bank Paging Bug.mp4
- Create a new quiz
- select "questions"
- Use browser dev tools to inspect the page and the network traffic, paying particular attention to the Fetch/XHR traffic for the AJAX calls
- Click on "Add" -> "from question bank"
- (a pop up window with title "Add from the question bank at the end" dialog opens)
- Drop-down select a category with more than 20 questions (Test Questions Category 1 in the video example)
- Click on "Apply filters"
- Notice in the network tab on the browser there is a single call to /lib/ajax/service.php?sesskey=xxxx&info=core_get_fragment
- (the first page of the first 20 questions appears)
- Click on "2" to navigate to the second page
- Notice in the network tab on the browser there are 2 calls to /lib/ajax/service.php?sesskey=xxxx&info=core_get_fragment
- Click on "1" to navigate back to the first page
- Notice in the network tab on the browser there are 3 calls to /lib/ajax/service.php?sesskey=xxxx&info=core_get_fragment
- In my video example, the category also switches back to the default category and no questions are in that category on the sandbox site.
- Change the category filter to another category with more than 20 questions (Test Questions Category 2 in the video example)
- Click on "Apply filters"
- Notice in the network tab on the browser there is a single call to /lib/ajax/service.php?sesskey=xxxx&info=core_get_fragment
- (the first page of the first 20 questions in the selected category appears)
- Click on "2" to navigate to the second page
- Notice in the network tab on the browser there are 4 calls to /lib/ajax/service.php?sesskey=xxxx&info=core_get_fragment
- Also a flash of the questions
- Click on "1" to navigate back to the first page
- Notice in the network tab on the browser there are 5 calls to /lib/ajax/service.php?sesskey=xxxx&info=core_get_fragment
- In my video example, the Test Questions Category 1 questions flash, then disappear as the category switches back to the default category
Observations:
- When inspecting the page and the "click" event listeners registered on the page numbers, every time a page number is clicked, there is a new "click" event registered to call first.js:2512 on every page link. This seems to correspond to question/amd/src/filter.js line 183. See attached screenshots of the registered event handlers.
- will be (partly) resolved by
-
MDL-80386 Lost link to 'Show all questions' when adding questions to quiz
-
- Closed
-