mirror of
https://github.com/moodle/moodle.git
synced 2025-04-03 15:32:43 +02:00
MDL-83357 question: Fix filter cleaning in page links
This commit is contained in:
parent
c5f78e9bd3
commit
d0fb2d5cac
@ -222,11 +222,14 @@ function question_build_edit_resources($edittab, $baseurl, $params,
|
||||
if ($filterkey == 'jointype') {
|
||||
$cleanparams['filter']['jointype'] = clean_param($filtervalue, PARAM_INT);
|
||||
} else {
|
||||
if (!array_key_exists('name', $filtervalue)) {
|
||||
$filtervalue['name'] = $filterkey;
|
||||
}
|
||||
$cleanfilter = [
|
||||
'name' => clean_param($filtervalue['name'], PARAM_ALPHANUM),
|
||||
'jointype' => clean_param($filtervalue['jointype'], PARAM_INT),
|
||||
'values' => $filtervalue['values'],
|
||||
'filteroptions' => $filtervalue['filteroptions'],
|
||||
'filteroptions' => $filtervalue['filteroptions'] ?? [],
|
||||
];
|
||||
$cleanparams['filter'][$filterkey] = $cleanfilter;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user