1 |
efrain |
1 |
@mod @mod_h5pactivity @core_h5p
|
|
|
2 |
Feature: Teacher can reset H5P activity grades
|
|
|
3 |
As a teacher,
|
|
|
4 |
I should be able to reset H5P activity grades
|
|
|
5 |
|
|
|
6 |
Background:
|
|
|
7 |
Given the following "users" exist:
|
|
|
8 |
| username | firstname | lastname | email |
|
|
|
9 |
| teacher1 | Teacher | One | teacher1@example.com |
|
|
|
10 |
| student1 | First | Student | student1@example.com |
|
|
|
11 |
| student2 | Second | Student | student2@example.com |
|
|
|
12 |
| student3 | Third | Student | student3@example.com |
|
|
|
13 |
And the following "courses" exist:
|
|
|
14 |
| fullname | shortname | category |
|
|
|
15 |
| Course 1 | C1 | 0 |
|
|
|
16 |
And the following "course enrolments" exist:
|
|
|
17 |
| user | course | role |
|
|
|
18 |
| teacher1 | C1 | editingteacher |
|
|
|
19 |
| student1 | C1 | student |
|
|
|
20 |
| student2 | C1 | student |
|
|
|
21 |
| student3 | C1 | student |
|
|
|
22 |
And the following "activities" exist:
|
|
|
23 |
| activity | course | name | grade[modgrade_type] | grade[modgrade_point] |
|
|
|
24 |
| h5pactivity | C1 | H5P Activity | point | 10 |
|
|
|
25 |
|
|
|
26 |
@javascript
|
|
|
27 |
Scenario:Teacher can reset H5P activity grades
|
|
|
28 |
Given I am on the "Course 1" course page logged in as teacher1
|
|
|
29 |
And I navigate to "View > Grader report" in the course gradebook
|
|
|
30 |
And I turn editing mode on
|
|
|
31 |
And I give the grade "7" to the user "First Student" for the grade item "H5P Activity"
|
|
|
32 |
And I give the grade "5" to the user "Second Student" for the grade item "H5P Activity"
|
|
|
33 |
And I give the grade "0" to the user "Third Student" for the grade item "H5P Activity"
|
|
|
34 |
And I press "Save changes"
|
|
|
35 |
# Confirm that grade was sucessfully saved
|
|
|
36 |
And I turn editing mode off
|
|
|
37 |
And I should see "7.00" in the "First Student" "table_row"
|
|
|
38 |
And I should see "5.00" in the "Second Student" "table_row"
|
|
|
39 |
And I should see "0.00" in the "Third Student" "table_row"
|
|
|
40 |
When I am on the "Course 1" "reset" page
|
|
|
41 |
And I expand all fieldsets
|
|
|
42 |
# Check `Delete all grades` in course reset page to reset grades
|
|
|
43 |
And I click on "Delete all grades" "checkbox"
|
|
|
44 |
And I press "Reset"
|
|
|
45 |
Then I should see "OK" in the "Gradebook" "table_row"
|
|
|
46 |
And I press "Continue"
|
|
|
47 |
# Confirm that previously saved grades are gone
|
|
|
48 |
And I navigate to "View > Grader report" in the course gradebook
|
|
|
49 |
And I should not see "7.00" in the "First Student" "table_row"
|
|
|
50 |
And I should not see "5.00" in the "Second Student" "table_row"
|
|
|
51 |
And I should not see "0.00" in the "Third Student" "table_row"
|