Details
-
Improvement
-
Resolution: Fixed
-
Major
-
4.0, 4.1, 4.1.5
-
MOODLE_400_STABLE, MOODLE_401_STABLE
-
MOODLE_403_STABLE
-
MDL-72321_master-squashed -
Description
MDL-67743 introduced a new filter UI for the participants page which was refactored into a reusable core API in MDL-72509.
This issue continues that work by converting the question bank's filters to the use new API, with each condition implemented in the appropriate qbank plugin. This then allows any plugin to define its own filter conditions.
The scope of this issue covers just the conversion of the current filters, adding additional filters based on other question bank columns is out of scope, but these will be added in follow-up tracker issues (MDL-78220).
In particular, we will have the following filter conditions:
- Question bank category (optionally including subcategories)
- Show hidden questions
- Tags
- Show question text in question list
"Show question text in question list" is not technically a filter, since it controls which which fields of each record are displayed, rather than which record. However, this was included in the existing question bank filter UI, so for simplicity we will just convert it to the new filter UI within this issue. Once MDL-74054 is resolved we will hopefully have a method to show and hide fields, so will have a more logical place for this option to live, and can convert it in a subsequent issue (MDL-78409).
"Show hidden questions" and "Show question text in question list" are a simple yes/no choice. Rather than using an autocomplete with just these choices, we have implemented an additional datafilter class for a binary filter. This allows us to use a Yes/No select instead for these filters.
"Question bank category" requires an additional checkbox to indicate whether or not the results should include questions from subcategories of the selected category well. To support this, datafilters now support an additional "filteroptions" parameter, to allow filters to add custom options to modify the filter's behaviour.
Currently, all filters used on the Participants page have the option to match on the join types "All", "Any" or "None". These options do not make sense for most of the filters use in the question bank (all except Tags). Datafilters can now define the list of jointypes they support, and if only one is available the option will be hidden in the UI.
In the question bank, we must always have a category filter, and the "Show hidden questions" filter should always be shown to make it clear which state it is in. To support this, datafilters can now be defined as "required", in which case the "remove" button will be hidden and they will not be removed by the "Clear filters" button.
Aside from the main question bank UI, these changes also impact how questions are added to the quiz. The "Add from the question bank" and "Add a random question" modals now use the new filter UI to allow filtering of questions by categories and tags. For random questions, these filters are saved to the question set reference. This can be extended in the future to support more filters.
None of these changes should impact on the existing filters on the Participants page.
Balsamiq Wireframes
Attachments
Issue Links
- blocks
-
MDL-71378 Make shared question banks more manageable and usable
-
- Reopened
-
-
MDL-76205 Create last used filter condition
-
- Closed
-
-
MDL-76206 Create modified by filter condition
-
- Closed
-
-
MDL-72397 Improve question category management UI
-
- Reopened
-
-
MDL-74054 Give teachers more flexibility to customise their own view of the question bank
-
- Closed
-
-
MDL-75307 Add question status filterable object
-
- Closed
-
- caused a regression
-
MDL-79708 Random questions from a category including subcategories don't include sub-categories lose the 'include sub-categories' in upgrade to 4.3 (Error: not enough questions in category)
-
- Waiting for peer review
-
-
MDL-79224 Deleting/Restoring a question does not re-display "Show hidden questions" correctly
-
- Closed
-
-
MDL-79248 Behat failures following MDL-72321
-
- Closed
-
-
MDL-79535 Problem in mod/quiz/edit.php causing some debugging to happen
-
- Closed
-
-
MDL-79642 Question bank error: Return value must be of type array, none returned
-
- Closed
-
- has a QA test
-
MDLQA-17932 Improved searching and filtering in the question bank
-
- Open
-
-
MDLQA-18427 CLONE - Improved searching and filtering in the question bank
-
- Passed
-
- has been marked as being related by
-
MDL-79629 Enhance report editor filter/condition selection to use autocomplete
-
- Closed
-
- has to be done after
-
MDL-72509 Move the participants filter UI from within core_user to a re-usable API
-
- Closed
-
- is duplicated by
-
MDL-78557 Filtering random questions by custom fields and import/export
-
- Closed
-
- split to
-
MDL-78220 Add additional question bank filters
-
- Open
-
-
MDL-78409 Convert "Show question text" filter to a column display option
-
- Closed
-
- Testing discovered
-
MDL-79634 Autocomplete field type: inconsistent styling between single select and multi-select (e.g. select category in question bank)
-
- Open
-
-
MDL-76026 Non object property access warning when changing question category name
-
- Closed
-
-
MDL-79223 Question bank => Delete question confirmation should be in modal
-
- Closed
-
- will help resolve
-
MDL-77587 Quiz statistics report ignores tags when analysing random questions.
-
- Open
-