mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
63e4df60f6
This is a squash of many small fixes. The list of changes are: Initial set of behat selectors overrides required for new theme. set core behat selectors if not overridden by theme Remove pause Fix for checkboxes not saving properly Custom override for click in the user menu Fix for behat guessing the field type. Behat fix for guessing the correct field type. Fix for missing closeElementBefore mforms mess. Fix for textareas not displaying their contents. Fix availability form element Fix action menu selectors for activities in a course page Fix textareas not retaining their values Fix selector for blocks I had to change the single select template to use an input instead of a button because of a behat bug we have not tracked down yet. Fix for frozen attribute in form elements Use input instead of button while behat is still broken Fix for navigation selector override Behat selector fixes and multi-select fixes for templated select Fix for configure blocks selector + booleans for autocomplete Fixes for course_summary behat tests Allow optgroups in single_select Behat fixes for block_navigation Fixes for url form element and activity chooser selectors blocks_social - fix specific selector for behat Fix export_for_template for selectgroups element. Dont set empty id on the form Fix direct call to behat_navigation in backup context Checkbox empty value fix Fix for assign grading panel popouts file picker overrides to find a file manager in the page Fix chat tests to use element name Make selectors in mod_data behat less specific MDL-55839: recent activity behat test relies on time() SQUASH Honour mform element "class" attribute on the container SQUASH Fixes for behat in mod_forum SQUASH search form template showing value as text next to the button SQUASH undo double selectgroup fix SQUASH - The slightly different structure to action menus breaks course drag and drop SQUASH Wrap loading icon in a span so the selector still works. SQUASH Fix fragile javascript in report_loglive SQUASH Fix tabtree, and selectgroups for mod_feedback Also - do-not enhance the action menu - we are dropping support for this. SQUASH Fix filemanager selector and pix_icon template for mod_forum tests. SQUASH Fixes to breadcrumb and add formid to single select (fixes mod_glossary tests) SQUASH lesson behat fixes. 95% of lesson styles were rubbish so they were disgarded. SQUASH Fix lti behat tests - they were cheating and using a context step from quiz SQUASH Behat fixes for quiz with new theme SQUASH behat fixes for mod_wiki SQUASH Workshop behat fixes SQUASH Frozen form elements cannot use a readonly form element because it screws with the form JS "disabledIf" stuff. SQUASH Fixes for grades behat tests SQUASH behat fixes for groups SQUASH blacklist action menu tests SQUASH Fix for tag form element missing "manage standard tags" link SQUASH Incomplete fixes for course behat tests SQUASH behat fixes for badges SQUASH Tags fixes for behat SQUASH filepicker fixes for behat SQUASH Abort guessing field type when we hit 'html' SQUASH Fix for admin/tool/behat tests SQUASH fix for admin tool behat tests SQUASH fix for availabilty conditions hiding "aria-hidden" elements SQUASH give the blocks more room. We get behat files because nav tree nodes are not in view SQUASH Blocks fixed Fix behaviour of unchecked checkboxes SQUASH Remove incorrect step in user test SQUASH behat fixes for course tests Part of MDL-55071
241 lines
10 KiB
Gherkin
241 lines
10 KiB
Gherkin
@core @core_grades
|
|
Feature: We can set the grade to pass value
|
|
In order to set the grade to pass value
|
|
As a teacher
|
|
I assign a grade to pass to an activity while editing the activity.
|
|
I need to ensure that the grade to pass is visible in the gradebook.
|
|
|
|
Background:
|
|
Given the following "users" exist:
|
|
| username | firstname | lastname | email |
|
|
| teacher1 | Teacher | 1 | teacher1@example.com |
|
|
And the following "courses" exist:
|
|
| fullname | shortname | format | numsections |
|
|
| Course 1 | C1 | weeks | 5 |
|
|
And the following "course enrolments" exist:
|
|
| user | course | role |
|
|
| teacher1 | C1 | editingteacher |
|
|
And the following "scales" exist:
|
|
| name | scale |
|
|
| Test Scale 1 | Disappointing, Good, Very good, Excellent |
|
|
And I log in as "teacher1"
|
|
And I follow "Course 1"
|
|
|
|
@javascript
|
|
Scenario: Validate that switching the type of grading used correctly disables grade to pass
|
|
When I turn editing mode on
|
|
And I add a "Assignment" to section "1"
|
|
And I expand all fieldsets
|
|
And I set the field "grade[modgrade_type]" to "Point"
|
|
Then the "Grade to pass" "field" should be enabled
|
|
And I set the field "grade[modgrade_type]" to "None"
|
|
And the "Grade to pass" "field" should be disabled
|
|
And I press "Save and return to course"
|
|
|
|
@javascript
|
|
Scenario: Create an activity with a Grade to pass value greater than the maximum grade
|
|
When I turn editing mode on
|
|
And I add a "Assignment" to section "1" and I fill the form with:
|
|
| Assignment name | Test Assignment 1 |
|
|
| Description | Submit your online text |
|
|
| assignsubmission_onlinetext_enabled | 1 |
|
|
| grade[modgrade_type] | Point |
|
|
| grade[modgrade_point] | 50 |
|
|
| Grade to pass | 100 |
|
|
Then I should see "The grade to pass can not be greater than the maximum possible grade 50"
|
|
And I press "Cancel"
|
|
|
|
Scenario: Set a valid grade to pass for an assignment activity using points
|
|
When I turn editing mode on
|
|
And I add a "Assignment" to section "1" and I fill the form with:
|
|
| Assignment name | Test Assignment 1 |
|
|
| Description | Submit your online text |
|
|
| assignsubmission_onlinetext_enabled | 1 |
|
|
| grade[modgrade_type] | Point |
|
|
| grade[modgrade_point] | 50 |
|
|
| Grade to pass | 25 |
|
|
And I navigate to "Grades" node in "Course administration"
|
|
And I turn editing mode on
|
|
And I click on "Edit assign Test Assignment 1" "link"
|
|
Then the field "Grade to pass" matches value "25"
|
|
And I follow "Course 1"
|
|
And I follow "Test Assignment 1"
|
|
And I follow "Edit settings"
|
|
And I expand all fieldsets
|
|
And I set the field "Grade to pass" to "30"
|
|
And I press "Save and return to course"
|
|
And I navigate to "Grades" node in "Course administration"
|
|
And I click on "Edit assign Test Assignment 1" "link"
|
|
And the field "Grade to pass" matches value "30"
|
|
|
|
Scenario: Set a valid grade to pass for an assignment activity using scales
|
|
When I turn editing mode on
|
|
And I add a "Assignment" to section "1" and I fill the form with:
|
|
| Assignment name | Test Assignment 1 |
|
|
| Description | Submit your online text |
|
|
| grade[modgrade_type] | Scale |
|
|
| grade[modgrade_scale] | Test Scale 1 |
|
|
| Grade to pass | 3 |
|
|
And I navigate to "Grades" node in "Course administration"
|
|
And I turn editing mode on
|
|
And I click on "Edit assign Test Assignment 1" "link"
|
|
And I expand all fieldsets
|
|
Then the field "Grade to pass" matches value "3"
|
|
And I set the field "Grade to pass" to "4"
|
|
And I press "Save changes"
|
|
And I follow "Course 1"
|
|
And I follow "Test Assignment 1"
|
|
And I follow "Edit settings"
|
|
And the field "Grade to pass" matches value "4"
|
|
|
|
Scenario: Set a invalid grade to pass for an assignment activity using scales
|
|
When I turn editing mode on
|
|
And I add a "Assignment" to section "1" and I fill the form with:
|
|
| Assignment name | Test Assignment 1 |
|
|
| Description | Submit your online text |
|
|
| grade[modgrade_type] | Scale |
|
|
| grade[modgrade_scale] | Test Scale 1 |
|
|
| Grade to pass | 10 |
|
|
Then I should see "The grade to pass can not be greater than the maximum possible grade 4"
|
|
|
|
Scenario: Set a valid grade to pass for workshop activity
|
|
When I turn editing mode on
|
|
And I add a "Workshop" to section "1" and I fill the form with:
|
|
| Workshop name | Test Workshop 1 |
|
|
| Description | Test workshop |
|
|
| grade | 80 |
|
|
| Submission grade to pass | 40 |
|
|
| gradinggrade | 20 |
|
|
| Assessment grade to pass | 10 |
|
|
And I navigate to "Grades" node in "Course administration"
|
|
And I turn editing mode on
|
|
And I click on "Edit workshop Test Workshop 1 (submission)" "link"
|
|
And I expand all fieldsets
|
|
Then the field "Grade to pass" matches value "40"
|
|
And I set the field "Grade to pass" to "45"
|
|
And I press "Save changes"
|
|
And I click on "Edit workshop Test Workshop 1 (assessment)" "link"
|
|
And I expand all fieldsets
|
|
And the field "Grade to pass" matches value "10"
|
|
And I set the field "Grade to pass" to "15"
|
|
And I press "Save changes"
|
|
And I follow "Course 1"
|
|
And I follow "Test Workshop 1"
|
|
And I follow "Edit settings"
|
|
And the field "Submission grade to pass" matches value "45"
|
|
And the field "Assessment grade to pass" matches value "15"
|
|
|
|
Scenario: Set an invalid grade to pass for workshop activity
|
|
When I turn editing mode on
|
|
And I add a "Workshop" to section "1" and I fill the form with:
|
|
| Workshop name | Test Workshop 1 |
|
|
| Description | Test workshop |
|
|
| grade | 80 |
|
|
| Submission grade to pass | 90 |
|
|
| gradinggrade | 20 |
|
|
| Assessment grade to pass | 30 |
|
|
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"
|
|
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"
|
|
|
|
Scenario: Set a valid grade to pass for quiz activity
|
|
When I turn editing mode on
|
|
And I add a "Quiz" to section "1" and I fill the form with:
|
|
| Name | Test Quiz 1 |
|
|
| Grade to pass | 9.5 |
|
|
And I navigate to "Grades" node in "Course administration"
|
|
And I turn editing mode on
|
|
And I click on "Edit quiz Test Quiz 1" "link"
|
|
And I expand all fieldsets
|
|
Then the field "Grade to pass" matches value "9.5"
|
|
And I set the field "Grade to pass" to "8"
|
|
And I press "Save changes"
|
|
And I follow "Course 1"
|
|
And I follow "Test Quiz 1"
|
|
And I follow "Edit settings"
|
|
And the field "Grade to pass" matches value "8.00"
|
|
|
|
Scenario: Set a valid grade to pass for lesson activity
|
|
When I turn editing mode on
|
|
And I add a "Lesson" to section "1" and I fill the form with:
|
|
| Name | Test Lesson 1 |
|
|
| Description | Test |
|
|
| Grade to pass | 90 |
|
|
And I navigate to "Grades" node in "Course administration"
|
|
And I turn editing mode on
|
|
And I click on "Edit lesson Test Lesson 1" "link"
|
|
And I expand all fieldsets
|
|
Then the field "Grade to pass" matches value "90"
|
|
And I set the field "Grade to pass" to "80"
|
|
And I press "Save changes"
|
|
And I follow "Course 1"
|
|
And I follow "Test Lesson 1"
|
|
And I follow "Edit settings"
|
|
And the field "Grade to pass" matches value "80"
|
|
|
|
Scenario: Set a valid grade to pass for database activity
|
|
When I turn editing mode on
|
|
And I add a "Database" to section "1" and I fill the form with:
|
|
| Name | Test Database 1 |
|
|
| Description | Test |
|
|
| Aggregate type | Average of ratings |
|
|
| Grade to pass | 90 |
|
|
And I navigate to "Grades" node in "Course administration"
|
|
And I turn editing mode on
|
|
And I click on "Edit data Test Database 1" "link"
|
|
And I expand all fieldsets
|
|
Then the field "Grade to pass" matches value "90"
|
|
And I set the field "Grade to pass" to "80"
|
|
And I press "Save changes"
|
|
And I follow "Course 1"
|
|
And I follow "Test Database 1"
|
|
And I follow "Edit settings"
|
|
And the field "Grade to pass" matches value "80"
|
|
|
|
Scenario: Set an invalid grade to pass for forum activity
|
|
When I turn editing mode on
|
|
And I add a "Forum" to section "1" and I fill the form with:
|
|
| Forum name | Test Forum 1 |
|
|
| Description | Test |
|
|
| Aggregate type | Average of ratings |
|
|
| Grade to pass | 90 |
|
|
| scale[modgrade_point] | 60 |
|
|
Then I should see "The grade to pass can not be greater than the maximum possible grade 60"
|
|
|
|
Scenario: Set a valid grade to pass for forum activity
|
|
When I turn editing mode on
|
|
And I add a "Forum" to section "1" and I fill the form with:
|
|
| Forum name | Test Forum 1 |
|
|
| Description | Test |
|
|
| Aggregate type | Average of ratings |
|
|
| Grade to pass | 90 |
|
|
And I navigate to "Grades" node in "Course administration"
|
|
And I turn editing mode on
|
|
And I click on "Edit forum Test Forum 1" "link"
|
|
And I expand all fieldsets
|
|
Then the field "Grade to pass" matches value "90"
|
|
And I set the field "Grade to pass" to "80"
|
|
And I press "Save changes"
|
|
And I follow "Course 1"
|
|
And I follow "Test Forum 1"
|
|
And I follow "Edit settings"
|
|
And the field "Grade to pass" matches value "80"
|
|
|
|
Scenario: Set a valid grade to pass for glossary activity
|
|
When I turn editing mode on
|
|
And I add a "Glossary" to section "1" and I fill the form with:
|
|
| Name | Test Glossary 1 |
|
|
| Description | Test |
|
|
| Aggregate type | Average of ratings |
|
|
| Grade to pass | 90 |
|
|
And I navigate to "Grades" node in "Course administration"
|
|
And I turn editing mode on
|
|
And I click on "Edit glossary Test Glossary 1" "link"
|
|
And I expand all fieldsets
|
|
Then the field "Grade to pass" matches value "90"
|
|
And I set the field "Grade to pass" to "80"
|
|
And I press "Save changes"
|
|
And I follow "Course 1"
|
|
And I follow "Test Glossary 1"
|
|
And I follow "Edit settings"
|
|
And the field "Grade to pass" matches value "80"
|