MDL-60579 user: Check filter strings have correct part count
This commit is contained in:
@@ -277,6 +277,9 @@ class core_user_renderer extends plugin_renderer_base {
|
||||
foreach ($filtersapplied as $filter) {
|
||||
if (!array_key_exists($filter, $filteroptions)) {
|
||||
$filtervalue = explode(':', $filter);
|
||||
if (count($filtervalue) !== 2) {
|
||||
continue;
|
||||
}
|
||||
$key = $filtervalue[0];
|
||||
$value = $filtervalue[1];
|
||||
|
||||
|
||||
@@ -108,6 +108,7 @@ Feature: Course participants can be filtered
|
||||
Given I log in as "teacher1"
|
||||
And I am on "Course 1" course homepage
|
||||
And I navigate to course participants
|
||||
# Note: This is the literal string "student", not the Role student.
|
||||
When I set the field "Filters" to "student"
|
||||
And I press key "13" in the field "Filters"
|
||||
Then I should see "Student 1" in the "participants" "table"
|
||||
|
||||
Reference in New Issue
Block a user