Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_grades @javascript
2
Feature: We can set the grade to pass value
3
  In order to set the grade to pass value
4
  As a teacher
5
  I assign a grade to pass to an activity while editing the activity.
6
  I need to ensure that the grade to pass is visible in the gradebook.
7
 
8
  Background:
9
    Given the following "users" exist:
10
      | username | firstname | lastname | email                |
11
      | teacher1 | Teacher   | 1        | teacher1@example.com |
12
    And the following "courses" exist:
13
      | fullname | shortname | format | numsections |
14
      | Course 1 | C1        | weeks  | 5           |
15
    And the following "course enrolments" exist:
16
      | user     | course | role           |
17
      | teacher1 | C1     | editingteacher |
18
    And the following "scales" exist:
19
      | name         | scale                                     |
20
      | Test Scale 1 | Disappointing, Good, Very good, Excellent |
21
    And the following "activity" exists:
22
      | activity                            | assign                  |
23
      | course                              | C1                      |
24
      | section                             | 1                       |
25
      | idnumber                            | assign1                 |
26
      | name                                | Test Assignment 1       |
27
      | intro                               | Submit your online text |
28
      | assignsubmission_onlinetext_enabled | 1                       |
29
    And I am on the "Course 1" course page logged in as teacher1
30
 
31
  Scenario: Validate that switching the type of grading used correctly disables grade to pass
32
    Given I turn editing mode on
33
    And I am on the "Test Assignment 1" "assign activity" page
34
    And I navigate to "Settings" in current page administration
35
    And I expand all fieldsets
36
    And I set the field "grade[modgrade_type]" to "Point"
37
    Then the "Grade to pass" "field" should be enabled
38
    And I set the field "grade[modgrade_type]" to "None"
39
    And the "Grade to pass" "field" should be disabled
40
    And I press "Save and return to course"
41
 
42
  Scenario: Create an activity with a Grade to pass value greater than the maximum grade
43
    When I turn editing mode on
44
    And I am on the "Test Assignment 1" "assign activity" page
45
    And I navigate to "Settings" in current page administration
46
    And I expand all fieldsets
47
    And I set the field "grade[modgrade_type]" to "Point"
48
    And I set the field "grade[modgrade_point]" to "50"
49
    And I set the field "Grade to pass" to "100"
50
    And I press "Save and return to course"
51
    Then I should see "The grade to pass can not be greater than the maximum possible grade 50"
52
    And I press "Cancel"
53
 
54
  Scenario: Set a valid grade to pass for an assignment activity using points
55
    When I turn editing mode on
56
    And I am on the "Test Assignment 1" "assign activity" page
57
    And I navigate to "Settings" in current page administration
58
    And I set the following fields to these values:
59
      | assignsubmission_onlinetext_enabled | 1 |
60
      | grade[modgrade_type] | Point |
61
      | grade[modgrade_point] | 50 |
62
      | Grade to pass | 25 |
63
    And I press "Save and return to course"
64
    And I navigate to "View > Grader report" in the course gradebook
65
    And I click on grade item menu "Test Assignment 1" of type "gradeitem" on "grader" page
66
    And I choose "Edit grade item" in the open action menu
67
    And I click on "Show more..." "link" in the ".modal-dialog" "css_element"
68
    Then the field "Grade to pass" matches value "25"
69
    And I am on "Course 1" course homepage
70
    And I am on the "Test Assignment 1" "assign activity" page
71
    And I navigate to "Settings" in current page administration
72
    And I expand all fieldsets
73
    And I set the field "Grade to pass" to "30"
74
    And I press "Save and return to course"
75
    And I navigate to "View > Grader report" in the course gradebook
76
    And I click on grade item menu "Test Assignment 1" of type "gradeitem" on "grader" page
77
    And I choose "Edit grade item" in the open action menu
78
    And I click on "Show more..." "link" in the ".modal-dialog" "css_element"
79
    And the field "Grade to pass" matches value "30"
80
 
81
  Scenario: Set a valid grade to pass for an assignment activity using scales
82
    When I turn editing mode on
