1 |
efrain |
1 |
@core @core_grades @javascript
|
|
|
2 |
Feature: Control the aggregation of the scales
|
|
|
3 |
In order to use control the aggregation of the scales
|
|
|
4 |
As an admin
|
|
|
5 |
I can change use administration setting
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "courses" exist:
|
|
|
9 |
| fullname | shortname |
|
|
|
10 |
| Course 1 | C1 |
|
|
|
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 | Mean of grades,Weighted mean of grades,Simple weighted mean of grades,Mean of grades (with extra credits),Median of grades,Lowest grade,Highest grade,Mode of grades,Natural |
|
|
|
22 |
| grade_report_user_showcontributiontocoursetotal | 1 |
|
|
|
23 |
And I navigate to "Grades > Scales" in site administration
|
|
|
24 |
And I press "Add a new scale"
|
|
|
25 |
And I set the following fields to these values:
|
|
|
26 |
| Name | Letterscale |
|
|
|
27 |
| Scale | F,D,C,B,A |
|
|
|
28 |
And I press "Save changes"
|
|
|
29 |
And the following "grade items" exist:
|
|
|
30 |
| itemname | course |
|
|
|
31 |
| Grade me | C1 |
|
|
|
32 |
And the following "grade items" exist:
|
|
|
33 |
| itemname | course | scale |
|
|
|
34 |
| Scale me | C1 | Letterscale |
|
|
|
35 |
And the following config values are set as admin:
|
|
|
36 |
| grade_includescalesinaggregation | 0 |
|
|
|
37 |
|
|
|
38 |
Scenario Outline: Scales can be excluded from aggregation
|
|
|
39 |
Given I am on the "Course 1" "grades > Grader report > View" page logged in as "teacher1"
|
|
|
40 |
And I turn editing mode on
|
|
|
41 |
When I give the grade "10" to the user "Student 1" for the grade item "Grade me"
|
|
|
42 |
And I give the grade "B" to the user "Student 1" for the grade item "Scale me"
|
|
|
43 |
And I press "Save changes"
|
|
|
44 |
And I set the following settings for grade item "Course 1" of type "course" on "grader" page:
|
|
|
45 |
| Aggregation | <aggregation> |
|
|
|
46 |
And I navigate to "View > User report" in the course gradebook
|
|
|
47 |
And I click on "Student 1" in the "user" search widget
|
|
|
48 |
Then the following should exist in the "user-grade" table:
|
|
|
49 |
| Grade item | Grade | Percentage | Contribution to course total |
|
|
|
50 |
| Grade me | 10.00 | 10.00 % | <gradecontrib> |
|
|
|
51 |
| Scale me | B | 75.00 % | <scalecontrib> |
|
|
|
52 |
| Course total | <coursetotal> | <coursepc> | - |
|
|
|
53 |
And I log out
|
|
|
54 |
And I log in as "admin"
|
|
|
55 |
And I set the following administration settings values:
|
|
|
56 |
| grade_includescalesinaggregation | 1 |
|
|
|
57 |
And I am on the "Course 1" "grades > User report > View" page logged in as "teacher1"
|
|
|
58 |
And I click on "Student 1" in the "user" search widget
|
|
|
59 |
And the following should exist in the "user-grade" table:
|
|
|
60 |
| Grade item | Grade | Percentage | Contribution to course total |
|
|
|
61 |
| Grade me | 10.00 | 10.00 % | <gradecontrib2> |
|
|
|
62 |
| Scale me | B | 75.00 % | <scalecontrib2> |
|
|
|
63 |
| Course total | <coursetotal2> | <coursepc2> | - |
|
|
|
64 |
|
|
|
65 |
Examples:
|
|
|
66 |
| aggregation | coursetotal | coursepc | gradecontrib | scalecontrib | coursetotal2 | coursepc2 | gradecontrib2 | scalecontrib2 |
|
|
|
67 |
| Natural | 10.00 | 10.00 % | 10.00 | 0.00 | 14.00 | 13.33 % | 9.52 % | 3.81 % |
|
|
|
68 |
| Mean of grades | 10.00 | 10.00 % | 10.00 | 0.00 | 42.50 | 42.50 % | 5.00 % | 37.50 % |
|
|
|
69 |
| Weighted mean of grades | 10.00 | 10.00 % | 10.00 | 0.00 | 42.50 | 42.50 % | 5.00 % | 37.50 % |
|
|
|
70 |
| Simple weighted mean of grades | 10.00 | 10.00 % | 10.00 | 0.00 | 12.50 | 12.50 % | 9.62 % | 2.88 % |
|
|
|
71 |
| Mean of grades (with extra credits) | 10.00 | 10.00 % | 10.00 | 0.00 | 42.50 | 42.50 % | 5.00 % | 37.50 % |
|
|
|
72 |
| Median of grades | 10.00 | 10.00 % | 10.00 | 0.00 | 42.50 | 42.50 % | 5.00 % | 37.50 % |
|
|
|
73 |
| Lowest grade | 10.00 | 10.00 % | 10.00 | 0.00 | 10.00 | 10.00 % | 10.00 % | 0.00 % |
|
|
|
74 |
| Highest grade | 10.00 | 10.00 % | 10.00 | 0.00 | 75.00 | 75.00 % | 0.00 % | 75.00 % |
|
|
|
75 |
| Mode of grades | 10.00 | 10.00 % | 10.00 | 0.00 | 75.00 | 75.00 % | 0.00 % | 75.00 % |
|
|
|
76 |
|
|
|
77 |
Scenario: Weights of scales cannot be edited when they are not aggregated
|
|
|
78 |
Given I am on the "Course 1" "grades > Grader report > View" page logged in as "teacher1"
|
|
|
79 |
And I turn editing mode on
|
|
|
80 |
When I set the following settings for grade item "Course 1" of type "course" on "grader" page:
|
|
|
81 |
| Aggregation | Natural |
|
|
|
82 |
And I press "Save changes"
|
|
|
83 |
And I navigate to "Setup > Gradebook setup" in the course gradebook
|
|
|
84 |
And I set the field "Override weight of Grade me" to "1"
|
|
|
85 |
Then the field "Override weight of Grade me" matches value "100.00"
|
|
|
86 |
And I click on grade item menu "Scale me" of type "gradeitem" on "setup" page
|
|
|
87 |
And I choose "Edit grade item" in the open action menu
|
|
|
88 |
And I click on "Show more..." "link" in the ".modal-dialog" "css_element"
|
|
|
89 |
And I should not see "Weight adjusted"
|
|
|
90 |
And I should not see "Weight"
|
|
|
91 |
And the following config values are set as admin:
|
|
|
92 |
| grade_includescalesinaggregation | 1 |
|
|
|
93 |
And I am on "Course 1" course homepage
|
|
|
94 |
And I navigate to "Setup > Gradebook setup" in the course gradebook
|
|
|
95 |
And I set the field "Override weight of Grade me" to "1"
|
|
|
96 |
And the field "Override weight of Grade me" matches value "95.238"
|
|
|
97 |
And I set the field "Override weight of Scale me" to "1"
|
|
|
98 |
And the field "Override weight of Scale me" matches value "4.8"
|
|
|
99 |
And I click on grade item menu "Scale me" of type "gradeitem" on "setup" page
|
|
|
100 |
And I choose "Edit grade item" in the open action menu
|
|
|
101 |
And I click on "Show more..." "link" in the ".modal-dialog" "css_element"
|
|
|
102 |
And I should see "Weight adjusted"
|
|
|
103 |
And I should see "Weight"
|