Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@mod @mod_assign
2
Feature: Submit assignment without group
3
  As a teacher
4
  I should be able to prevent students submitting team assignments as members of the default group
5
 
6
  @javascript
7
  Scenario: Switch between group modes
8
    Given the following "courses" exist:
9
      | fullname | shortname | category | groupmode |
10
      | Course 1 | C1        | 0        | 1         |
11
      | Course 2 | C2        | 0        | 1         |
12
      | Course 3 | C3        | 0        | 1         |
13
    And the following "activities" exist:
14
      | activity | course | idnumber  | name                     | intro                       | assignsubmission_onlinetext_enabled | preventsubmissionnotingroup | teamsubmission |
15
      | assign   | C1     | c1assign1 | Allow default group      | Test assignment description | 1                                   | 0                           | 1              |
16
      | assign   | C1     | c1assign2 | Require group membership | Test assignment description | 1                                   | 1                           | 1              |
17
      | assign   | C2     | c2assign1 | Require group membership | Test assignment description | 1                                   | 1                           | 1              |
18
      | assign   | C3     | c3assign1 | Require group membership | Test assignment description | 1                                   | 1                           | 1              |
19
    And the following "users" exist:
20
      | username | firstname | lastname | email            |
21
      | teacher1 | Teacher   | 1        | teacher1@example.com |
22
      | student1 | Student   | 1        | student1@example.com |
23
      | student2 | Student   | 2        | student2@example.com |
24
      | student3 | Student   | 3        | student3@example.com |
25
    And the following "groups" exist:
26
      | name    | course | idnumber |
27
      | Group 1 | C2     | GC21     |
28
      | Group 1 | C3     | GC31     |
29
      | Group 2 | C3     | GC32     |
30
    And the following "course enrolments" exist:
31
      | user     | course | role           |
32
      | teacher1 | C1     | editingteacher |
33
      | student1 | C1     | student        |
34
      | student2 | C1     | student        |
35
      | teacher1 | C2     | editingteacher |
36
      | student1 | C2     | student        |
37
      | student2 | C2     | student        |
38
      | teacher1 | C3     | editingteacher |
39
      | student3 | C3     | student        |
40
    And the following "group members" exist:
41
      | user     | group |
42
      | student1 | GC21  |
43
      | student2 | GC21  |
44
      | student3 | GC31  |
45
      | student3 | GC32  |
46
    # Student 1 can only submit assignment in course 2.
47
    When I am on the "c1assign1" "assign activity" page logged in as student1
48
    Then I should not see "Not a member of any group"
49
    And I should not see "This assignment requires submission in groups. You are not a member of any group"
50
    And I should see "Nothing has been submitted for this assignment"
51
    And I press "Add submission"
52
    And I set the following fields to these values:
53
      | Online text | I'm the student submission |
54
    And I press "Save changes"
55
    And I press "Submit assignment"
56
    And I press "Continue"
57
    And I should see "Submitted for grading"
58
    And I am on the "c1assign2" "assign activity" page
59
    And I should see "Not a member of any group"
60
    And I should see "This assignment requires submission in groups. You are not a member of any group"
61
    And I should see "Nothing has been submitted for this assignment"
62
    And I should not see "Add submission"
63
    And I am on the "c2assign1" "assign activity" page
64
    And I should not see "Not a member of any group"
65
    And I should see "Nothing has been submitted for this assignment"
66
    And I press "Add submission"
67
    And I set the following fields to these values:
68
      | Online text | I'm the student submission |
69
    And I press "Save changes"
70
    And I press "Submit assignment"
71
    And I press "Continue"
72
    And I should see "Submitted for grading"
73
    And I log out
74
    # Student 2 should see submitted for grading.
75
    And I am on the "c1assign1" "assign activity" page logged in as student2
76
    And I should see "Submitted for grading"
77
    And I am on the "c2assign1" "assign activity" page
78
    And I should see "Submitted for grading"