83
    And I am on the "Test Assignment 1" "assign activity" page
84
    And I navigate to "Settings" in current page administration
85
    And I set the following fields to these values:
86
      | grade[modgrade_type] | Scale |
87
      | grade[modgrade_scale] | Test Scale 1 |
88
      | Grade to pass | 3 |
89
    And I press "Save and return to course"
90
    And I navigate to "View > Grader report" in the course gradebook
91
    And I click on grade item menu "Test Assignment 1" of type "gradeitem" on "grader" page
92
    And I choose "Edit grade item" in the open action menu
93
    And I click on "Show more..." "link" in the ".modal-dialog" "css_element"
94
    Then the field "Grade to pass" matches value "3"
95
    And I set the field "Grade to pass" to "4"
96
    And I press "Save changes"
97
    And I am on "Course 1" course homepage
98
    And I am on the "Test Assignment 1" "assign activity" page
99
    And I navigate to "Settings" in current page administration
100
    And the field "Grade to pass" matches value "4"
101
 
102
  Scenario: Set a invalid grade to pass for an assignment activity using scales
103
    When I turn editing mode on
104
    And I am on the "Test Assignment 1" "assign activity" page
105
    And I navigate to "Settings" in current page administration
106
    And I set the following fields to these values:
107
      | grade[modgrade_type] | Scale |
108
      | grade[modgrade_scale] | Test Scale 1 |
109
      | Grade to pass | 10 |
110
    And I press "Save and return to course"
111
    Then I should see "The grade to pass can not be greater than the maximum possible grade 4"
112
 
113
  Scenario: Set a valid grade to pass for workshop activity
114
    Given the following "activities" exist:
115
      | activity   | name              | course | idnumber  |
116
      | workshop   | Test Workshop 1   | C1     | workshop1 |
117
    And I am on "Course 1" course homepage with editing mode on
118
    And I am on the "Test Workshop 1" "workshop activity editing" page
119
    And I set the following fields to these values:
120
      | grade | 80 |
121
      | Submission grade to pass | 40 |
122
      | gradinggrade | 20 |
123
      | Assessment grade to pass | 10 |
124
    And I press "Save and return to course"
125
    And I navigate to "View > Grader report" in the course gradebook
126
    And I click on grade item menu "Test Workshop 1 (submission)" of type "gradeitem" on "grader" page
127
    And I choose "Edit grade item" in the open action menu
128
    And I click on "Show more..." "link" in the ".modal-dialog" "css_element"
129
    Then the field "Grade to pass" matches value "40"
130
    And I set the field "Grade to pass" to "45"
131
    And I press "Save changes"
132
    And I click on grade item menu "Test Workshop 1 (assessment)" of type "gradeitem" on "grader" page
133
    And I choose "Edit grade item" in the open action menu
134
    And I click on "Show more..." "link" in the ".modal-dialog" "css_element"
135
    And the field "Grade to pass" matches value "10"
136
    And I set the field "Grade to pass" to "15"
137
    And I press "Save changes"
138
    And I am on the "Test Workshop 1" "workshop activity editing" page
139
    And the field "Submission grade to pass" matches value "45"
140
    And the field "Assessment grade to pass" matches value "15"
141
 
142
  Scenario: Set an invalid grade to pass for workshop activity
143
    Given the following "activities" exist:
144
      | activity   | name              | course | idnumber  |
145
      | workshop   | Test Workshop 1   | C1     | workshop1 |
146
    And I am on "Course 1" course homepage with editing mode on
147
    And I am on the "Test Workshop 1" "workshop activity editing" page
148
    And I set the following fields to these values:
149
      | grade | 80 |
150
      | Submission grade to pass | 90 |
151
      | gradinggrade | 20 |
152
      | Assessment grade to pass | 30 |
153
    And I press "Save and return to course"
154
    Then "The grade to pass can not be greater than the maximum possible grade 80" "text" should exist in the "Submission grade to pass" "form_row"
155
    Then "The grade to pass can not be greater than the maximum possible grade 20" "text" should exist in the "Assessment grade to pass" "form_row"
