1 |
efrain |
1 |
@core @core_grades @javascript
|
|
|
2 |
Feature: We can change the maximum and minimum number of points for manual items with existing grades
|
|
|
3 |
In order to verify existing grades are modified as expected
|
|
|
4 |
As an teacher
|
|
|
5 |
I need to modify a grade item with exiting grades
|
|
|
6 |
I need to ensure existing grades are modified in an expected manner
|
|
|
7 |
|
|
|
8 |
Background:
|
|
|
9 |
Given the following "courses" exist:
|
|
|
10 |
| fullname | shortname | category | groupmode |
|
|
|
11 |
| Course 1 | C1 | 0 | 1 |
|
|
|
12 |
And the following "users" exist:
|
|
|
13 |
| username | firstname | lastname | email | idnumber |
|
|
|
14 |
| teacher1 | Teacher | 1 | teacher1@example.com | t1 |
|
|
|
15 |
| student1 | Student | 1 | student1@example.com | s1 |
|
|
|
16 |
| student2 | Student | 2 | student2@example.com | s2 |
|
|
|
17 |
And the following "course enrolments" exist:
|
|
|
18 |
| user | course | role |
|
|
|
19 |
| teacher1 | C1 | editingteacher |
|
|
|
20 |
| student1 | C1 | student |
|
|
|
21 |
| student2 | C1 | student |
|
|
|
22 |
And I am on the "Course 1" "grades > gradebook setup" page logged in as "teacher1"
|
|
|
23 |
And I choose the "Add grade item" item in the "Add" action menu
|
|
|
24 |
And I set the following fields to these values:
|
|
|
25 |
| Item name | Manual item 1 |
|
|
|
26 |
| Minimum grade | 0 |
|
|
|
27 |
| Maximum grade | 100 |
|
|
|
28 |
And I click on "Save" "button" in the "New grade item" "dialogue"
|
|
|
29 |
And I navigate to "Setup > Course grade settings" in the course gradebook
|
|
|
30 |
And I set the field "Show weightings" to "Show"
|
|
|
31 |
And I set the field "Show contribution to course total" to "Show"
|
|
|
32 |
And I press "Save changes"
|
|
|
33 |
|
|
|
34 |
Scenario: Change maximum number of points on a graded item.
|
|
|
35 |
Given I am on the "Course 1" "grades > Grader report > View" page
|
|
|
36 |
And I turn editing mode on
|
|
|
37 |
And I give the grade "10.00" to the user "Student 1" for the grade item "Manual item 1"
|
|
|
38 |
And I give the grade "8.00" to the user "Student 2" for the grade item "Manual item 1"
|
|
|
39 |
And I press "Save changes"
|
|
|
40 |
When I navigate to "Setup > Gradebook setup" in the course gradebook
|
|
|
41 |
And I set the following settings for grade item "Manual item 1" of type "gradeitem" on "setup" page:
|
|
|
42 |
| Rescale existing grades | No |
|
|
|
43 |
| Maximum grade | 10 |
|
|
|
44 |
And I navigate to "View > User report" in the course gradebook
|
|
|
45 |
And I click on "Student 1" in the "user" search widget
|
|
|
46 |
Then the following should exist in the "user-grade" table:
|
|
|
47 |
| Grade item | Calculated weight | Grade | Contribution to course total |
|
|
|
48 |
| Manual item 1 | 100.00 % | 10.00 | 100.00 % |
|
|
|
49 |
And I click on "Student 2" in the "user" search widget
|
|
|
50 |
And the following should exist in the "user-grade" table:
|
|
|
51 |
| Grade item | Calculated weight | Grade | Contribution to course total |
|
|
|
52 |
| Manual item 1 | 100.00 % | 8.00 | 80.00 % |
|
|
|
53 |
And I navigate to "Setup > Gradebook setup" in the course gradebook
|
|
|
54 |
And I click on grade item menu "Manual item 1" of type "gradeitem" on "setup" page
|
|
|
55 |
And I choose "Edit grade item" in the open action menu
|
|
|
56 |
And I set the following fields to these values:
|
|
|
57 |
| Rescale existing grades | Yes |
|
|
|
58 |
| Maximum grade | 20 |
|
|
|
59 |
And I click on "Save" "button" in the "Edit grade item" "dialogue"
|
|
|
60 |
And I navigate to "View > User report" in the course gradebook
|
|
|
61 |
And I click on "Student 1" in the "user" search widget
|
|
|
62 |
And the following should exist in the "user-grade" table:
|
|
|
63 |
| Grade item | Calculated weight | Grade | Contribution to course total |
|
|
|
64 |
| Manual item 1 | 100.00 % | 20.00 | 100.00 % |
|
|
|
65 |
And I click on "Student 2" in the "user" search widget
|
|
|
66 |
And the following should exist in the "user-grade" table:
|
|
|
67 |
| Grade item | Calculated weight | Grade | Contribution to course total |
|
|
|
68 |
| Manual item 1 | 100.00 % | 16.00 | 80.00 % |
|