Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
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
1441 ariadna 73
  Scenario: Confirm that the group switching option is available only when the group settings are correctly configured
74
    Given the following "activity" exists:
75
      | activity | assign          |
76
      | course   | C1              |
77
      | name     | Test assignment |
78
    And I am on the "Test assignment" "assign activity editing" page logged in as teacher1
79
    # The assignment does not have a specified group mode.
80
    When I set the following fields to these values:
81
      | Group mode | No groups |
82
    And I press "Save and display"
83
    And I navigate to "Submissions" in current page administration
84
    Then ".groupsearchwidget" "css_element" should not exist
85
    # The course has a specified group mode, but not enforced on modules.
86
    And I am on the "C1" "course editing" page
87
    And I set the following fields to these values:
88
      | Group mode       | Separate groups |
89
      | Force group mode | No              |
90
    And I press "Save and display"
91
    And I am on the "Test assignment" Activity page
92
    And I navigate to "Submissions" in current page administration
93
    And ".groupsearchwidget" "css_element" should not exist
94
    # The assignment has a specified group mode.
95
    And I am on the "Test assignment" "assign activity editing" page
96
    And I set the following fields to these values:
97
      | Group mode | Visible groups |
98
    And I press "Save and display"
99
    And I navigate to "Submissions" in current page administration
100
    And ".groupsearchwidget" "css_element" should exist
101
    And I should see "Select visible groups" in the ".groupsearchwidget" "css_element"
102
    And I confirm "All participants" exists in the "Search groups" search combo box
103
    And I confirm "Group 1" exists in the "Search groups" search combo box
104
    # The course enforces its group mode on modules.
105
    And I am on the "C1" "course editing" page
106
    And I set the following fields to these values:
107
      | Force group mode | Yes |
108
    And I press "Save and display"
109
    And I am on the "Test assignment" Activity page
110
    And I navigate to "Submissions" in current page administration
111
    And ".groupsearchwidget" "css_element" should exist
112
    And I should see "Select separate groups" in the ".groupsearchwidget" "css_element"
113
    And I confirm "All participants" exists in the "Search groups" search combo box
114
    And I confirm "Group 1" exists in the "Search groups" search combo box
115
 
116
  @javascript
1 efrain 117
  Scenario: Switch between group modes
118
    Given the following "activity" exists:
119
      | activity         | assign                      |
120
      | course           | C1                          |
121
      | name             | Test assignment name        |
122
      | submissiondrafts | 0                           |
123
      | teamsubmission   | 1                           |
124
    And I am on the "Test assignment name" Activity page logged in as teacher1
1441 ariadna 125
    When I navigate to "Submissions" in current page administration
1 efrain 126
    Then I should see "Default group" in the "Student 0" "table_row"
127
    And I should see "Default group" in the "Student 1" "table_row"
128
    And I should see "Default group" in the "Student 2" "table_row"
129
    And I should see "Default group" in the "Student 3" "table_row"
130
    And I am on the "Test assignment name" "assign activity editing" page
131
    And I set the following fields to these values:
132
      | Group mode | Separate groups |
133
    And I press "Save and return to course"
134
    And I navigate to "Settings" in current page administration
135
    And I set the following fields to these values:
136
      | Group mode | Separate groups |
137
    And I press "Save and display"
138
    And the following "group members" exist:
139
      | user     | group |
140
      | student0 | G1    |
141
      | student1 | G1    |
142
    And I am on the "Test assignment name" "assign activity" page
1441 ariadna 143
    And I navigate to "Submissions" in current page administration
144
    And I click on "Group 1" in the "Search groups" search combo box
1 efrain 145
    And I should see "Group 1" in the "Student 0" "table_row"
146
    And I should see "Group 1" in the "Student 1" "table_row"
147
    And I should not see "Student 2"
1441 ariadna 148
    And I click on "All participants" in the "Search groups" search combo box
1 efrain 149
    And I should see "Group 1" in the "Student 0" "table_row"
150
    And I should see "Group 1" in the "Student 1" "table_row"
151
    And I should see "Default group" in the "Student 2" "table_row"
152
    And I should see "Default group" in the "Student 3" "table_row"
153
 
154
  Scenario: Confirm that the grading status changes for each group member
155
    Given the following "group members" exist:
