1 |
efrain |
1 |
@core @core_grades @javascript
|
|
|
2 |
Feature: Extra credit contributions are normalised when going out of bounds
|
|
|
3 |
In order to use extra credit
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to add some extra credit items.
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "courses" exist:
|
|
|
9 |
| fullname | shortname | category | groupmode |
|
|
|
10 |
| Course 1 | C1 | 0 | 1 |
|
|
|
11 |
And the following "users" exist:
|
|
|
12 |
| username | firstname | lastname | email | idnumber |
|
|
|
13 |
| teacher1 | Teacher | 1 | teacher1@example.com | t1 |
|
|
|
14 |
| student1 | Student | 1 | student1@example.com | s1 |
|
|
|
15 |
And the following "course enrolments" exist:
|
|
|
16 |
| user | course | role |
|
|
|
17 |
| teacher1 | C1 | editingteacher |
|
|
|
18 |
| student1 | C1 | student |
|
|
|
19 |
And I log in as "admin"
|
|
|
20 |
And I set the following administration settings values:
|
|
|
21 |
| grade_aggregations_visible | Simple weighted mean of grades,Mean of grades (with extra credits),Natural |
|
|
|
22 |
And I am on the "Course 1" "grades > gradebook setup" page
|
|
|
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 |
| Maximum grade | 150 |
|
|
|
27 |
And I click on "Save" "button" in the "New grade item" "dialogue"
|
|
|
28 |
And I choose the "Add grade item" item in the "Add" action menu
|
|
|
29 |
And I set the following fields to these values:
|
|
|
30 |
| Item name | Manual item 2 |
|
|
|
31 |
And I click on "Save" "button" in the "New grade item" "dialogue"
|
|
|
32 |
And I choose the "Add grade item" item in the "Add" action menu
|
|
|
33 |
And I set the following fields to these values:
|
|
|
34 |
| Item name | Manual item 3 |
|
|
|
35 |
And I click on "Save" "button" in the "New grade item" "dialogue"
|
|
|
36 |
And I choose the "Add grade item" item in the "Add" action menu
|
|
|
37 |
And I set the following fields to these values:
|
|
|
38 |
| Item name | Manual item 4 |
|
|
|
39 |
And I click on "Save" "button" in the "New grade item" "dialogue"
|
|
|
40 |
And I navigate to "Setup > Course grade settings" in the course gradebook
|
|
|
41 |
And I set the field "Show weighting" to "Show"
|
|
|
42 |
And I set the field "Show contribution to course total" to "Show"
|
|
|
43 |
And I press "Save changes"
|
|
|
44 |
And I am on the "Course 1" "grades > Grader report > View" page logged in as "teacher1"
|
|
|
45 |
And I turn editing mode on
|
|
|
46 |
And I give the grade "80.00" to the user "Student 1" for the grade item "Manual item 1"
|
|
|
47 |
And I give the grade "10.00" to the user "Student 1" for the grade item "Manual item 2"
|
|
|
48 |
And I give the grade "70.00" to the user "Student 1" for the grade item "Manual item 3"
|
|
|
49 |
And I give the grade "90.00" to the user "Student 1" for the grade item "Manual item 4"
|
|
|
50 |
And I press "Save changes"
|
|
|
51 |
|
|
|
52 |
Scenario Outline: The contribution of extra credit items is normalised
|
|
|
53 |
Given I navigate to "Setup > Gradebook setup" in the course gradebook
|
|
|
54 |
When I set the following settings for grade item "Course 1" of type "course" on "setup" page:
|
|
|
55 |
| Aggregation | <aggregation> |
|
|
|
56 |
And I set the following settings for grade item "Manual item 2" of type "gradeitem" on "setup" page:
|
|
|
57 |
| aggregationcoef | 1 |
|
|
|
58 |
And I set the following settings for grade item "Manual item 3" of type "gradeitem" on "setup" page:
|
|
|
59 |
| aggregationcoef | 1 |
|
|
|
60 |
And I set the following settings for grade item "Manual item 4" of type "gradeitem" on "setup" page:
|
|
|
61 |
| aggregationcoef | 1 |
|
|
|
62 |
And I navigate to "View > User report" in the course gradebook
|
|
|
63 |
And I click on "Student 1" in the "user" search widget
|
|
|
64 |
Then the following should exist in the "user-grade" table:
|
|
|
65 |
| Grade item | Calculated weight | Grade | Contribution to course total |
|
|
|
66 |
| Manual item 1 | <m1w> | 80.00 | <m1c> |
|
|
|
67 |
| Manual item 2 | <m2w> | 10.00 | <m2c> |
|
|
|
68 |
| Manual item 3 | <m3w> | 70.00 | <m3c> |
|
|
|
69 |
| Manual item 4 | 0.00 % | 90.00 | 0.00 % |
|
|
|
70 |
|
|
|
71 |
Examples:
|
|
|
72 |
| aggregation | m1w | m1c | m2w | m2c | m3w | m3c |
|
|
|
73 |
| Natural | 100.00 % | 53.33 % | 66.67 % | 6.67 % | 57.14 % | 40.00 % |
|
|
|
74 |
| Simple weighted mean of grades | 100.00 % | 53.33 % | 66.67 % | 6.67 % | 57.14 % | 40.00 % |
|
|
|
75 |
| Mean of grades (with extra credits) | 100.00 % | 53.33 % | 100.00 % | 10.00 % | 52.38 % | 36.67 % |
|