Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_grades
2
Feature: Weights in natural aggregation are adjusted if the items are excluded from user report
3
  In order to correctly display user report
4
  As a teacher
5
  I need to be able to exclude hidden grades.
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                | idnumber |
13
      | teacher1 | Teacher   | 1        | teacher1@example.com | t1       |
14
      | student1 | Student   | 1        | student1@example.com | s1       |
15
    And the following "course enrolments" exist:
16
      | user | course | role |
17
      | teacher1 | C1 | editingteacher |
18
      | student1 | C1 | student |
19
    And the following "activities" exist:
20
      | activity | course | idnumber | name                         | intro | grade |
21
      | assign   | C1     | a1       | Test assignment one          | x     | 100   |
22
      | assign   | C1     | a2       | Test assignment two          | x     | 50    |
23
      | assign   | C1     | a3       | Test assignment three        | x     | 200   |
24
      | assign   | C1     | a4       | Test assignment four (extra) | x     | 20    |
25
      | assign   | C1     | a5       | Test assignment five (extra) | x     | 10    |
26
    And I am on the "Course 1" "grades > gradebook setup" page logged in as "teacher1"
27
    And I set the following settings for grade item "Test assignment four (extra)" of type "gradeitem" on "setup" page:
28
      | Extra credit | 1 |
29
    And I set the following settings for grade item "Test assignment five (extra)" of type "gradeitem" on "setup" page:
30
      | Extra credit | 1 |
31
 
32
  @javascript
33
  Scenario: No weights are overridden and student has all grades present
34
    When I navigate to "View > Grader report" in the course gradebook
35
    And I turn editing mode on
36
    And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one"
37
    And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two"
38
    And I give the grade "150.00" to the user "Student 1" for the grade item "Test assignment three"
39
    And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)"
40
    And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)"
41
    And I press "Save changes"
42
    And I navigate to "View > User report" in the course gradebook
43
    And I click on "Student 1" in the "user" search widget
44
    Then the following should exist in the "user-grade" table:
45
      | Grade item                   | Calculated weight      | Grade  | Range | Percentage | Contribution to course total |
46
      | Test assignment one          | 28.57 %                | 80.00  | 0–100 | 80.00 %    | 22.86 %                      |
47
      | Test assignment two          | 14.29 %                | 30.00  | 0–50  | 60.00 %    | 8.57 %                       |
48
      | Test assignment three        | 57.14 %                | 150.00 | 0–200 | 75.00 %    | 42.86 %                      |
49
      | Test assignment four (extra) | 5.71 %( Extra credit ) | 10.00  | 0–20  | 50.00 %    | 2.86 %                       |
50
      | Test assignment five (extra) | 2.86 %( Extra credit ) | 8.00   | 0–10  | 80.00 %    | 2.29 %                       |
51
      | Course total                 | -                      | 278.00 | 0–350 | 79.43 %    | -                            |
52
    And I log out
53
 
54
  @javascript
55
  Scenario: No weights are overridden, student has some grades present
56
    When I navigate to "View > Grader report" in the course gradebook
57
    And I turn editing mode on
58
    And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one"
59
    And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two"
60
    And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)"
61
    And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)"
62
    And I press "Save changes"
63
    And I navigate to "View > User report" in the course gradebook
64
    And I click on "Student 1" in the "user" search widget
65
    Then the following should exist in the "user-grade" table:
66
      | Grade item                   | Calculated weight       | Grade  | Range | Percentage | Contribution to course total |
67
      | Test assignment one          | 66.67 %                 | 80.00  | 0–100 | 80.00 %    | 53.33 %                      |
68
      | Test assignment two          | 33.33 %                 | 30.00  | 0–50  | 60.00 %    | 20.00 %                      |
69
      | Test assignment three        | 0.00 %( Empty )         | -      | 0–200 | -          | 0.00 %                       |
70
      | Test assignment four (extra) | 13.33 %( Extra credit ) | 10.00  | 0–20  | 50.00 %    | 6.67 %                       |
71
      | Test assignment five (extra) | 6.67 %( Extra credit )  | 8.00   | 0–10  | 80.00 %    | 5.33 %                       |
72
      | Course total                 | -                       | 128.00 | 0–150 | 85.33 %    | -                            |
73
    And I log out
74
 
