mirrored from git://git.moodle.org/moodle.git
/
group_submission.feature
356 lines (351 loc) · 15.7 KB
/
group_submission.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
@mod @mod_assign
Feature: Group assignment submissions
In order to allow students to work collaboratively on an assignment
As a teacher
I need to group submissions in groups
@javascript
Scenario: Switch between group modes
Given the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student0 | Student | 0 | student0@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
| student3 | Student | 3 | student3@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student0 | C1 | student |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
And the following "groups" exist:
| name | course | idnumber |
| Group 1 | C1 | G1 |
And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment name |
| Description | Test assignment description |
| Students submit in groups | Yes |
| Group mode | No groups |
And I follow "Test assignment name"
When I navigate to "View all submissions" in current page administration
Then "//tr[contains(., 'Student 0')][contains(., 'Default group')]" "xpath_element" should exist
And "//tr[contains(., 'Student 1')][contains(., 'Default group')]" "xpath_element" should exist
And "//tr[contains(., 'Student 2')][contains(., 'Default group')]" "xpath_element" should exist
And "//tr[contains(., 'Student 3')][contains(., 'Default group')]" "xpath_element" should exist
And I follow "Test assignment name"
And I navigate to "Edit settings" in current page administration
And I set the following fields to these values:
| Group mode | Separate groups |
And I press "Save and return to course"
And I navigate to "Edit settings" in current page administration
And I set the following fields to these values:
| Group mode | Separate groups |
And I press "Save and display"
And I navigate to "Users > Groups" in current page administration
And I add "Student 0 (student0@example.com)" user to "Group 1" group members
And I add "Student 1 (student1@example.com)" user to "Group 1" group members
And I am on "Course 1" course homepage
And I follow "Test assignment name"
And I navigate to "View all submissions" in current page administration
And "//tr[contains(., 'Student 0')][contains(., 'Group 1')]" "xpath_element" should exist
And "//tr[contains(., 'Student 1')][contains(., 'Group 1')]" "xpath_element" should exist
And I should not see "Student 2"
And I set the field "Separate groups" to "All participants"
And "//tr[contains(., 'Student 0')][contains(., 'Group 1')]" "xpath_element" should exist
And "//tr[contains(., 'Student 1')][contains(., 'Group 1')]" "xpath_element" should exist
And "//tr[contains(., 'Student 2')][contains(., 'Default group')]" "xpath_element" should exist
And "//tr[contains(., 'Student 3')][contains(., 'Default group')]" "xpath_element" should exist
@javascript
Scenario: Confirm that the grading status changes for each group member
Given the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
| student3 | Student | 3 | student3@example.com |
| student4 | Student | 4 | student4@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
| student4 | C1 | student |
And the following "groups" exist:
| name | course | idnumber |
| Group 1 | C1 | G1 |
And the following "group members" exist:
| user | group |
| student1 | G1 |
| student2 | G1 |
And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment name |
| Description | Test assignment description |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_file_enabled | 0 |
| Students submit in groups | Yes |
| Group mode | No groups |
| Require group to make submission | No |
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test assignment name"
And I press "Add submission"
And I set the following fields to these values:
| Online text | I'm the student's first submission |
And I press "Save changes"
And I log out
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I follow "Test assignment name"
When I navigate to "View all submissions" in current page administration
Then "Student 1" row "Status" column of "generaltable" table should contain "Submitted for grading"
And "Student 2" row "Status" column of "generaltable" table should contain "Submitted for grading"
And "Student 3" row "Status" column of "generaltable" table should not contain "Submitted for grading"
And "Student 4" row "Status" column of "generaltable" table should not contain "Submitted for grading"
And I log out
And I log in as "student3"
And I am on "Course 1" course homepage
And I follow "Test assignment name"
And I press "Add submission"
And I set the following fields to these values:
| Online text | I'm the student's first submission |
And I press "Save changes"
And I log out
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I follow "Test assignment name"
And I navigate to "View all submissions" in current page administration
And "Student 1" row "Status" column of "generaltable" table should contain "Submitted for grading"
And "Student 2" row "Status" column of "generaltable" table should contain "Submitted for grading"
And "Student 3" row "Status" column of "generaltable" table should contain "Submitted for grading"
And "Student 4" row "Status" column of "generaltable" table should contain "Submitted for grading"
@javascript
Scenario: Confirm that group submissions can be reopened
Given the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
| student3 | Student | 3 | student3@example.com |
| student4 | Student | 4 | student4@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
| student4 | C1 | student |
And the following "groups" exist:
| name | course | idnumber |
| Group 1 | C1 | G1 |
And the following "group members" exist:
| user | group |
| student1 | G1 |
| student2 | G1 |
And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment name |
| Description | Test assignment description |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_file_enabled | 0 |
| Students submit in groups | Yes |
| Attempts reopened | Manually |
| Group mode | No groups |
| Require group to make submission | No |
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test assignment name"
And I press "Add submission"
And I set the following fields to these values:
| Online text | I'm the student's first submission |
And I press "Save changes"
And I log out
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I follow "Test assignment name"
And I navigate to "View all submissions" in current page administration
And I click on "Grade" "link" in the "Student 1" "table_row"
And I set the following fields to these values:
| Grade out of 100 | 50.0 |
| Apply grades and feedback to entire group | 1 |
And I press "Save changes"
And I press "OK"
And I set the following fields to these values:
| Allow another attempt | 1 |
And I press "Save changes"
And I press "OK"
When I am on "Course 1" course homepage
And I follow "Test assignment name"
And I navigate to "View all submissions" in current page administration
Then "Student 1" row "Status" column of "generaltable" table should contain "Reopened"
And "Student 2" row "Status" column of "generaltable" table should contain "Reopened"
Scenario: Confirm groups and submission counts are correct
Given the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist:
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
| student3 | Student | 3 | student3@example.com |
| student4 | Student | 4 | student4@example.com |
| student5 | Student | 5 | student5@example.com |
| student6 | Student | 6 | student6@example.com |
And the following "course enrolments" exist:
| user | course | role |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
| student4 | C1 | student |
| student5 | C1 | student |
| student6 | C1 | student |
And the following "groups" exist:
| name | course | idnumber |
| Group 1 | C1 | G1 |
| Group 2 | C1 | G2 |
| Group 3 | C1 | G3 |
And the following "group members" exist:
| user | group |
| student1 | G1 |
| student2 | G1 |
| student3 | G2 |
| student4 | G2 |
| student5 | G3 |
| student6 | G3 |
And the following "groupings" exist:
| name | course | idnumber |
| Grouping 1 | C1 | GG1 |
And the following "grouping groups" exist:
| grouping | group |
| GG1 | G1 |
| GG1 | G2 |
And I log in as "admin"
And I am on "Course 1" course homepage with editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment name |
| Description | Test assignment description |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_file_enabled | 0 |
| Students submit in groups | Yes |
| Grouping for student groups | Grouping 1 |
| Group mode | Separate groups |
| Require group to make submission | No |
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test assignment name"
And I press "Add submission"
And I set the following fields to these values:
| Online text | I'm the student's 1 submission |
And I press "Save changes"
And I log out
And I log in as "student3"
And I am on "Course 1" course homepage
And I follow "Test assignment name"
And I press "Add submission"
And I set the following fields to these values:
| Online text | I'm the student's 3 submission |
And I press "Save changes"
And I log out
And I log in as "student5"
And I am on "Course 1" course homepage
And I follow "Test assignment name"
And I press "Add submission"
And I set the following fields to these values:
| Online text | I'm the student's 5 submission |
And I press "Save changes"
And I log out
And I log in as "admin"
And I am on "Course 1" course homepage
And I follow "Test assignment name"
And I should see "3" in the "Groups" "table_row"
And I should see "3" in the "Submitted" "table_row"
When I set the field "Separate groups" to "Group 1"
And I press "Go"
Then I should see "1" in the "Groups" "table_row"
And I should see "1" in the "Submitted" "table_row"
And I set the field "Separate groups" to "Group 2"
And I press "Go"
And I should see "1" in the "Groups" "table_row"
And I should see "1" in the "Submitted" "table_row"
And I set the field "Separate groups" to "Group 3"
And I press "Go"
And I should see "1" in the "Groups" "table_row"
And I should see "1" in the "Submitted" "table_row"
Scenario: Confirm that the submission status changes for each group member
Given the following "courses" exist:
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist:
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the following "course enrolments" exist:
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And the following "groups" exist:
| name | course | idnumber |
| Group 1 | C1 | G1 |
And the following "group members" exist:
| user | group |
| student1 | G1 |
| student2 | G1 |
And I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I add a "Assignment" to section "1" and I fill the form with:
| Assignment name | Test assignment name |
| Description | Test assignment description |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_file_enabled | 0 |
| Require students to click the submit button | Yes |
| Students submit in groups | Yes |
| Group mode | No groups |
| Require group to make submission | No |
| Require all group members submit | No |
And I am on "Course 1" course homepage
And I add the "Activities" block
And I log out
And I log in as "student1"
And I am on "Course 1" course homepage
And I follow "Test assignment name"
And I press "Add submission"
And I set the following fields to these values:
| Online text | I'm the student's first submission |
And I press "Save changes"
And I press "Submit assignment"
And I press "Continue"
And I am on "Course 1" course homepage
And I click on "Assignments" "link" in the "Activities" "block"
And I should see "Submitted for grading"
And I log out
And I log in as "student2"
And I am on "Course 1" course homepage
And I click on "Assignments" "link" in the "Activities" "block"
And I should see "Submitted for grading"
And I log out
And I log in as "teacher1"
And I am on "Course 1" course homepage
And I follow "Test assignment name"
When I navigate to "View all submissions" in current page administration
Then "Student 1" row "Status" column of "generaltable" table should contain "Submitted for grading"
And "Student 2" row "Status" column of "generaltable" table should contain "Submitted for grading"