156
 
157
  Scenario: Set a valid grade to pass for quiz activity
158
    Given the following "activities" exist:
159
      | activity   | name          | course | section | idnumber  |
160
      | quiz       | Test Quiz 1   | C1     | 1       | quiz1     |
161
    And I am on "Course 1" course homepage with editing mode on
162
    And I am on the "Test Quiz 1" "quiz activity" page
163
    And I navigate to "Settings" in current page administration
164
    And I set the following fields to these values:
165
      | Grade to pass | 9.5 |
166
    And I press "Save and return to course"
167
    And I navigate to "View > Grader report" in the course gradebook
168
    And I click on grade item menu "Test Quiz 1" of type "gradeitem" on "grader" page
169
    And I choose "Edit grade item" in the open action menu
170
    And I click on "Show more..." "link" in the ".modal-dialog" "css_element"
171
    Then the field "Grade to pass" matches value "9.5"
172
    And I set the field "Grade to pass" to "8"
173
    And I press "Save changes"
174
    And I am on "Course 1" course homepage
175
    And I am on the "Test Quiz 1" "quiz activity" page
176
    And I follow "Settings"
177
    And the field "Grade to pass" matches value "8.00"
178
 
179
  Scenario: Set a valid grade to pass for lesson activity
180
    Given the following "activities" exist:
181
      | activity   | name          | course | idnumber  |
182
      | lesson     | Test Lesson 1 | C1     | lesson1   |
183
    And I am on "Course 1" course homepage with editing mode on
184
    And I am on the "Test Lesson 1" "lesson activity editing" page
185
    And I set the following fields to these values:
186
      | Grade to pass | 90            |
187
    And I press "Save and return to course"
188
    And I navigate to "View > Grader report" in the course gradebook
189
    And I click on grade item menu "Test Lesson 1" of type "gradeitem" on "grader" page
190
    And I choose "Edit grade item" in the open action menu
191
    And I click on "Show more..." "link" in the ".modal-dialog" "css_element"
192
    Then the field "Grade to pass" matches value "90"
193
    And I set the field "Grade to pass" to "80"
194
    And I press "Save changes"
195
    And I am on the "Test Lesson 1" "lesson activity editing" page
196
    And the field "Grade to pass" matches value "80"
197
 
198
  Scenario: Set a valid grade to pass for lesson activity with custom decimal separator
199
    Given the following "activities" exist:
200
      | activity   | name          | course | idnumber  |
201
      | lesson     | Test Lesson 1 | C1     | lesson1   |
202
    And the following "language customisations" exist:
203
      | component       | stringid | value |
204
      | core_langconfig | decsep   | #     |
205
    And I am on "Course 1" course homepage with editing mode on
206
    And I am on the "Test Lesson 1" "lesson activity editing" page
207
    And I set the following fields to these values:
208
      | Grade to pass | 90#50 |
209
    And I press "Save and return to course"
210
    And I navigate to "View > Grader report" in the course gradebook
211
    And I click on grade item menu "Test Lesson 1" of type "gradeitem" on "grader" page
212
    And I choose "Edit grade item" in the open action menu
213
    And I click on "Show more..." "link" in the ".modal-dialog" "css_element"
214
    Then the field "Grade to pass" matches value "90#50"
215
    And I set the field "Grade to pass" to "80"
216
    And I press "Save changes"
217
    And I am on the "Test Lesson 1" "lesson activity editing" page
218
    And the field "Grade to pass" matches value "80#00"
219
 
220
  Scenario: Set a valid grade to pass for database activity
221
    Given the following "activities" exist:
222
      | activity   | name            | intro       | course | section | idnumber  |
223
      | data       | Test Database 1 | Test        | C1     | 1       | data1     |
224
    And I am on "Course 1" course homepage with editing mode on
225
    And I am on the "Test Database 1" "data activity" page
226
    And I navigate to "Settings" in current page administration
227
    And I expand all fieldsets
228
    And I set the following fields to these values:
229
      | Ratings > Aggregate type | Average of ratings |
