mirror of
https://github.com/moodle/moodle.git
synced 2025-02-21 01:48:45 +01:00
MDL-62983 core_user: Hold multiple filters when clicking any link
This commit is contained in:
parent
6e8235c7d3
commit
89e27d9999
@ -225,8 +225,8 @@ echo $renderer->unified_filter($course, $context, $filtersapplied, $baseurl);
|
|||||||
echo '<div class="userlist">';
|
echo '<div class="userlist">';
|
||||||
|
|
||||||
// Add filters to the baseurl after creating unified_filter to avoid losing them.
|
// Add filters to the baseurl after creating unified_filter to avoid losing them.
|
||||||
foreach ($filtersapplied as $filter) {
|
foreach (array_unique($filtersapplied) as $filterix => $filter) {
|
||||||
$baseurl->param('unified-filters[]', $filter);
|
$baseurl->param('unified-filters[' . $filterix . ']', $filter);
|
||||||
}
|
}
|
||||||
$participanttable = new \core_user\participants_table($course->id, $groupid, $lastaccess, $roleid, $enrolid, $status,
|
$participanttable = new \core_user\participants_table($course->id, $groupid, $lastaccess, $roleid, $enrolid, $status,
|
||||||
$searchkeywords, $bulkoperations, $selectall);
|
$searchkeywords, $bulkoperations, $selectall);
|
||||||
|
@ -39,7 +39,7 @@ Feature: Course participants can be filtered to display all the users
|
|||||||
And the following "course enrolments" exist:
|
And the following "course enrolments" exist:
|
||||||
| user | course | role | status | timeend |
|
| user | course | role | status | timeend |
|
||||||
| student1 | C1 | student | 0 | |
|
| student1 | C1 | student | 0 | |
|
||||||
| student2 | C1 | student | 1 | |
|
| student2 | C1 | student | 0 | |
|
||||||
| student3 | C1 | student | 0 | |
|
| student3 | C1 | student | 0 | |
|
||||||
| student4 | C1 | student | 0 | |
|
| student4 | C1 | student | 0 | |
|
||||||
| student5 | C1 | student | 0 | |
|
| student5 | C1 | student | 0 | |
|
||||||
@ -61,7 +61,7 @@ Feature: Course participants can be filtered to display all the users
|
|||||||
| student21 | C1 | student | 0 | |
|
| student21 | C1 | student | 0 | |
|
||||||
| student22 | C1 | student | 0 | |
|
| student22 | C1 | student | 0 | |
|
||||||
| student23 | C1 | student | 0 | |
|
| student23 | C1 | student | 0 | |
|
||||||
| student24 | C1 | student | 0 | |
|
| student24 | C1 | student | 1 | |
|
||||||
| student1 | C2 | student | 0 | |
|
| student1 | C2 | student | 0 | |
|
||||||
| student2 | C2 | student | 0 | |
|
| student2 | C2 | student | 0 | |
|
||||||
| student3 | C2 | student | 0 | |
|
| student3 | C2 | student | 0 | |
|
||||||
@ -88,3 +88,20 @@ Feature: Course participants can be filtered to display all the users
|
|||||||
Then I should see "Role: Student"
|
Then I should see "Role: Student"
|
||||||
And I should see "Number of participants: 24" in the "//div[@class='userlist']" "xpath_element"
|
And I should see "Number of participants: 24" in the "//div[@class='userlist']" "xpath_element"
|
||||||
And I should see "Show 20 per page"
|
And I should see "Show 20 per page"
|
||||||
|
|
||||||
|
@javascript
|
||||||
|
Scenario: Apply more than one filter and show all users
|
||||||
|
Given I log in as "teacher1"
|
||||||
|
And I am on "Course 1" course homepage
|
||||||
|
And I navigate to course participants
|
||||||
|
When I open the autocomplete suggestions list
|
||||||
|
And I click on "Role: Student" item in the autocomplete list
|
||||||
|
And I open the autocomplete suggestions list
|
||||||
|
And I click on "Status: Active" item in the autocomplete list
|
||||||
|
And I click on "Show all 23" "link"
|
||||||
|
Then I should see "Role: Student"
|
||||||
|
And I should see "Status: Active"
|
||||||
|
And I should see "Number of participants: 23" in the "//div[@class='userlist']" "xpath_element"
|
||||||
|
And I should see "Student 1"
|
||||||
|
And I should not see "Student 24"
|
||||||
|
And I should see "Show 20 per page"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user