[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/grade/tests/behat/ -> grade_to_pass.feature (source)

   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 |
  11        | teacher1 | Teacher | 1 | teacher1@example.com |
  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 |
  18      And the following "scales" exist:
  19        | name | scale |
  20        | Test Scale 1 | Disappointing, Good, Very good, Excellent |
  21      And I log in as "teacher1"
  22      And I follow "Course 1"
  23  
  24    @javascript
  25    Scenario: Validate that switching the type of grading used correctly disables grade to pass
  26      When I turn editing mode on
  27      And I add a "Assignment" to section "1"
  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"
  32      And the "Grade to pass" "field" should be disabled
  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
  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"
  46      And I press "Cancel"
  47  
  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 |
  57      And I navigate to "Grades" node in "Course administration"
  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"
  61      And I follow "Course 1"
  62      And I follow "Test Assignment 1"
  63      And I follow "Edit settings"
  64      And I expand all fieldsets
  65      And I set the field "Grade to pass" to "30"
  66      And I press "Save and return to course"
  67      And I navigate to "Grades" node in "Course administration"
  68      And I click on "Edit  assign Test Assignment 1" "link"
  69      And the field "Grade to pass" matches value "30"
  70  
  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 |
  79      And I navigate to "Grades" node in "Course administration"
  80      And I turn editing mode on
  81      And I click on "Edit  assign Test Assignment 1" "link"
  82      And I expand all fieldsets
  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"
  86      And I follow "Course 1"
  87      And I follow "Test Assignment 1"
  88      And I follow "Edit settings"
  89      And the field "Grade to pass" matches value "4"
  90  
  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  
 101    Scenario: Set a valid grade to pass for workshop activity
 102      When I turn editing mode on
 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 |
 107        | Submission grade to pass | 40 |
 108        | gradinggrade | 20 |
 109        | Assessment grade to pass | 10 |
 110      And I navigate to "Grades" node in "Course administration"
 111      And I turn editing mode on
 112      And I click on "Edit  workshop Test Workshop 1 (submission)" "link"
 113      And I expand all fieldsets
 114      Then the field "Grade to pass" matches value "40"
 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"
 118      And I expand all fieldsets
 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"
 122      And I follow "Course 1"
 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  
 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 |
 137      Then "The grade to pass can not be greater than the maximum possible grade 80" "text" should exist in the "#fitem_id_submissiongradepass .error" "css_element"
 138      Then "The grade to pass can not be greater than the maximum possible grade 20" "text" should exist in the "#fitem_id_gradinggradepass .error" "css_element"
 139  
 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 |
 145      And I navigate to "Grades" node in "Course administration"
 146      And I turn editing mode on
 147      And I click on "Edit  quiz Test Quiz 1" "link"
 148      And I expand all fieldsets
 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"
 152      And I follow "Course 1"
 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  
 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            |
 163      And I navigate to "Grades" node in "Course administration"
 164      And I turn editing mode on
 165      And I click on "Edit  lesson Test Lesson 1" "link"
 166      And I expand all fieldsets
 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"
 170      And I follow "Course 1"
 171      And I follow "Test Lesson 1"
 172      And I follow "Edit settings"
 173      And the field "Grade to pass" matches value "80"
 174  
 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               |
 180        | Aggregate type | Average of ratings |
 181        | Grade to pass  | 90                 |
 182      And I navigate to "Grades" node in "Course administration"
 183      And I turn editing mode on
 184      And I click on "Edit  data Test Database 1" "link"
 185      And I expand all fieldsets
 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"
 189      And I follow "Course 1"
 190      And I follow "Test Database 1"
 191      And I follow "Edit settings"
 192      And the field "Grade to pass" matches value "80"
 193  
 194    Scenario: Set an invalid grade to pass for forum activity
 195      When I turn editing mode on
 196      And I add a "Forum" to section "1" and I fill the form with:
 197        | Forum name     | Test Forum 1    |
 198        | Description    | Test               |
 199        | Aggregate type | Average of ratings |
 200        | Grade to pass  | 90                 |
 201        | scale[modgrade_point] | 60 |
 202      Then I should see "The grade to pass can not be greater than the maximum possible grade 60"
 203  
 204    Scenario: Set a valid grade to pass for forum activity
 205      When I turn editing mode on
 206      And I add a "Forum" to section "1" and I fill the form with:
 207        | Forum name     | Test Forum 1    |
 208        | Description    | Test               |
 209        | Aggregate type | Average of ratings |
 210        | Grade to pass  | 90                 |
 211      And I navigate to "Grades" node in "Course administration"
 212      And I turn editing mode on
 213      And I click on "Edit  forum Test Forum 1" "link"
 214      And I expand all fieldsets
 215      Then the field "Grade to pass" matches value "90"
 216      And I set the field "Grade to pass" to "80"
 217      And I press "Save changes"
 218      And I follow "Course 1"
 219      And I follow "Test Forum 1"
 220      And I follow "Edit settings"
 221      And the field "Grade to pass" matches value "80"
 222  
 223    Scenario: Set a valid grade to pass for glossary activity
 224      When I turn editing mode on
 225      And I add a "Glossary" to section "1" and I fill the form with:
 226        | Name           | Test Glossary 1    |
 227        | Description    | Test               |
 228        | Aggregate type | Average of ratings |
 229        | Grade to pass  | 90                 |
 230      And I navigate to "Grades" node in "Course administration"
 231      And I turn editing mode on
 232      And I click on "Edit  glossary Test Glossary 1" "link"
 233      And I expand all fieldsets
 234      Then the field "Grade to pass" matches value "90"
 235      And I set the field "Grade to pass" to "80"
 236      And I press "Save changes"
 237      And I follow "Course 1"
 238      And I follow "Test Glossary 1"
 239      And I follow "Edit settings"
 240      And the field "Grade to pass" matches value "80"


Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1