Quiz add from question bank: paging loses filter options

Description

Assumptions:

  • The global question bank contains a category with more than 20 questions.

Steps to trace the problem:

  • Create a new quiz

  • select "questions"

  • 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

  • Click on "Apply filters"

  • (the first page of the first 20 questions appears)

  • Click on "2" to navigate to the second page

Issue:

  • The list is empty, but should show questions 21 and following

Workaround:

  • Close the pop-up window and open it again via "add" -> "from question bank"

  • The previous filtering reappears and the page navigation buttons behave as expected

Testing Instructions

Covered by modified Behat test in: mod/quiz/tests/behat/editing_add_from_question_bank.feature

Automated test results

None

Pre-check results

None

Workaround

None

Attachments

10

Activity

Zvonko Martinovic
19 November 2024 at 13:57

I agree that fix is not great. It doesn't fix issues if you select the checkbox to show questions from subcategories. In this instance you lose this filter when going to the next page. You need to tick this checkbox every time before going to the next page. 

Michael Gerszewski
10 September 2024 at 18:04

Since this issue was closed out, I submitted a new Tracker item with detailed reproduction steps and what I think is a contributing factor: https://moodle.atlassian.net/browse/MDL-82783#icft=MDL-82783

I recommend voting that up if you can also reproduce it in the same way.

As a simple workaround, we did change the code on our site to increase the number of questions displayed on a page to 100 which covers all but our oldest and largest courses.

Brian Neumann
10 September 2024 at 17:36

Hi, 

We updated our test environment to address the bug (in our case, Moodle 4.3.7), but the issue persists. 

Can we get an update on where Moodle stands in addressing this bug? 

Cheers, 
Brian  

Colette Sannié
23 August 2024 at 09:02
(edited)

We have installed the Moodle 4.3.6 update (Build: 20240812) on our test environment, and the problem does not seem to have been solved.

In fact, when the results of a question bank filter are displayed on several pages, the choices of questions to add to the quiz activity are not saved if you click on a new page to add questions from subsequent pages: only the questions selected on the last page visited are added to the quiz and the selection window closes.
If you want to add questions from other pages in the previous filter, you have to click on Add -> from question bank again and recreate the filter that was not saved.

The proposed workaround for reappearing the previous filter only works if the question selection window has been closed without any questions having been added to the quiz, which doesn't really help...
This regression bug severely hampers the creation of quizzes from a large bank of questions, organised into categories and sub-categories, which requires the use of filters that are necessarily displayed on several pages.

If it is not possible to save choices when changing pages, then the ‘Show all’ button should be restored (see https://moodle.atlassian.net/browse/MDL-80386#icft=MDL-80386). NB: the action to resolve this other regression bug has still not been assigned.

My two cents on possible alternatives:

  • display filter results on a single page

  • change the ‘qperpage’ value to 200 or 2000 vs 20

Restoring the ability to save multi-page choices AND the ‘Show All’ button would be great!

 

Stephan Robotta
13 August 2024 at 07:19

I have seen similar effects once but was not able to reproduce it. Therefore, I did change anything regarding this behaviour. If you could describe exacly how to reproduce it, then please open another ticket with the description.

This ticket fixes the paging beyond the second page click, when selectin questions within one category.

Fixed

Details

Priority

Affects versions

Components

Assignee

Reporter

Peer reviewer

Integrator

Fix versions

Tester

Participants

Adam Jenkins
Andreas Schwenk
Brian Neumann
Colette Sannié
Diego Dubois
Huong Nguyen
Jordi Pujol-Ahulló
Kim Jared Lucas

Pull Main Branch

Component Lead Review

Pull 4.4 Branch

Pull 4.3 Branch

Clockify

Created 18 October 2023 at 10:09
Updated 19 November 2024 at 13:57
Resolved 5 July 2024 at 02:03