75
  @javascript
76
  Scenario: No weights are overridden, student has none grades present except for extra credit
77
    When I navigate to "View > Grader report" in the course gradebook
78
    And I turn editing mode on
79
    And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)"
80
    And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)"
81
    And I press "Save changes"
82
    And I navigate to "View > User report" in the course gradebook
83
    And I click on "Student 1" in the "user" search widget
84
    Then the following should exist in the "user-grade" table:
85
      | Grade item                   | Calculated weight      | Grade | Range | Percentage | Contribution to course total |
86
      | Test assignment one          | 0.00 %( Empty )        | -     | 0–100 | -          | 0.00 %                       |
87
      | Test assignment two          | 0.00 %( Empty )        | -     | 0–50  | -          | 0.00 %                       |
88
      | Test assignment three        | 0.00 %( Empty )        | -     | 0–200 | -          | 0.00 %                       |
89
      | Test assignment four (extra) | 0.00 %( Extra credit ) | 10.00 | 0–20  | 50.00 %    | 0.00 %                       |
90
      | Test assignment five (extra) | 0.00 %( Extra credit ) | 8.00  | 0–10  | 80.00 %    | 0.00 %                       |
91
      | Course total                 | -                      | 0.00  | 0–0   |            | -                            |
92
    And I log out
93
 
94
  @javascript
95
  Scenario: Make sure there are no errors when all items are marked as extra credit
96
    And I set the following settings for grade item "Test assignment one" of type "gradeitem" on "setup" page:
97
      | Extra credit | 1 |
98
    And I set the following settings for grade item "Test assignment two" of type "gradeitem" on "setup" page:
99
      | Extra credit | 1 |
100
    And I set the following settings for grade item "Test assignment three" of type "gradeitem" on "setup" page:
101
      | Extra credit | 1 |
102
    When I navigate to "View > Grader report" in the course gradebook
103
    And I turn editing mode on
104
    And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one"
105
    And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two"
106
    And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)"
107
    And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)"
108
    And I press "Save changes"
109
    And I navigate to "View > User report" in the course gradebook
110
    And I click on "Student 1" in the "user" search widget
111
    Then the following should exist in the "user-grade" table:
112
      | Grade item                   | Calculated weight      | Grade | Range | Percentage | Contribution to course total |
113
      | Test assignment one          | 0.00 %( Extra credit ) | 80.00 | 0–100 | 80.00 %    | 0.00 %                       |
114
      | Test assignment two          | 0.00 %( Extra credit ) | 30.00 | 0–50  | 60.00 %    | 0.00 %                       |
115
      | Test assignment three        | 0.00 %( Empty )        | -     | 0–200 | -          | 0.00 %                       |
116
      | Test assignment four (extra) | 0.00 %( Extra credit ) | 10.00 | 0–20  | 50.00 %    | 0.00 %                       |
117
      | Test assignment five (extra) | 0.00 %( Extra credit ) | 8.00  | 0–10  | 80.00 %    | 0.00 %                       |
118
      | Course total                 | -                      | 0.0   | 0–0   |            | -                            |
119
    And I log out
120
 
121
  @javascript
122
  Scenario: Weights are overridden and student has all grades present
123
    When I set the field "Override weight of Test assignment one" to "1"
124
    And I set the field "Weight of Test assignment one" to "50"
125
    And I press "Save changes"
126
    And I navigate to "View > Grader report" in the course gradebook
127
    And I turn editing mode on
128
    And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one"
129
    And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two"
130
    And I give the grade "150.00" to the user "Student 1" for the grade item "Test assignment three"
131
    And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)"
132
    And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)"
133
    And I press "Save changes"
134
    And I navigate to "View > User report" in the course gradebook
135
    And I click on "Student 1" in the "user" search widget
136
    Then the following should exist in the "user-grade" table:
137
      | Grade item                   | Calculated weight      | Grade  | Range | Percentage | Contribution to course total |
138
      | Test assignment one          | 50.00 %                | 80.00  | 0–100 | 80.00 %    | 40.00 %                      |
139
      | Test assignment two          | 10.00 %                | 30.00  | 0–50  | 60.00 %    | 6.00 %                       |
140
      | Test assignment three        | 40.00 %                | 150.00 | 0–200 | 75.00 %    | 30.00 %                      |