156
      | user     | group |
157
      | student1 | G1    |
158
      | student2 | G1    |
159
    And the following "activity" exists:
160
      | activity                            | assign                      |
161
      | course                              | C1                          |
162
      | name                                | Test assignment name        |
163
      | submissiondrafts                    | 0                           |
164
      | assignsubmission_onlinetext_enabled | 1                           |
165
      | assignsubmission_file_enabled       | 0                           |
166
      | teamsubmission                      | 1                           |
167
      | preventsubmissionnotingroup         | 0                           |
168
    And the following "mod_assign > submissions" exist:
169
      | assign                | user      | onlinetext                          |
170
      | Test assignment name  | student1  | I'm the student's first submission  |
171
    And I am on the "Test assignment name" Activity page logged in as teacher1
1441 ariadna 172
    When I navigate to "Submissions" in current page administration
1 efrain 173
    Then "Student 1" row "Status" column of "generaltable" table should contain "Submitted for grading"
174
    And "Student 2" row "Status" column of "generaltable" table should contain "Submitted for grading"
175
    And "Student 3" row "Status" column of "generaltable" table should not contain "Submitted for grading"
176
    And "Student 4" row "Status" column of "generaltable" table should not contain "Submitted for grading"
177
    And the following "mod_assign > submissions" exist:
178
      | assign                | user      | onlinetext                          |
179
      | Test assignment name  | student3  | I'm the student's first submission  |
180
    And I am on the "Test assignment name" Activity page
1441 ariadna 181
    And I navigate to "Submissions" in current page administration
1 efrain 182
    And "Student 1" row "Status" column of "generaltable" table should contain "Submitted for grading"
183
    And "Student 2" row "Status" column of "generaltable" table should contain "Submitted for grading"
184
    And "Student 3" row "Status" column of "generaltable" table should contain "Submitted for grading"
185
    And "Student 4" row "Status" column of "generaltable" table should contain "Submitted for grading"
186
 
187
  @javascript
188
  Scenario: Confirm that group submissions can be reopened
189
    Given the following "group members" exist:
190
      | user     | group |
191
      | student1 | G1    |
192
      | student2 | G1    |
193
    And the following "activity" exists:
194
      | activity                            | assign                      |
195
      | course                              | C1                          |
196
      | name                                | Test assignment name        |
197
      | submissiondrafts                    | 0                           |
198
      | assignsubmission_onlinetext_enabled | 1                           |
199
      | assignsubmission_file_enabled       | 0                           |
200
      | teamsubmission                      | 1                           |
1441 ariadna 201
      | maxattempts                         | -1                          |
1 efrain 202
      | attemptreopenmethod                 | manual                      |
203
      | requireallteammemberssubmit         | 0                           |
204
    And the following "mod_assign > submissions" exist:
205
      | assign                | user      | onlinetext                          |
206
      | Test assignment name  | student1  | I'm the student's first submission  |
207
    And I am on the "Test assignment name" Activity page logged in as teacher1
1441 ariadna 208
    And I go to "Student 1" "Test assignment name" activity advanced grading page
1 efrain 209
    And I set the following fields to these values:
210
      | Grade out of 100 | 50.0 |
211
      | Apply grades and feedback to entire group | 1 |
212
    And I press "Save changes"
213
    And I set the following fields to these values:
214
      | Allow another attempt | 1 |
215
    And I press "Save changes"
216
    When I am on the "Test assignment name" "assign activity" page
1441 ariadna 217
    And I navigate to "Submissions" in current page administration
1 efrain 218
    Then "Student 1" row "Status" column of "generaltable" table should contain "Reopened"
219
    And "Student 2" row "Status" column of "generaltable" table should contain "Reopened"
220
 
221
  Scenario: Confirm groups and submission counts are correct
222
    Given the following "groups" exist:
223
      | name    | course | idnumber |
224
      | Group 2 | C1     | G2       |
225
      | Group 3 | C1     | G3       |
226
    And the following "group members" exist:
227
      | user     | group |
228
      | student1 | G1    |
229
      | student2 | G2    |
230
      | student3 | G3    |
231
    And the following "groupings" exist:
232
      | name       | course | idnumber |
233
      | Grouping 1 | C1     | GG1      |
234
    And the following "grouping groups" exist:
