1 |
efrain |
1 |
@mod @mod_assign
|
|
|
2 |
Feature: Group assignment submissions
|
|
|
3 |
In order to allow students to work collaboratively on an assignment
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to group submissions in groups
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "courses" exist:
|
|
|
9 |
| fullname | shortname | category | groupmode |
|
|
|
10 |
| Course 1 | C1 | 0 | 1 |
|
|
|
11 |
And the following "users" exist:
|
|
|
12 |
| username | firstname | lastname | email |
|
|
|
13 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
|
|
14 |
| student0 | Student | 0 | student0@example.com |
|
|
|
15 |
| student1 | Student | 1 | student1@example.com |
|
|
|
16 |
| student2 | Student | 2 | student2@example.com |
|
|
|
17 |
| student3 | Student | 3 | student3@example.com |
|
|
|
18 |
| student4 | Student | 4 | student4@example.com |
|
|
|
19 |
And the following "course enrolments" exist:
|
|
|
20 |
| user | course | role |
|
|
|
21 |
| teacher1 | C1 | editingteacher |
|
|
|
22 |
| student0 | C1 | student |
|
|
|
23 |
| student1 | C1 | student |
|
|
|
24 |
| student2 | C1 | student |
|
|
|
25 |
| student3 | C1 | student |
|
|
|
26 |
| student4 | C1 | student |
|
|
|
27 |
And the following "groups" exist:
|
|
|
28 |
| name | course | idnumber |
|
|
|
29 |
| Group 1 | C1 | G1 |
|
|
|
30 |
|
|
|
31 |
@javascript
|
|
|
32 |
Scenario: Confirm that group submissions are removed from the timeline
|
|
|
33 |
Given the following "activity" exists:
|
|
|
34 |
| activity | assign |
|
|
|
35 |
| course | C1 |
|
|
|
36 |
| name | Test assignment name |
|
|
|
37 |
| assignsubmission_onlinetext_enabled | 1 |
|
|
|
38 |
| teamsubmission | 1 |
|
|
|
39 |
| duedate | ##tomorrow## |
|
|
|
40 |
| requiresubmissionstatement | 1 |
|
|
|
41 |
And the following "group members" exist:
|
|
|
42 |
| user | group |
|
|
|
43 |
| student1 | G1 |
|
|
|
44 |
| student2 | G1 |
|
|
|
45 |
# Student1 checks the assignment is visible in the timeline
|
|
|
46 |
When I am on the "Homepage" page logged in as student1
|
|
|
47 |
Then I should see "Test assignment name" in the "Timeline" "block"
|
|
|
48 |
# Student2 checks the assignment is visible in the timeline
|
|
|
49 |
And I am on the "Homepage" page logged in as student2
|
|
|
50 |
And I should see "Test assignment name" in the "Timeline" "block"
|
|
|
51 |
# Student2 submits the assignment
|
|
|
52 |
And I am on the "Test assignment name" Activity page
|
|
|
53 |
And I press "Add submission"
|
|
|
54 |
And I set the field "Online text" to "Assignment submission text"
|
|
|
55 |
And I press "Save changes"
|
|
|
56 |
And I should see "Draft (not submitted)" in the "Submission status" "table_row"
|
|
|
57 |
And I press "Submit assignment"
|
|
|
58 |
And I should see "This submission is the work of my group, except where we have acknowledged the use of the works of other people."
|
|
|
59 |
And I press "Continue"
|
|
|
60 |
And I should see "Confirm submission"
|
|
|
61 |
And I should see "You are required to agree to this statement before you can submit."
|
|
|
62 |
And I set the field "submissionstatement" to "1"
|
|
|
63 |
And I press "Continue"
|
|
|
64 |
And I should see "Submitted for grading" in the "Submission status" "table_row"
|
|
|
65 |
# Student2 checks the timeline again
|
|
|
66 |
And I am on the "Homepage" page
|
|
|
67 |
And I should not see "Test assignment name" in the "Timeline" "block"
|
|
|
68 |
# Student1 checks the timeline again
|
|
|
69 |
And I am on the "Homepage" page logged in as student1
|
|
|
70 |
And I should not see "Test assignment name" in the "Timeline" "block"
|
|
|
71 |
|
|
|
72 |
@javascript
|
|
|
73 |
Scenario: Switch between group modes
|
|
|
74 |
Given the following "activity" exists:
|
|
|
75 |
| activity | assign |
|
|
|
76 |
| course | C1 |
|
|
|
77 |
| name | Test assignment name |
|
|
|
78 |
| submissiondrafts | 0 |
|
|
|
79 |
| teamsubmission | 1 |
|
|
|
80 |
And I am on the "Test assignment name" Activity page logged in as teacher1
|
|
|
81 |
When I follow "View all submissions"
|
|
|
82 |
Then I should see "Default group" in the "Student 0" "table_row"
|
|
|
83 |
And I should see "Default group" in the "Student 1" "table_row"
|
|
|
84 |
And I should see "Default group" in the "Student 2" "table_row"
|
|
|
85 |
And I should see "Default group" in the "Student 3" "table_row"
|
|
|
86 |
And I am on the "Test assignment name" "assign activity editing" page
|
|
|
87 |
And I set the following fields to these values:
|
|
|
88 |
| Group mode | Separate groups |
|
|
|
89 |
And I press "Save and return to course"
|
|
|
90 |
And I navigate to "Settings" in current page administration
|
|
|
91 |
And I set the following fields to these values:
|
|
|
92 |
| Group mode | Separate groups |
|
|
|
93 |
And I press "Save and display"
|
|
|
94 |
And the following "group members" exist:
|
|
|
95 |
| user | group |
|
|
|
96 |
| student0 | G1 |
|
|
|
97 |
| student1 | G1 |
|
|
|
98 |
And I am on the "Test assignment name" "assign activity" page
|
|
|
99 |
And I follow "View all submissions"
|
|
|
100 |
And I set the field "Separate groups" to "Group 1"
|
|
|
101 |
And I should see "Group 1" in the "Student 0" "table_row"
|
|
|
102 |
And I should see "Group 1" in the "Student 1" "table_row"
|
|
|
103 |
And I should not see "Student 2"
|
|
|
104 |
And I set the field "Separate groups" to "All participants"
|
|
|
105 |
And I should see "Group 1" in the "Student 0" "table_row"
|
|
|
106 |
And I should see "Group 1" in the "Student 1" "table_row"
|
|
|
107 |
And I should see "Default group" in the "Student 2" "table_row"
|
|
|
108 |
And I should see "Default group" in the "Student 3" "table_row"
|
|
|
109 |
|
|
|
110 |
Scenario: Confirm that the grading status changes for each group member
|
|
|
111 |
Given the following "group members" exist:
|
|
|
112 |
| user | group |
|
|
|
113 |
| student1 | G1 |
|
|
|
114 |
| student2 | G1 |
|
|
|
115 |
And the following "activity" exists:
|
|
|
116 |
| activity | assign |
|
|
|
117 |
| course | C1 |
|
|
|
118 |
| name | Test assignment name |
|
|
|
119 |
| submissiondrafts | 0 |
|
|
|
120 |
| assignsubmission_onlinetext_enabled | 1 |
|
|
|
121 |
| assignsubmission_file_enabled | 0 |
|
|
|
122 |
| teamsubmission | 1 |
|
|
|
123 |
| preventsubmissionnotingroup | 0 |
|
|
|
124 |
And the following "mod_assign > submissions" exist:
|
|
|
125 |
| assign | user | onlinetext |
|
|
|
126 |
| Test assignment name | student1 | I'm the student's first submission |
|
|
|
127 |
And I am on the "Test assignment name" Activity page logged in as teacher1
|
|
|
128 |
When I follow "View all submissions"
|
|
|
129 |
Then "Student 1" row "Status" column of "generaltable" table should contain "Submitted for grading"
|
|
|
130 |
And "Student 2" row "Status" column of "generaltable" table should contain "Submitted for grading"
|
|
|
131 |
And "Student 3" row "Status" column of "generaltable" table should not contain "Submitted for grading"
|
|
|
132 |
And "Student 4" row "Status" column of "generaltable" table should not contain "Submitted for grading"
|
|
|
133 |
And the following "mod_assign > submissions" exist:
|
|
|
134 |
| assign | user | onlinetext |
|
|
|
135 |
| Test assignment name | student3 | I'm the student's first submission |
|
|
|
136 |
And I am on the "Test assignment name" Activity page
|
|
|
137 |
And I follow "View all submissions"
|
|
|
138 |
And "Student 1" row "Status" column of "generaltable" table should contain "Submitted for grading"
|
|
|
139 |
And "Student 2" row "Status" column of "generaltable" table should contain "Submitted for grading"
|
|
|
140 |
And "Student 3" row "Status" column of "generaltable" table should contain "Submitted for grading"
|
|
|
141 |
And "Student 4" row "Status" column of "generaltable" table should contain "Submitted for grading"
|
|
|
142 |
|
|
|
143 |
@javascript
|
|
|
144 |
Scenario: Confirm that group submissions can be reopened
|
|
|
145 |
Given the following "group members" exist:
|
|
|
146 |
| user | group |
|
|
|
147 |
| student1 | G1 |
|
|
|
148 |
| student2 | G1 |
|
|
|
149 |
And the following "activity" exists:
|
|
|
150 |
| activity | assign |
|
|
|
151 |
| course | C1 |
|
|
|
152 |
| name | Test assignment name |
|
|
|
153 |
| submissiondrafts | 0 |
|
|
|
154 |
| assignsubmission_onlinetext_enabled | 1 |
|
|
|
155 |
| assignsubmission_file_enabled | 0 |
|
|
|
156 |
| teamsubmission | 1 |
|
|
|
157 |
| attemptreopenmethod | manual |
|
|
|
158 |
| requireallteammemberssubmit | 0 |
|
|
|
159 |
And the following "mod_assign > submissions" exist:
|
|
|
160 |
| assign | user | onlinetext |
|
|
|
161 |
| Test assignment name | student1 | I'm the student's first submission |
|
|
|
162 |
And I am on the "Test assignment name" Activity page logged in as teacher1
|
|
|
163 |
And I follow "View all submissions"
|
|
|
164 |
And I click on "Grade" "link" in the "Student 1" "table_row"
|
|
|
165 |
And I set the following fields to these values:
|
|
|
166 |
| Grade out of 100 | 50.0 |
|
|
|
167 |
| Apply grades and feedback to entire group | 1 |
|
|
|
168 |
And I press "Save changes"
|
|
|
169 |
And I set the following fields to these values:
|
|
|
170 |
| Allow another attempt | 1 |
|
|
|
171 |
And I press "Save changes"
|
|
|
172 |
When I am on the "Test assignment name" "assign activity" page
|
|
|
173 |
And I follow "View all submissions"
|
|
|
174 |
Then "Student 1" row "Status" column of "generaltable" table should contain "Reopened"
|
|
|
175 |
And "Student 2" row "Status" column of "generaltable" table should contain "Reopened"
|
|
|
176 |
|
|
|
177 |
Scenario: Confirm groups and submission counts are correct
|
|
|
178 |
Given the following "groups" exist:
|
|
|
179 |
| name | course | idnumber |
|
|
|
180 |
| Group 2 | C1 | G2 |
|
|
|
181 |
| Group 3 | C1 | G3 |
|
|
|
182 |
And the following "group members" exist:
|
|
|
183 |
| user | group |
|
|
|
184 |
| student1 | G1 |
|
|
|
185 |
| student2 | G2 |
|
|
|
186 |
| student3 | G3 |
|
|
|
187 |
And the following "groupings" exist:
|
|
|
188 |
| name | course | idnumber |
|
|
|
189 |
| Grouping 1 | C1 | GG1 |
|
|
|
190 |
And the following "grouping groups" exist:
|
|
|
191 |
| grouping | group |
|
|
|
192 |
| GG1 | G1 |
|
|
|
193 |
| GG1 | G2 |
|
|
|
194 |
# Groupmode 1 = Separate Groups
|
|
|
195 |
And the following "activity" exists:
|
|
|
196 |
| activity | assign |
|
|
|
197 |
| course | C1 |
|
|
|
198 |
| name | Test assignment name |
|
|
|
199 |
| submissiondrafts | 0 |
|
|
|
200 |
| assignsubmission_onlinetext_enabled | 1 |
|
|
|
201 |
| assignsubmission_file_enabled | 0 |
|
|
|
202 |
| teamsubmission | 1 |
|
|
|
203 |
| attemptreopenmethod | manual |
|
|
|
204 |
| requireallteammemberssubmit | 0 |
|
|
|
205 |
| groupmode | 1 |
|
|
|
206 |
| teamsubmissiongroupingid | GG1 |
|
|
|
207 |
| submissiondrafts | 0 |
|
|
|
208 |
And the following "mod_assign > submissions" exist:
|
|
|
209 |
| assign | user | onlinetext |
|
|
|
210 |
| Test assignment name | student1 | I'm the student's first submission |
|
|
|
211 |
| Test assignment name | student2 | I'm the student's first submission |
|
|
|
212 |
| Test assignment name | student3 | I'm the student's first submission |
|
|
|
213 |
And I am on the "Test assignment name" Activity page logged in as admin
|
|
|
214 |
And I should see "3" in the "Groups" "table_row"
|
|
|
215 |
And I should see "3" in the "Submitted" "table_row"
|
|
|
216 |
When I select "Group 1" from the "Separate groups" singleselect
|
|
|
217 |
Then I should see "1" in the "Groups" "table_row"
|
|
|
218 |
And I should see "1" in the "Submitted" "table_row"
|
|
|
219 |
And I select "Group 2" from the "Separate groups" singleselect
|
|
|
220 |
And I should see "1" in the "Groups" "table_row"
|
|
|
221 |
And I should see "1" in the "Submitted" "table_row"
|
|
|
222 |
And I select "Group 3" from the "Separate groups" singleselect
|
|
|
223 |
And I should see "1" in the "Groups" "table_row"
|
|
|
224 |
And I should see "1" in the "Submitted" "table_row"
|
|
|
225 |
|
|
|
226 |
Scenario: Confirm that the submission status changes for each group member
|
|
|
227 |
Given the following "group members" exist:
|
|
|
228 |
| user | group |
|
|
|
229 |
| student1 | G1 |
|
|
|
230 |
| student2 | G1 |
|
|
|
231 |
And the following "activity" exists:
|
|
|
232 |
| activity | assign |
|
|
|
233 |
| course | C1 |
|
|
|
234 |
| name | Test assignment name |
|
|
|
235 |
| submissiondrafts | 1 |
|
|
|
236 |
| assignsubmission_onlinetext_enabled | 1 |
|
|
|
237 |
| assignsubmission_file_enabled | 0 |
|
|
|
238 |
| teamsubmission | 1 |
|
|
|
239 |
| attemptreopenmethod | manual |
|
|
|
240 |
| requireallteammemberssubmit | 0 |
|
|
|
241 |
# Groupmode 0 = No Groups
|
|
|
242 |
| groupmode | 0 |
|
|
|
243 |
| preventsubmissionnotingroup | 0 |
|
|
|
244 |
| submissiondrafts | 0 |
|
|
|
245 |
| teamsubmission | 1 |
|
|
|
246 |
And the following "mod_assign > submissions" exist:
|
|
|
247 |
| assign | user | onlinetext |
|
|
|
248 |
| Test assignment name | student1 | I'm the student's first submission |
|
|
|
249 |
And the following "blocks" exist:
|
|
|
250 |
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
|
|
|
251 |
| activity_modules | Course | C1 | course-view-* | side-pre |
|
|
|
252 |
And I am on the "C1" Course page logged in as student1
|
|
|
253 |
And I click on "Assignments" "link" in the "Activities" "block"
|
|
|
254 |
And I should see "Submitted for grading"
|
|
|
255 |
And I am on the "C1" Course page logged in as student2
|
|
|
256 |
And I click on "Assignments" "link" in the "Activities" "block"
|
|
|
257 |
And I should see "Submitted for grading"
|
|
|
258 |
And I am on the "Test assignment name" Activity page logged in as teacher1
|
|
|
259 |
When I follow "View all submissions"
|
|
|
260 |
Then "Student 1" row "Status" column of "generaltable" table should contain "Submitted for grading"
|
|
|
261 |
And "Student 2" row "Status" column of "generaltable" table should contain "Submitted for grading"
|
|
|
262 |
|
|
|
263 |
@javascript @_file_upload
|
|
|
264 |
Scenario: Student can submit or edit group assignment depending on 'requireallteammemberssubmit' setting
|
|
|
265 |
Given the following "courses" exist:
|
|
|
266 |
| fullname | shortname | category | groupmode |
|
|
|
267 |
| Course 2 | C2 | 0 | 2 |
|
|
|
268 |
And the following "course enrolments" exist:
|
|
|
269 |
| user | course | role |
|
|
|
270 |
| teacher1 | C2 | editingteacher |
|
|
|
271 |
| student1 | C2 | student |
|
|
|
272 |
| student2 | C2 | student |
|
|
|
273 |
And the following "groups" exist:
|
|
|
274 |
| name | course | idnumber |
|
|
|
275 |
| Group 1 | C2 | CG1 |
|
|
|
276 |
And the following "group members" exist:
|
|
|
277 |
| user | group |
|
|
|
278 |
| student1 | CG1 |
|
|
|
279 |
| student2 | CG1 |
|
|
|
280 |
And the following "activities" exist:
|
|
|
281 |
| activity | course | name | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled | assignsubmission_file_maxfiles | assignsubmission_file_maxsizebytes | submissiondrafts | teamsubmission | requireallteammemberssubmit |
|
|
|
282 |
| assign | C2 | Assign 1 | 1 | 1 | 1 | 2097152 | 1 | 1 | 1 |
|
|
|
283 |
| assign | C2 | Assign 2 | 1 | 1 | 1 | 2097152 | 0 | 1 | 0 |
|
|
|
284 |
# Submit an assignment with 'requireallteammemberssubmit' setting enabled
|
|
|
285 |
When I am on the "Assign 1" "assign activity" page logged in as student1
|
|
|
286 |
Then I should see "Group 1"
|
|
|
287 |
And I should not see "Student 2"
|
|
|
288 |
And I press "Add submission"
|
|
|
289 |
And I set the field "Online text" to "student1 submission"
|
|
|
290 |
And I upload "lib/tests/fixtures/empty.txt" file to "File submissions" filemanager
|
|
|
291 |
And I press "Save changes"
|
|
|
292 |
# Confirm that Submission status remains as draft and all students appear because 'Submit assignment' was not yet clicked
|
|
|
293 |
And I should see "Draft (not submitted)" in the "Submission status" "table_row"
|
|
|
294 |
And I should see "Users who need to submit: Student 1, Student 2"
|
|
|
295 |
And I press "Submit assignment"
|
|
|
296 |
And I press "Continue"
|
|
|
297 |
# Confirm that Submission status remains as draft and only student2 appears because student2 has not yet submitted assignment
|
|
|
298 |
And I am on the "Assign 1" "assign activity" page logged in as student2
|
|
|
299 |
And I should see "Draft (not submitted)" in the "Submission status" "table_row"
|
|
|
300 |
And I should see "Users who need to submit: Student 2"
|
|
|
301 |
And I press "Edit submission"
|
|
|
302 |
And I set the field "Online text" to "student2 updated submission"
|
|
|
303 |
And I delete "empty.txt" from "File submissions" filemanager
|
|
|
304 |
And I upload "lib/tests/fixtures/tabfile.csv" file to "File submissions" filemanager
|
|
|
305 |
And I press "Save changes"
|
|
|
306 |
And I press "Submit assignment"
|
|
|
307 |
And I press "Continue"
|
|
|
308 |
# Confirm that Submission status is now Submitted for grading and all changes made by student2 is reflected on assignment
|
|
|
309 |
And I am on the "Assign 1" "assign activity" page logged in as student1
|
|
|
310 |
And I should see "Submitted for grading" in the "Submission status" "table_row"
|
|
|
311 |
And I should see "student2 updated submission" in the "Online text" "table_row"
|
|
|
312 |
And I should see "tabfile.csv" in the "File submissions" "table_row"
|
|
|
313 |
And I should not see "student1 submission" in the "Online text" "table_row"
|
|
|
314 |
And I should not see "empty.txt" in the "File submissions" "table_row"
|
|
|
315 |
# Submit an assignment with 'requireallteammemberssubmit' disabled
|
|
|
316 |
And I am on the "Assign 2" "assign activity" page logged in as student1
|
|
|
317 |
And I should see "Group 1"
|
|
|
318 |
And I should not see "Student 2"
|
|
|
319 |
And I press "Add submission"
|
|
|
320 |
And I set the field "Online text" to "student1 submission"
|
|
|
321 |
And I upload "lib/tests/fixtures/empty.txt" file to "File submissions" filemanager
|
|
|
322 |
And I press "Save changes"
|
|
|
323 |
# Confirm that Submission status is immediately set to Submitted for grading for all students after student1 submits assignments
|
|
|
324 |
And I am on the "Assign 2" "assign activity" page logged in as student2
|
|
|
325 |
And I should see "Submitted for grading" in the "Submission status" "table_row"
|
|
|
326 |
And I should not see "Users who need to submit"
|
|
|
327 |
|
|
|
328 |
Scenario: Group submission does not use non-participation groups
|
|
|
329 |
Given the following "groups" exist:
|
|
|
330 |
| name | course | idnumber | participation |
|
|
|
331 |
| Group A | C1 | CG1 | 0 |
|
|
|
332 |
And the following "group members" exist:
|
|
|
333 |
| group | user |
|
|
|
334 |
| CG1 | student1 |
|
|
|
335 |
And the following "activity" exists:
|
|
|
336 |
| activity | assign |
|
|
|
337 |
| course | C1 |
|
|
|
338 |
| name | Test assignment name |
|
|
|
339 |
| submissiondrafts | 0 |
|
|
|
340 |
| teamsubmission | 1 |
|
|
|
341 |
| groupmode | 1 |
|
|
|
342 |
When I am on the "Test assignment name" Activity page logged in as student1
|
|
|
343 |
Then I should see "Default group"
|
|
|
344 |
And I should not see "Group A"
|