79
    And I log out
80
    # Teacher should see student 1 and student 2 has submitted assignment.
81
    And I am on the "c1assign1" "assign activity" page logged in as teacher1
82
    And I should see "1" in the "Groups" "table_row"
83
    And I should not see "The setting 'Require group to make submission\' is enabled and some users are either not a member of any group, or are a member of more than one group, so are unable to make submissions."
84
    And I follow "View all submissions"
85
    And I should see "Default group" in the "Student 1" "table_row"
86
    And I should see "Default group" in the "Student 2" "table_row"
87
    And I should see "Submitted for grading" in the "Student 1" "table_row"
88
    And I should see "Submitted for grading" in the "Student 2" "table_row"
89
    And I am on the "c1assign2" "assign activity" page
90
    And I should see "0" in the "Groups" "table_row"
91
    And I should see "The setting 'Require group to make submission' is enabled and some users are either not a member of any group, or are a member of more than one group, so are unable to make submissions."
92
    And I follow "View all submissions"
93
    And I should see "Not a member of any group, so unable to make submissions." in the "Student 1" "table_row"
94
    And I should see "Not a member of any group, so unable to make submissions." in the "Student 2" "table_row"
95
    And I should not see "Submitted for grading" in the "Student 1" "table_row"
96
    And I should not see "Submitted for grading" in the "Student 2" "table_row"
97
    And I am on the "c2assign1" "assign activity" page
98
    And I should see "1" in the "Groups" "table_row"
99
    And I should not see "The setting 'Require group to make submission' is enabled and some users are either not a member of any group, or are a member of more than one group, so are unable to make submissions."
100
    And I follow "View all submissions"
101
    And I should see "Group 1" in the "Student 1" "table_row"
102
    And I should see "Group 1" in the "Student 2" "table_row"
103
    And I should see "Submitted for grading" in the "Student 1" "table_row"
104
    And I should see "Submitted for grading" in the "Student 2" "table_row"
105
    And I log out
106
    # Test student 3 (in multiple groups) should not be able to submit.
107
    And I am on the "c3assign1" "assign activity" page logged in as student3
108
    And I should see "Member of more than one group"
109
    And I should see "The assignment requires submission in groups. You are a member of more than one group."
110
    And I should see "Nothing has been submitted for this assignment"
111
    And I should not see "Add submission"
112
    And I log out
113
    And I am on the "c3assign1" "assign activity" page logged in as teacher1
114
    And I should see "The setting 'Require group to make submission' is enabled and some users are either not a member of any group, or are a member of more than one group, so are unable to make submissions."
115
    And I follow "View all submissions"
116
    And I should see "Member of more than one group, so unable to make submissions." in the "Student 3" "table_row"
117
 
118
  Scenario: All users are in groups, so no warning messages needed.
119
    Given the following "courses" exist:
120
      | fullname | shortname | groupmode |
121
      | Course 1 | C1        | 0         |
122
    And the following "activities" exist:
123
      | activity | course | idnumber | name                | intro                       | assignsubmission_onlinetext_enabled | preventsubmissionnotingroup | teamsubmission |
124
      | assign   | C1     | assign1  | Allow default group | Test assignment description | 1                                   | 0                           | 1              |
125
    And the following "users" exist:
126
      | username | firstname | lastname | email                |
127
      | teacher1 | Teacher   | 1        | teacher1@example.com |
128
      | student1 | Student   | 1        | student1@example.com |
129
      | student2 | Student   | 2        | student2@example.com |
130
    And the following "groups" exist:
131
      | name    | course | idnumber |
132
      | Group 1 | C1     | G1       |
133
      | Group 2 | C1     | G2       |
134
    And the following "course enrolments" exist:
135
      | user     | course | role           |
136
      | teacher1 | C1     | editingteacher |
137
      | student1 | C1     | student        |
138
      | student2 | C1     | student        |
139
    And the following "group members" exist:
140
      | user     | group |
141
      | student1 | G1    |
142
      | student2 | G2    |
143
    When I am on the "Allow default group" "assign activity" page logged in as teacher1
144
    Then I should not see "The setting 'Require group to make submission\' is enabled and some users are either not a member of any group, or are a member of more than one group, so are unable to make submissions."
145
    And I should not see "The setting 'Students submit in groups' is enabled and some users are either not a member of any group, or are a member of more than one group. Please be aware that these students will submit as members of the 'Default group'."
146
 
147
  Scenario: One user is not in a group, so should see a warning about default group submission
148
    Given the following "courses" exist:
149
      | fullname | shortname | groupmode |
150
      | Course 1 | C1        | 0         |
151
    And the following "activities" exist:
152
      | activity | course | idnumber | name                | intro                       | assignsubmission_onlinetext_enabled | preventsubmissionnotingroup | teamsubmission |
153
      | assign   | C1     | assign1  | Allow default group | Test assignment description | 1                                   | 0                           | 1              |
154
    And the following "users" exist:
155
      | username | firstname | lastname | email                |
156
      | teacher1 | Teacher   | 1        | teacher1@example.com |
157
      | student1 | Student   | 1        | student1@example.com |
158
      | student2 | Student   | 2        | student2@example.com |
159
    And the following "groups" exist:
160
      | name    | course | idnumber |
161
      | Group 1 | C1     | G1       |
162
      | Group 2 | C1     | G2       |
163
    And the following "course enrolments" exist:
164
      | user     | course | role           |
165
      | teacher1 | C1     | editingteacher |
166
      | student1 | C1     | student        |
167
      | student2 | C1     | student        |
168
    And the following "group members" exist:
169
      | user     | group |
170
      | student1 | G1    |
171
    When I am on the "Allow default group" "assign activity" page logged in as teacher1
172
    Then I should not see "The setting 'Require group to make submission\' is enabled and some users are either not a member of any group, or are a member of more than one group, so are unable to make submissions."
173
    And I should see "The setting 'Students submit in groups' is enabled and some users are either not a member of any group, or are a member of more than one group. Please be aware that these students will submit as members of the 'Default group'."
174
 
175
  Scenario: One user is a member of multiple groups, so should see a warning about default group submission
176
    Given the following "courses" exist:
177
      | fullname | shortname | groupmode |
178
      | Course 1 | C1        | 0         |
179
    And the following "activities" exist:
180
      | activity | course | idnumber | name                | intro                       | assignsubmission_onlinetext_enabled | preventsubmissionnotingroup | teamsubmission |
181
      | assign   | C1     | assign1  | Allow default group | Test assignment description | 1                                   | 0                           | 1              |
182
    And the following "users" exist:
183
      | username | firstname | lastname | email                |
184
      | teacher1 | Teacher   | 1        | teacher1@example.com |
185
      | student1 | Student   | 1        | student1@example.com |
186
      | student2 | Student   | 2        | student2@example.com |
187
    And the following "groups" exist:
188
      | name    | course | idnumber |
189
      | Group 1 | C1     | G1       |
190
      | Group 2 | C1     | G2       |
191
    And the following "course enrolments" exist:
192
      | user     | course | role           |
193
      | teacher1 | C1     | editingteacher |
194
      | student1 | C1     | student        |
195
      | student2 | C1     | student        |
196
    And the following "group members" exist:
197
      | user     | group |
198
      | student1 | G1    |
199
      | student2 | G1    |
200
      | student2 | G2    |
201
    When I am on the "Allow default group" "assign activity" page logged in as teacher1
202
    Then I should not see "The setting 'Require group to make submission\' is enabled and some users are either not a member of any group, or are a member of more than one group, so are unable to make submissions."
203
    And I should see "The setting 'Students submit in groups' is enabled and some users are either not a member of any group, or are a member of more than one group. Please be aware that these students will submit as members of the 'Default group'."