MDL-85069 question: Services for question bank and category search

This updates the core_question_search_shared_banks external function
with additional parameters to make it applicable outside of the "Switch
bank" dialogue in the quiz, with the corresponding changes to the
question_banks_datasource Javascript module, and unit test coverage.

It also adds a new \core_question\output\question_category_selector
class for rendering a select list of question categories, migrating
the logic used in qbank_managecategories to a core namespace. There
is a fragment callback for rendering this via AJAX.
This commit is contained in:
Mark Johnson
2025-07-02 10:58:33 +01:00
parent 082a5f7a96
commit f4e8942755
13 changed files with 789 additions and 135 deletions
+1 -1
View File
@@ -1276,7 +1276,7 @@ function question_default_export_filename($course, $category): string {
*
* @param int|stdClass|question_definition $questionorid object or id.
* If an object is passed, it should include ->contextid and ->createdby.
* @param string $cap 'add', 'edit', 'view', 'use', 'move' or 'tag'.
* @param string $cap 'add', 'edit', 'view', 'use', 'move', or 'tag'.
* @param int $notused no longer used.
* @return bool this user has the capability $cap for this question $question?
*/