Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
@core @core_grades
2
Feature: Gradebook calculations for calculated grade items before the fix 20150627
3
  In order to make sure the grades are not changed after upgrade
4
  As a teacher
5
  I need to be able to freeze gradebook calculations
6
 
7
  Background:
8
    Given the following "courses" exist:
9
      | fullname | shortname | category | groupmode |
10
      | Course 1 | C1 | 0 | 1 |
11
    And gradebook calculations for the course "C1" are frozen at version "20150627"
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 "admin"
23
 
24
  @javascript
25
  Scenario: The max grade for a category item, with a calculation using Natural aggregation, can be changed
26
    Given I choose the "Add category" item in the "Add" action menu
27
    And I set the following fields to these values:
28
      | Category name | Calc cat |
29
    And I click on "Save" "button" in the "New category" "dialogue"
30
    And I wait until the page is ready
31
    And I choose the "Add grade item" item in the "Add" action menu
32
    And I set the following fields to these values:
33
      | Item name | grade item 1 |
34
      | Grade category | Calc cat |
35
    And I click on "Save" "button" in the "New grade item" "dialogue"
36
    And I set "=[[gi1]]/2" calculation for grade category "Calc cat" with idnumbers:
37
      | grade item 1 | gi1 |
38
    And I set the following settings for grade item "Calc cat" of type "category" on "setup" page:
39
      | Maximum grade | 50 |
40
    And I navigate to "View > Grader report" in the course gradebook
41
    And I turn editing mode on
42
    And I give the grade "75.00" to the user "Student 1" for the grade item "grade item 1"
43
    And I press "Save changes"
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
    And the following should exist in the "user-grade" table:
47
      | Grade item                          | Calculated weight | Grade  | Range | Percentage | Contribution to course total |
48
      | grade item 1                        | -                 | 75.00  | 0–100 | 75.00 %    | -                            |
49
      | Calc cat total                      | 100.00 %          | 37.50  | 0–100 | 37.50 %    | -                            |
50
      | Course total                        | -                 | 37.50  | 0–100 | 37.50 %    | -                            |
51
 
52
  @javascript
53
  Scenario: Changing max grade for a category item with a calculation that has existing grades will display the same points with the new max grade values immediately.
54
    Given I choose the "Add category" item in the "Add" action menu
55
    And I set the following fields to these values:
56
      | Category name | Calc cat |
57
    And I click on "Save" "button" in the "New category" "dialogue"
58
    And I wait until the page is ready
59
    And I choose the "Add grade item" item in the "Add" action menu
60
    And I set the following fields to these values:
61
      | Item name | grade item 1 |
62
      | Grade category | Calc cat |
63
    And I click on "Save" "button" in the "New grade item" "dialogue"
64
    And I set "=[[gi1]]/2" calculation for grade category "Calc cat" with idnumbers:
65
      | grade item 1 | gi1 |
66
    And I set the following settings for grade item "Calc cat" of type "category" on "setup" page:
67
      | Maximum grade | 50 |
68
    And I navigate to "View > Grader report" in the course gradebook
69
    And I turn editing mode on
70
    And I give the grade "75.00" to the user "Student 1" for the grade item "grade item 1"
71
    And I press "Save changes"
72
    And I navigate to "View > User report" in the course gradebook
73
    And I click on "Student 1" in the "user" search widget
74
    And the following should exist in the "user-grade" table:
75
      | Grade item                          | Calculated weight | Grade  | Range | Percentage | Contribution to course total |
76
      | grade item 1                        | -                 | 75.00  | 0–100 | 75.00 %    | -                            |
77
      | Calc cat total                      | 100.00 %          | 37.50  | 0–100 | 37.50 %    | -                            |
78
      | Course total                        | -                 | 37.50  | 0–100 | 37.50 %    | -                            |
79
    And I navigate to "Setup > Gradebook setup" in the course gradebook
80
    And I set the following settings for grade item "Calc cat" of type "category" on "setup" page:
81
      | Maximum grade | 40 |
82
    And I navigate to "View > Grader report" in the course gradebook
83
    And I give the grade "65.00" to the user "Student 2" for the grade item "grade item 1"
84
    And I press "Save changes"
85
    And I navigate to "View > User report" in the course gradebook
86
    When I click on "Student 1" in the "user" search widget
87
    Then the following should exist in the "user-grade" table:
88
      | Grade item                          | Calculated weight | Grade  | Range | Percentage | Contribution to course total |
89
      | grade item 1                        | -                 | 75.00  | 0–100 | 75.00 %    | -                            |
90
      | Calc cat total                      | 100.00 %          | 37.50  | 0–100 | 37.50 %    | -                            |
91
      | Course total                        | -                 | 37.50  | 0–100 | 37.50 %    | -                            |
92
    And I click on "Student 2" in the "user" search widget
93
    And the following should exist in the "user-grade" table:
94
      | Grade item                          | Calculated weight | Grade  | Range | Percentage | Contribution to course total |
