[ Index ] |
PHP Cross Reference of Unnamed Project |
[Summary view] [Print] [Text view]
1 @core_grades 2 Feature: Editing a grade item 3 In order to ensure validation is provided to the teacher 4 As a teacher 5 I need to know why I can not add/edit values on the grade category form 6 7 Background: 8 Given the following "users" exist: 9 | username | firstname | lastname | email | 10 | student1 | Student | 1 | student1@example.com | 11 | teacher1 | Teacher | 1 | teacher1@example.com | 12 And the following "courses" exist: 13 | fullname | shortname | category | groupmode | 14 | Course 1 | C1 | 0 | 1 | 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 navigate to "Scales" node in "Site administration > Grades" 21 And I press "Add a new scale" 22 And I set the following fields to these values: 23 | Name | ABCDEF | 24 | Scale | F,E,D,C,B,A | 25 And I press "Save changes" 26 And I press "Add a new scale" 27 And I set the following fields to these values: 28 | Name | Letter scale | 29 | Scale | Disappointing, Good, Very good, Excellent | 30 And I press "Save changes" 31 And I set the following administration settings values: 32 | 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 | 33 And I log out 34 And I log in as "teacher1" 35 And I am on site homepage 36 And I follow "Course 1" 37 And I navigate to "Gradebook setup" node in "Course administration" 38 And I press "Add category" 39 And I set the following fields to these values: 40 | Category name | Cat 1 | 41 | Aggregation | Highest grade | 42 And I press "Save changes" 43 And I press "Add grade item" 44 And I set the following fields to these values: 45 | Item name | Item 1 | 46 | Grade category | Cat 1 | 47 And I press "Save changes" 48 And I press "Add grade item" 49 And I set the following fields to these values: 50 | Item name | Item 2 | 51 | Grade category | Cat 1 | 52 And I press "Save changes" 53 54 Scenario: Being able to change the grade type, scale and maximum grade for a grade category when there are no overridden grades 55 Given I click on "Edit" "link" in the "Cat 1" "table_row" 56 When I click on "Edit settings" "link" in the "Cat 1" "table_row" 57 Then I should not see "This category has associated grade items which have been overridden. Therefore some grades have already been awarded" 58 And I set the field "Grade type" to "Scale" 59 And I press "Save changes" 60 And I should see "Scale must be selected" 61 And I set the field "Scale" to "ABCDEF" 62 And I press "Save changes" 63 And I should not see "You cannot change the type, as grades already exist for this item" 64 And I click on "Edit" "link" in the "Cat 1" "table_row" 65 And I click on "Edit settings" "link" in the "Cat 1" "table_row" 66 And I should not see "This category has associated grade items which have been overridden. Therefore some grades have already been awarded" 67 And I set the field "Scale" to "Letter scale" 68 And I press "Save changes" 69 And I should not see "You cannot change the scale, as grades already exist for this item" 70 71 Scenario: Attempting to change a category item's grade type when overridden grades already exist 72 Given I navigate to "Grader report" node in "Grade administration" 73 And I turn editing mode on 74 And I give the grade "20.00" to the user "Student 1" for the grade item "Cat 1 total" 75 And I press "Save changes" 76 And I navigate to "Gradebook setup" node in "Grade administration > Setup" 77 And I click on "Edit" "link" in the "Cat 1" "table_row" 78 When I click on "Edit settings" "link" in the "Cat 1" "table_row" 79 Then I should see "This category has associated grade items which have been overridden. Therefore some grades have already been awarded, so the grade type cannot be changed. If you wish to change the maximum grade, you must first choose whether or not to rescale existing grades." 80 And "//div[contains(concat(' ', normalize-space(@class), ' '), 'fstatic') and contains(text(), 'Value')]" "xpath_element" should exist 81 82 Scenario: Attempting to change a category item's scale when overridden grades already exist 83 Given I click on "Edit" "link" in the "Cat 1" "table_row" 84 And I click on "Edit settings" "link" in the "Cat 1" "table_row" 85 And I set the field "Grade type" to "Scale" 86 And I set the field "Scale" to "ABCDEF" 87 And I press "Save changes" 88 And I navigate to "Grader report" node in "Grade administration" 89 And I turn editing mode on 90 And I give the grade "C" to the user "Student 1" for the grade item "Cat 1 total" 91 And I press "Save changes" 92 And I navigate to "Gradebook setup" node in "Grade administration > Setup" 93 And I click on "Edit" "link" in the "Cat 1" "table_row" 94 When I click on "Edit settings" "link" in the "Cat 1" "table_row" 95 Then I should see "This category has associated grade items which have been overridden. Therefore some grades have already been awarded, so the grade type and scale cannot be changed." 96 And "//div[contains(concat(' ', normalize-space(@class), ' '), 'fstatic') and contains(text(), 'ABCDEF')]" "xpath_element" should exist 97 98 Scenario: Attempting to change a category item's maximum grade when no rescaling option has been chosen 99 Given I navigate to "Grader report" node in "Grade administration" 100 And I turn editing mode on 101 And I give the grade "20.00" to the user "Student 1" for the grade item "Cat 1 total" 102 And I press "Save changes" 103 And I navigate to "Gradebook setup" node in "Grade administration > Setup" 104 And I click on "Edit" "link" in the "Cat 1" "table_row" 105 And I click on "Edit settings" "link" in the "Cat 1" "table_row" 106 And I set the field "Maximum grade" to "50" 107 When I press "Save changes" 108 Then I should see "You must choose whether to rescale existing grades or not."
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 |