Commit | Line | Data |
---|---|---|
8164fad4 GF |
1 | @core @core_grades |
2 | Feature: We can set the grade to pass value | |
3 | In order to set the grade to pass value | |
4 | As a teacher | |
5 | I assign a grade to pass to an activity while editing the activity. | |
6 | I need to ensure that the grade to pass is visible in the gradebook. | |
7 | ||
8 | Background: | |
9 | Given the following "users" exist: | |
10 | | username | firstname | lastname | email | | |
0fe86bbd | 11 | | teacher1 | Teacher | 1 | teacher1@example.com | |
8164fad4 GF |
12 | And the following "courses" exist: |
13 | | fullname | shortname | format | numsections | | |
14 | | Course 1 | C1 | weeks | 5 | | |
15 | And the following "course enrolments" exist: | |
16 | | user | course | role | | |
17 | | teacher1 | C1 | editingteacher | | |
c977b350 MG |
18 | And the following "scales" exist: |
19 | | name | scale | | |
20 | | Test Scale 1 | Disappointing, Good, Very good, Excellent | | |
8164fad4 | 21 | And I log in as "teacher1" |
fdeeaff9 | 22 | And I am on "Course 1" course homepage |
8164fad4 GF |
23 | |
24 | @javascript | |
25 | Scenario: Validate that switching the type of grading used correctly disables grade to pass | |
c977b350 MG |
26 | When I turn editing mode on |
27 | And I add a "Assignment" to section "1" | |
8164fad4 GF |
28 | And I expand all fieldsets |
29 | And I set the field "grade[modgrade_type]" to "Point" | |
30 | Then the "Grade to pass" "field" should be enabled | |
31 | And I set the field "grade[modgrade_type]" to "None" | |
c977b350 | 32 | And the "Grade to pass" "field" should be disabled |
8164fad4 GF |
33 | And I press "Save and return to course" |
34 | ||
35 | @javascript | |
36 | Scenario: Create an activity with a Grade to pass value greater than the maximum grade | |
c977b350 MG |
37 | When I turn editing mode on |
38 | And I add a "Assignment" to section "1" and I fill the form with: | |
39 | | Assignment name | Test Assignment 1 | | |
40 | | Description | Submit your online text | | |
41 | | assignsubmission_onlinetext_enabled | 1 | | |
42 | | grade[modgrade_type] | Point | | |
43 | | grade[modgrade_point] | 50 | | |
44 | | Grade to pass | 100 | | |
45 | Then I should see "The grade to pass can not be greater than the maximum possible grade 50" | |
8164fad4 GF |
46 | And I press "Cancel" |
47 | ||
c977b350 MG |
48 | Scenario: Set a valid grade to pass for an assignment activity using points |
49 | When I turn editing mode on | |
50 | And I add a "Assignment" to section "1" and I fill the form with: | |
51 | | Assignment name | Test Assignment 1 | | |
52 | | Description | Submit your online text | | |
53 | | assignsubmission_onlinetext_enabled | 1 | | |
54 | | grade[modgrade_type] | Point | | |
55 | | grade[modgrade_point] | 50 | | |
56 | | Grade to pass | 25 | | |
44f460c3 | 57 | And I navigate to "View > Grader report" in the course gradebook |
c977b350 MG |
58 | And I turn editing mode on |
59 | And I click on "Edit assign Test Assignment 1" "link" | |
60 | Then the field "Grade to pass" matches value "25" | |
fdeeaff9 | 61 | And I am on "Course 1" course homepage |
c977b350 | 62 | And I follow "Test Assignment 1" |
8164fad4 GF |
63 | And I follow "Edit settings" |
64 | And I expand all fieldsets | |
c977b350 MG |
65 | And I set the field "Grade to pass" to "30" |
66 | And I press "Save and return to course" | |
44f460c3 | 67 | And I navigate to "View > Grader report" in the course gradebook |
c977b350 MG |
68 | And I click on "Edit assign Test Assignment 1" "link" |
69 | And the field "Grade to pass" matches value "30" | |
70 | ||
c977b350 MG |
71 | Scenario: Set a valid grade to pass for an assignment activity using scales |
72 | When I turn editing mode on | |
73 | And I add a "Assignment" to section "1" and I fill the form with: | |
74 | | Assignment name | Test Assignment 1 | | |
75 | | Description | Submit your online text | | |
76 | | grade[modgrade_type] | Scale | | |
77 | | grade[modgrade_scale] | Test Scale 1 | | |
78 | | Grade to pass | 3 | | |
44f460c3 | 79 | And I navigate to "View > Grader report" in the course gradebook |
8164fad4 GF |
80 | And I turn editing mode on |
81 | And I click on "Edit assign Test Assignment 1" "link" | |
47f084c6 | 82 | And I expand all fieldsets |
c977b350 MG |
83 | Then the field "Grade to pass" matches value "3" |
84 | And I set the field "Grade to pass" to "4" | |
85 | And I press "Save changes" | |
fdeeaff9 | 86 | And I am on "Course 1" course homepage |
c977b350 MG |
87 | And I follow "Test Assignment 1" |
88 | And I follow "Edit settings" | |
89 | And the field "Grade to pass" matches value "4" | |
90 | ||
c977b350 MG |
91 | Scenario: Set a invalid grade to pass for an assignment activity using scales |
92 | When I turn editing mode on | |
93 | And I add a "Assignment" to section "1" and I fill the form with: | |
94 | | Assignment name | Test Assignment 1 | | |
95 | | Description | Submit your online text | | |
96 | | grade[modgrade_type] | Scale | | |
97 | | grade[modgrade_scale] | Test Scale 1 | | |
98 | | Grade to pass | 10 | | |
99 | Then I should see "The grade to pass can not be greater than the maximum possible grade 4" | |
100 | ||
c977b350 MG |
101 | Scenario: Set a valid grade to pass for workshop activity |
102 | When I turn editing mode on | |
8164fad4 GF |
103 | And I add a "Workshop" to section "1" and I fill the form with: |
104 | | Workshop name | Test Workshop 1 | | |
105 | | Description | Test workshop | | |
106 | | grade | 80 | | |
c977b350 | 107 | | Submission grade to pass | 40 | |
8164fad4 | 108 | | gradinggrade | 20 | |
c977b350 | 109 | | Assessment grade to pass | 10 | |
44f460c3 | 110 | And I navigate to "View > Grader report" in the course gradebook |
c977b350 | 111 | And I turn editing mode on |
8164fad4 | 112 | And I click on "Edit workshop Test Workshop 1 (submission)" "link" |
47f084c6 | 113 | And I expand all fieldsets |
8164fad4 | 114 | Then the field "Grade to pass" matches value "40" |
c977b350 MG |
115 | And I set the field "Grade to pass" to "45" |
116 | And I press "Save changes" | |
117 | And I click on "Edit workshop Test Workshop 1 (assessment)" "link" | |
47f084c6 | 118 | And I expand all fieldsets |
c977b350 MG |
119 | And the field "Grade to pass" matches value "10" |
120 | And I set the field "Grade to pass" to "15" | |
121 | And I press "Save changes" | |
fdeeaff9 | 122 | And I am on "Course 1" course homepage |
c977b350 MG |
123 | And I follow "Test Workshop 1" |
124 | And I follow "Edit settings" | |
125 | And the field "Submission grade to pass" matches value "45" | |
126 | And the field "Assessment grade to pass" matches value "15" | |
127 | ||
c977b350 MG |
128 | Scenario: Set an invalid grade to pass for workshop activity |
129 | When I turn editing mode on | |
130 | And I add a "Workshop" to section "1" and I fill the form with: | |
131 | | Workshop name | Test Workshop 1 | | |
132 | | Description | Test workshop | | |
133 | | grade | 80 | | |
134 | | Submission grade to pass | 90 | | |
135 | | gradinggrade | 20 | | |
136 | | Assessment grade to pass | 30 | | |
63e4df60 DW |
137 | Then "The grade to pass can not be greater than the maximum possible grade 80" "text" should exist in the "Submission grade to pass" "form_row" |
138 | Then "The grade to pass can not be greater than the maximum possible grade 20" "text" should exist in the "Assessment grade to pass" "form_row" | |
c977b350 | 139 | |
c977b350 MG |
140 | Scenario: Set a valid grade to pass for quiz activity |
141 | When I turn editing mode on | |
142 | And I add a "Quiz" to section "1" and I fill the form with: | |
143 | | Name | Test Quiz 1 | | |
144 | | Grade to pass | 9.5 | | |
44f460c3 | 145 | And I navigate to "View > Grader report" in the course gradebook |
c977b350 MG |
146 | And I turn editing mode on |
147 | And I click on "Edit quiz Test Quiz 1" "link" | |
47f084c6 | 148 | And I expand all fieldsets |
c977b350 MG |
149 | Then the field "Grade to pass" matches value "9.5" |
150 | And I set the field "Grade to pass" to "8" | |
151 | And I press "Save changes" | |
fdeeaff9 | 152 | And I am on "Course 1" course homepage |
c977b350 MG |
153 | And I follow "Test Quiz 1" |
154 | And I follow "Edit settings" | |
155 | And the field "Grade to pass" matches value "8.00" | |
156 | ||
c977b350 MG |
157 | Scenario: Set a valid grade to pass for lesson activity |
158 | When I turn editing mode on | |
159 | And I add a "Lesson" to section "1" and I fill the form with: | |
160 | | Name | Test Lesson 1 | | |
161 | | Description | Test | | |
162 | | Grade to pass | 90 | | |
44f460c3 | 163 | And I navigate to "View > Grader report" in the course gradebook |
c977b350 MG |
164 | And I turn editing mode on |
165 | And I click on "Edit lesson Test Lesson 1" "link" | |
47f084c6 | 166 | And I expand all fieldsets |
c977b350 MG |
167 | Then the field "Grade to pass" matches value "90" |
168 | And I set the field "Grade to pass" to "80" | |
169 | And I press "Save changes" | |
fdeeaff9 | 170 | And I am on "Course 1" course homepage |
c977b350 MG |
171 | And I follow "Test Lesson 1" |
172 | And I follow "Edit settings" | |
173 | And the field "Grade to pass" matches value "80" | |
174 | ||
c977b350 MG |
175 | Scenario: Set a valid grade to pass for database activity |
176 | When I turn editing mode on | |
177 | And I add a "Database" to section "1" and I fill the form with: | |
178 | | Name | Test Database 1 | | |
179 | | Description | Test | | |
c977b350 | 180 | | Aggregate type | Average of ratings | |
bc5d93c7 | 181 | | Grade to pass | 90 | |
44f460c3 | 182 | And I navigate to "View > Grader report" in the course gradebook |
c977b350 MG |
183 | And I turn editing mode on |
184 | And I click on "Edit data Test Database 1" "link" | |
47f084c6 | 185 | And I expand all fieldsets |
c977b350 MG |
186 | Then the field "Grade to pass" matches value "90" |
187 | And I set the field "Grade to pass" to "80" | |
188 | And I press "Save changes" | |
fdeeaff9 | 189 | And I am on "Course 1" course homepage |
e5287f9b | 190 | And I click on "Edit settings" "link" in the "Test Database 1" activity |
c977b350 MG |
191 | And the field "Grade to pass" matches value "80" |
192 | ||
c977b350 MG |
193 | Scenario: Set an invalid grade to pass for forum activity |
194 | When I turn editing mode on | |
195 | And I add a "Forum" to section "1" and I fill the form with: | |
196 | | Forum name | Test Forum 1 | | |
197 | | Description | Test | | |
bb6315f2 AN |
198 | | Ratings > Aggregate type | Average of ratings | |
199 | | Ratings > scale[modgrade_point] | 60 | | |
200 | | Grade > Grade to pass | 90 | | |
c977b350 MG |
201 | Then I should see "The grade to pass can not be greater than the maximum possible grade 60" |
202 | ||
c977b350 MG |
203 | Scenario: Set a valid grade to pass for forum activity |
204 | When I turn editing mode on | |
205 | And I add a "Forum" to section "1" and I fill the form with: | |
206 | | Forum name | Test Forum 1 | | |
207 | | Description | Test | | |
bb6315f2 AN |
208 | | Ratings > Aggregate type | Average of ratings | |
209 | | Grade > Grade to pass | 90 | | |
44f460c3 | 210 | And I navigate to "View > Grader report" in the course gradebook |
c977b350 MG |
211 | And I turn editing mode on |
212 | And I click on "Edit forum Test Forum 1" "link" | |
47f084c6 | 213 | And I expand all fieldsets |
c977b350 MG |
214 | Then the field "Grade to pass" matches value "90" |
215 | And I set the field "Grade to pass" to "80" | |
216 | And I press "Save changes" | |
fdeeaff9 | 217 | And I am on "Course 1" course homepage |
c977b350 MG |
218 | And I follow "Test Forum 1" |
219 | And I follow "Edit settings" | |
fcc88fdd | 220 | And the field "Ratings > Grade to pass" matches value "80" |
c977b350 | 221 | |
c977b350 MG |
222 | Scenario: Set a valid grade to pass for glossary activity |
223 | When I turn editing mode on | |
224 | And I add a "Glossary" to section "1" and I fill the form with: | |
225 | | Name | Test Glossary 1 | | |
226 | | Description | Test | | |
c977b350 | 227 | | Aggregate type | Average of ratings | |
bc5d93c7 | 228 | | Grade to pass | 90 | |
44f460c3 | 229 | And I navigate to "View > Grader report" in the course gradebook |
c977b350 MG |
230 | And I turn editing mode on |
231 | And I click on "Edit glossary Test Glossary 1" "link" | |
47f084c6 | 232 | And I expand all fieldsets |
c977b350 MG |
233 | Then the field "Grade to pass" matches value "90" |
234 | And I set the field "Grade to pass" to "80" | |
235 | And I press "Save changes" | |
fdeeaff9 | 236 | And I am on "Course 1" course homepage |
c977b350 MG |
237 | And I follow "Test Glossary 1" |
238 | And I follow "Edit settings" | |
239 | And the field "Grade to pass" matches value "80" |