141
      | Test assignment four (extra) | 5.71 %( Extra credit ) | 10.00  | 0–20  | 50.00 %    | 2.86 %                       |
142
      | Test assignment five (extra) | 2.86 %( Extra credit ) | 8.00   | 0–10  | 80.00 %    | 2.29 %                       |
143
      | Course total                 | -                      | 284.00 | 0–350 | 81.14 %    | -                            |
144
    And I log out
145
 
146
  @javascript
147
  Scenario: Weights are overridden and student has some grades present
148
    When I set the field "Override weight of Test assignment one" to "1"
149
    And I set the field "Weight of Test assignment one" to "50"
150
    And I press "Save changes"
151
    And I navigate to "View > Grader report" in the course gradebook
152
    And I turn editing mode on
153
    And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one"
154
    And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two"
155
    And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)"
156
    And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)"
157
    And I press "Save changes"
158
    And I navigate to "View > User report" in the course gradebook
159
    And I click on "Student 1" in the "user" search widget
160
    Then the following should exist in the "user-grade" table:
161
      | Grade item                   | Calculated weight       | Grade  | Range | Percentage | Contribution to course total |
162
      | Test assignment one          | 83.33 %                 | 80.00  | 0–100 | 80.00 %    | 66.67 %                      |
163
      | Test assignment two          | 16.67 %                 | 30.00  | 0–50  | 60.00 %    | 10.00 %                      |
164
      | Test assignment three        | 0.00 %( Empty )         | -      | 0–200 | -          | 0.00 %                       |
165
      | Test assignment four (extra) | 13.33 %( Extra credit ) | 10.00  | 0–20  | 50.00 %    | 6.67 %                       |
166
      | Test assignment five (extra) | 6.67 %( Extra credit )  | 8.00   | 0–10  | 80.00 %    | 5.33 %                       |
167
      | Course total                 | -                       | 133.00 | 0–150 | 88.67 %    | -                            |
168
    And I log out
169
 
170
  @javascript
171
  Scenario: Weights are overridden, student has none grades present except for extra credit
172
    When I set the field "Override weight of Test assignment one" to "1"
173
    And I set the field "Weight of Test assignment one" to "50"
174
    And I press "Save changes"
175
    And I navigate to "View > Grader report" in the course gradebook
176
    And I turn editing mode on
177
    And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)"
178
    And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)"
179
    And I press "Save changes"
180
    And I navigate to "View > User report" in the course gradebook
181
    And I click on "Student 1" in the "user" search widget
182
    Then the following should exist in the "user-grade" table:
183
      | Grade item                   | Calculated weight      | Grade | Range | Percentage | Contribution to course total |
184
      | Test assignment one          | 0.00 %( Empty )        | -     | 0–100 | -          | 0.00 %                       |
185
      | Test assignment two          | 0.00 %( Empty )        | -     | 0–50  | -          | 0.00 %                       |
186
      | Test assignment three        | 0.00 %( Empty )        | -     | 0–200 | -          | 0.00 %                       |
187
      | Test assignment four (extra) | 0.00 %( Extra credit ) | 10.00 | 0–20  | 50.00 %    | 0.00 %                       |
188
      | Test assignment five (extra) | 0.00 %( Extra credit ) | 8.00  | 0–10  | 80.00 %    | 0.00 %                       |
189
      | Course total                 | -                      | 0.00  | 0–0   |            | -                            |
190
    And I log out
191
 
192
  @javascript
193
  Scenario: Weights are overridden, including extra credit, and student has all grades present
194
    When I set the field "Override weight of Test assignment one" to "1"
195
    And I set the field "Weight of Test assignment one" to "50"
196
    And I set the field "Override weight of Test assignment four (extra)" to "1"
197
    And I set the field "Weight of Test assignment four (extra)" to "10"
198
    And I press "Save changes"
199
    And I navigate to "View > Grader report" in the course gradebook
200
    And I turn editing mode on
201
    And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one"
202
    And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two"
203
    And I give the grade "150.00" to the user "Student 1" for the grade item "Test assignment three"
204
    And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)"
205
    And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)"
206
    And I press "Save changes"
207
    And I navigate to "View > User report" in the course gradebook
208
    And I click on "Student 1" in the "user" search widget
