[ Index ] |
PHP Cross Reference of moodle-2.8 |
[Summary view] [Print] [Text view]
1 @core @core_grades 2 Feature: We can change the grading type and maximum grade point values 3 In order to verify that we can change the system-level maximum grade point value 4 As an admin 5 I need to modify the system maximum grade point and ensure that activities can use the full range. 6 I need to ensure that using scales for activities still works correctly. 7 I need to ensure that the maximum grade point value is enforced for new and existing activities. 8 9 Background: 10 Given the following "courses" exist: 11 | fullname | shortname | category | format | 12 | Course 1 | C1 | 0 | topics | 13 Given the following "activities" exist: 14 | activity | course | idnumber | name | intro | 15 | assign | C1 | assign1| Test Assignment 1 | Test Assignment 1 | 16 And I log in as "admin" 17 And I navigate to "General settings" node in "Site administration > Grades" 18 And I set the following fields to these values: 19 | Grade point maximum | 900 | 20 | Grade point default | 800 | 21 And I press "Save changes" 22 And I follow "Home" 23 And I follow "Course 1" 24 25 @javascript 26 Scenario: Validate that switching the type of grading used correctly disables input form elements 27 When I follow "Test Assignment 1" 28 And I follow "Edit settings" 29 And I expand all fieldsets 30 And I set the field "grade[modgrade_type]" to "Point" 31 Then the "Scale" "select" should be disabled 32 And the "Maximum points" "field" should be enabled 33 And I set the field "grade[modgrade_type]" to "Scale" 34 And the "Maximum points" "field" should be disabled 35 Then the "Scale" "select" should be enabled 36 And I set the field "grade[modgrade_type]" to "None" 37 Then the "Scale" "select" should be disabled 38 And the "Maximum points" "field" should be disabled 39 And I press "Save and return to course" 40 41 @javascript 42 Scenario: Create an activity with a maximum grade point value less than the system maximum 43 When I follow "Test Assignment 1" 44 And I follow "Edit settings" 45 And I expand all fieldsets 46 And I set the field "grade[modgrade_type]" to "point" 47 And I set the field "grade[modgrade_point]" to "600" 48 And I press "Save and display" 49 And I follow "Edit settings" 50 Then the field "grade[modgrade_point]" matches value "600" 51 And the "Scale" "select" should be disabled 52 And I press "Save and return to course" 53 54 @javascript 55 Scenario: Create an activity with a scale as the grade type 56 When I follow "Test Assignment 1" 57 And I follow "Edit settings" 58 And I expand all fieldsets 59 And I set the field "grade[modgrade_type]" to "Scale" 60 And I set the field "grade[modgrade_scale]" to "Separate and Connected ways of knowing" 61 And I press "Save and display" 62 And I follow "Edit settings" 63 Then the field "grade[modgrade_scale]" matches value "Separate and Connected ways of knowing" 64 And the "Maximum points" "field" should be disabled 65 And I press "Save and return to course" 66 67 @javascript 68 Scenario: Create an activity with no grade as the grade type 69 When I follow "Test Assignment 1" 70 And I follow "Edit settings" 71 And I expand all fieldsets 72 And I set the field "grade[modgrade_type]" to "None" 73 And I press "Save and display" 74 And I follow "Edit settings" 75 And the "Scale" "select" should be disabled 76 And the "Maximum points" "field" should be disabled 77 And I press "Save and return to course" 78 79 @javascript 80 Scenario: Create an activity with a maximum grade point value higher than the system maximum 81 When I follow "Test Assignment 1" 82 And I follow "Edit settings" 83 And I expand all fieldsets 84 And I set the field "grade[modgrade_type]" to "Point" 85 And I set the field "grade[modgrade_point]" to "20000" 86 And I press "Save and display" 87 Then I should see "Invalid Grade Value. This must be an integer between 0 and 900" 88 And I press "Cancel" 89 90 @javascript 91 Scenario: Create an activity with a valid maximum grade point and then change the system maximum to be lower 92 When I follow "Test Assignment 1" 93 And I follow "Edit settings" 94 And I expand all fieldsets 95 And I set the field "grade[modgrade_type]" to "point" 96 And I set the field "grade[modgrade_point]" to "600" 97 And I press "Save and display" 98 And I navigate to "General settings" node in "Site administration > Grades" 99 And I set the following fields to these values: 100 | Grade point maximum | 100 | 101 And I press "Save changes" 102 And I follow "Home" 103 And I follow "Course 1" 104 And I follow "Test Assignment 1" 105 And I follow "Edit settings" 106 And I press "Save and display" 107 Then I should see "Invalid Grade Value. This must be an integer between 0 and 100" 108 And I press "Cancel"
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Nov 28 20:29:05 2014 | Cross-referenced by PHPXref 0.7.1 |