235
      | grouping | group |
236
      | GG1      | G1    |
237
      | GG1      | G2    |
238
      # Groupmode 1 = Separate Groups
239
    And the following "activity" exists:
240
      | activity                             | assign                       |
241
      | course                               | C1                           |
242
      | name                                 | Test assignment name         |
243
      | submissiondrafts                     | 0                            |
244
      | assignsubmission_onlinetext_enabled  | 1                            |
245
      | assignsubmission_file_enabled        | 0                            |
246
      | teamsubmission                       | 1                            |
247
      | attemptreopenmethod                  | manual                       |
248
      | requireallteammemberssubmit          | 0                            |
249
      | groupmode                            | 1                            |
250
      | teamsubmissiongroupingid             | GG1                          |
251
      | submissiondrafts                     | 0                            |
252
    And the following "mod_assign > submissions" exist:
253
      | assign                | user      | onlinetext                          |
254
      | Test assignment name  | student1  | I'm the student's first submission  |
255
      | Test assignment name  | student2  | I'm the student's first submission  |
256
      | Test assignment name  | student3  | I'm the student's first submission  |
257
    And I am on the "Test assignment name" Activity page logged in as admin
258
    And I should see "3" in the "Groups" "table_row"
259
    And I should see "3" in the "Submitted" "table_row"
260
    When I select "Group 1" from the "Separate groups" singleselect
261
    Then I should see "1" in the "Groups" "table_row"
262
    And I should see "1" in the "Submitted" "table_row"
263
    And I select "Group 2" from the "Separate groups" singleselect
264
    And I should see "1" in the "Groups" "table_row"
265
    And I should see "1" in the "Submitted" "table_row"
266
    And I select "Group 3" from the "Separate groups" singleselect
267
    And I should see "1" in the "Groups" "table_row"
268
    And I should see "1" in the "Submitted" "table_row"
269
 
270
  Scenario: Confirm that the submission status changes for each group member
271
    Given the following "group members" exist:
272
      | user     | group |
273
      | student1 | G1    |
274
      | student2 | G1    |
275
    And the following "activity" exists:
276
      | activity                             | assign                       |
277
      | course                               | C1                           |
278
      | name                                 | Test assignment name         |
279
      | submissiondrafts                     | 1                            |
280
      | assignsubmission_onlinetext_enabled  | 1                            |
281
      | assignsubmission_file_enabled        | 0                            |
282
      | teamsubmission                       | 1                            |
283
      | attemptreopenmethod                  | manual                       |
284
      | requireallteammemberssubmit          | 0                            |
285
      # Groupmode 0 = No Groups
286
      | groupmode                            | 0                            |
287
      | preventsubmissionnotingroup          | 0                            |
288
      | submissiondrafts                     | 0                            |
289
      | teamsubmission                       | 1                            |
290
    And the following "mod_assign > submissions" exist:
291
      | assign                | user      | onlinetext                          |
292
      | Test assignment name  | student1  | I'm the student's first submission  |
293
    And the following "blocks" exist:
294
      | blockname        | contextlevel | reference | pagetypepattern | defaultregion |
295
      | activity_modules | Course       | C1        | course-view-*   | side-pre      |
296
    And I am on the "C1" Course page logged in as student1
297
    And I click on "Assignments" "link" in the "Activities" "block"
298
    And I should see "Submitted for grading"
299
    And I am on the "C1" Course page logged in as student2
300
    And I click on "Assignments" "link" in the "Activities" "block"
301
    And I should see "Submitted for grading"
302
    And I am on the "Test assignment name" Activity page logged in as teacher1
1441 ariadna 303
    When I navigate to "Submissions" in current page administration
1 efrain 304
    Then "Student 1" row "Status" column of "generaltable" table should contain "Submitted for grading"
305
    And "Student 2" row "Status" column of "generaltable" table should contain "Submitted for grading"
306
 
307
  @javascript @_file_upload
308
  Scenario: Student can submit or edit group assignment depending on 'requireallteammemberssubmit' setting
309
    Given the following "courses" exist:
310
      | fullname | shortname | category | groupmode   |
311
      | Course 2 | C2        | 0        | 2           |
312
    And the following "course enrolments" exist:
313
      | user     | course | role           |
314
      | teacher1 | C2     | editingteacher |