209
    Then the following should exist in the "user-grade" table:
210
      | Grade item                   | Calculated weight       | Grade  | Range | Percentage | Contribution to course total |
211
      | Test assignment one          | 50.00 %                 | 80.00  | 0–100 | 80.00 %    | 40.00 %                      |
212
      | Test assignment two          | 10.00 %                 | 30.00  | 0–50  | 60.00 %    | 6.00 %                       |
213
      | Test assignment three        | 40.00 %                 | 150.00 | 0–200 | 75.00 %    | 30.00 %                      |
214
      | Test assignment four (extra) | 10.00 %( Extra credit ) | 10.00  | 0–20  | 50.00 %    | 5.00 %                       |
215
      | Test assignment five (extra) | 2.86 %( Extra credit )  | 8.00   | 0–10  | 80.00 %    | 2.29 %                       |
216
      | Course total                 | -                       | 291.50 | 0–350 | 83.29 %    | -                            |
217
    And I log out
218
 
219
  @javascript
220
  Scenario: Weights are overridden, including extra credit, and student has some grades present
221
    When I set the field "Override weight of Test assignment one" to "1"
222
    And I set the field "Weight of Test assignment one" to "50"
223
    And I set the field "Override weight of Test assignment four (extra)" to "1"
224
    And I set the field "Weight of Test assignment four (extra)" to "10"
225
    And I press "Save changes"
226
    And I navigate to "View > Grader report" in the course gradebook
227
    And I turn editing mode on
228
    And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one"
229
    And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two"
230
    And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)"
231
    And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)"
232
    And I press "Save changes"
233
    And I navigate to "View > User report" in the course gradebook
234
    And I click on "Student 1" in the "user" search widget
235
    Then the following should exist in the "user-grade" table:
236
      | Grade item                   | Calculated weight       | Grade  | Range | Percentage | Contribution to course total |
237
      | Test assignment one          | 83.33 %                 | 80.00  | 0–100 | 80.00 %    | 66.67 %                      |
238
      | Test assignment two          | 16.67 %                 | 30.00  | 0–50  | 60.00 %    | 10.00 %                      |
239
      | Test assignment three        | 0.00 %( Empty )         | -      | 0–200 | -          | 0.00 %                       |
240
      | Test assignment four (extra) | 16.67 %( Extra credit ) | 10.00  | 0–20  | 50.00 %    | 8.33 %                       |
241
      | Test assignment five (extra) | 6.67 %( Extra credit )  | 8.00   | 0–10  | 80.00 %    | 5.33 %                       |
242
      | Course total                 | -                       | 135.50 | 0–150 | 90.33 %    | -                            |
243
    And I log out
244
 
245
  @javascript
246
  Scenario: Weights are overridden, including extra credit, student has none grades present except for extra credit
247
    When I set the field "Override weight of Test assignment one" to "1"
248
    And I set the field "Weight of Test assignment one" to "50"
249
    And I set the field "Override weight of Test assignment four (extra)" to "1"
250
    And I set the field "Weight of Test assignment four (extra)" to "10"
251
    And I press "Save changes"
252
    And I navigate to "View > Grader report" in the course gradebook
253
    And I turn editing mode on
254
    And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)"
255
    And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)"
256
    And I press "Save changes"
257
    And I navigate to "View > User report" in the course gradebook
258
    And I click on "Student 1" in the "user" search widget
259
    Then the following should exist in the "user-grade" table:
260
      | Grade item                   | Calculated weight      | Grade | Range | Percentage | Contribution to course total |
261
      | Test assignment one          | 0.00 %( Empty )        | -     | 0–100 | -          | 0.00 %                       |
262
      | Test assignment two          | 0.00 %( Empty )        | -     | 0–50  | -          | 0.00 %                       |
263
      | Test assignment three        | 0.00 %( Empty )        | -     | 0–200 | -          | 0.00 %                       |
264
      | Test assignment four (extra) | 0.00 %( Extra credit ) | 10.00 | 0–20  | 50.00 %    | 0.00 %                       |
265
      | Test assignment five (extra) | 0.00 %( Extra credit ) | 8.00  | 0–10  | 80.00 %    | 0.00 %                       |
266
      | Course total                 | -                      | 0.00  | 0–0   |            | -                            |
267
    And I log out