95
      | grade item 1                        | -                 | 65.00  | 0–100 | 65.00 %    | -                            |
96
      | Calc cat total                      | 100.00 %          | 32.50  | 0–100 | 32.50 %    | -                            |
97
      | Course total                        | -                 | 32.50  | 0–100 | 32.50 %    | -                            |
98
    And I navigate to "Setup > Course grade settings" in the course gradebook
99
    And I set the following fields to these values:
100
      | Min and max grades used in calculation | Initial min and max grades |
101
    And I press "Save changes"
102
    And I navigate to "View > User report" in the course gradebook
103
    And I click on "Student 1" in the "user" search widget
104
    And the following should exist in the "user-grade" table:
105
      | Grade item                          | Calculated weight | Grade  | Range | Percentage | Contribution to course total |
106
      | grade item 1                        | -                 | 75.00  | 0–100 | 75.00 %    | -                            |
107
      | Calc cat total                      | 100.00 %          | 37.50  | 0–100 | 37.50 %    | -                            |
108
      | Course total                        | -                 | 37.50  | 0–100 | 37.50 %    | -                            |
109
    And I click on "Student 2" in the "user" search widget
110
    And the following should exist in the "user-grade" table:
111
      | Grade item                          | Calculated weight | Grade  | Range | Percentage | Contribution to course total |
112
      | grade item 1                        | -                 | 65.00  | 0–100 | 65.00 %    | -                            |
113
      | Calc cat total                      | 100.00 %          | 32.50  | 0–100 | 32.50 %    | -                            |
114
      | Course total                        | -                 | 32.50  | 0–100 | 32.50 %    | -                            |
115
 
116
  @javascript
117
  Scenario: Values in calculated grade items are not always out of one hundred
118
    Given I choose the "Add grade item" item in the "Add" action menu
119
    And I set the following fields to these values:
120
      | Item name | grade item 1 |
121
    And I click on "Save" "button" in the "New grade item" "dialogue"
122
    And I choose the "Add grade item" item in the "Add" action menu
123
    And I set the following fields to these values:
124
      | Item name | calc item |
125
    And I click on "Save" "button" in the "New grade item" "dialogue"
126
    And I set "=[[gi1]]/2" calculation for grade item "calc item" with idnumbers:
127
      | grade item 1 | gi1 |
128
    And I set the following settings for grade item "calc item" of type "gradeitem" on "setup" page:
129
      | Maximum grade | 50 |
130
    And I navigate to "Setup > Course grade settings" in the course gradebook
131
    And I set the following fields to these values:
132
      | Min and max grades used in calculation | Initial min and max grades |
133
    And I press "Save changes"
134
    And I navigate to "View > Grader report" in the course gradebook
135
    And I turn editing mode on
136
    And I give the grade "75.00" to the user "Student 1" for the grade item "grade item 1"
137
    And I press "Save changes"
138
    And I navigate to "View > User report" in the course gradebook
139
    When I click on "Student 1" in the "user" search widget
140
    Then the following should exist in the "user-grade" table:
141
      | Grade item   | Calculated weight | Grade  | Range | Percentage | Contribution to course total |
142
      | grade item 1 | 50.00 %           | 75.00  | 0–100 | 75.00 %    | 37.50 %                      |
143
      | calc item    | 50.00 %           | 37.50  | 0–100 | 37.50 %    | 18.75 %                      |
144
      | Course total | -                 | 112.50 | 0–200 | 56.25 %    | -                            |
145
    And I navigate to "Setup > Gradebook setup" in the course gradebook
146
    And I set the following settings for grade item "calc item" of type "gradeitem" on "setup" page:
147
      | Rescale existing grades | No |
148
      | Maximum grade | 40 |
149
    And I navigate to "View > Grader report" in the course gradebook
150
    And I give the grade "65.00" to the user "Student 2" for the grade item "grade item 1"
151
    And I press "Save changes"
152
    And I navigate to "View > User report" in the course gradebook
153
    And I click on "Student 1" in the "user" search widget
154
    And the following should exist in the "user-grade" table:
155
      | Grade item   | Calculated weight | Grade  | Range | Percentage | Contribution to course total |
156
      | grade item 1 | 50.00 %           | 75.00  | 0–100 | 75.00 %    | 37.50 %                      |
157
      | calc item    | 50.00 %           | 37.50  | 0–100 | 37.50 %    | 18.75 %                      |
158
      | Course total | -                 | 112.50 | 0–200 | 56.25 %    | -                            |
159
    And I click on "Student 2" in the "user" search widget
160
    And the following should exist in the "user-grade" table:
161
      | Grade item   | Calculated weight | Grade  | Range | Percentage | Contribution to course total |
162
      | grade item 1 | 50.00 %           | 65.00  | 0–100 | 65.00 %    | 32.50 %                      |
163
      | calc item    | 50.00 %           | 32.50  | 0–100 | 32.50 %    | 16.25 %                      |
164
      | Course total | -                 | 97.50  | 0–200 | 48.75 %    | -                            |