MDL-74054 core_question: Re-apply filters when performing a qbank action
This changes the root element used by the fragment when applying filters, so that the whole of display_question_list() is reloaded. This ensures that the returnurl will be updated correctly on the question actions and bulk actions without manipulating then further in Javascript.
This commit is contained in:
+6
-3
@@ -138,8 +138,8 @@ function core_question_output_fragment_question_data(array $args): string {
|
||||
} else {
|
||||
$thispageurl->param('courseid', $params['courseid']);
|
||||
}
|
||||
if (!empty($args['filterquery'])) {
|
||||
$thispageurl->param('filter', $args['filterquery']);
|
||||
if (!empty($args['filtercondition'])) {
|
||||
$thispageurl->param('filter', $args['filtercondition']);
|
||||
}
|
||||
if (!empty($args['lastchanged'])) {
|
||||
$thispageurl->param('lastchanged', $args['lastchanged']);
|
||||
@@ -150,5 +150,8 @@ function core_question_output_fragment_question_data(array $args): string {
|
||||
}
|
||||
}
|
||||
$questionbank = new $viewclass($contexts, $thispageurl, $course, $cm, $params, $extraparams);
|
||||
return $questionbank->display_questions_table();
|
||||
$questionbank->add_standard_search_conditions();
|
||||
ob_start();
|
||||
$questionbank->display_question_list();
|
||||
return ob_get_clean();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user