315
      | student1 | C2     | student        |
316
      | student2 | C2     | student        |
317
    And the following "groups" exist:
318
      | name    | course | idnumber |
319
      | Group 1 | C2     | CG1      |
320
    And the following "group members" exist:
321
      | user     | group |
322
      | student1 | CG1   |
323
      | student2 | CG1   |
324
    And the following "activities" exist:
325
      | activity | course | name     | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled | assignsubmission_file_maxfiles | assignsubmission_file_maxsizebytes | submissiondrafts | teamsubmission | requireallteammemberssubmit |
326
      | assign   | C2     | Assign 1 | 1                                   | 1                             | 1                              | 2097152                            | 1                | 1              | 1                           |
327
      | assign   | C2     | Assign 2 | 1                                   | 1                             | 1                              | 2097152                            | 0                | 1              | 0                           |
328
    # Submit an assignment with 'requireallteammemberssubmit' setting enabled
329
    When I am on the "Assign 1" "assign activity" page logged in as student1
330
    Then I should see "Group 1"
331
    And I should not see "Student 2"
332
    And I press "Add submission"
333
    And I set the field "Online text" to "student1 submission"
334
    And I upload "lib/tests/fixtures/empty.txt" file to "File submissions" filemanager
335
    And I press "Save changes"
336
    # Confirm that Submission status remains as draft and all students appear because 'Submit assignment' was not yet clicked
337
    And I should see "Draft (not submitted)" in the "Submission status" "table_row"
338
    And I should see "Users who need to submit: Student 1, Student 2"
339
    And I press "Submit assignment"
340
    And I press "Continue"
341
    # Confirm that Submission status remains as draft and only student2 appears because student2 has not yet submitted assignment
342
    And I am on the "Assign 1" "assign activity" page logged in as student2
343
    And I should see "Draft (not submitted)" in the "Submission status" "table_row"
344
    And I should see "Users who need to submit: Student 2"
345
    And I press "Edit submission"
346
    And I set the field "Online text" to "student2 updated submission"
347
    And I delete "empty.txt" from "File submissions" filemanager
348
    And I upload "lib/tests/fixtures/tabfile.csv" file to "File submissions" filemanager
349
    And I press "Save changes"
350
    And I press "Submit assignment"
351
    And I press "Continue"
352
    # Confirm that Submission status is now Submitted for grading and all changes made by student2 is reflected on assignment
353
    And I am on the "Assign 1" "assign activity" page logged in as student1
354
    And I should see "Submitted for grading" in the "Submission status" "table_row"
355
    And I should see "student2 updated submission" in the "Online text" "table_row"
356
    And I should see "tabfile.csv" in the "File submissions" "table_row"
357
    And I should not see "student1 submission" in the "Online text" "table_row"
358
    And I should not see "empty.txt" in the "File submissions" "table_row"
359
    # Submit an assignment with 'requireallteammemberssubmit' disabled
360
    And I am on the "Assign 2" "assign activity" page logged in as student1
361
    And I should see "Group 1"
362
    And I should not see "Student 2"
363
    And I press "Add submission"
364
    And I set the field "Online text" to "student1 submission"
365
    And I upload "lib/tests/fixtures/empty.txt" file to "File submissions" filemanager
366
    And I press "Save changes"
367
    # Confirm that Submission status is immediately set to Submitted for grading for all students after student1 submits assignments
368
    And I am on the "Assign 2" "assign activity" page logged in as student2
369
    And I should see "Submitted for grading" in the "Submission status" "table_row"
370
    And I should not see "Users who need to submit"
371
 
372
  Scenario: Group submission does not use non-participation groups
373
    Given the following "groups" exist:
374
      | name    | course | idnumber | participation |
375
      | Group A | C1     | CG1      | 0             |
376
    And the following "group members" exist:
377
      | group  | user     |
378
      | CG1    | student1 |
379
    And the following "activity" exists:
380
      | activity         | assign                      |
381
      | course           | C1                          |
382
      | name             | Test assignment name        |
383
      | submissiondrafts | 0                           |
384
      | teamsubmission   | 1                           |
385
      | groupmode        | 1                           |
386
    When I am on the "Test assignment name" Activity page logged in as student1
387
    Then I should see "Default group"
388
    And I should not see "Group A"