230
      | id_scale_modgrade_type   | Point              |
231
      | Ratings > Grade to pass  | 90                 |
232
    And I press "Save and return to course"
233
    And I navigate to "View > Grader report" in the course gradebook
234
    And I click on grade item menu "Test Database 1" of type "gradeitem" on "grader" page
235
    And I choose "Edit grade item" in the open action menu
236
    And I click on "Show more..." "link" in the ".modal-dialog" "css_element"
237
    Then the field "Grade to pass" matches value "90"
238
    And I set the field "Grade to pass" to "80"
239
    And I press "Save changes"
240
    And I am on "Course 1" course homepage
241
    And I am on the "Test Database 1" "data activity" page
242
    And I follow "Settings"
243
    And the field "Grade to pass" matches value "80"
244
 
245
  Scenario: Set an invalid grade to pass for forum activity
246
    Given the following "activities" exist:
247
      | activity    | name         | course | idnumber  |
248
      | forum       | Test Forum 1 | C1     | forum1    |
249
    And I am on the "Test Forum 1" "forum activity editing" page
250
    And I expand all fieldsets
251
    And I set the following fields to these values:
252
      | Ratings > Aggregate type        | Average of ratings |
253
      | id_scale_modgrade_type          | Point              |
254
      | Ratings > Grade to pass         | 90                 |
255
      | Ratings > scale[modgrade_point] | 60                 |
256
    And I press "Save and return to course"
257
    Then I should see "The grade to pass can not be greater than the maximum possible grade 60"
258
 
259
  Scenario: Set a valid grade to pass for forum activity
260
    Given the following "activities" exist:
261
      | activity    | name         | course | idnumber  |
262
      | forum       | Test Forum 1 | C1     | forum1    |
263
    And I am on "Course 1" course homepage with editing mode on
264
    And I am on the "Test Forum 1" "forum activity editing" page
265
    And I expand all fieldsets
266
    And I set the following fields to these values:
267
      | Ratings > Aggregate type | Average of ratings |
268
      | id_scale_modgrade_type   | Point              |
269
      | Ratings > Grade to pass  | 90                 |
270
    And I press "Save and return to course"
271
    And I navigate to "View > Grader report" in the course gradebook
272
    And I click on grade item menu "Test Forum 1 rating" of type "gradeitem" on "grader" page
273
    And I choose "Edit grade item" in the open action menu
274
    And I click on "Show more..." "link" in the ".modal-dialog" "css_element"
275
    Then the field "Grade to pass" matches value "90"
276
    And I set the field "Grade to pass" to "80"
277
    And I press "Save changes"
278
    And I am on the "Test Forum 1" "forum activity editing" page
279
    And the field "Ratings > Grade to pass" matches value "80"
280
 
281
  Scenario: Set a valid grade to pass for glossary activity
282
    Given the following "activities" exist:
283
      | activity    | name            | intro       | course | section | idnumber  |
284
      | glossary    | Test Glossary 1 | Test        | C1     | 1       | glossary1 |
285
    And I am on "Course 1" course homepage with editing mode on
286
    And I am on the "Test Glossary 1" "glossary activity" page
287
    And I navigate to "Settings" in current page administration
288
    And I set the following fields to these values:
289
      | Ratings > Aggregate type | Average of ratings |
290
      | id_scale_modgrade_type   | Point              |
291
      | Ratings > Grade to pass  | 90                 |
292
    And I press "Save and return to course"
293
    And I navigate to "View > Grader report" in the course gradebook
294
    And I click on grade item menu "Test Glossary 1" of type "gradeitem" on "grader" page
295
    And I choose "Edit grade item" in the open action menu
296
    And I click on "Show more..." "link" in the ".modal-dialog" "css_element"
297
    Then the field "Grade to pass" matches value "90"
298
    And I set the field "Grade to pass" to "80"
299
    And I press "Save changes"
300
    And I am on "Course 1" course homepage
301
    And I am on the "Test Glossary 1" "glossary activity" page
302
    And I follow "Settings"
303
    And the field "Grade to pass" matches value "80"