| Línea 218... |
Línea 218... |
| 218 |
And I press "Save"
|
218 |
And I press "Save"
|
| 219 |
Then I should see "This override is inactive"
|
219 |
Then I should see "This override is inactive"
|
| 220 |
And "Edit" "icon" should exist in the "Sam1 Student1" "table_row"
|
220 |
And "Edit" "icon" should exist in the "Sam1 Student1" "table_row"
|
| 221 |
And "copy" "icon" should exist in the "Sam1 Student1" "table_row"
|
221 |
And "copy" "icon" should exist in the "Sam1 Student1" "table_row"
|
| 222 |
And "Delete" "icon" should exist in the "Sam1 Student1" "table_row"
|
222 |
And "Delete" "icon" should exist in the "Sam1 Student1" "table_row"
|
| - |
|
223 |
|
| - |
|
224 |
@javascript
|
| - |
|
225 |
Scenario: Teachers can trigger grade penalty recalculation when modifying or deleting user overrides
|
| - |
|
226 |
Given I enable grade penalties for assignment
|
| - |
|
227 |
And the following "activity" exists:
|
| - |
|
228 |
| activity | assign |
|
| - |
|
229 |
| course | C1 |
|
| - |
|
230 |
| name | Test assignment penalty |
|
| - |
|
231 |
| intro | Test assignment description |
|
| - |
|
232 |
| grade | 100 |
|
| - |
|
233 |
| duedate | ##tomorrow## |
|
| - |
|
234 |
| gradepenalty | 1 |
|
| - |
|
235 |
| assignsubmission_onlinetext_enabled | 1 |
|
| - |
|
236 |
| submissiondrafts | 0 |
|
| - |
|
237 |
And the following "mod_assign > submissions" exist:
|
| - |
|
238 |
| assign | user | onlinetext |
|
| - |
|
239 |
| Test assignment name | student1 | I'm the student first submission |
|
| - |
|
240 |
# Add a user override with a due date set in the future.
|
| - |
|
241 |
And I am on the "Test assignment penalty" Activity page logged in as teacher1
|
| - |
|
242 |
And I navigate to "Overrides > Add user override" in current page administration
|
| - |
|
243 |
And I set the following fields to these values:
|
| - |
|
244 |
| Override user | Student1 |
|
| - |
|
245 |
| Due date | ##tomorrow +1day## |
|
| - |
|
246 |
And I press "Save"
|
| - |
|
247 |
And I change window size to "large"
|
| - |
|
248 |
And I go to "Sam1 Student1" "Test assignment penalty" activity advanced grading page
|
| - |
|
249 |
And I set the field "Grade out of 100" to "90"
|
| - |
|
250 |
And I set the field "Notify student" to "0"
|
| - |
|
251 |
And I press "Save changes"
|
| - |
|
252 |
And I follow "View all submissions"
|
| - |
|
253 |
And "Sam1 Student1" row "Grade" column of "submissions" table should contain "90.00"
|
| - |
|
254 |
And "Sam1 Student1" row "Final grade" column of "submissions" table should contain "90.00"
|
| - |
|
255 |
# Modify the user override by changing the due date to a past date.
|
| - |
|
256 |
And I navigate to "Overrides" in current page administration
|
| - |
|
257 |
And I click on "Edit" "link" in the "Sam1 Student1" "table_row"
|
| - |
|
258 |
When I set the following fields to these values:
|
| - |
|
259 |
| Recalculate penalty | Yes |
|
| - |
|
260 |
| Due date | ##yesterday## |
|
| - |
|
261 |
And I press "Save"
|
| - |
|
262 |
And I navigate to "Submissions" in current page administration
|
| - |
|
263 |
Then "Sam1 Student1" row "Grade" column of "submissions" table should contain "90.00"
|
| - |
|
264 |
And "Sam1 Student1" row "Final grade" column of "submissions" table should contain "80.00"
|
| - |
|
265 |
# Delete the user override.
|
| - |
|
266 |
And I navigate to "Overrides" in current page administration
|
| - |
|
267 |
And I click on "Delete" "link" in the "Sam1 Student1" "table_row"
|
| - |
|
268 |
And I click on "Recalculate penalty for user(s) in the override" "checkbox" in the "Confirm" "dialogue"
|
| - |
|
269 |
And I click on "Continue" "button" in the "Confirm" "dialogue"
|
| - |
|
270 |
And I navigate to "Submissions" in current page administration
|
| - |
|
271 |
And "Sam1 Student1" row "Grade" column of "submissions" table should contain "90.00"
|
| - |
|
272 |
And "Sam1 Student1" row "Final grade" column of "submissions" table should contain "90.00"
|