|
| 1 | +@core @core_user |
| 2 | +Feature: Course participants can be filtered to display all the users |
| 3 | + In order to filter the list of course participants |
| 4 | + As a user |
| 5 | + I need to visit the course participants page, apply the appropriate filters and show all users per page |
| 6 | + |
| 7 | + Background: |
| 8 | + Given the following "courses" exist: |
| 9 | + | fullname | shortname | groupmode | |
| 10 | + | Course 1 | C1 | 1 | |
| 11 | + | Course 2 | C2 | 0 | |
| 12 | + And the following "users" exist: |
| 13 | + | username | firstname | lastname | email | |
| 14 | + | student1 | Student | 1 | student1@example.com | |
| 15 | + | student2 | Student | 2 | student2@example.com | |
| 16 | + | student3 | Student | 3 | student3@example.com | |
| 17 | + | student4 | Student | 4 | student4@example.com | |
| 18 | + | student5 | Student | 5 | student5@example.com | |
| 19 | + | student6 | Student | 6 | student6@example.com | |
| 20 | + | student7 | Student | 7 | student7@example.com | |
| 21 | + | student8 | Student | 8 | student8@example.com | |
| 22 | + | student9 | Student | 9 | student9@example.com | |
| 23 | + | student10 | Student | 10 | student10@example.com | |
| 24 | + | student11 | Student | 11 | student11@example.com | |
| 25 | + | student12 | Student | 12 | student12@example.com | |
| 26 | + | student13 | Student | 13 | student13@example.com | |
| 27 | + | student14 | Student | 14 | student14@example.com | |
| 28 | + | student15 | Student | 15 | student15@example.com | |
| 29 | + | student16 | Student | 16 | student16@example.com | |
| 30 | + | student17 | Student | 17 | student17@example.com | |
| 31 | + | student18 | Student | 18 | student18@example.com | |
| 32 | + | student19 | Student | 19 | student19@example.com | |
| 33 | + | student20 | Student | 20 | student20@example.com | |
| 34 | + | student21 | Student | 21 | student21@example.com | |
| 35 | + | student22 | Student | 22 | student22@example.com | |
| 36 | + | student23 | Student | 23 | student23@example.com | |
| 37 | + | student24 | Student | 24 | student24@example.com | |
| 38 | + | teacher1 | Teacher | 1 | teacher1@example.com | |
| 39 | + And the following "course enrolments" exist: |
| 40 | + | user | course | role | status | timeend | |
| 41 | + | student1 | C1 | student | 0 | | |
| 42 | + | student2 | C1 | student | 1 | | |
| 43 | + | student3 | C1 | student | 0 | | |
| 44 | + | student4 | C1 | student | 0 | | |
| 45 | + | student5 | C1 | student | 0 | | |
| 46 | + | student6 | C1 | student | 0 | | |
| 47 | + | student7 | C1 | student | 0 | | |
| 48 | + | student8 | C1 | student | 0 | | |
| 49 | + | student9 | C1 | student | 0 | | |
| 50 | + | student10 | C1 | student | 0 | | |
| 51 | + | student11 | C1 | student | 0 | | |
| 52 | + | student12 | C1 | student | 0 | | |
| 53 | + | student13 | C1 | student | 0 | | |
| 54 | + | student14 | C1 | student | 0 | | |
| 55 | + | student15 | C1 | student | 0 | | |
| 56 | + | student16 | C1 | student | 0 | | |
| 57 | + | student17 | C1 | student | 0 | | |
| 58 | + | student18 | C1 | student | 0 | | |
| 59 | + | student19 | C1 | student | 0 | | |
| 60 | + | student20 | C1 | student | 0 | | |
| 61 | + | student21 | C1 | student | 0 | | |
| 62 | + | student22 | C1 | student | 0 | | |
| 63 | + | student23 | C1 | student | 0 | | |
| 64 | + | student24 | C1 | student | 0 | | |
| 65 | + | student1 | C2 | student | 0 | | |
| 66 | + | student2 | C2 | student | 0 | | |
| 67 | + | student3 | C2 | student | 0 | | |
| 68 | + | teacher1 | C1 | editingteacher | 0 | | |
| 69 | + | teacher1 | C2 | editingteacher | 0 | | |
| 70 | + And the following "groups" exist: |
| 71 | + | name | course | idnumber | |
| 72 | + | Group 1 | C1 | G1 | |
| 73 | + | Group 2 | C1 | G2 | |
| 74 | + And the following "group members" exist: |
| 75 | + | user | group | |
| 76 | + | student2 | G1 | |
| 77 | + | student2 | G2 | |
| 78 | + | student3 | G2 | |
| 79 | + |
| 80 | + @javascript |
| 81 | + Scenario: Show all filtered users for a course |
| 82 | + Given I log in as "teacher1" |
| 83 | + And I am on "Course 1" course homepage |
| 84 | + And I navigate to course participants |
| 85 | + When I open the autocomplete suggestions list |
| 86 | + And I click on "Role: Student" item in the autocomplete list |
| 87 | + And I click on "Show all 24" "link" |
| 88 | + Then I should see "Role: Student" |
| 89 | + And I should see "Number of participants: 24" in the "//div[@class='userlist']" "xpath_element" |
| 90 | + And I should see "Show 20 per page" |
0 commit comments