mirrored from git://git.moodle.org/moodle.git
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDL-48634 grades: Add an option to rescale when changing the maxgrade
- Loading branch information
Showing
12 changed files
with
422 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
@core @core_grades | ||
Feature: We can change the maximum and minimum number of points for manual items with existing grades | ||
In order to verify existing grades are modified as expected | ||
As an teacher | ||
I need to modify a grade item with exiting grades | ||
I need to ensure existing grades are modified in an expected manner | ||
|
||
Background: | ||
Given the following "courses" exist: | ||
| fullname | shortname | category | groupmode | | ||
| Course 1 | C1 | 0 | 1 | | ||
And the following "users" exist: | ||
| username | firstname | lastname | email | idnumber | | ||
| teacher1 | Teacher | 1 | teacher1@example.com | t1 | | ||
| student1 | Student | 1 | student1@example.com | s1 | | ||
| student2 | Student | 2 | student2@example.com | s2 | | ||
And the following "course enrolments" exist: | ||
| user | course | role | | ||
| teacher1 | C1 | editingteacher | | ||
| student1 | C1 | student | | ||
| student2 | C1 | student | | ||
And I log in as "teacher1" | ||
And I am on site homepage | ||
And I follow "Course 1" | ||
And I navigate to "Grades" node in "Course administration" | ||
And I navigate to "Gradebook setup" node in "Grade administration > Setup" | ||
And I press "Add grade item" | ||
And I set the following fields to these values: | ||
| Item name | Manual item 1 | | ||
| Minimum grade | 0 | | ||
| Maximum grade | 100 | | ||
And I press "Save changes" | ||
And I navigate to "Course grade settings" node in "Grade administration > Setup" | ||
And I set the field "Show weightings" to "Show" | ||
And I set the field "Show contribution to course total" to "Show" | ||
And I press "Save changes" | ||
|
||
Scenario: Change maximum number of points on a graded item. | ||
And I follow "Course 1" | ||
And I navigate to "Grades" node in "Course administration" | ||
And I turn editing mode on | ||
And I give the grade "10.00" to the user "Student 1" for the grade item "Manual item 1" | ||
And I give the grade "8.00" to the user "Student 2" for the grade item "Manual item 1" | ||
And I press "Save changes" | ||
When I navigate to "Gradebook setup" node in "Grade administration > Setup" | ||
And I click on "Edit" "link" in the "Manual item 1" "table_row" | ||
And I click on "Edit settings" "link" in the "Manual item 1" "table_row" | ||
And I set the following fields to these values: | ||
| Maximum grade | 10 | | ||
| Rescale existing grades | No | | ||
And I press "Save changes" | ||
And I follow "User report" | ||
And I select "Student 1" from the "Select all or one user" singleselect | ||
Then the following should exist in the "user-grade" table: | ||
| Grade item | Calculated weight | Grade | Contribution to course total | | ||
| Manual item 1 | 100.00 % | 10.00 | 100.00 % | | ||
And I select "Student 2" from the "Select all or one user" singleselect | ||
And the following should exist in the "user-grade" table: | ||
| Grade item | Calculated weight | Grade | Contribution to course total | | ||
| Manual item 1 | 100.00 % | 8.00 | 80.00 % | | ||
And I navigate to "Gradebook setup" node in "Grade administration > Setup" | ||
And I click on "Edit" "link" in the "Manual item 1" "table_row" | ||
And I click on "Edit settings" "link" in the "Manual item 1" "table_row" | ||
And I set the following fields to these values: | ||
| Maximum grade | 20 | | ||
| Rescale existing grades | Yes | | ||
And I press "Save changes" | ||
And I follow "User report" | ||
And I select "Student 1" from the "Select all or one user" singleselect | ||
And the following should exist in the "user-grade" table: | ||
| Grade item | Calculated weight | Grade | Contribution to course total | | ||
| Manual item 1 | 100.00 % | 20.00 | 100.00 % | | ||
And I select "Student 2" from the "Select all or one user" singleselect | ||
And the following should exist in the "user-grade" table: | ||
| Grade item | Calculated weight | Grade | Contribution to course total | | ||
| Manual item 1 | 100.00 % | 16.00 | 80.00 % | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.