[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @core @core_grades 2 Feature: We can use calculated grade totals 3 In order to calculate grade totals 4 As an teacher 5 I need to add aggregate columns to the gradebook 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 the following "grade categories" exist: 20 | fullname | course | 21 | Sub category 1 | C1 | 22 | Sub category 2 | C1 | 23 And the following "activities" exist: 24 | activity | course | idnumber | name | intro | grade | 25 | assign | C1 | a1 | Test assignment one | Submit something! | 300 | 26 | assign | C1 | a2 | Test assignment two | Submit something! | 100 | 27 | assign | C1 | a3 | Test assignment three | Submit something! | 150 | 28 | assign | C1 | a4 | Test assignment four | Submit nothing! | 150 | 29 And the following "activities" exist: 30 | activity | course | idnumber | name | intro | gradecategory | grade | 31 | assign | C1 | a5 | Test assignment five | Submit something! | Sub category 1 | 20 | 32 | assign | C1 | a6 | Test assignment six | Submit something! | Sub category 1 | 10 | 33 | assign | C1 | a7 | Test assignment seven | Submit nothing! | Sub category 1 | 15 | 34 And the following "activities" exist: 35 | activity | course | idnumber | name | intro | gradecategory | grade | 36 | assign | C1 | a8 | Test assignment eight | Submit something! | Sub category 2 | 20 | 37 | assign | C1 | a9 | Test assignment nine | Submit something! | Sub category 2 | 10 | 38 | assign | C1 | 10 | Test assignment ten | Submit nothing! | Sub category 2 | 15 | 39 And I log in as "admin" 40 And I set the following administration settings values: 41 | 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 | 42 And I log out 43 And I log in as "teacher1" 44 And I follow "Course 1" 45 And I navigate to "Grades" node in "Course administration" 46 And I turn editing mode on 47 And I change window size to "large" 48 And I give the grade "60.00" to the user "Student 1" for the grade item "Test assignment one" 49 And I give the grade "20.00" to the user "Student 1" for the grade item "Test assignment two" 50 And I give the grade "40.00" to the user "Student 1" for the grade item "Test assignment three" 51 And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment five" 52 And I give the grade "5.00" to the user "Student 1" for the grade item "Test assignment six" 53 And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment eight" 54 And I give the grade "5.00" to the user "Student 1" for the grade item "Test assignment nine" 55 And I press "Save changes" 56 And I set the following settings for grade item "Test assignment two": 57 | Hidden | 1 | 58 And I set the following settings for grade item "Test assignment five": 59 | Hidden | 1 | 60 And I set the following settings for grade item "Test assignment eight": 61 | Hidden | 1 | 62 And I change window size to "medium" 63 And I navigate to "Course grade settings" node in "Grade administration > Setup" 64 And I set the field "Grade display type" to "Real (percentage)" 65 And I press "Save changes" 66 67 Scenario: Mean of grades aggregation 68 And I set the following settings for grade item "Course 1": 69 | Aggregation | Mean of grades | 70 And I set the following settings for grade item "Sub category 1": 71 | Aggregation | Mean of grades | 72 And I set the following settings for grade item "Sub category 2": 73 | Aggregation | Mean of grades | 74 | Exclude empty grades | 0 | 75 And I turn editing mode off 76 Then I should see "30.00 (30.00 %)" in the ".course" "css_element" 77 And I navigate to "Course grade settings" node in "Grade administration > Setup" 78 And I set the field "Hide totals if they contain hidden items" to "Show totals excluding hidden items" 79 And I press "Save changes" 80 And I log out 81 And I log in as "student1" 82 And I follow "Grades" in the user menu 83 And I should see "30.42 (30.42 %)" in the "overview-grade" "table" 84 85 Scenario: Weighted mean of grades aggregation 86 And I set the following settings for grade item "Course 1": 87 | Aggregation | Weighted mean of grades | 88 And I set the following settings for grade item "Sub category 1": 89 | Aggregation | Weighted mean of grades | 90 | Item weight | 1 | 91 And I set the following settings for grade item "Sub category 2": 92 | Aggregation | Weighted mean of grades | 93 | Item weight | 1 | 94 | Exclude empty grades | 0 | 95 And I set the following settings for grade item "Test assignment one": 96 | Item weight | 3 | 97 And I turn editing mode off 98 Then I should see "27.14 (27.14 %)" in the ".course" "css_element" 99 And I navigate to "Course grade settings" node in "Grade administration > Setup" 100 And I set the field "Hide totals if they contain hidden items" to "Show totals excluding hidden items" 101 And I press "Save changes" 102 And I log out 103 And I log in as "student1" 104 And I follow "Grades" in the user menu 105 And I should see "26.94 (26.94 %)" in the "overview-grade" "table" 106 107 Scenario: Simple weighted mean of grades aggregation 108 And I set the following settings for grade item "Course 1": 109 | Aggregation | Simple weighted mean of grades | 110 And I set the following settings for grade item "Sub category 1": 111 | Aggregation | Simple weighted mean of grades | 112 And I set the following settings for grade item "Sub category 2": 113 | Aggregation | Simple weighted mean of grades | 114 | Exclude empty grades | 0 | 115 And I set the following settings for grade item "Test assignment one": 116 | Extra credit | 1 | 117 And I turn editing mode off 118 Then I should see "45.19 (45.19 %)" in the ".course" "css_element" 119 And I navigate to "Course grade settings" node in "Grade administration > Setup" 120 And I set the field "Hide totals if they contain hidden items" to "Show totals excluding hidden items" 121 And I press "Save changes" 122 And I log out 123 And I log in as "student1" 124 And I follow "Grades" in the user menu 125 And I should see "48.57 (48.57 %)" in the "overview-grade" "table" 126 127 Scenario: Mean of grades (with extra credits) aggregation 128 And I set the following settings for grade item "Course 1": 129 | Aggregation | Mean of grades (with extra credits) | 130 And I set the following settings for grade item "Sub category 1": 131 | Aggregation | Mean of grades (with extra credits) | 132 And I set the following settings for grade item "Sub category 2": 133 | Aggregation | Mean of grades (with extra credits) | 134 | Exclude empty grades | 0 | 135 And I set the following settings for grade item "Test assignment one": 136 | Extra credit weight | 2 | 137 And I turn editing mode off 138 Then I should see "42.50 (42.50 %)" in the ".course" "css_element" 139 And I navigate to "Course grade settings" node in "Grade administration > Setup" 140 And I set the field "Hide totals if they contain hidden items" to "Show totals excluding hidden items" 141 And I press "Save changes" 142 And I log out 143 And I log in as "student1" 144 And I follow "Grades" in the user menu 145 And I should see "47.22 (47.22 %)" in the "overview-grade" "table" 146 147 Scenario: Median of grades aggregation 148 And I set the following settings for grade item "Course 1": 149 | Aggregation | Median of grades | 150 And I set the following settings for grade item "Sub category 1": 151 | Aggregation | Median of grades | 152 And I set the following settings for grade item "Sub category 2": 153 | Aggregation | Median of grades | 154 | Exclude empty grades | 0 | 155 And I turn editing mode off 156 Then I should see "26.67 (26.67 %)" in the ".course" "css_element" 157 And I navigate to "Course grade settings" node in "Grade administration > Setup" 158 And I set the field "Hide totals if they contain hidden items" to "Show totals excluding hidden items" 159 And I press "Save changes" 160 And I log out 161 And I log in as "student1" 162 And I follow "Grades" in the user menu 163 And I should see "25.83 (25.83 %)" in the "overview-grade" "table" 164 165 Scenario: Lowest grade aggregation 166 And I set the following settings for grade item "Course 1": 167 | Aggregation | Lowest grade | 168 And I set the following settings for grade item "Sub category 1": 169 | Aggregation | Lowest grade | 170 And I set the following settings for grade item "Sub category 2": 171 | Aggregation | Lowest grade | 172 | Exclude empty grades | 0 | 173 And I set the following settings for grade item "Test assignment five": 174 | Hidden | 1 | 175 And I set the following settings for grade item "Test assignment four": 176 | Hidden | 1 | 177 And I turn editing mode off 178 Then I should see "0.00 (0.00 %)" in the ".course" "css_element" 179 And I navigate to "Course grade settings" node in "Grade administration > Setup" 180 And I set the field "Hide totals if they contain hidden items" to "Show totals excluding hidden items" 181 And I press "Save changes" 182 And I log out 183 And I log in as "student1" 184 And I follow "Grades" in the user menu 185 And I should see "0.00 (0.00 %)" in the "overview-grade" "table" 186 187 Scenario: Highest grade aggregation 188 And I set the following settings for grade item "Course 1": 189 | Aggregation | Highest grade | 190 And I set the following settings for grade item "Sub category 1": 191 | Aggregation | Highest grade | 192 And I set the following settings for grade item "Sub category 2": 193 | Aggregation | Highest grade | 194 | Exclude empty grades | 0 | 195 And I set the following settings for grade item "Test assignment one": 196 | Hidden | 1 | 197 And I turn editing mode off 198 Then I should see "50.00 (50.00 %)" in the ".course" "css_element" 199 And I navigate to "Course grade settings" node in "Grade administration > Setup" 200 And I set the field "Hide totals if they contain hidden items" to "Show totals excluding hidden items" 201 And I press "Save changes" 202 And I log out 203 And I log in as "student1" 204 And I follow "Grades" in the user menu 205 And I should see "50.00 (50.00 %)" in the "overview-grade" "table" 206 207 Scenario: Mode of grades aggregation 208 And I set the following settings for grade item "Course 1": 209 | Aggregation | Mode of grades | 210 And I set the following settings for grade item "Sub category 1": 211 | Aggregation | Mode of grades | 212 And I set the following settings for grade item "Sub category 1": 213 | Aggregation | Mode of grades | 214 | Exclude empty grades | 0 | 215 And I set the following settings for grade item "Test assignment one": 216 | Hidden | 1 | 217 And I turn editing mode off 218 Then I should see "50.00 (50.00 %)" in the ".course" "css_element" 219 And I navigate to "Course grade settings" node in "Grade administration > Setup" 220 And I set the field "Hide totals if they contain hidden items" to "Show totals excluding hidden items" 221 And I press "Save changes" 222 And I log out 223 And I log in as "student1" 224 And I follow "Grades" in the user menu 225 And I should see "50.00 (50.00 %)" in the "overview-grade" "table" 226 227 Scenario: Natural aggregation on outcome items with natural weights 228 And the following config values are set as admin: 229 | enableoutcomes | 1 | 230 And the following "scales" exist: 231 | name | scale | 232 | Test Scale | Disappointing, Good, Very good, Excellent | 233 And the following "grade outcomes" exist: 234 | fullname | shortname | course | scale | 235 | Outcome 1 | OT1 | C1 | Test Scale | 236 And the following "grade items" exist: 237 | itemname | course | outcome | gradetype | scale | 238 | Test outcome item one | C1 | OT1 | Scale | Test Scale | 239 And I expand "Setup" node 240 And I follow "Gradebook setup" 241 And I set the following settings for grade item "Course 1": 242 | Aggregation | Natural | 243 | Include outcomes in aggregation | 1 | 244 | Exclude empty grades | 0 | 245 And I follow "Grader report" 246 And I give the grade "Excellent" to the user "Student 1" for the grade item "Test outcome item one" 247 And I press "Save changes" 248 And I navigate to "Course grade settings" node in "Grade administration > Setup" 249 And I set the field "report_overview_showtotalsifcontainhidden" to "Show totals excluding hidden items" 250 And I set the field "report_user_showtotalsifcontainhidden" to "Show totals excluding hidden items" 251 And I press "Save changes" 252 And I log out 253 And I log in as "student1" 254 And I follow "Grades" in the user menu 255 Then I should see "114.82 (18.27 %)" in the "overview-grade" "table" 256 And I follow "Course 1" 257 And "Test outcome item one" row "Grade" column of "user-grade" table should contain "Excellent (100.00 %)" 258 And I log out 259 And I log in as "teacher1" 260 And I follow "Course 1" 261 And I navigate to "Grades" node in "Course administration" 262 And I expand "Setup" node 263 And I follow "Gradebook setup" 264 And I set the following settings for grade item "Test outcome item one": 265 | Extra credit | 1 | 266 And I log out 267 And I log in as "student1" 268 And I follow "Grades" in the user menu 269 Then I should see "114.00 (18.39 %)" in the "overview-grade" "table" 270 And I follow "Course 1" 271 And "Test outcome item one" row "Grade" column of "user-grade" table should contain "Excellent (100.00 %)" 272 And I log out 273 And I log in as "teacher1" 274 And I follow "Course 1" 275 And I navigate to "Grades" node in "Course administration" 276 And I expand "Setup" node 277 And I follow "Gradebook setup" 278 And I set the following settings for grade item "Course 1": 279 | Aggregation | Natural | 280 | Include outcomes in aggregation | 0 | 281 And I log out 282 And I log in as "student1" 283 And I follow "Grades" in the user menu 284 Then I should see "110.00 (17.74 %)" in the "overview-grade" "table" 285 And I follow "Course 1" 286 And "Test outcome item one" row "Grade" column of "user-grade" table should contain "Excellent (100.00 %)" 287 288 Scenario: Natural aggregation on outcome items with modified weights 289 And the following config values are set as admin: 290 | enableoutcomes | 1 | 291 And the following "scales" exist: 292 | name | scale | 293 | Test Scale | Disappointing, Good, Very good, Excellent | 294 And the following "grade outcomes" exist: 295 | fullname | shortname | course | scale | 296 | Outcome 1 | OT1 | C1 | Test Scale | 297 And the following "grade items" exist: 298 | itemname | course | outcome | gradetype | scale | 299 | Test outcome item one | C1 | OT1 | Scale | Test Scale | 300 And I navigate to "Grades" node in "Course administration" 301 And I expand "Setup" node 302 And I follow "Gradebook setup" 303 And I set the following settings for grade item "Course 1": 304 | Aggregation | Natural | 305 | Include outcomes in aggregation | 1 | 306 | Exclude empty grades | 0 | 307 And I set the following settings for grade item "Test outcome item one": 308 | Weight adjusted | 1 | 309 | aggregationcoef2 | 100 | 310 And I follow "Grader report" 311 And I give the grade "Excellent" to the user "Student 1" for the grade item "Test outcome item one" 312 And I press "Save changes" 313 And I navigate to "Course grade settings" node in "Grade administration > Setup" 314 And I set the field "report_overview_showtotalsifcontainhidden" to "Show totals excluding hidden items" 315 And I set the field "report_user_showtotalsifcontainhidden" to "Show totals excluding hidden items" 316 And I press "Save changes" 317 And I log out 318 And I log in as "student1" 319 And I follow "Grades" in the user menu 320 Then I should see "4.00 (100.00 %)" in the "overview-grade" "table" 321 And I follow "Course 1" 322 And "Test outcome item one" row "Grade" column of "user-grade" table should contain "Excellent (100.00 %)" 323 324 Scenario: Natural aggregation 325 And I set the following settings for grade item "Sub category 1": 326 | Aggregation | Natural | 327 | Exclude empty grades | 0 | 328 And I set the following settings for grade item "Sub category 2": 329 | Aggregation | Natural | 330 | Exclude empty grades | 1 | 331 And I set the following settings for grade item "Course 1": 332 | Aggregation | Natural | 333 | Exclude empty grades | 0 | 334 And I set the following settings for grade item "Test assignment six": 335 | Weight adjusted | 1 | 336 | aggregationcoef2 | 50 | 337 And I set the following settings for grade item "Test assignment three": 338 | Extra credit | 1 | 339 And I turn editing mode off 340 Then I should see "152.68 (24.43 %)" in the ".course" "css_element" 341 And I navigate to "Course grade settings" node in "Grade administration > Setup" 342 And I set the field "report_overview_showtotalsifcontainhidden" to "Show totals excluding hidden items" 343 And I set the field "report_user_showtotalsifcontainhidden" to "Show totals excluding hidden items" 344 And I set the field "Show contribution to course total" to "Show" 345 And I set the field "Show weightings" to "Show" 346 And I press "Save changes" 347 And I select "User report" from the "Grade report" singleselect 348 And I select "Student 1" from the "Select all or one user" singleselect 349 And the following should exist in the "user-grade" table: 350 | Grade item | Calculated weight | Grade | Range | Contribution to course total | 351 | Test assignment five | 28.57 % | 10.00 (50.00 %) | 0–20 | 1.03 % | 352 | Test assignment six | 50.00 % | 5.00 (50.00 %) | 0–10 | 1.80 % | 353 | Test assignment seven | 21.43 % | - | 0–15 | 0.00 % | 354 | Test assignment eight | 66.67 % | 10.00 (50.00 %) | 0–20 | 1.60 % | 355 | Test assignment nine | 33.33 % | 5.00 (50.00 %) | 0–10 | 0.80 % | 356 | Test assignment ten | 0.00 %( Empty ) | - | 0–15 | 0.00 % | 357 | Test assignment one | 48.00 % | 60.00 (20.00 %) | 0–300 | 9.60 % | 358 | Test assignment two | 16.00 % | 20.00 (20.00 %) | 0–100 | 3.20 % | 359 | Test assignment three | 24.00 %( Extra credit ) | 40.00 (26.67 %) | 0–150 | 6.40 % | 360 | Test assignment four | 24.00 % | - | 0–150 | 0.00 % | 361 And I log out 362 And I log in as "student1" 363 And I follow "Grades" in the user menu 364 And I should see "113.75 (23.45 %)" in the "overview-grade" "table" 365 And I follow "Course 1" 366 And the following should exist in the "user-grade" table: 367 | Grade item | Calculated weight | Grade | Range | Contribution to course total | 368 | Test assignment six | 70.00 % | 5.00 (50.00 %) | 0–10 | 1.80 % | 369 | Test assignment seven | 30.00 % | - | 0–15 | 0.00 % | 370 | Test assignment nine | 100.00 % | 5.00 (50.00 %) | 0–10 | 1.03 % | 371 | Test assignment ten | -( Empty ) | - | 0–15 | - | 372 | Test assignment one | 61.86 % | 60.00 (20.00 %) | 0–300 | 12.37 % | 373 | Test assignment three | 30.93 %( Extra credit ) | 40.00 (26.67 %) | 0–150 | 8.25 % | 374 | Test assignment four | 30.93 % | - | 0–150 | 0.00 % | 375 376 Scenario: Natural aggregation with drop lowest 377 When I log out 378 And I log in as "admin" 379 And I am on site homepage 380 And I follow "Course 1" 381 And I navigate to "Grades" node in "Course administration" 382 And I turn editing mode on 383 And I set the following settings for grade item "Sub category 1": 384 | Aggregation | Natural | 385 | Exclude empty grades | 0 | 386 And I set the following settings for grade item "Sub category 2": 387 | Aggregation | Natural | 388 | Exclude empty grades | 0 | 389 And I set the following settings for grade item "Course 1": 390 | Aggregation | Natural | 391 | Exclude empty grades | 0 | 392 And I navigate to "Gradebook setup" node in "Grade administration > Setup" 393 And I press "Add category" 394 And I set the following fields to these values: 395 | Category name | Sub category 3 | 396 | Aggregation | Natural | 397 | Drop the lowest | 1 | 398 And I press "Save changes" 399 And I press "Add grade item" 400 And I set the following fields to these values: 401 | Item name | Manual item 1 | 402 | Grade category | Sub category 3 | 403 And I press "Save changes" 404 And I press "Add grade item" 405 And I set the following fields to these values: 406 | Item name | Manual item 2 | 407 | Grade category | Sub category 3 | 408 And I press "Save changes" 409 And I press "Add grade item" 410 And I set the following fields to these values: 411 | Item name | Manual item 3 | 412 | Grade category | Sub category 3 | 413 And I press "Save changes" 414 And I follow "Grader report" 415 And I give the grade "60.00" to the user "Student 1" for the grade item "Manual item 1" 416 And I give the grade "20.00" to the user "Student 1" for the grade item "Manual item 2" 417 And I give the grade "40.00" to the user "Student 1" for the grade item "Manual item 3" 418 And I press "Save changes" 419 And I turn editing mode off 420 Then I should see "250.00 (25.25 %)" in the ".course" "css_element" 421 And I turn editing mode on 422 And I set the following settings for grade item "Manual item 2": 423 | Extra credit | 1 | 424 And I turn editing mode off 425 And I should see "270.00 (27.27 %)" in the ".course" "css_element" 426 And I turn editing mode on 427 And I set the following settings for grade item "Manual item 2": 428 | Extra credit | 0 | 429 | Maximum grade | 200 | 430 | Rescale existing grades | No | 431 And I give the grade "21.00" to the user "Student 1" for the grade item "Manual item 2" 432 And I press "Save changes" 433 And I give the grade "20.00" to the user "Student 1" for the grade item "Manual item 2" 434 And I press "Save changes" 435 And I turn editing mode off 436 And I should see "270.00 (22.69 %)" in the ".course" "css_element" 437 And I turn editing mode on 438 And I set the following settings for grade item "Manual item 2": 439 | Extra credit | 0 | 440 | Maximum grade | 100 | 441 | Rescale existing grades | No | 442 And I give the grade "21.00" to the user "Student 1" for the grade item "Manual item 2" 443 And I press "Save changes" 444 And I give the grade "20.00" to the user "Student 1" for the grade item "Manual item 2" 445 And I press "Save changes" 446 And I turn editing mode off 447 And I should see "250.00 (25.25 %)" in the ".course" "css_element" 448 And I navigate to "Gradebook setup" node in "Grade administration > Setup" 449 And I press "Add category" 450 And I set the following fields to these values: 451 | Category name | Sub sub category 1 | 452 | Parent category | Sub category 3 | 453 And I press "Save changes" 454 And I follow "Grader report" 455 And I should see "270.00 (24.77 %)" in the ".course" "css_element" 456 457 @javascript 458 Scenario: Natural aggregation from the setup screen 459 And I select "Gradebook setup" from the "Grade report" singleselect 460 And I set the following settings for grade item "Course 1": 461 | Aggregation | Natural | 462 And I set the following settings for grade item "Sub category 1": 463 | Aggregation | Natural | 464 And I set the following settings for grade item "Sub category 2": 465 | Aggregation | Natural | 466 467 And I set the field "Override weight of Test assignment one" to "1" 468 And the field "Weight of Test assignment one" matches value "37.975" 469 And I set the field "Weight of Test assignment one" to "10" 470 471 And I set the field "Override weight of Test assignment two" to "1" 472 And the field "Weight of Test assignment two" matches value "12.658" 473 And I set the field "Override weight of Test assignment two" to "0" 474 475 And I set the field "Override weight of Test assignment six" to "1" 476 And the field "Weight of Test assignment six" matches value "22.222" 477 And I set the field "Weight of Test assignment six" to "50" 478 And I set the field "Override weight of Test assignment six" to "0" 479 480 And I set the field "Override weight of Test assignment ten" to "1" 481 And the field "Weight of Test assignment ten" matches value "33.333" 482 And I set the field "Weight of Test assignment ten" to "50" 483 484 And I set the field "Override weight of Sub category 1" to "1" 485 And the field "Weight of Sub category 1" matches value "5.696" 486 And I set the field "Weight of Sub category 1" to "15" 487 488 When I press "Save changes" 489 And I set the field "Override weight of Test assignment two" to "1" 490 And I set the field "Override weight of Test assignment six" to "1" 491 492 Then the field "Weight of Test assignment one" matches value "10.0" 493 And the field "Weight of Test assignment two" matches value "16.854" 494 And the field "Weight of Test assignment six" matches value "22.222" 495 And the field "Weight of Test assignment ten" matches value "50.0" 496 And the field "Weight of Sub category 1" matches value "15.0" 497 And I set the field "Override weight of Test assignment one" to "0" 498 And I set the field "Override weight of Test assignment two" to "0" 499 And I set the field "Override weight of Test assignment six" to "0" 500 And I set the field "Override weight of Sub category 1" to "0" 501 And I press "Save changes" 502 And I set the field "Override weight of Test assignment one" to "1" 503 And I set the field "Override weight of Sub category 1" to "1" 504 And the field "Weight of Test assignment one" matches value "37.975" 505 And the field "Weight of Sub category 1" matches value "5.696" 506 And I reset weights for grade category "Sub category 2" 507 And the field "Weight of Test assignment ten" matches value "33.333" 508 509 @javascript 510 Scenario: Natural aggregation with weights of zero 511 When I set the following settings for grade item "Course 1": 512 | Aggregation | Natural | 513 | Exclude empty grades | 0 | 514 And I set the following settings for grade item "Sub category 1": 515 | Aggregation | Natural | 516 | Exclude empty grades | 0 | 517 And I set the following settings for grade item "Sub category 2": 518 | Aggregation | Natural | 519 | Exclude empty grades | 0 | 520 And I turn editing mode off 521 And I select "Gradebook setup" from the "Grade report" singleselect 522 And I set the field "Override weight of Test assignment one" to "1" 523 And I set the field "Weight of Test assignment one" to "0" 524 And I set the field "Override weight of Test assignment six" to "1" 525 And I set the field "Weight of Test assignment six" to "0" 526 And I set the field "Override weight of Test assignment nine" to "1" 527 And I set the field "Weight of Test assignment nine" to "100" 528 And I press "Save changes" 529 And I navigate to "Course grade settings" node in "Grade administration > Setup" 530 And I set the field "report_overview_showtotalsifcontainhidden" to "Show totals excluding hidden items" 531 And I set the field "report_user_showtotalsifcontainhidden" to "Show totals excluding hidden items" 532 And I set the field "Show contribution to course total" to "Show" 533 And I set the field "Show weightings" to "Show" 534 And I press "Save changes" 535 Then I should see "75.00 (16.85 %)" in the ".course" "css_element" 536 And I select "User report" from the "Grade report" singleselect 537 And I select "Student 1" from the "Select all or one user" singleselect 538 And the following should exist in the "user-grade" table: 539 | Grade item | Calculated weight | Grade | Contribution to course total | 540 | Test assignment five | 57.14 % | 10.00 (50.00 %) | 2.25 % | 541 | Test assignment six | 0.00 % | 5.00 (50.00 %) | 0.00 % | 542 | Test assignment seven | 42.86 % | - | 0.00 % | 543 | Test assignment eight | 0.00 % | 10.00 (50.00 %) | 0.00 % | 544 | Test assignment nine | 100.00 % | 5.00 (50.00 %) | 1.12 % | 545 | Test assignment ten | 0.00 % | - | 0.00 % | 546 | Test assignment one | 0.00 % | 60.00 (20.00 %) | 0.00 % | 547 | Test assignment two | 22.47 % | 20.00 (20.00 %) | 4.49 % | 548 | Test assignment three | 33.71 % | 40.00 (26.67 %) | 8.99 % | 549 | Test assignment four | 33.71 % | - | 0.00 | 550 And I log out 551 And I log in as "student1" 552 And I follow "Grades" in the user menu 553 And I should see "45.00 (13.85 %)" in the "overview-grade" "table" 554 And I follow "Course 1" 555 And the following should exist in the "user-grade" table: 556 | Grade item | Calculated weight | Grade | Contribution to course total | 557 | Test assignment six | 0.00 % | 5.00 (50.00 %) | 0.00 % | 558 | Test assignment seven | 100.00 % | - | 0.00 % | 559 | Test assignment nine | 100.00 % | 5.00 (50.00 %) | 1.54 % | 560 | Test assignment ten | 0.00 | - | 0.00 % | 561 | Test assignment one | 0.00 % | 60.00 (20.00 %) | 0.00 % | 562 | Test assignment three | 46.15 % | 40.00 (26.67 %) | 12.31 % | 563 | Test assignment four | 46.15 % | - | 0.00 % |
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Aug 11 10:00:09 2016 | Cross-referenced by PHPXref 0.7.1 |