forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDL-68163 gradebook: add grade item duplication
- Loading branch information
Showing
7 changed files
with
219 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
@core @core_grades | ||
Feature: We can duplicate grade items that already exist. | ||
In order to quickly create grade items that have similar settings. | ||
As a teacher | ||
I need to duplicate an existing grade item and check that its values are properly duplicated. | ||
|
||
Background: | ||
Given the following "courses" exist: | ||
| fullname | shortname | format | | ||
| Course 1 | C1 | topics | | ||
And the following "grade categories" exist: | ||
| fullname | course | | ||
| Category1 | C1 | | ||
And the following "activities" exist: | ||
| activity | course | idnumber | name | gradecategory | | ||
| assign | C1 | a1 | Assignment1 | Category1 | | ||
And the following "users" exist: | ||
| username | firstname | lastname | email | | ||
| teacher1 | Teacher | 1 | teacher1@example.com | | ||
And the following "course enrolments" exist: | ||
| user | course | role | | ||
| teacher1 | C1 | editingteacher | | ||
And the following "grade items" exist: | ||
| itemname | course | category | idnumber | gradetype | grademax | grademin | gradepass | display | decimals | hidden | weightoverride | | ||
| Item1 | C1 | Category1 | 001 | Value | 80.00 | 5.00 | 40.00 | 1 | 1 | 0 | 1 | | ||
|
||
Scenario: Ensure the duplicated grade item settings match the original grade item | ||
Given I log in as "teacher1" | ||
And I am on "Course 1" course homepage | ||
And I navigate to "Setup > Gradebook setup" in the course gradebook | ||
And I should not see "Duplicate Category1" | ||
And I should not see "Duplicate Assignment1" | ||
When I duplicate the grade item "Item1" | ||
Then I should see "Item1 (copy)" | ||
And I follow "Edit Item1 (copy)" | ||
And the field "Item name" matches value "Item1 (copy)" | ||
And the field "ID number" matches value "" | ||
And the field "Grade type" matches value "Value" | ||
And the field "Maximum grade" matches value "80.00" | ||
And the field "Minimum grade" matches value "5.00" | ||
And the field "Grade to pass" matches value "40.00" | ||
And the field "Grade display type" matches value "Real" | ||
And the field "Overall decimal places" matches value "1" | ||
And the field "Hidden" matches value "0" | ||
And the field "Weight adjusted" matches value "1" |
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