1 |
efrain |
1 |
@core @core_user
|
|
|
2 |
Feature: View course participants
|
|
|
3 |
In order to know who is on a course
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to be able to view the participants on a course
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname | email |
|
|
|
10 |
| teacher1x | Teacher | 1x | teacher1x@example.com |
|
|
|
11 |
| student0x | Student | 0x | student0x@example.com |
|
|
|
12 |
| student1x | Student | 1x | student1x@example.com |
|
|
|
13 |
| student2x | Student | 2x | student2x@example.com |
|
|
|
14 |
| student3x | Student | 3x | student3x@example.com |
|
|
|
15 |
| student4x | Student | 4x | student4x@example.com |
|
|
|
16 |
| student5x | Student | 5x | student5x@example.com |
|
|
|
17 |
| student6x | Student | 6x | student6x@example.com |
|
|
|
18 |
| student7x | Student | 7x | student7x@example.com |
|
|
|
19 |
| student8x | Student | 8x | student8x@example.com |
|
|
|
20 |
| student9x | Student | 9x | student9x@example.com |
|
|
|
21 |
| student10x | Student | 10x | student10x@example.com |
|
|
|
22 |
| student11x | Student | 11x | student11x@example.com |
|
|
|
23 |
| student12x | Student | 12x | student12x@example.com |
|
|
|
24 |
| student13x | Student | 13x | student13x@example.com |
|
|
|
25 |
| student14x | Student | 14x | student14x@example.com |
|
|
|
26 |
| student15x | Student | 15x | student15x@example.com |
|
|
|
27 |
| student16x | Student | 16x | student16x@example.com |
|
|
|
28 |
| student17x | Student | 17x | student17x@example.com |
|
|
|
29 |
| student18x | Student | 18x | student18x@example.com |
|
|
|
30 |
| student19x | Student | 19x | student19x@example.com |
|
|
|
31 |
And the following "courses" exist:
|
|
|
32 |
| fullname | shortname | format |
|
|
|
33 |
| Course 1 | C1 | topics |
|
|
|
34 |
And the following "course enrolments" exist:
|
|
|
35 |
| user | course | role | status | timeend |
|
|
|
36 |
| teacher1x | C1 | editingteacher | 0 | 0 |
|
|
|
37 |
| student0x | C1 | student | 0 | 0 |
|
|
|
38 |
| student1x | C1 | student | 0 | 0 |
|
|
|
39 |
| student2x | C1 | student | 0 | 0 |
|
|
|
40 |
| student3x | C1 | student | 0 | 0 |
|
|
|
41 |
| student4x | C1 | student | 0 | 0 |
|
|
|
42 |
| student5x | C1 | student | 0 | 0 |
|
|
|
43 |
| student6x | C1 | student | 0 | 0 |
|
|
|
44 |
| student7x | C1 | student | 0 | 0 |
|
|
|
45 |
| student8x | C1 | student | 0 | 0 |
|
|
|
46 |
| student9x | C1 | student | 0 | 0 |
|
|
|
47 |
| student10x | C1 | student | 1 | 0 |
|
|
|
48 |
| student11x | C1 | student | 0 | 100 |
|
|
|
49 |
| student12x | C1 | student | 0 | 0 |
|
|
|
50 |
| student13x | C1 | student | 0 | 0 |
|
|
|
51 |
| student14x | C1 | student | 0 | 0 |
|
|
|
52 |
| student15x | C1 | student | 0 | 0 |
|
|
|
53 |
| student16x | C1 | student | 0 | 0 |
|
|
|
54 |
| student17x | C1 | student | 0 | 0 |
|
|
|
55 |
| student18x | C1 | student | 0 | 0 |
|
|
|
56 |
|
|
|
57 |
@javascript
|
|
|
58 |
Scenario: Use select and deselect all buttons
|
|
|
59 |
Given I log in as "teacher1x"
|
|
|
60 |
And I am on "Course 1" course homepage
|
|
|
61 |
And I navigate to course participants
|
|
|
62 |
When I click on "Select all" "checkbox"
|
|
|
63 |
Then the field "Select 'Teacher 1x'" matches value "1"
|
|
|
64 |
And the field "Select 'Student 0x'" matches value "1"
|
|
|
65 |
And the field "Select 'Student 1x'" matches value "1"
|
|
|
66 |
And the field "Select 'Student 2x'" matches value "1"
|
|
|
67 |
And the field "Select 'Student 3x'" matches value "1"
|
|
|
68 |
And the field "Select 'Student 4x'" matches value "1"
|
|
|
69 |
And the field "Select 'Student 5x'" matches value "1"
|
|
|
70 |
And the field "Select 'Student 6x'" matches value "1"
|
|
|
71 |
And the field "Select 'Student 7x'" matches value "1"
|
|
|
72 |
And the field "Select 'Student 8x'" matches value "1"
|
|
|
73 |
And the field "Select 'Student 9x'" matches value "1"
|
|
|
74 |
And the field "Select 'Student 10x'" matches value "1"
|
|
|
75 |
And the field "Select 'Student 11x'" matches value "1"
|
|
|
76 |
And the field "Select 'Student 12x'" matches value "1"
|
|
|
77 |
And the field "Select 'Student 13x'" matches value "1"
|
|
|
78 |
And the field "Select 'Student 14x'" matches value "1"
|
|
|
79 |
And the field "Select 'Student 14x'" matches value "1"
|
|
|
80 |
And the field "Select 'Student 15x'" matches value "1"
|
|
|
81 |
And the field "Select 'Student 16x'" matches value "1"
|
|
|
82 |
And the field "Select 'Student 17x'" matches value "1"
|
|
|
83 |
And the field "Select 'Student 18x'" matches value "1"
|
|
|
84 |
|
|
|
85 |
And I click on "Deselect all" "checkbox"
|
|
|
86 |
And the field "Select 'Teacher 1x'" matches value "0"
|
|
|
87 |
And the field "Select 'Student 0x'" matches value "0"
|
|
|
88 |
And the field "Select 'Student 1x'" matches value "0"
|
|
|
89 |
And the field "Select 'Student 2x'" matches value "0"
|
|
|
90 |
And the field "Select 'Student 3x'" matches value "0"
|
|
|
91 |
And the field "Select 'Student 4x'" matches value "0"
|
|
|
92 |
And the field "Select 'Student 5x'" matches value "0"
|
|
|
93 |
And the field "Select 'Student 6x'" matches value "0"
|
|
|
94 |
And the field "Select 'Student 7x'" matches value "0"
|
|
|
95 |
And the field "Select 'Student 8x'" matches value "0"
|
|
|
96 |
And the field "Select 'Student 9x'" matches value "0"
|
|
|
97 |
And the field "Select 'Student 10x'" matches value "0"
|
|
|
98 |
And the field "Select 'Student 11x'" matches value "0"
|
|
|
99 |
And the field "Select 'Student 12x'" matches value "0"
|
|
|
100 |
And the field "Select 'Student 13x'" matches value "0"
|
|
|
101 |
And the field "Select 'Student 14x'" matches value "0"
|
|
|
102 |
And the field "Select 'Student 14x'" matches value "0"
|
|
|
103 |
And the field "Select 'Student 15x'" matches value "0"
|
|
|
104 |
And the field "Select 'Student 16x'" matches value "0"
|
|
|
105 |
And the field "Select 'Student 17x'" matches value "0"
|
|
|
106 |
And the field "Select 'Student 18x'" matches value "0"
|
|
|
107 |
|
|
|
108 |
@javascript
|
|
|
109 |
Scenario: Sort and paginate the list of users
|
|
|
110 |
Given I log in as "teacher1x"
|
|
|
111 |
And the following "course enrolments" exist:
|
|
|
112 |
| user | course | role |
|
|
|
113 |
| student19x | C1 | student |
|
|
|
114 |
And I am on "Course 1" course homepage
|
|
|
115 |
And I navigate to course participants
|
|
|
116 |
And I follow "Email address"
|
|
|
117 |
When I click on "2" "link" in the "//nav[@aria-label='Page']" "xpath_element"
|
|
|
118 |
Then I should not see "student0x@example.com"
|
|
|
119 |
And I should not see "student19x@example.com"
|
|
|
120 |
And I should see "teacher1x@example.com"
|
|
|
121 |
And I follow "Email address"
|
|
|
122 |
And I click on "2" "link" in the "//nav[@aria-label='Page']" "xpath_element"
|
|
|
123 |
And I should not see "teacher1x@example.com"
|
|
|
124 |
And I should not see "student19x@example.com"
|
|
|
125 |
And I should not see "student1x@example.com"
|
|
|
126 |
And I should see "student0x@example.com"
|
|
|
127 |
|
|
|
128 |
@javascript
|
|
|
129 |
Scenario: Use select all users on this page, select all users and deselect all
|
|
|
130 |
Given the following "course enrolments" exist:
|
|
|
131 |
| user | course | role |
|
|
|
132 |
| student19x | C1 | student |
|
|
|
133 |
When I log in as "teacher1x"
|
|
|
134 |
And I am on "Course 1" course homepage
|
|
|
135 |
And I navigate to course participants
|
|
|
136 |
And I click on "Select all" "checkbox"
|
|
|
137 |
Then I should not see "Student 9x"
|
|
|
138 |
And the field "Select 'Teacher 1x'" matches value "1"
|
|
|
139 |
And the field "Select 'Student 0x'" matches value "1"
|
|
|
140 |
And the field "Select 'Student 1x'" matches value "1"
|
|
|
141 |
And the field "Select 'Student 2x'" matches value "1"
|
|
|
142 |
And the field "Select 'Student 3x'" matches value "1"
|
|
|
143 |
And the field "Select 'Student 4x'" matches value "1"
|
|
|
144 |
And the field "Select 'Student 5x'" matches value "1"
|
|
|
145 |
And the field "Select 'Student 6x'" matches value "1"
|
|
|
146 |
And the field "Select 'Student 7x'" matches value "1"
|
|
|
147 |
And the field "Select 'Student 8x'" matches value "1"
|
|
|
148 |
And the field "Select 'Student 10x'" matches value "1"
|
|
|
149 |
And the field "Select 'Student 11x'" matches value "1"
|
|
|
150 |
And the field "Select 'Student 12x'" matches value "1"
|
|
|
151 |
And the field "Select 'Student 13x'" matches value "1"
|
|
|
152 |
And the field "Select 'Student 14x'" matches value "1"
|
|
|
153 |
And the field "Select 'Student 14x'" matches value "1"
|
|
|
154 |
And the field "Select 'Student 15x'" matches value "1"
|
|
|
155 |
And the field "Select 'Student 16x'" matches value "1"
|
|
|
156 |
And the field "Select 'Student 17x'" matches value "1"
|
|
|
157 |
And the field "Select 'Student 18x'" matches value "1"
|
|
|
158 |
And the field "Select 'Student 19x'" matches value "1"
|
|
|
159 |
|
|
|
160 |
And I click on "Deselect all" "checkbox"
|
|
|
161 |
And the field "Select 'Teacher 1x'" matches value "0"
|
|
|
162 |
And the field "Select 'Student 0x'" matches value "0"
|
|
|
163 |
And the field "Select 'Student 1x'" matches value "0"
|
|
|
164 |
And the field "Select 'Student 2x'" matches value "0"
|
|
|
165 |
And the field "Select 'Student 3x'" matches value "0"
|
|
|
166 |
And the field "Select 'Student 4x'" matches value "0"
|
|
|
167 |
And the field "Select 'Student 5x'" matches value "0"
|
|
|
168 |
And the field "Select 'Student 6x'" matches value "0"
|
|
|
169 |
And the field "Select 'Student 7x'" matches value "0"
|
|
|
170 |
And the field "Select 'Student 8x'" matches value "0"
|
|
|
171 |
And the field "Select 'Student 10x'" matches value "0"
|
|
|
172 |
And the field "Select 'Student 11x'" matches value "0"
|
|
|
173 |
And the field "Select 'Student 12x'" matches value "0"
|
|
|
174 |
And the field "Select 'Student 13x'" matches value "0"
|
|
|
175 |
And the field "Select 'Student 14x'" matches value "0"
|
|
|
176 |
And the field "Select 'Student 14x'" matches value "0"
|
|
|
177 |
And the field "Select 'Student 15x'" matches value "0"
|
|
|
178 |
And the field "Select 'Student 16x'" matches value "0"
|
|
|
179 |
And the field "Select 'Student 17x'" matches value "0"
|
|
|
180 |
And the field "Select 'Student 18x'" matches value "0"
|
|
|
181 |
And the field "Select 'Student 19x'" matches value "0"
|
|
|
182 |
|
|
|
183 |
# Pressing the "Select all X users" button should select all including the 21st user (Student 9x).
|
|
|
184 |
And I press "Select all 21 users"
|
|
|
185 |
And I should see "Student 9x"
|
|
|
186 |
And the field "Select 'Teacher 1x'" matches value "1"
|
|
|
187 |
And the field "Select 'Student 0x'" matches value "1"
|
|
|
188 |
And the field "Select 'Student 1x'" matches value "1"
|
|
|
189 |
And the field "Select 'Student 2x'" matches value "1"
|
|
|
190 |
And the field "Select 'Student 3x'" matches value "1"
|
|
|
191 |
And the field "Select 'Student 4x'" matches value "1"
|
|
|
192 |
And the field "Select 'Student 5x'" matches value "1"
|
|
|
193 |
And the field "Select 'Student 6x'" matches value "1"
|
|
|
194 |
And the field "Select 'Student 7x'" matches value "1"
|
|
|
195 |
And the field "Select 'Student 8x'" matches value "1"
|
|
|
196 |
And the field "Select 'Student 9x'" matches value "1"
|
|
|
197 |
And the field "Select 'Student 10x'" matches value "1"
|
|
|
198 |
And the field "Select 'Student 11x'" matches value "1"
|
|
|
199 |
And the field "Select 'Student 12x'" matches value "1"
|
|
|
200 |
And the field "Select 'Student 13x'" matches value "1"
|
|
|
201 |
And the field "Select 'Student 14x'" matches value "1"
|
|
|
202 |
And the field "Select 'Student 14x'" matches value "1"
|
|
|
203 |
And the field "Select 'Student 15x'" matches value "1"
|
|
|
204 |
And the field "Select 'Student 16x'" matches value "1"
|
|
|
205 |
And the field "Select 'Student 17x'" matches value "1"
|
|
|
206 |
And the field "Select 'Student 18x'" matches value "1"
|
|
|
207 |
And the field "Select 'Student 19x'" matches value "1"
|
|
|
208 |
And the "With selected users..." "select" should be enabled
|
|
|
209 |
|
|
|
210 |
And I click on "Deselect all" "checkbox"
|
|
|
211 |
And the field "Select 'Teacher 1x'" matches value "0"
|
|
|
212 |
And the field "Select 'Student 0x'" matches value "0"
|
|
|
213 |
And the field "Select 'Student 1x'" matches value "0"
|
|
|
214 |
And the field "Select 'Student 2x'" matches value "0"
|
|
|
215 |
And the field "Select 'Student 3x'" matches value "0"
|
|
|
216 |
And the field "Select 'Student 4x'" matches value "0"
|
|
|
217 |
And the field "Select 'Student 5x'" matches value "0"
|
|
|
218 |
And the field "Select 'Student 6x'" matches value "0"
|
|
|
219 |
And the field "Select 'Student 7x'" matches value "0"
|
|
|
220 |
And the field "Select 'Student 8x'" matches value "0"
|
|
|
221 |
And the field "Select 'Student 9x'" matches value "0"
|
|
|
222 |
And the field "Select 'Student 10x'" matches value "0"
|
|
|
223 |
And the field "Select 'Student 11x'" matches value "0"
|
|
|
224 |
And the field "Select 'Student 12x'" matches value "0"
|
|
|
225 |
And the field "Select 'Student 13x'" matches value "0"
|
|
|
226 |
And the field "Select 'Student 14x'" matches value "0"
|
|
|
227 |
And the field "Select 'Student 14x'" matches value "0"
|
|
|
228 |
And the field "Select 'Student 15x'" matches value "0"
|
|
|
229 |
And the field "Select 'Student 16x'" matches value "0"
|
|
|
230 |
And the field "Select 'Student 17x'" matches value "0"
|
|
|
231 |
And the field "Select 'Student 18x'" matches value "0"
|
|
|
232 |
And the field "Select 'Student 19x'" matches value "0"
|
|
|
233 |
|
|
|
234 |
Scenario: View the participants page as a teacher
|
|
|
235 |
Given I log in as "teacher1x"
|
|
|
236 |
And I am on "Course 1" course homepage
|
|
|
237 |
When I navigate to course participants
|
|
|
238 |
Then I should see "Active" in the "student0x" "table_row"
|
|
|
239 |
Then I should see "Active" in the "student1x" "table_row"
|
|
|
240 |
And I should see "Active" in the "student2x" "table_row"
|
|
|
241 |
And I should see "Active" in the "student3x" "table_row"
|
|
|
242 |
And I should see "Active" in the "student4x" "table_row"
|
|
|
243 |
And I should see "Active" in the "student5x" "table_row"
|
|
|
244 |
And I should see "Active" in the "student6x" "table_row"
|
|
|
245 |
And I should see "Active" in the "student7x" "table_row"
|
|
|
246 |
And I should see "Active" in the "student8x" "table_row"
|
|
|
247 |
And I should see "Active" in the "student9x" "table_row"
|
|
|
248 |
And I should see "Suspended" in the "student10x" "table_row"
|
|
|
249 |
And I should see "Not current" in the "student11x" "table_row"
|
|
|
250 |
And I should see "Active" in the "student12x" "table_row"
|
|
|
251 |
And I should see "Active" in the "student13x" "table_row"
|
|
|
252 |
And I should see "Active" in the "student14x" "table_row"
|
|
|
253 |
And I should see "Active" in the "student15x" "table_row"
|
|
|
254 |
And I should see "Active" in the "student16x" "table_row"
|
|
|
255 |
And I should see "Active" in the "student17x" "table_row"
|
|
|
256 |
And I should see "Active" in the "student18x" "table_row"
|
|
|
257 |
|
|
|
258 |
Scenario: View the participants page as a student
|
|
|
259 |
Given I log in as "student1x"
|
|
|
260 |
And I am on "Course 1" course homepage
|
|
|
261 |
When I navigate to course participants
|
|
|
262 |
# Student should not see the status column.
|
|
|
263 |
Then I should not see "Status" in the "participants" "table"
|
|
|
264 |
# Student should be able to see the other actively-enrolled students.
|
|
|
265 |
And I should see "Student 1x" in the "participants" "table"
|
|
|
266 |
And I should see "Student 2x" in the "participants" "table"
|
|
|
267 |
And I should see "Student 3x" in the "participants" "table"
|
|
|
268 |
And I should see "Student 4x" in the "participants" "table"
|
|
|
269 |
And I should see "Student 5x" in the "participants" "table"
|
|
|
270 |
And I should see "Student 6x" in the "participants" "table"
|
|
|
271 |
And I should see "Student 7x" in the "participants" "table"
|
|
|
272 |
And I should see "Student 8x" in the "participants" "table"
|
|
|
273 |
# Suspended and non-current students should not be rendered.
|
|
|
274 |
And I should not see "Student 10x" in the "participants" "table"
|
|
|
275 |
And I should not see "Student 11x" in the "participants" "table"
|
|
|
276 |
|
|
|
277 |
Scenario: Check status after disabling manual enrolment
|
|
|
278 |
Given I log in as "admin"
|
|
|
279 |
And I am on the "Course 1" "enrolment methods" page
|
|
|
280 |
And I click on "Disable" "link" in the "Manual enrolments" "table_row"
|
|
|
281 |
Then I navigate to course participants
|
|
|
282 |
And I should see "Not current" in the "student0x" "table_row"
|