@core @core_cohort @enrol_cohort
Feature: Access visible and hidden cohorts
In order to enrol users from cohorts
As an manager or teacher
I need to be able to view the list of cohorts defined above the course
Background: # C:\Apache24\htdocs\integration\cohort\tests\behat\access_visible_cohorts.feature:7
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
| Cat 2 | 0 | CAT2 |
And the following "cohorts" exist: # behat_hooks::i_look_for_exceptions()
| name | idnumber | visible |
| System cohort | CV0 | 1 |
| System hidden cohort | CH0 | 0 |
| System empty cohort | CVE0 | 1 |
And the following "cohorts" exist: # behat_hooks::i_look_for_exceptions()
| name | idnumber | contextlevel | reference | visible |
| Cohort in category 1 | CV1 | Category | CAT1 | 1 |
| Cohort in category 2 | CV2 | Category | CAT2 | 1 |
| Cohort hidden in category 1 | CH1 | Category | CAT1 | 0 |
| Cohort empty in category 1 | CVE1 | Category | CAT1 | 1 |
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| user1 | First | User | first@example.com |
| user2 | Second | User | second@example.com |
| student | Sam | User | student@example.com |
| teacher | Terry | User | teacher@example.com |
And the following "cohort members" exist: # behat_hooks::i_look_for_exceptions()
| user | cohort |
| student | CV0 |
| student | CV1 |
| student | CV2 |
| student | CH0 |
| student | CH1 |
And the following "role assigns" exist: # behat_hooks::i_look_for_exceptions()
| user | role | contextlevel | reference |
| user1 | manager | System | |
| user2 | manager | Category | CAT1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | CAT1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher | C1 | editingteacher |
Scenario: Teacher can see visible cohorts defined in the above contexts # C:\Apache24\htdocs\integration\cohort\tests\behat\access_visible_cohorts.feature:47
When I log in as "teacher" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Enrolment methods" node in "Course administration > Users" # behat_hooks::i_look_for_exceptions()
And I select "Cohort sync" from the "Add method" singleselect # behat_hooks::i_look_for_exceptions()
Then the "Cohort" select box should contain "Cohort in category 1" # behat_hooks::i_look_for_exceptions()
And the "Cohort" select box should contain "System cohort" # behat_hooks::i_look_for_exceptions()
And the "Cohort" select box should not contain "Cohort hidden in category 1" # behat_hooks::i_look_for_exceptions()
And the "Cohort" select box should not contain "System hidden cohort" # behat_hooks::i_look_for_exceptions()
And the "Cohort" select box should not contain "Cohort in category 2" # behat_hooks::i_look_for_exceptions()
And the "Cohort" select box should contain "Cohort empty in category 1" # behat_hooks::i_look_for_exceptions()
And the "Cohort" select box should contain "System empty cohort" # behat_hooks::i_look_for_exceptions()
And I set the field "Cohort" to "System cohort" # behat_hooks::i_look_for_exceptions()
And I press "Add method" # behat_hooks::i_look_for_exceptions()
And I navigate to "Enrolled users" node in "Course administration > Users" # behat_hooks::i_look_for_exceptions()
And I should see "student@example.com" # behat_hooks::i_look_for_exceptions()
And I navigate to "Groups" node in "Course administration > Users" # behat_hooks::i_look_for_exceptions()
And I press "Auto-create groups" # behat_hooks::i_look_for_exceptions()
And the "Select members from cohort" select box should contain "Cohort in category 1" # behat_hooks::i_look_for_exceptions()
And the "Select members from cohort" select box should contain "System cohort" # behat_hooks::i_look_for_exceptions()
And the "Select members from cohort" select box should not contain "Cohort hidden in category 1" # behat_hooks::i_look_for_exceptions()
And the "Select members from cohort" select box should not contain "System hidden cohort" # behat_hooks::i_look_for_exceptions()
And the "Select members from cohort" select box should not contain "Cohort in category 2" # behat_hooks::i_look_for_exceptions()
And the "Select members from cohort" select box should not contain "Cohort empty in category 1" # behat_hooks::i_look_for_exceptions()
And the "Select members from cohort" select box should not contain "System empty cohort" # behat_hooks::i_look_for_exceptions()
Scenario: System manager can see all cohorts defined in the above contexts # C:\Apache24\htdocs\integration\cohort\tests\behat\access_visible_cohorts.feature:73
When I log in as "user1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Enrolment methods" node in "Course administration > Users" # behat_hooks::i_look_for_exceptions()
And I select "Cohort sync" from the "Add method" singleselect # behat_hooks::i_look_for_exceptions()
Then the "Cohort" select box should contain "Cohort in category 1" # behat_hooks::i_look_for_exceptions()
And the "Cohort" select box should contain "System cohort" # behat_hooks::i_look_for_exceptions()
And the "Cohort" select box should contain "Cohort hidden in category 1" # behat_hooks::i_look_for_exceptions()
And the "Cohort" select box should contain "System hidden cohort" # behat_hooks::i_look_for_exceptions()
And the "Cohort" select box should not contain "Cohort in category 2" # behat_hooks::i_look_for_exceptions()
And the "Cohort" select box should contain "Cohort empty in category 1" # behat_hooks::i_look_for_exceptions()
And the "Cohort" select box should contain "System empty cohort" # behat_hooks::i_look_for_exceptions()
And I set the field "Cohort" to "System cohort" # behat_hooks::i_look_for_exceptions()
And I press "Add method" # behat_hooks::i_look_for_exceptions()
And I navigate to "Enrolled users" node in "Course administration > Users" # behat_hooks::i_look_for_exceptions()
And I should see "student@example.com" # behat_hooks::i_look_for_exceptions()
And I navigate to "Groups" node in "Course administration > Users" # behat_hooks::i_look_for_exceptions()
And I press "Auto-create groups" # behat_hooks::i_look_for_exceptions()
And the "Select members from cohort" select box should contain "Cohort in category 1" # behat_hooks::i_look_for_exceptions()
And the "Select members from cohort" select box should contain "System cohort" # behat_hooks::i_look_for_exceptions()
And the "Select members from cohort" select box should contain "Cohort hidden in category 1" # behat_hooks::i_look_for_exceptions()
And the "Select members from cohort" select box should contain "System hidden cohort" # behat_hooks::i_look_for_exceptions()
And the "Select members from cohort" select box should not contain "Cohort in category 2" # behat_hooks::i_look_for_exceptions()
And the "Select members from cohort" select box should not contain "Cohort empty in category 1" # behat_hooks::i_look_for_exceptions()
And the "Select members from cohort" select box should not contain "System empty cohort" # behat_hooks::i_look_for_exceptions()
Scenario: Category manager can see all cohorts defined in his category and visible cohorts defined above # C:\Apache24\htdocs\integration\cohort\tests\behat\access_visible_cohorts.feature:100
When I log in as "user2" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Enrolment methods" node in "Course administration > Users" # behat_hooks::i_look_for_exceptions()
And I select "Cohort sync" from the "Add method" singleselect # behat_hooks::i_look_for_exceptions()
Then the "Cohort" select box should contain "Cohort in category 1" # behat_hooks::i_look_for_exceptions()
And the "Cohort" select box should contain "System cohort" # behat_hooks::i_look_for_exceptions()
And the "Cohort" select box should contain "Cohort hidden in category 1" # behat_hooks::i_look_for_exceptions()
And the "Cohort" select box should not contain "System hidden cohort" # behat_hooks::i_look_for_exceptions()
And the "Cohort" select box should not contain "Cohort in category 2" # behat_hooks::i_look_for_exceptions()
And the "Cohort" select box should contain "Cohort empty in category 1" # behat_hooks::i_look_for_exceptions()
And the "Cohort" select box should contain "System empty cohort" # behat_hooks::i_look_for_exceptions()
And I set the field "Cohort" to "System cohort" # behat_hooks::i_look_for_exceptions()
And I press "Add method" # behat_hooks::i_look_for_exceptions()
And I navigate to "Enrolled users" node in "Course administration > Users" # behat_hooks::i_look_for_exceptions()
And I should see "student@example.com" # behat_hooks::i_look_for_exceptions()
And I navigate to "Groups" node in "Course administration > Users" # behat_hooks::i_look_for_exceptions()
And I press "Auto-create groups" # behat_hooks::i_look_for_exceptions()
And the "Select members from cohort" select box should contain "Cohort in category 1" # behat_hooks::i_look_for_exceptions()
And the "Select members from cohort" select box should contain "System cohort" # behat_hooks::i_look_for_exceptions()
And the "Select members from cohort" select box should contain "Cohort hidden in category 1" # behat_hooks::i_look_for_exceptions()
And the "Select members from cohort" select box should not contain "System hidden cohort" # behat_hooks::i_look_for_exceptions()
And the "Select members from cohort" select box should not contain "Cohort in category 2" # behat_hooks::i_look_for_exceptions()
And the "Select members from cohort" select box should not contain "Cohort empty in category 1" # behat_hooks::i_look_for_exceptions()
And the "Select members from cohort" select box should not contain "System empty cohort" # behat_hooks::i_look_for_exceptions()
@editor @editor_atto @atto @atto_accessibilitychecker
Feature: Atto accessibility checker
To write accessible text in Atto, I need to check for accessibility warnings.
@javascript
Scenario: Images with no alt # C:\Apache24\htdocs\integration\lib\editor\atto\plugins\accessibilitychecker\tests\behat\accessibilitychecker.feature:6
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I follow "Profile" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I set the field "Description" to "
Some plain text

Some more text
" # behat_hooks::i_look_for_exceptions()
When I click on "Show more buttons" "button" # behat_hooks::i_look_for_exceptions()
And I click on "Accessibility checker" "button" # behat_hooks::i_look_for_exceptions()
Then I should see "Images require alternative text." # behat_hooks::i_look_for_exceptions()
And I follow "/broken-image" # behat_hooks::i_look_for_exceptions()
And I wait "2" seconds # behat_hooks::i_look_for_exceptions()
And I click on "Image" "button" # behat_hooks::i_look_for_exceptions()
And the field "Enter URL" matches value "/broken-image" # behat_hooks::i_look_for_exceptions()
And I set the field "Describe this image for someone who cannot see it" to "No more warning!" # behat_hooks::i_look_for_exceptions()
And I press "Save image" # behat_hooks::i_look_for_exceptions()
And I press "Accessibility checker" # behat_hooks::i_look_for_exceptions()
And I should see "Congratulations, no accessibility problems found!" # behat_hooks::i_look_for_exceptions()
And I click on ".moodle-dialogue-focused .closebutton" "css_element" # behat_hooks::i_look_for_exceptions()
And I select the text in the "Description" Atto editor # behat_hooks::i_look_for_exceptions()
And I click on "Image" "button" # behat_hooks::i_look_for_exceptions()
And I set the field "Describe this image for someone who cannot see it" to "" # behat_hooks::i_look_for_exceptions()
And I set the field "Description not necessary" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Save image" # behat_hooks::i_look_for_exceptions()
And I press "Accessibility checker" # behat_hooks::i_look_for_exceptions()
And I should see "Congratulations, no accessibility problems found!" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Low contrast # C:\Apache24\htdocs\integration\lib\editor\atto\plugins\accessibilitychecker\tests\behat\accessibilitychecker.feature:32
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I follow "Profile" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I set the field "Description" to "Hard to read
" # behat_hooks::i_look_for_exceptions()
When I click on "Show more buttons" "button" # behat_hooks::i_look_for_exceptions()
And I click on "Accessibility checker" "button" # behat_hooks::i_look_for_exceptions()
Then I should see "The colours of the foreground and background text do not have enough contrast." # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: No headings # C:\Apache24\htdocs\integration\lib\editor\atto\plugins\accessibilitychecker\tests\behat\accessibilitychecker.feature:42
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I follow "Profile" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I set the field "Description" to "Sweet roll oat cake jelly-o macaroon donut oat cake. Caramels macaroon cookie sweet roll croissant cheesecake candy jelly-o. Gummies sugar plum sugar plum gingerbread dessert. Tiramisu bonbon jujubes danish marshmallow cookie chocolate cake cupcake tiramisu. Bear claw oat cake chocolate bar croissant. Lollipop cookie topping liquorice croissant. Brownie cookie cupcake lollipop cupcake cupcake. Fruitcake dessert sweet biscuit dragée caramels marzipan brownie. Chupa chups gingerbread apple pie cookie liquorice caramels carrot cake cookie gingerbread. Croissant candy jelly beans. Tiramisu apple pie dessert apple pie macaroon soufflé. Brownie powder carrot cake chocolate. Tart applicake croissant dragée macaroon chocolate donut.
Jelly beans gingerbread tootsie roll. Sugar plum tiramisu cotton candy toffee pie cotton candy tiramisu. Carrot cake chocolate bar sesame snaps cupcake cake dessert sweet fruitcake wafer. Marshmallow cupcake gingerbread pie sweet candy canes powder gummi bears. Jujubes cake muffin marshmallow candy jelly beans tootsie roll pie. Gummi bears applicake chocolate cake sweet jelly sesame snaps lollipop lollipop carrot cake. Marshmallow cake jelly beans. Jelly beans sesame snaps muffin halvah cookie ice cream candy canes carrot cake. Halvah donut marshmallow tiramisu. Cookie dessert gummi bears. Sugar plum apple pie jelly beans gummi bears tart chupa chups. Liquorice macaroon gummi bears gummies macaroon marshmallow sweet roll cake topping. Lemon drops caramels pie icing danish. Chocolate cake oat cake dessert halvah danish carrot cake apple pie.
" # behat_hooks::i_look_for_exceptions()
When I click on "Show more buttons" "button" # behat_hooks::i_look_for_exceptions()
And I click on "Accessibility checker" "button" # behat_hooks::i_look_for_exceptions()
Then I should see "There is a lot of text with no headings." # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Merged cells # C:\Apache24\htdocs\integration\lib\editor\atto\plugins\accessibilitychecker\tests\behat\accessibilitychecker.feature:52
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I follow "Profile" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I set the field "Description" to "Dogs that look good in pantsBreed | Coolness |
---|
Poodle | NOT COOL |
Doberman |
" # behat_hooks::i_look_for_exceptions()
When I click on "Show more buttons" "button" # behat_hooks::i_look_for_exceptions()
And I click on "Accessibility checker" "button" # behat_hooks::i_look_for_exceptions()
Then I should see "Tables should not contain merged cells." # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Table missing row/column headers # C:\Apache24\htdocs\integration\lib\editor\atto\plugins\accessibilitychecker\tests\behat\accessibilitychecker.feature:62
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I follow "Profile" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I set the field "Description" to "Dogs that look good in pantsBreed | Coolness |
---|
Poodle | NOT COOL |
Doberman | COOL |
" # behat_hooks::i_look_for_exceptions()
When I click on "Show more buttons" "button" # behat_hooks::i_look_for_exceptions()
And I click on "Accessibility checker" "button" # behat_hooks::i_look_for_exceptions()
Then I should see "Tables should use row and/or column headers." # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Table missing caption # C:\Apache24\htdocs\integration\lib\editor\atto\plugins\accessibilitychecker\tests\behat\accessibilitychecker.feature:72
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I follow "Profile" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I set the field "Description" to "Breed | Coolness |
---|
Poodle | NOT COOL |
Doberman | COOL |
" # behat_hooks::i_look_for_exceptions()
When I click on "Show more buttons" "button" # behat_hooks::i_look_for_exceptions()
And I click on "Accessibility checker" "button" # behat_hooks::i_look_for_exceptions()
Then I should see "Tables should have captions." # behat_hooks::i_look_for_exceptions()
@editor @editor_atto @atto @atto_accessibilityhelper
Feature: Atto accessibility helper
To use a screen reader effectively in Atto, I may need additional information about the text
@javascript
Scenario: Images and links # C:\Apache24\htdocs\integration\lib\editor\atto\plugins\accessibilityhelper\tests\behat\accessibilityhelper.feature:6
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I follow "Profile" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I set the field "Description" to "Some plain text

Some link text
" # behat_hooks::i_look_for_exceptions()
And I select the text in the "Description" Atto editor # behat_hooks::i_look_for_exceptions()
When I click on "Show more buttons" "button" # behat_hooks::i_look_for_exceptions()
And I click on "Screenreader helper" "button" # behat_hooks::i_look_for_exceptions()
Then I should see "Links in text editor" # behat_hooks::i_look_for_exceptions()
And I should see "Some link text" # behat_hooks::i_look_for_exceptions()
And I should see "Images in text editor" # behat_hooks::i_look_for_exceptions()
And I should see "Image 1" # behat_hooks::i_look_for_exceptions()
And I should not see "No images" # behat_hooks::i_look_for_exceptions()
And I should not see "No links" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Styles # C:\Apache24\htdocs\integration\lib\editor\atto\plugins\accessibilityhelper\tests\behat\accessibilityhelper.feature:22
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I follow "Profile" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I set the field "Description" to "Some plain text
" # behat_hooks::i_look_for_exceptions()
When I click on "Show more buttons" "button" # behat_hooks::i_look_for_exceptions()
And I select the text in the "Description" Atto editor # behat_hooks::i_look_for_exceptions()
And I click on "Unordered list" "button" # behat_hooks::i_look_for_exceptions()
And I click on "Screenreader helper" "button" # behat_hooks::i_look_for_exceptions()
And I select the text in the "Description" Atto editor # behat_hooks::i_look_for_exceptions()
Then I should see "UL, LI" # behat_hooks::i_look_for_exceptions()
@core @core_course
Feature: Edit completion settings of an activity
In order to edit completion settings without accidentally breaking user data
As a teacher
I need to edit the activity and use the unlock button if required
Background: # C:\Apache24\htdocs\integration\course\tests\behat\activities_edit_completion.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | enablecompletion |
| Course 1 | C1 | 1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Page" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | TestPage |
| Description | x |
| Page content | x |
| Completion tracking | 2 |
| Require view | 1 |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Scenario: Completion is not locked when the activity has not yet been viewed # C:\Apache24\htdocs\integration\course\tests\behat\activities_edit_completion.feature:23
Given I click on "Edit settings" "link" in the "TestPage" activity # behat_hooks::i_look_for_exceptions()
When I expand all fieldsets # behat_hooks::i_look_for_exceptions()
Then I should see "Completion tracking" # behat_hooks::i_look_for_exceptions()
And I should not see "Completion options locked" # behat_hooks::i_look_for_exceptions()
Scenario: Completion is locked after the activity has been viewed # C:\Apache24\htdocs\integration\course\tests\behat\activities_edit_completion.feature:29
Given I follow "TestPage" # behat_hooks::i_look_for_exceptions()
When I follow "Edit settings" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
Then I should see "Completion options locked" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Pressing the unlock button allows the user to edit completion settings # C:\Apache24\htdocs\integration\course\tests\behat\activities_edit_completion.feature:36
Given I follow "TestPage" # behat_hooks::i_look_for_exceptions()
When I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I press "Unlock completion options" # behat_hooks::i_look_for_exceptions()
Then I should see "Completion options unlocked" # behat_hooks::i_look_for_exceptions()
And I set the field "Completion tracking" to "Students can manually mark the activity as completed" # behat_hooks::i_look_for_exceptions()
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
Then the field "Completion tracking" matches value "Students can manually mark the activity as completed" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Even when completion is locked, the user can still set the date # C:\Apache24\htdocs\integration\course\tests\behat\activities_edit_completion.feature:49
Given I follow "TestPage" # behat_hooks::i_look_for_exceptions()
When I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
When I click on "id_completionexpected_enabled" "checkbox" # behat_hooks::i_look_for_exceptions()
And I set the field "id_completionexpected_year" to "2013" # behat_hooks::i_look_for_exceptions()
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
Then the field "id_completionexpected_year" matches value "2013" # behat_hooks::i_look_for_exceptions()
@core @core_course
Feature: Edit activity name in-place
In order to quickly edit activity name
As a teacher
I need to use inplace editing
@javascript
Scenario: Edit activity name in-place # C:\Apache24\htdocs\integration\course\tests\behat\activities_edit_name.feature:8
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name |
| Description | Test forum description |
And I click on "Edit title" "link" in the "//div[contains(@class,'activityinstance') and contains(.,'Test forum name')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I set the field "New name for activity Test forum name" to "Good news" # behat_hooks::i_look_for_exceptions()
And I press key "13" in the field "New name for activity Test forum name" # behat_hooks::i_look_for_exceptions()
Then I should not see "Test forum name" in the ".course-content" "css_element" # behat_hooks::i_look_for_exceptions()
And "New name for activity Test forum name" "field" should not exist # behat_hooks::i_look_for_exceptions()
And I should see "Good news" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Good news" # behat_hooks::i_look_for_exceptions()
And I should not see "Test forum name" # behat_hooks::i_look_for_exceptions()
And I click on "Edit title" "link" in the "//div[contains(@class,'activityinstance') and contains(.,'Good news')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I set the field "New name for activity Good news" to "Terrible news" # behat_hooks::i_look_for_exceptions()
And I press key "27" in the field "New name for activity Good news" # behat_hooks::i_look_for_exceptions()
And "New name for activity Good news" "field" should not exist # behat_hooks::i_look_for_exceptions()
And I should see "Good news" # behat_hooks::i_look_for_exceptions()
And I should not see "Terrible news" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Good news" # behat_hooks::i_look_for_exceptions()
And I should not see "Terrible news" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@core @core_course @_cross_browser
Feature: Toggle activities groups mode from the course page
In order to split activities in groups
As a teacher
I need to change quickly the group mode of an activity
@javascript
Scenario: Groups mode toggle with javascript enabled # C:\Apache24\htdocs\integration\course\tests\behat\activities_group_icons.feature:8
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name |
| Description | Test forum description |
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Group mode | No groups |
| Force group mode | No |
When I press "Save and display" # behat_hooks::i_look_for_exceptions()
Then "No groups (Click to change)" "link" should exist # behat_hooks::i_look_for_exceptions()
And "//a/child::img[contains(@src, 'groupn')]" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
And I click on "No groups (Click to change)" "link" in the "Test forum name" activity # behat_hooks::i_look_for_exceptions()
And "Separate groups (Click to change)" "link" should exist # behat_hooks::i_look_for_exceptions()
And "//a/child::img[contains(@src, 'groups')]" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
And I reload the page # behat_hooks::i_look_for_exceptions()
And "Separate groups (Click to change)" "link" should exist # behat_hooks::i_look_for_exceptions()
And "//a/child::img[contains(@src, 'groups')]" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
And I click on "Separate groups (Click to change)" "link" in the "Test forum name" activity # behat_hooks::i_look_for_exceptions()
And "Visible groups (Click to change)" "link" should exist # behat_hooks::i_look_for_exceptions()
And "//a/child::img[contains(@src, 'groupv')]" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
And I reload the page # behat_hooks::i_look_for_exceptions()
And "Visible groups (Click to change)" "link" should exist # behat_hooks::i_look_for_exceptions()
And "//a/child::img[contains(@src, 'groupv')]" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
And I click on "Visible groups (Click to change)" "link" in the "Test forum name" activity # behat_hooks::i_look_for_exceptions()
And "No groups (Click to change)" "link" should exist # behat_hooks::i_look_for_exceptions()
And "//a/child::img[contains(@src, 'groupn')]" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
@core @core_course @_cross_browser
Feature: Indent items on the course page
In order to create a structured view of activities
As a teacher
I need to move activities and resources to left and right
@javascript
Scenario: Indent course items with Javascript enabled # C:\Apache24\htdocs\integration\course\tests\behat\activities_indentation.feature:8
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | weeks |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Glossary" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Test glossary name |
| Description | Test glossary description |
When I indent right "Test glossary name" activity # behat_hooks::i_look_for_exceptions()
Then "#section-1 li.glossary div.mod-indent-1" "css_element" should exist # behat_hooks::i_look_for_exceptions()
And I indent right "Test glossary name" activity # behat_hooks::i_look_for_exceptions()
And "//li[@id='section-1']/descendant::li[contains(concat(' ', @class, ' '), ' glossary ')]/descendant::a[not(contains(concat(' ', @class, ' '), ' hidden '))]/descendant::span[normalize-space(.)='Move left']" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
And "#section-1 li.glossary div.mod-indent-2" "css_element" should exist # behat_hooks::i_look_for_exceptions()
And I reload the page # behat_hooks::i_look_for_exceptions()
And "#section-1 li.glossary div.mod-indent-2" "css_element" should exist # behat_hooks::i_look_for_exceptions()
And I indent left "Test glossary name" activity # behat_hooks::i_look_for_exceptions()
And I indent left "Test glossary name" activity # behat_hooks::i_look_for_exceptions()
And "#section-1 li.glossary div.mod-indent-2" "css_element" should not exist # behat_hooks::i_look_for_exceptions()
And "#section-1 li.glossary div.mod-indent-1" "css_element" should not exist # behat_hooks::i_look_for_exceptions()
And "//li[@id='section-1']/descendant::li[contains(concat(' ', @class, ' '), ' glossary ')]/descendant::a[not(contains(concat(' ', @class, ' '), ' hidden '))]/descendant::span[normalize-space(.)='Move left']" "xpath_element" should not exist # behat_hooks::i_look_for_exceptions()
@core @core_course @_cross_browser
Feature: Toggle activities visibility from the course page
In order to delay activities availability
As a teacher
I need to quickly change the visibility of an activity
@javascript
Scenario: Hide/Show toggle with javascript enabled # C:\Apache24\htdocs\integration\course\tests\behat\activities_visibility_icons.feature:8
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name |
| Description | Test forum description |
| Visible | Show |
When I open "Test forum name" actions menu # behat_hooks::i_look_for_exceptions()
And I click on "Hide" "link" in the "Test forum name" activity # behat_hooks::i_look_for_exceptions()
Then "Test forum name" activity should be hidden # behat_hooks::i_look_for_exceptions()
And I open "Test forum name" actions menu # behat_hooks::i_look_for_exceptions()
And I click on "Show" "link" in the "Test forum name" activity # behat_hooks::i_look_for_exceptions()
And "Test forum name" activity should be visible # behat_hooks::i_look_for_exceptions()
And I open "Test forum name" actions menu # behat_hooks::i_look_for_exceptions()
And I click on "Hide" "link" in the "Test forum name" activity # behat_hooks::i_look_for_exceptions()
And "Test forum name" activity should be hidden # behat_hooks::i_look_for_exceptions()
And I reload the page # behat_hooks::i_look_for_exceptions()
And "Test forum name" activity should be hidden # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And "Test forum name" activity should be hidden # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Activities can be shown and hidden inside a hidden section # C:\Apache24\htdocs\integration\course\tests\behat\activities_visibility_icons.feature:44
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format | numsections |
| Course 1 | C1 | topics | 2 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Forum" to section "2" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name |
| Description | Test forum description |
| Visible | Show |
When I hide section "2" # behat_hooks::i_look_for_exceptions()
Then "Test forum name" activity should be hidden # behat_hooks::i_look_for_exceptions()
And I open "Test forum name" actions menu # behat_hooks::i_look_for_exceptions()
And I click on "Show" "link" in the "Test forum name" activity # behat_hooks::i_look_for_exceptions()
And "Test forum name" activity should be visible # behat_hooks::i_look_for_exceptions()
And I open "Test forum name" actions menu # behat_hooks::i_look_for_exceptions()
And I click on "Hide" "link" in the "Test forum name" activity # behat_hooks::i_look_for_exceptions()
And "Test forum name" activity should be hidden # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Activities can be shown and hidden inside an orphaned section # C:\Apache24\htdocs\integration\course\tests\behat\activities_visibility_icons.feature:71
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format | numsections |
| Course 1 | C1 | topics | 2 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Forum" to section "2" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name |
| Description | Test forum description |
| Visible | Show |
When I click on ".reduce-sections" "css_element" # behat_hooks::i_look_for_exceptions()
Then "Test forum name" activity should be visible # behat_hooks::i_look_for_exceptions()
And I open "Test forum name" actions menu # behat_hooks::i_look_for_exceptions()
And I click on "Hide" "link" in the "Test forum name" activity # behat_hooks::i_look_for_exceptions()
And "Test forum name" activity should be hidden # behat_hooks::i_look_for_exceptions()
And I open "Test forum name" actions menu # behat_hooks::i_look_for_exceptions()
And I click on "Show" "link" in the "Test forum name" activity # behat_hooks::i_look_for_exceptions()
And "Test forum name" activity should be visible # behat_hooks::i_look_for_exceptions()
@core @core_course
Feature: Add activities to courses
In order to provide tools for students learning
As a teacher
I need to add activites to a course
Background: # C:\Apache24\htdocs\integration\course\tests\behat\add_activities.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| student1 | C1 | student |
| student2 | C1 | student |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Add an activity to a course # C:\Apache24\htdocs\integration\course\tests\behat\add_activities.feature:25
When I add a "Database" to section "3" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Test name |
| Description | Test database description |
| Entries required for completion | 9 |
| Allow comments on entries | Yes |
And I turn editing mode off # behat_hooks::i_look_for_exceptions()
Then I should not see "Adding a new" # behat_hooks::i_look_for_exceptions()
And I follow "Test name" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And the field "Name" matches value "Test name" # behat_hooks::i_look_for_exceptions()
And the field "Entries required for completion" matches value "9" # behat_hooks::i_look_for_exceptions()
And the field "Allow comments on entries" matches value "Yes" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Add an activity supplying only the name # C:\Apache24\htdocs\integration\course\tests\behat\add_activities.feature:41
When I add a "Database" to section "3" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Test name |
Then I should see "Test name" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Set activity description to required then add an activity supplying only the name # C:\Apache24\htdocs\integration\course\tests\behat\add_activities.feature:47
Given I set the following administration settings values: # behat_hooks::i_look_for_exceptions()
| requiremodintro | Yes |
When I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I add a "Database" to section "3" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Test name |
Then I should see "Required" # behat_hooks::i_look_for_exceptions()
Scenario: Add an activity to a course with Javascript disabled # C:\Apache24\htdocs\integration\course\tests\behat\add_activities.feature:56
Then I should see "Add a resource to section 'Topic 1'" # behat_hooks::i_look_for_exceptions()
And I should see "Add an activity to section 'Topic 1'" # behat_hooks::i_look_for_exceptions()
And I should see "Add a resource to section 'Topic 2'" # behat_hooks::i_look_for_exceptions()
And I should see "Add an activity to section 'Topic 2'" # behat_hooks::i_look_for_exceptions()
And I should see "Add a resource to section 'Topic 3'" # behat_hooks::i_look_for_exceptions()
And I should see "Add an activity to section 'Topic 3'" # behat_hooks::i_look_for_exceptions()
And I add a "Label" to section "2" # behat_hooks::i_look_for_exceptions()
And I should see "Adding a new Label to Topic 2" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Label text | I'm a label |
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
And I add a "Database" to section "3" # behat_hooks::i_look_for_exceptions()
And I should see "Adding a new Database to Topic 3" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Test database name |
| Description | Test database description |
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
And I should not see "Adding a new" # behat_hooks::i_look_for_exceptions()
And I should see "Test database name" # behat_hooks::i_look_for_exceptions()
And I should see "I'm a label" # behat_hooks::i_look_for_exceptions()
@core @core_badges @_file_upload
Feature: Add badges to the system
In order to give badges to users for their achievements
As an admin
I need to manage badges in the system
Background: # C:\Apache24\htdocs\integration\badges\tests\behat\add_badge.feature:7
Given I am on homepage # behat_hooks::i_look_for_exceptions()
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Setting badges settings # C:\Apache24\htdocs\integration\badges\tests\behat\add_badge.feature:12
Given I navigate to "Badges settings" node in "Site administration > Badges" # behat_hooks::i_look_for_exceptions()
And I set the field "Default badge issuer name" to "Test Badge Site" # behat_hooks::i_look_for_exceptions()
And I set the field "Default badge issuer contact details" to "testuser@example.com" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
When I follow "Add a new badge" # behat_hooks::i_look_for_exceptions()
Then the field "issuercontact" matches value "testuser@example.com" # behat_hooks::i_look_for_exceptions()
And the field "issuername" matches value "Test Badge Site" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Accessing the badges # C:\Apache24\htdocs\integration\badges\tests\behat\add_badge.feature:22
Given I navigate to "Site badges" node in "Site pages" # behat_hooks::i_look_for_exceptions()
Then I should see "There are no badges available." # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Add a badge # C:\Apache24\htdocs\integration\badges\tests\behat\add_badge.feature:27
Given I navigate to "Add a new badge" node in "Site administration > Badges" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Test Badge |
| Description | Test badge description |
| issuername | Test Badge Site |
| issuercontact | testuser@example.com |
And I upload "badges/tests/behat/badge.png" file to "Image" filemanager # behat_hooks::i_look_for_exceptions()
When I press "Create badge" # behat_hooks::i_look_for_exceptions()
Then I should see "Edit details" # behat_hooks::i_look_for_exceptions()
And I should see "Test Badge" # behat_hooks::i_look_for_exceptions()
And I should not see "Create badge" # behat_hooks::i_look_for_exceptions()
And I follow "Manage badges" # behat_hooks::i_look_for_exceptions()
And I should see "Number of badges available: 1" # behat_hooks::i_look_for_exceptions()
And I should not see "There are no badges available." # behat_hooks::i_look_for_exceptions()
@qtype @qtype_ddimageortext
Feature: Test creating a drag and drop onto image question
As a teacher
In order to test my students
I need to be able to create drag and drop onto image questions
Background: # C:\Apache24\htdocs\integration\question\type\ddimageortext\tests\behat\add.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@moodle.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Question bank" node in "Course administration" # behat_hooks::i_look_for_exceptions()
@javascript @_file_upload
Scenario: Create a drag and drop onto image question # C:\Apache24\htdocs\integration\question\type\ddimageortext\tests\behat\add.feature:22
When I press "Create a new question ..." # behat_hooks::i_look_for_exceptions()
And I set the field "Drag and drop onto image" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Add" # behat_hooks::i_look_for_exceptions()
And I set the field "Question name" to "Drag and drop onto image 001" # behat_hooks::i_look_for_exceptions()
And I set the field "Question text" to "Identify the features in this cross-section." # behat_hooks::i_look_for_exceptions()
And I set the field "General feedback" to "The locations are now labelled on the diagram below." # behat_hooks::i_look_for_exceptions()
And I upload "question/type/ddimageortext/tests/fixtures/oceanfloorbase.jpg" file to "Background image" filemanager # behat_hooks::i_look_for_exceptions()
And I follow "Draggable items" # behat_hooks::i_look_for_exceptions()
And I press "Blanks for 3 more draggable items" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drags_0_dragitemtype" to "Draggable text" # behat_hooks::i_look_for_exceptions()
And I set the field "id_draglabel_0" to "island
arc" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drags_1_dragitemtype" to "Draggable text" # behat_hooks::i_look_for_exceptions()
And I set the field "id_draglabel_1" to "mid-ocean
ridge" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drags_2_dragitemtype" to "Draggable text" # behat_hooks::i_look_for_exceptions()
And I set the field "id_draglabel_2" to "abyssal
plain" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drags_3_dragitemtype" to "Draggable text" # behat_hooks::i_look_for_exceptions()
And I set the field "id_draglabel_3" to "continental
rise" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drags_4_dragitemtype" to "Draggable text" # behat_hooks::i_look_for_exceptions()
And I set the field "id_draglabel_4" to "ocean
trench" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drags_5_dragitemtype" to "Draggable text" # behat_hooks::i_look_for_exceptions()
And I set the field "id_draglabel_5" to "continental
slope" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drags_6_dragitemtype" to "Draggable text" # behat_hooks::i_look_for_exceptions()
And I set the field "id_draglabel_6" to "mountain
belt" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drags_7_dragitemtype" to "Draggable text" # behat_hooks::i_look_for_exceptions()
And I set the field "id_draglabel_7" to "continental
shelf" # behat_hooks::i_look_for_exceptions()
And I follow "Drop zones" # behat_hooks::i_look_for_exceptions()
And I press "Blanks for 3 more drop zones" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drops_0_xleft" to "53" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drops_0_ytop" to "17" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drops_0_choice" to "7" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drops_1_xleft" to "172" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drops_1_ytop" to "2" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drops_1_choice" to "8" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drops_2_xleft" to "363" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drops_2_ytop" to "31" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drops_2_choice" to "5" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drops_3_xleft" to "440" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drops_3_ytop" to "13" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drops_3_choice" to "3" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drops_4_xleft" to "115" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drops_4_ytop" to "74" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drops_4_choice" to "6" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drops_5_xleft" to "210" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drops_5_ytop" to "94" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drops_5_choice" to "4" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drops_6_xleft" to "310" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drops_6_ytop" to "87" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drops_6_choice" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drops_7_xleft" to "479" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drops_7_ytop" to "84" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drops_7_choice" to "2" # behat_hooks::i_look_for_exceptions()
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Drag and drop onto image 001" # behat_hooks::i_look_for_exceptions()
@qtype @qtype_ddmarker
Feature: Test creating a drag and drop markers question
As a teacher
In order to test my students
I need to be able to create drag and drop markers questions
Background: # C:\Apache24\htdocs\integration\question\type\ddmarker\tests\behat\add.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@moodle.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Question bank" node in "Course administration" # behat_hooks::i_look_for_exceptions()
@javascript @_file_upload
Scenario: Create a drag and drop markers question # C:\Apache24\htdocs\integration\question\type\ddmarker\tests\behat\add.feature:22
When I press "Create a new question ..." # behat_hooks::i_look_for_exceptions()
And I set the field "Drag and drop markers" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Add" # behat_hooks::i_look_for_exceptions()
And I set the field "Question name" to "Drag and drop markers" # behat_hooks::i_look_for_exceptions()
And I set the field "Question text" to "Please place the markers on the map of Milton Keynes and be aware that there is more than one railway station." # behat_hooks::i_look_for_exceptions()
And I set the field "General feedback" to "The Open University is at the junction of Brickhill Street and Groveway. There are three railway stations, Wolverton, Milton Keynes Central and Bletchley." # behat_hooks::i_look_for_exceptions()
And I upload "question/type/ddmarker/tests/fixtures/mkmap.png" file to "Background image" filemanager # behat_hooks::i_look_for_exceptions()
And I follow "Markers" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drags_0_label" to "OU" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drags_0_noofdrags" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drags_1_label" to "Railway station" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drags_1_noofdrags" to "3" # behat_hooks::i_look_for_exceptions()
And I follow "Drop zones" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drops_0_shape" to "Circle" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drops_0_coords" to "322,213;10" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drops_0_choice" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drops_1_shape" to "Circle" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drops_1_coords" to "144,84;10" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drops_1_choice" to "2" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drops_2_shape" to "Circle" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drops_2_coords" to "195,180;10" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drops_2_choice" to "2" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drops_3_shape" to "Circle" # behat_hooks::i_look_for_exceptions()
And I set the field "id_drops_3_coords" to "267,302;10" # behat_hooks::i_look_for_exceptions()
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "You have specified a drop zone but not chosen a marker that must be dragged to the zone." # behat_hooks::i_look_for_exceptions()
And I set the field "id_drops_3_choice" to "2" # behat_hooks::i_look_for_exceptions()
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
And I should see "Drag and drop markers" # behat_hooks::i_look_for_exceptions()
@qtype @qtype_ddwtos
Feature: Test creating a drag and drop into text question
As a teacher
In order to test my students
I need to be able to create drag and drop into text questions
Background: # C:\Apache24\htdocs\integration\question\type\ddwtos\tests\behat\add.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@moodle.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Question bank" node in "Course administration" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Create a drag and drop into text question # C:\Apache24\htdocs\integration\question\type\ddwtos\tests\behat\add.feature:22
When I add a "Drag and drop into text" question filling the form with: # behat_hooks::i_look_for_exceptions()
| Question name | Drag and drop into text 001 |
| Question text | The [[1]] [[2]] on the [[3]]. |
| General feedback | The cat sat on the mat. |
| id_choices_0_answer | cat |
| id_choices_1_answer | sat |
| id_choices_2_answer | mat |
| id_choices_3_answer | dog |
| id_choices_4_answer | table |
| Hint 1 | First hint |
| Hint 2 | Second hint |
Then I should see "Drag and drop into text 001" # behat_hooks::i_look_for_exceptions()
@qtype @qtype_description
Feature: Test creating a Description question
As a teacher
In order to test my students
I need to be able to create a Description question
Background: # C:\Apache24\htdocs\integration\question\type\description\tests\behat\add.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@moodle.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Question bank" node in "Course administration" # behat_hooks::i_look_for_exceptions()
Scenario: Create a Description question with Correct answer as False # C:\Apache24\htdocs\integration\question\type\description\tests\behat\add.feature:21
When I add a "Description" question filling the form with: # behat_hooks::i_look_for_exceptions()
| Question name | description-001 |
| Question text | Instructions about the following questions. |
| General feedback | Why actually the field 'General feedback' used in this qytype? |
Then I should see "description-001" # behat_hooks::i_look_for_exceptions()
@qtype @qtype_essay
Feature: Test creating an Essay question
As a teacher
In order to test my students
I need to be able to create an Essay question
Background: # C:\Apache24\htdocs\integration\question\type\essay\tests\behat\add.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@moodle.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Question bank" node in "Course administration" # behat_hooks::i_look_for_exceptions()
Scenario: Create an Essay question with Response format set to 'HTML editor' # C:\Apache24\htdocs\integration\question\type\essay\tests\behat\add.feature:21
When I add a "Essay" question filling the form with: # behat_hooks::i_look_for_exceptions()
| Question name | essay-001 |
| Question text | Write an essay with 500 words. |
| General feedback | This is general feedback |
| Response format | HTML editor |
Then I should see "essay-001" # behat_hooks::i_look_for_exceptions()
Scenario: Create an Essay question with Response format set to 'HTML editor with the file picker' # C:\Apache24\htdocs\integration\question\type\essay\tests\behat\add.feature:29
When I add a "Essay" question filling the form with: # behat_hooks::i_look_for_exceptions()
| Question name | essay-002 |
| Question text | Write an essay with 500 words. |
| General feedback | This is general feedback |
| Response format | HTML editor |
Then I should see "essay-002" # behat_hooks::i_look_for_exceptions()
@qtype @qtype_match
Feature: Test creating a Matching question
As a teacher
In order to test my students
I need to be able to create a Matching question
Background: # C:\Apache24\htdocs\integration\question\type\match\tests\behat\add.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@moodle.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Question bank" node in "Course administration" # behat_hooks::i_look_for_exceptions()
Scenario: Create a Matching question with 3 subquestions # C:\Apache24\htdocs\integration\question\type\match\tests\behat\add.feature:21
When I add a "Matching" question filling the form with: # behat_hooks::i_look_for_exceptions()
| Question name | match-001 |
| Question text | Match the country with the capital city. |
| General feedback | England=London, France=Paris and Spain=Madrid. |
| id_subquestions_0 | England |
| id_subanswers_0 | London |
| id_subquestions_1 | France |
| id_subanswers_1 | Paris |
| id_subquestions_2 | Spain |
| id_subanswers_2 | Madrid |
| For any correct response | Your answer is correct |
| For any partially correct response | Your answer is partially correct |
| For any incorrect response | Your answer is incorrect |
| Hint 1 | This is your first hint |
| Hint 2 | This is your second hint |
Then I should see "match-001" # behat_hooks::i_look_for_exceptions()
@qtype @qtype_multichoice
Feature: Test creating a Multiple choice question
As a teacher
In order to test my students
I need to be able to create a Multiple choice question
Background: # C:\Apache24\htdocs\integration\question\type\multichoice\tests\behat\add.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@moodle.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Question bank" node in "Course administration" # behat_hooks::i_look_for_exceptions()
Scenario: Create a Multiple choice question with multiple response # C:\Apache24\htdocs\integration\question\type\multichoice\tests\behat\add.feature:21
When I add a "Multiple choice" question filling the form with: # behat_hooks::i_look_for_exceptions()
| Question name | Multi-choice-001 |
| Question text | Find the capital cities in Europe. |
| General feedback | Paris and London |
| One or multiple answers? | Multiple answers allowed |
| Choice 1 | Tokyo |
| Choice 2 | Spain |
| Choice 3 | London |
| Choice 4 | Barcelona |
| Choice 5 | Paris |
| id_fraction_0 | None |
| id_fraction_1 | None |
| id_fraction_2 | 50% |
| id_fraction_3 | None |
| id_fraction_4 | 50% |
| Hint 1 | First hint |
| Hint 2 | Second hint |
Then I should see "Multi-choice-001" # behat_hooks::i_look_for_exceptions()
Scenario: Create a Multiple choice question with single response # C:\Apache24\htdocs\integration\question\type\multichoice\tests\behat\add.feature:41
When I add a "Multiple choice" question filling the form with: # behat_hooks::i_look_for_exceptions()
| Question name | Multi-choice-002 |
| Question text | Find the capital city of England. |
| General feedback | London is the capital city of England. |
| One or multiple answers? | One answer only |
| Choice 1 | Manchester |
| Choice 2 | Buckingham |
| Choice 3 | London |
| Choice 4 | Barcelona |
| Choice 5 | Paris |
| id_fraction_0 | None |
| id_fraction_1 | None |
| id_fraction_2 | 100% |
| id_fraction_3 | None |
| id_fraction_4 | None |
| Hint 1 | First hint |
| Hint 2 | Second hint |
Then I should see "Multi-choice-002" # behat_hooks::i_look_for_exceptions()
@qtype @qtype_shortanswer
Feature: Test creating a Short answer question
As a teacher
In order to test my students
I need to be able to create a Short answer question
Background: # C:\Apache24\htdocs\integration\question\type\shortanswer\tests\behat\add.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@moodle.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Question bank" node in "Course administration" # behat_hooks::i_look_for_exceptions()
Scenario: Create a Short answer question # C:\Apache24\htdocs\integration\question\type\shortanswer\tests\behat\add.feature:21
When I add a "Short answer" question filling the form with: # behat_hooks::i_look_for_exceptions()
| Question name | shortanswer-001 |
| Question text | What is the national langauge in France? |
| General feedback | The national langauge in France is French |
| Default mark | 1 |
| Case sensitivity | No, case is unimportant |
| id_answer_0 | French |
| id_fraction_0 | 100% |
| id_feedback_0 | Well done. French is correct. |
| id_answer_1 | * |
| id_fraction_1 | None |
| id_feedback_1 | Your answer is incorrect. |
Then I should see "shortanswer-001" # behat_hooks::i_look_for_exceptions()
@qtype @qtype_truefalse
Feature: Test creating a True/False question
As a teacher
In order to test my students
I need to be able to create a True/False question
Background: # C:\Apache24\htdocs\integration\question\type\truefalse\tests\behat\add.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@moodle.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Question bank" node in "Course administration" # behat_hooks::i_look_for_exceptions()
Scenario: Create a True/False question with Correct answer as False # C:\Apache24\htdocs\integration\question\type\truefalse\tests\behat\add.feature:21
When I add a "True/False" question filling the form with: # behat_hooks::i_look_for_exceptions()
| Question name | true-false-001 |
| Question text | Manchester is the capital city of England. |
| Default mark | 1 |
| General feedback | London is the capital city of England. |
| Correct answer | False |
| Feedback for the response 'True'. | Well done! |
| Feedback for the response 'False'. | Read more about England. |
Then I should see "true-false-001" # behat_hooks::i_look_for_exceptions()
Scenario: Create a True/False question with Correct answer as True # C:\Apache24\htdocs\integration\question\type\truefalse\tests\behat\add.feature:32
When I add a "True/False" question filling the form with: # behat_hooks::i_look_for_exceptions()
| Question name | true-false-002 |
| Question text | London is the capital city of England. |
| Default mark | 1 |
| General feedback | London is the capital city of England. |
| Correct answer | True |
| Feedback for the response 'True'. | Well done! |
| Feedback for the response 'False'. | Read more about England. |
Then I should see "true-false-002" # behat_hooks::i_look_for_exceptions()
@core @core_block
Feature: Add blocks
In order to add more functionality to pages
As a teacher
I need to add blocks to pages
Background: # C:\Apache24\htdocs\integration\blocks\tests\behat\add_blocks.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| student1 | C1 | student |
| student2 | C1 | student |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
When I add the "Blog menu" block # behat_hooks::i_look_for_exceptions()
Then I should see "View my entries about this course" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Add a block to a course with Javascript enabled # C:\Apache24\htdocs\integration\blocks\tests\behat\add_blocks.feature:27
Scenario: Add a block to a course with Javascript disabled # C:\Apache24\htdocs\integration\blocks\tests\behat\add_blocks.feature:29
@core @core_my
Feature: Add blocks to dashboard page
In order to add more functionality to dashboard page
As a user
I need to add blocks to dashboard page
Background: # C:\Apache24\htdocs\integration\my\tests\behat\add_blocks.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| student1 | C1 | student |
| student2 | C1 | student |
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I click on "Dashboard" "link" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Add blocks to page # C:\Apache24\htdocs\integration\my\tests\behat\add_blocks.feature:22
When I press "Customise this page" # behat_hooks::i_look_for_exceptions()
And I add the "Latest announcements" block # behat_hooks::i_look_for_exceptions()
Then I should see "Latest announcements" in the "Latest announcements" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Latest badges" in the "Latest badges" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Calendar" in the "Calendar" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Upcoming events" in the "Upcoming events" "block" # behat_hooks::i_look_for_exceptions()
@core @core_user
Feature: Add blocks to my profile page
In order to add more functionality to my profile page
As a user
I need to add blocks to my profile page
Background: # C:\Apache24\htdocs\integration\user\tests\behat\add_blocks.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| student1 | C1 | student |
| student2 | C1 | student |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I follow "View profile" # behat_hooks::i_look_for_exceptions()
Scenario: Add blocks to page # C:\Apache24\htdocs\integration\user\tests\behat\add_blocks.feature:22
When I press "Customise this page" # behat_hooks::i_look_for_exceptions()
And I add the "Latest announcements" block # behat_hooks::i_look_for_exceptions()
Then I should see "Latest announcements" # behat_hooks::i_look_for_exceptions()
@mod @mod_choice
Feature: Add choice activity
In order to ask questions as a choice of multiple responses
As a teacher
I need to add choice activities to courses
Scenario: Add a choice activity and complete the activity as a student # C:\Apache24\htdocs\integration\mod\choice\tests\behat\add_choice.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Choice" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Choice name | Choice name |
| Description | Choice Description |
| option[0] | Option 1 |
| option[1] | Option 2 |
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I choose "Option 1" from "Choice name" choice activity # behat_hooks::i_look_for_exceptions()
Then I should see "Your selection: Option 1" # behat_hooks::i_look_for_exceptions()
And I should see "Your choice has been saved" # behat_hooks::i_look_for_exceptions()
@core @core_cohort
Feature: Add cohorts of users
In order to create site-wide groups
As an admin
I need to create cohorts and add users on them
Background: # C:\Apache24\htdocs\integration\cohort\tests\behat\add_cohort.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| user1 | First | User | first@example.com |
| user2 | Second | User | second@example.com |
| user3 | Third | User | third@example.com |
| user4 | Forth | User | forth@example.com |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "Cohorts" node in "Site administration > Users > Accounts" # behat_hooks::i_look_for_exceptions()
And I follow "Add new cohort" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Test cohort name |
| Context | System |
| Cohort ID | 333 |
| Description | Test cohort description |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Scenario: Add a cohort # C:\Apache24\htdocs\integration\cohort\tests\behat\add_cohort.feature:24
When I follow "Cohorts" # behat_hooks::i_look_for_exceptions()
Then I should see "Test cohort name" # behat_hooks::i_look_for_exceptions()
And I should see "333" # behat_hooks::i_look_for_exceptions()
And I should see "Test cohort description" # behat_hooks::i_look_for_exceptions()
And I should see "Created manually" # behat_hooks::i_look_for_exceptions()
Scenario: Add users to a cohort selecting them from the system users list # C:\Apache24\htdocs\integration\cohort\tests\behat\add_cohort.feature:31
When I add "First User (first@example.com)" user to "333" cohort members # behat_hooks::i_look_for_exceptions()
And I add "Second User (second@example.com)" user to "333" cohort members # behat_hooks::i_look_for_exceptions()
Then I should see "2" in the "#cohorts" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Assign" "link" in the "Test cohort name" "table_row" # behat_hooks::i_look_for_exceptions()
And the "Current users" select box should contain "First User (first@example.com)" # behat_hooks::i_look_for_exceptions()
And the "Current users" select box should contain "Second User (second@example.com)" # behat_hooks::i_look_for_exceptions()
And the "Current users" select box should not contain "Forth User (forth@example.com)" # behat_hooks::i_look_for_exceptions()
Scenario: Add users to a cohort using a bulk user action # C:\Apache24\htdocs\integration\cohort\tests\behat\add_cohort.feature:40
When I follow "Bulk user actions" # behat_hooks::i_look_for_exceptions()
And I set the field "Available" to "Third User" # behat_hooks::i_look_for_exceptions()
And I press "Add to selection" # behat_hooks::i_look_for_exceptions()
And I set the field "Available" to "Forth User" # behat_hooks::i_look_for_exceptions()
And I press "Add to selection" # behat_hooks::i_look_for_exceptions()
And I set the field "id_action" to "Add to cohort" # behat_hooks::i_look_for_exceptions()
And I press "Go" # behat_hooks::i_look_for_exceptions()
And I set the field "Cohort" to "Test cohort name [333]" # behat_hooks::i_look_for_exceptions()
And I press "Add to cohort" # behat_hooks::i_look_for_exceptions()
And I follow "Cohorts" # behat_hooks::i_look_for_exceptions()
Then I should see "2" in the "#cohorts" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Assign" "link" in the "Test cohort name" "table_row" # behat_hooks::i_look_for_exceptions()
And the "Current users" select box should contain "Third User (third@example.com)" # behat_hooks::i_look_for_exceptions()
And the "Current users" select box should contain "Forth User (forth@example.com)" # behat_hooks::i_look_for_exceptions()
And the "Current users" select box should not contain "First User (first@example.com)" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Edit cohort name in-place # C:\Apache24\htdocs\integration\cohort\tests\behat\add_cohort.feature:58
When I follow "Cohorts" # behat_hooks::i_look_for_exceptions()
And I click on "Edit cohort name" "link" in the "Test cohort name" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the field "New name for cohort Test cohort name" to "Students cohort" # behat_hooks::i_look_for_exceptions()
And I press key "13" in the field "New name for cohort Test cohort name" # behat_hooks::i_look_for_exceptions()
Then I should not see "Test cohort name" # behat_hooks::i_look_for_exceptions()
And I should see "Students cohort" # behat_hooks::i_look_for_exceptions()
And I follow "Cohorts" # behat_hooks::i_look_for_exceptions()
And I should see "Students cohort" # behat_hooks::i_look_for_exceptions()
@block @block_comments
Feature: Add a comment to the comments block
In order to comment on a conversation or a topic
As a user
In need to add comments to courses
Background: # C:\Apache24\htdocs\integration\blocks\comments\tests\behat\add_comment.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | Frist | teacher1@example.com |
| student1 | Student | First | student1@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Comments" block # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Add a comment with Javascript enabled # C:\Apache24\htdocs\integration\blocks\comments\tests\behat\add_comment.feature:28
When I add "I'm a comment from student1" comment to comments block # behat_hooks::i_look_for_exceptions()
Then I should see "I'm a comment from student1" # behat_hooks::i_look_for_exceptions()
Scenario: Add a comment with Javascript disabled # C:\Apache24\htdocs\integration\blocks\comments\tests\behat\add_comment.feature:32
When I follow "Show comments" # behat_hooks::i_look_for_exceptions()
And I add "I'm a comment from student1" comment to comments block # behat_hooks::i_look_for_exceptions()
Then I should see "I'm a comment from student1" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Test comment block pagination # C:\Apache24\htdocs\integration\blocks\comments\tests\behat\add_comment.feature:38
When I add "Super test comment 01" comment to comments block # behat_hooks::i_look_for_exceptions()
And I add "Super test comment 02" comment to comments block # behat_hooks::i_look_for_exceptions()
And I add "Super test comment 03" comment to comments block # behat_hooks::i_look_for_exceptions()
And I add "Super test comment 04" comment to comments block # behat_hooks::i_look_for_exceptions()
And I add "Super test comment 05" comment to comments block # behat_hooks::i_look_for_exceptions()
And I add "Super test comment 06" comment to comments block # behat_hooks::i_look_for_exceptions()
And I add "Super test comment 07" comment to comments block # behat_hooks::i_look_for_exceptions()
And I add "Super test comment 08" comment to comments block # behat_hooks::i_look_for_exceptions()
And I add "Super test comment 09" comment to comments block # behat_hooks::i_look_for_exceptions()
And I add "Super test comment 10" comment to comments block # behat_hooks::i_look_for_exceptions()
And I add "Super test comment 11" comment to comments block # behat_hooks::i_look_for_exceptions()
And I add "Super test comment 12" comment to comments block # behat_hooks::i_look_for_exceptions()
And I add "Super test comment 13" comment to comments block # behat_hooks::i_look_for_exceptions()
And I add "Super test comment 14" comment to comments block # behat_hooks::i_look_for_exceptions()
And I add "Super test comment 15" comment to comments block # behat_hooks::i_look_for_exceptions()
And I add "Super test comment 16" comment to comments block # behat_hooks::i_look_for_exceptions()
And I add "Super test comment 17" comment to comments block # behat_hooks::i_look_for_exceptions()
And I add "Super test comment 18" comment to comments block # behat_hooks::i_look_for_exceptions()
And I add "Super test comment 19" comment to comments block # behat_hooks::i_look_for_exceptions()
And I add "Super test comment 20" comment to comments block # behat_hooks::i_look_for_exceptions()
And I add "Super test comment 21" comment to comments block # behat_hooks::i_look_for_exceptions()
And I add "Super test comment 22" comment to comments block # behat_hooks::i_look_for_exceptions()
And I add "Super test comment 23" comment to comments block # behat_hooks::i_look_for_exceptions()
And I add "Super test comment 24" comment to comments block # behat_hooks::i_look_for_exceptions()
And I add "Super test comment 25" comment to comments block # behat_hooks::i_look_for_exceptions()
And I add "Super test comment 26" comment to comments block # behat_hooks::i_look_for_exceptions()
And I add "Super test comment 27" comment to comments block # behat_hooks::i_look_for_exceptions()
And I add "Super test comment 28" comment to comments block # behat_hooks::i_look_for_exceptions()
And I add "Super test comment 29" comment to comments block # behat_hooks::i_look_for_exceptions()
And I add "Super test comment 30" comment to comments block # behat_hooks::i_look_for_exceptions()
And I add "Super test comment 31" comment to comments block # behat_hooks::i_look_for_exceptions()
Then I should see "Super test comment 01" # behat_hooks::i_look_for_exceptions()
And I should see "Super test comment 31" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should not see "Super test comment 01" # behat_hooks::i_look_for_exceptions()
And I should not see "Super test comment 02" # behat_hooks::i_look_for_exceptions()
And I should not see "Super test comment 16" # behat_hooks::i_look_for_exceptions()
And I should see "Super test comment 17" # behat_hooks::i_look_for_exceptions()
And I should see "Super test comment 31" # behat_hooks::i_look_for_exceptions()
And I should see "1" in the ".block_comments .comment-paging" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "2" in the ".block_comments .comment-paging" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "3" in the ".block_comments .comment-paging" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "4" in the ".block_comments .comment-paging" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "2" "link" in the ".block_comments .comment-paging" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Super test comment 01" # behat_hooks::i_look_for_exceptions()
And I should see "Super test comment 02" # behat_hooks::i_look_for_exceptions()
And I should see "Super test comment 16" # behat_hooks::i_look_for_exceptions()
And I should not see "Super test comment 17" # behat_hooks::i_look_for_exceptions()
And I should not see "Super test comment 31" # behat_hooks::i_look_for_exceptions()
And I click on "3" "link" in the ".block_comments .comment-paging" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Super test comment 01" # behat_hooks::i_look_for_exceptions()
And I should not see "Super test comment 02" # behat_hooks::i_look_for_exceptions()
And I should not see "Super test comment 16" # behat_hooks::i_look_for_exceptions()
And I should not see "Super test comment 17" # behat_hooks::i_look_for_exceptions()
And I should not see "Super test comment 31" # behat_hooks::i_look_for_exceptions()
And I click on "1" "link" in the ".block_comments .comment-paging" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Super test comment 01" # behat_hooks::i_look_for_exceptions()
And I should not see "Super test comment 02" # behat_hooks::i_look_for_exceptions()
And I should not see "Super test comment 16" # behat_hooks::i_look_for_exceptions()
And I should see "Super test comment 17" # behat_hooks::i_look_for_exceptions()
And I should see "Super test comment 31" # behat_hooks::i_look_for_exceptions()
@core @core_files @_file_upload
Feature: Add a new custom file type
In order to add files of a custom type
As an admin
I need to add a new custom file type
@javascript
Scenario: Add custom file type # C:\Apache24\htdocs\integration\files\tests\behat\add_custom_file_type.feature:9
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | legacyfiles |
| Course 1 | C1 | 0 | 2 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "File types" node in "Site administration>Server" # behat_hooks::i_look_for_exceptions()
And I press "Add a new file type" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Extension | mdlr |
| MIME type | application/x-moodle-rules |
| File icon | document |
| Description type | Custom description specified in this form |
| Custom description | Moodle rules |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "application/x-moodle-rules" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
When I add a "File" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Test file |
| Select files | files/tests/fixtures/custom_filetype.mdlr |
| Show type | 1 |
| Display resource description | 1 |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then I should see "Test file" # behat_hooks::i_look_for_exceptions()
And I should see "Moodle rules" in the "span.resourcelinkdetails" "css_element" # behat_hooks::i_look_for_exceptions()
@mod @mod_data
Feature: Users can add entries to database activities
In order to populate databases
As a user
I need to add entries to databases
@javascript
Scenario: Students can add entries to a database # C:\Apache24\htdocs\integration\mod\data\tests\behat\add_entries.feature:8
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber |
| data | Test database name | n | C1 | data1 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I add a "Text input" field to "Test database name" database and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Field name | Test field name |
| Field description | Test field description |
And I add a "Text input" field to "Test database name" database and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Field name | Test field 2 name |
| Field description | Test field 2 description |
And I follow "Templates" # behat_hooks::i_look_for_exceptions()
And I wait until the page is ready # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I add an entry to "Test database name" database with: # behat_hooks::i_look_for_exceptions()
| Test field name | Student original entry |
| Test field 2 name | Student original entry 2 |
And I press "Save and view" # behat_hooks::i_look_for_exceptions()
Then I should see "Student original entry" # behat_hooks::i_look_for_exceptions()
And I follow "Edit" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Test field name | Student original entry |
| Test field 2 name | |
And I press "Save and view" # behat_hooks::i_look_for_exceptions()
Then I should not see "Student original entry 2" # behat_hooks::i_look_for_exceptions()
And I follow "Edit" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Test field name | Student edited entry |
And I press "Save and view" # behat_hooks::i_look_for_exceptions()
And I should see "Student edited entry" # behat_hooks::i_look_for_exceptions()
And I add an entry to "Test database name" database with: # behat_hooks::i_look_for_exceptions()
| Test field name | Student second entry |
And I press "Save and add another" # behat_hooks::i_look_for_exceptions()
And the field "Test field name" does not match value "Student second entry" # behat_hooks::i_look_for_exceptions()
And I add an entry to "Test database name" database with: # behat_hooks::i_look_for_exceptions()
| Test field name | Student third entry |
And I press "Save and view" # behat_hooks::i_look_for_exceptions()
And I follow "View list" # behat_hooks::i_look_for_exceptions()
And I should see "Student edited entry" # behat_hooks::i_look_for_exceptions()
And I should see "Student second entry" # behat_hooks::i_look_for_exceptions()
And I should see "Student third entry" # behat_hooks::i_look_for_exceptions()
And I follow "Delete" # behat_hooks::i_look_for_exceptions()
And I press "Delete" # behat_hooks::i_look_for_exceptions()
And I should not see "Student edited entry" # behat_hooks::i_look_for_exceptions()
And I should see "Student second entry" # behat_hooks::i_look_for_exceptions()
And I should see "Student third entry" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test database name" # behat_hooks::i_look_for_exceptions()
And I press "Select all" # behat_hooks::i_look_for_exceptions()
And I press "Delete selected" # behat_hooks::i_look_for_exceptions()
And I press "Delete" # behat_hooks::i_look_for_exceptions()
And I should see "No entries in database" # behat_hooks::i_look_for_exceptions()
@tool @tool_filetypes
Feature: Add customised file types
In order to support a file mime type which doesn't exist in Moodle
As an administrator
I need to add a new customised file type
Scenario: Add a new file type # C:\Apache24\htdocs\integration\admin\tool\filetypes\tests\behat\add_filetypes.feature:7
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "File types" node in "Site administration > Server" # behat_hooks::i_look_for_exceptions()
And I press "Add" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Extension | frog |
| MIME type | application/x-frog |
| File icon | archive |
| Type groups | document |
| Description type | Custom description specified in this form |
| Custom description | Froggy file |
| Default icon for MIME type | 1 |
When I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Froggy file" in the "application/x-frog" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "document" in the "application/x-frog" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "frog" in the "application/x-frog" "table_row" # behat_hooks::i_look_for_exceptions()
And "//img[contains(@src, 'archive')]" "xpath_element" should exist in the "application/x-frog" "table_row" # behat_hooks::i_look_for_exceptions()
Scenario: Update an existing file type # C:\Apache24\htdocs\integration\admin\tool\filetypes\tests\behat\add_filetypes.feature:26
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "File types" node in "Site administration > Server" # behat_hooks::i_look_for_exceptions()
When I click on "Edit 7z" "link" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Extension | doc |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "File extensions must be unique" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Extension | frog |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "frog" in the "application/x-7z-compressed" "table_row" # behat_hooks::i_look_for_exceptions()
Scenario: Change the text option (was buggy) # C:\Apache24\htdocs\integration\admin\tool\filetypes\tests\behat\add_filetypes.feature:39
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "File types" node in "Site administration > Server" # behat_hooks::i_look_for_exceptions()
When I click on "Edit 7z" "link" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Description type | Custom description specified in this form |
| Custom description | New description for 7z |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "New description" in the "application/x-7z-compressed" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "Edit 7z" "link" # behat_hooks::i_look_for_exceptions()
And I set the field "Description type" to "Default" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should not see "New description" in the "application/x-7z-compressed" "table_row" # behat_hooks::i_look_for_exceptions()
Scenario: Try to select a text option without entering a value. # C:\Apache24\htdocs\integration\admin\tool\filetypes\tests\behat\add_filetypes.feature:53
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "File types" node in "Site administration > Server" # behat_hooks::i_look_for_exceptions()
When I click on "Edit dmg" "link" # behat_hooks::i_look_for_exceptions()
And I set the field "Description type" to "Custom description" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Required" # behat_hooks::i_look_for_exceptions()
And I set the field "Description type" to "Alternative language string" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "Required" # behat_hooks::i_look_for_exceptions()
And I set the field "Description type" to "Default" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And "dmg" "table_row" should exist # behat_hooks::i_look_for_exceptions()
Scenario: Delete an existing file type # C:\Apache24\htdocs\integration\admin\tool\filetypes\tests\behat\add_filetypes.feature:68
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "File types" node in "Site administration > Server" # behat_hooks::i_look_for_exceptions()
When I click on "Delete 7z" "link" # behat_hooks::i_look_for_exceptions()
Then I should see "Are you absolutely sure you want to remove .7z?" # behat_hooks::i_look_for_exceptions()
And I press "Yes" # behat_hooks::i_look_for_exceptions()
And I should see "Deleted" in the "7z" "table_row" # behat_hooks::i_look_for_exceptions()
Scenario: Delete a custom file type # C:\Apache24\htdocs\integration\admin\tool\filetypes\tests\behat\add_filetypes.feature:76
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "File types" node in "Site administration > Server" # behat_hooks::i_look_for_exceptions()
And I press "Add" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Extension | frog |
| MIME type | application/x-frog |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
When I click on "Delete frog" "link" # behat_hooks::i_look_for_exceptions()
And I press "Yes" # behat_hooks::i_look_for_exceptions()
Then I should not see "frog" # behat_hooks::i_look_for_exceptions()
Scenario: Revert changes to deleted file type # C:\Apache24\htdocs\integration\admin\tool\filetypes\tests\behat\add_filetypes.feature:88
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "File types" node in "Site administration > Server" # behat_hooks::i_look_for_exceptions()
When I click on "Delete 7z" "link" # behat_hooks::i_look_for_exceptions()
And I press "Yes" # behat_hooks::i_look_for_exceptions()
And I follow "Restore 7z to Moodle defaults" # behat_hooks::i_look_for_exceptions()
And I press "Yes" # behat_hooks::i_look_for_exceptions()
Then I should not see "Deleted" in the "7z" "table_row" # behat_hooks::i_look_for_exceptions()
Scenario: Revert changes to updated file type # C:\Apache24\htdocs\integration\admin\tool\filetypes\tests\behat\add_filetypes.feature:97
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "File types" node in "Site administration > Server" # behat_hooks::i_look_for_exceptions()
And I click on "Edit 7z" "link" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| File icon | document |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
When I follow "Restore 7z to Moodle defaults" # behat_hooks::i_look_for_exceptions()
And I press "Yes" # behat_hooks::i_look_for_exceptions()
Then "//img[contains(@src, 'archive')]" "xpath_element" should exist in the "7z" "table_row" # behat_hooks::i_look_for_exceptions()
@javascript @_file_upload
Scenario: Create a resource activity which contains a customised file type # C:\Apache24\htdocs\integration\admin\tool\filetypes\tests\behat\add_filetypes.feature:109
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname |
| Course 1 | C1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "File types" node in "Site administration > Server" # behat_hooks::i_look_for_exceptions()
And I press "Add" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Extension | frog |
| MIME type | application/x-frog |
| File icon | archive |
| Description type | Custom description specified in this form |
| Custom description | Froggy file |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
When I add a "File" to section "1" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | An example of customised file type |
| Description | File description |
And I upload "admin/tool/filetypes/tests/fixtures/test.frog" file to "Select files" filemanager # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I set the field "Show type" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
Then I should see "Froggy file" # behat_hooks::i_look_for_exceptions()
And the "src" attribute of ".modtype_resource a img" "css_element" should contain "archive" # behat_hooks::i_look_for_exceptions()
@mod @mod_forum @_file_upload
Feature: Add forum activities and discussions
In order to discuss topics with other users
As a teacher
I need to add forum activities to moodle courses
@javascript
Scenario: Add a forum and a discussion attaching files # C:\Apache24\htdocs\integration\mod\forum\tests\behat\add_forum.feature:8
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name |
| Forum type | Standard forum for general use |
| Description | Test forum description |
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Forum post 1 |
| Message | This is the body |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
When I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Post with attachment |
| Message | This is the body |
| Attachment | lib/tests/fixtures/empty.txt |
And I reply "Forum post 1" post from "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Reply with attachment |
| Message | This is the body |
| Attachment | lib/tests/fixtures/upload_users.csv |
Then I should see "Reply with attachment" # behat_hooks::i_look_for_exceptions()
And I should see "upload_users.csv" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
And I follow "Post with attachment" # behat_hooks::i_look_for_exceptions()
And I should see "empty.txt" # behat_hooks::i_look_for_exceptions()
And I follow "Edit" # behat_hooks::i_look_for_exceptions()
And the field "Attachment" matches value "empty.txt" # behat_hooks::i_look_for_exceptions()
@mod @mod_quiz
Feature: Add a quiz
In order to evaluate students
As a teacher
I need to create a quiz
Background: # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\add_quiz.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Terry1 | Teacher1 | teacher1@example.com |
| student1 | Sam1 | Student1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Quiz" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Test quiz name |
| Description | Test quiz description |
And I add a "True/False" question to the "Test quiz name" quiz with: # behat_hooks::i_look_for_exceptions()
| Question name | First question |
| Question text | Answer the first question |
| General feedback | Thank you, this is the general feedback |
| Correct answer | False |
| Feedback for the response 'True'. | So you think it is true |
| Feedback for the response 'False'. | So you think it is false |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test quiz name" # behat_hooks::i_look_for_exceptions()
And I press "Attempt quiz now" # behat_hooks::i_look_for_exceptions()
Then I should see "Question 1" # behat_hooks::i_look_for_exceptions()
And I should see "Answer the first question" # behat_hooks::i_look_for_exceptions()
And I set the field "True" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Finish attempt ..." # behat_hooks::i_look_for_exceptions()
And I should see "Answer saved" # behat_hooks::i_look_for_exceptions()
And I press "Submit all and finish" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Add and configure small quiz and perform an attempt as a student with Javascript enabled # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\add_quiz.feature:45
Then I click on "Submit all and finish" "button" in the "Confirmation" "dialogue" # behat_hooks::i_look_for_exceptions()
And I should see "So you think it is true" # behat_hooks::i_look_for_exceptions()
And I should see "Thank you, this is the general feedback" # behat_hooks::i_look_for_exceptions()
And I should see "The correct answer is 'False'." # behat_hooks::i_look_for_exceptions()
And I follow "Finish review" # behat_hooks::i_look_for_exceptions()
And I should see "Highest grade: 0.00 / 10.00." # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Add and configure small quiz and perform an attempt as a student with Javascript disabled # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\add_quiz.feature:54
Then I should see "So you think it is true" # behat_hooks::i_look_for_exceptions()
And I should see "Thank you, this is the general feedback" # behat_hooks::i_look_for_exceptions()
And I should see "The correct answer is 'False'." # behat_hooks::i_look_for_exceptions()
And I follow "Finish review" # behat_hooks::i_look_for_exceptions()
And I should see "Highest grade: 0.00 / 10.00." # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@repository @repository_recent @_file_upload
Feature: Recent files repository lists the recently used files
In order to save time when selecting files
As a user
I need to use again the files I've just used
@javascript
Scenario: Add files recently uploaded # C:\Apache24\htdocs\integration\repository\recent\tests\behat\add_recent.feature:8
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I follow "Manage private files" # behat_hooks::i_look_for_exceptions()
And I upload "lib/tests/fixtures/empty.txt" file to "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I upload "lib/tests/fixtures/upload_users.csv" file to "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
When I add a "Folder" to section "1" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Folder name |
| Description | Folder description |
And I add "empty.txt" file from "Recent files" to "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I add "empty.txt" file from "Recent files" to "Files" filemanager as: # behat_hooks::i_look_for_exceptions()
| Save as | empty_copy.txt |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
Then I should see "empty.txt" # behat_hooks::i_look_for_exceptions()
And I should see "empty_copy.txt" # behat_hooks::i_look_for_exceptions()
And I should see "Folder description" # behat_hooks::i_look_for_exceptions()
@mod @mod_scorm @_file_upload @_switch_frame
Feature: Add scorm activity
In order to let students access a scorm package
As a teacher
I need to add scorm activity to a course
@javascript
Scenario: Add a scorm activity to a course # C:\Apache24\htdocs\integration\mod\scorm\tests\behat\add_scorm.feature:8
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "SCORM package" to section "1" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Awesome SCORM package |
| Description | Description |
And I upload "mod/scorm/tests/packages/singlesco_scorm12.zip" file to "Package file" filemanager # behat_hooks::i_look_for_exceptions()
And I click on "Save and display" "button" # behat_hooks::i_look_for_exceptions()
Then I should see "Awesome SCORM package" # behat_hooks::i_look_for_exceptions()
And I should see "Normal" # behat_hooks::i_look_for_exceptions()
And I should see "Preview" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Awesome SCORM package" # behat_hooks::i_look_for_exceptions()
And I should see "Normal" # behat_hooks::i_look_for_exceptions()
And I press "Enter" # behat_hooks::i_look_for_exceptions()
And I switch to "scorm_object" iframe # behat_hooks::i_look_for_exceptions()
And I should see "Not implemented yet" # behat_hooks::i_look_for_exceptions()
And I switch to the main frame # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
@core_enrol @core_group
Feature: Users can be added to multiple groups at once
In order to manage group membership effectively
As a user
I need to add another user to multiple groups
Background: # C:\Apache24\htdocs\integration\enrol\tests\behat\add_to_group.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "groups" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| Group 1 | C1 | G1 |
| Group 2 | C1 | G2 |
| Group 3 | C1 | G3 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | editingteacher |
Scenario: Adding a user to one group # C:\Apache24\htdocs\integration\enrol\tests\behat\add_to_group.feature:25
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Enrolled users" node in "Course administration > Users" # behat_hooks::i_look_for_exceptions()
And I click on "Add user into group" "link" in the "student1" "table_row" # behat_hooks::i_look_for_exceptions()
When I set the field "Add user into group" to "Group 1" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Group 1" # behat_hooks::i_look_for_exceptions()
Scenario: Adding a user to multiple group # C:\Apache24\htdocs\integration\enrol\tests\behat\add_to_group.feature:34
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Enrolled users" node in "Course administration > Users" # behat_hooks::i_look_for_exceptions()
And I click on "Add user into group" "link" in the "student1" "table_row" # behat_hooks::i_look_for_exceptions()
When I set the field "Add user into group" to "Group 1, Group 2, Group 3" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Group 1" # behat_hooks::i_look_for_exceptions()
And I should see "Group 2" # behat_hooks::i_look_for_exceptions()
And I should see "Group 3" # behat_hooks::i_look_for_exceptions()
@block @block_main_menu
Feature: Add URL to main menu block
In order to add helpful resources for students
As a admin
I need to add URLs to the main menu block and check it works.
@javascript
Scenario: Add a URL in menu block and ensure it appears # C:\Apache24\htdocs\integration\blocks\site_main_menu\tests\behat\add_url.feature:8
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I navigate to "Turn editing on" node in "Front page settings" # behat_hooks::i_look_for_exceptions()
And I add the "Main menu" block # behat_hooks::i_look_for_exceptions()
When I add a "URL" to section "0" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | google |
| Description | gooooooooogle |
| External URL | http://www.google.com |
| id_display | In pop-up |
Then "google" "link" should exist in the "Main menu" "block" # behat_hooks::i_look_for_exceptions()
And "Add an activity or resource" "link" should exist in the "Main menu" "block" # behat_hooks::i_look_for_exceptions()
@block @block_activity_results
Feature: The activity results block displays student scores
In order to be display student scores
As a user
I need to see the activity results block
Background: # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\addblockinactivity.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
| student1 | Student | 1 | student1@example.com | S1 |
| student2 | Student | 2 | student2@example.com | S2 |
| student3 | Student | 3 | student3@example.com | S3 |
| student4 | Student | 4 | student4@example.com | S4 |
| student5 | Student | 5 | student5@example.com | S5 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
| student4 | C1 | student |
| student5 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment 1 |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment 2 |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment 3 |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I add a "Page" to section "1" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Test page name |
| Description | Test page description |
| Page content | This is a page |
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Test page name" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I give the grade "80.00" to the user "Student 2" for the grade item "Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I give the grade "70.00" to the user "Student 3" for the grade item "Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I give the grade "60.00" to the user "Student 4" for the grade item "Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I give the grade "50.00" to the user "Student 5" for the grade item "Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Scenario: Configure the block on a non-graded activity to show 3 high scores # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\addblockinactivity.feature:63
Given I follow "Test page name" # behat_hooks::i_look_for_exceptions()
And I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_activitygradeitemid | Test assignment 1 |
| id_config_showbest | 3 |
| id_config_showworst | 0 |
| id_config_gradeformat | Absolute numbers |
| id_config_nameformat | Display full names |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Student 1" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "90.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Student 2" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "80.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Student 3" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "70.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Block should select current activity by default # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\addblockinactivity.feature:81
Given I follow "Test assignment 1" # behat_hooks::i_look_for_exceptions()
When I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
Then the field "id_config_activitygradeitemid" matches value "Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment 2" # behat_hooks::i_look_for_exceptions()
And I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And the field "id_config_activitygradeitemid" matches value "Test assignment 2" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment 3" # behat_hooks::i_look_for_exceptions()
And I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And the field "id_config_activitygradeitemid" matches value "Test assignment 3" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test page name" # behat_hooks::i_look_for_exceptions()
And I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And the field "id_config_activitygradeitemid" does not match value "Test page name" # behat_hooks::i_look_for_exceptions()
@mod @mod_lti
Feature: Add tools
In order to provide activities for learners
As a teacher
I need to be able to add external tools to a course
Background: # C:\Apache24\htdocs\integration\mod\lti\tests\behat\addtool.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Terry1 | Teacher1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "Manage tools" node in "Site administration > Plugins > Activity modules > External tool" # behat_hooks::i_look_for_exceptions()
And I follow "Manage preconfigured tools" # behat_hooks::i_look_for_exceptions()
And I follow "Add preconfigured tool" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Tool name | Teaching Tool 1 |
| Tool configuration usage | Show in activity chooser and as a preconfigured tool |
And I set the field "Tool URL" to local url "/mod/lti/tests/fixtures/tool_provider.php" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Add a tool via the activity picker # C:\Apache24\htdocs\integration\mod\lti\tests\behat\addtool.feature:29
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Teaching Tool 1" to section "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Activity name" to "Test tool activity 1" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I set the field "Launch container" to "Embed" # behat_hooks::i_look_for_exceptions()
And the "Select content" "button" should be disabled # behat_hooks::i_look_for_exceptions()
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
When I open "Test tool activity 1" actions menu # behat_hooks::i_look_for_exceptions()
And I choose "Edit settings" in the open action menu # behat_hooks::i_look_for_exceptions()
Then the field "Preconfigured tool" matches value "Teaching Tool 1" # behat_hooks::i_look_for_exceptions()
And the "Select content" "button" should be disabled # behat_hooks::i_look_for_exceptions()
And the "Tool URL" "field" should be disabled # behat_hooks::i_look_for_exceptions()
@mod @mod_lti
Feature: Add preconfigured tools via teacher interface
In order to provide reusable activities for teachers
As a teacher
I need to be able to add preconfigured tools
Background: # C:\Apache24\htdocs\integration\mod\lti\tests\behat\addtype.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Terry1 | Teacher1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
@javascript
Scenario: Add a tool from a cartridge # C:\Apache24\htdocs\integration\mod\lti\tests\behat\addtype.feature:19
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "External tool" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Activity name | Test tool activity 1 |
And I open "Test tool activity 1" actions menu # behat_hooks::i_look_for_exceptions()
And I choose "Edit settings" in the open action menu # behat_hooks::i_look_for_exceptions()
And I set the field "Tool URL" to local url "/mod/lti/tests/fixtures/ims_cartridge_basic_lti_link.xml" # behat_hooks::i_look_for_exceptions()
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
And I open "Test tool activity 1" actions menu # behat_hooks::i_look_for_exceptions()
And I choose "Edit settings" in the open action menu # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
Then the field "Tool URL" matches value "http://www.example.com/lti/provider.php" # behat_hooks::i_look_for_exceptions()
And the field "Secure tool URL" matches value "https://www.example.com/lti/provider.php" # behat_hooks::i_look_for_exceptions()
And the field "Icon URL" matches value "http://download.moodle.org/unittest/test.jpg" # behat_hooks::i_look_for_exceptions()
And the field "Secure icon URL" matches value "https://download.moodle.org/unittest/test.jpg" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Add a preconfigured tool from a cartridge # C:\Apache24\htdocs\integration\mod\lti\tests\behat\addtype.feature:38
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "External tool" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Activity name | Test tool activity 1 |
And I open "Test tool activity 1" actions menu # behat_hooks::i_look_for_exceptions()
And I choose "Edit settings" in the open action menu # behat_hooks::i_look_for_exceptions()
And I follow "Add preconfigured tool" # behat_hooks::i_look_for_exceptions()
And I switch to "add_tool" window # behat_hooks::i_look_for_exceptions()
And I set the field "Tool name" to "Placeholder" # behat_hooks::i_look_for_exceptions()
And I set the field "Tool URL" to local url "/mod/lti/tests/fixtures/ims_cartridge_basic_lti_link.xml" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I switch to the main window # behat_hooks::i_look_for_exceptions()
And I wait "2" seconds # behat_hooks::i_look_for_exceptions()
And I follow "Edit preconfigured tool" # behat_hooks::i_look_for_exceptions()
And I switch to "edit_tool" window # behat_hooks::i_look_for_exceptions()
Then the field "Tool URL" matches value "http://www.example.com/lti/provider.php" # behat_hooks::i_look_for_exceptions()
And the field "Icon URL" matches value "http://download.moodle.org/unittest/test.jpg" # behat_hooks::i_look_for_exceptions()
And the field "Secure icon URL" matches value "https://download.moodle.org/unittest/test.jpg" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I switch to the main window # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Add and use a preconfigured tool # C:\Apache24\htdocs\integration\mod\lti\tests\behat\addtype.feature:62
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "External tool" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Activity name | Test tool activity 1 |
And I open "Test tool activity 1" actions menu # behat_hooks::i_look_for_exceptions()
And I choose "Edit settings" in the open action menu # behat_hooks::i_look_for_exceptions()
And I set the field "Tool URL" to local url "/mod/lti/tests/fixtures/tool_provider.php" # behat_hooks::i_look_for_exceptions()
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
And I follow "Test tool activity 1" # behat_hooks::i_look_for_exceptions()
And I switch to "contentframe" iframe # behat_hooks::i_look_for_exceptions()
And I should see "This represents a tool provider" # behat_hooks::i_look_for_exceptions()
@block @block_activity_results
Feature: The activity results block displays student scores
In order to be display student scores
As a user
I need to see the activity results block
Background: # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\addunconfiguredblock.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
Scenario: Add the block to a the course # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\addunconfiguredblock.feature:21
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
Then I should see "Please configure this block and select which activity it should display results from." in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page in a course without activities # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\addunconfiguredblock.feature:25
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I should see "There are not yet any activities in this course." # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Please configure this block and select which activity it should display results from." in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on a resource page in a course without activities # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\addunconfiguredblock.feature:32
Given I add a "Page" to section "1" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Test page name |
| Description | Test page description |
| page | This is a page |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
When I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I should see "There are not yet any activities in this course." # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Please configure this block and select which activity it should display results from." in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
@block @block_activity_results
Feature: The activity results block displays student scores
In order to be display student scores
As a user
I need to properly configure the activity results block
Background: # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\addunsupportedactivity.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block to use an activity without grades # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\addunsupportedactivity.feature:21
Given I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
And I follow "C1" # behat_hooks::i_look_for_exceptions()
And I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 1 |
| id_config_showworst | 0 |
| id_config_gradeformat | Percentages |
| id_config_nameformat | Display full names |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
When I follow "Test assignment" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_grade_modgrade_type | None |
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
Then I should see "Error: the activity selected uses a grading method that is not supported by this block." in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
@mod @mod_forum
Feature: The forum search allows users to perform advanced searches for forum posts
In order to perform an advanced search for a forum post
As a teacher
I can use the search feature
Background: # C:\Apache24\htdocs\integration\mod\forum\tests\behat\advanced_search.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | ONE | teacher1@example.com | T1 |
| teacher2 | Teacher | TWO | teacher2@example.com | T1 |
| student1 | Student | 1 | student1@example.com | S1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| teacher2 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Latest announcements" block # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I set the field "id_newsitems" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I add a new topic to "Announcements" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | My subject |
| Message | My message |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I add a new topic to "Announcements" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | My subjective |
| Message | My long message |
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Perform an advanced search using any term # C:\Apache24\htdocs\integration\mod\forum\tests\behat\advanced_search.feature:37
Given I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Announcements" # behat_hooks::i_look_for_exceptions()
And I press "Search forums" # behat_hooks::i_look_for_exceptions()
And I should see "Advanced search" # behat_hooks::i_look_for_exceptions()
And I set the field "words" to "subject" # behat_hooks::i_look_for_exceptions()
When I press "Search forums" # behat_hooks::i_look_for_exceptions()
Then I should see "My subject" # behat_hooks::i_look_for_exceptions()
And I should see "My subjective" # behat_hooks::i_look_for_exceptions()
Scenario: Perform an advanced search avoiding words # C:\Apache24\htdocs\integration\mod\forum\tests\behat\advanced_search.feature:48
Given I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Announcements" # behat_hooks::i_look_for_exceptions()
And I press "Search forums" # behat_hooks::i_look_for_exceptions()
And I should see "Advanced search" # behat_hooks::i_look_for_exceptions()
And I set the field "words" to "My" # behat_hooks::i_look_for_exceptions()
And I set the field "notwords" to "subjective" # behat_hooks::i_look_for_exceptions()
When I press "Search forums" # behat_hooks::i_look_for_exceptions()
Then I should see "My subject" # behat_hooks::i_look_for_exceptions()
And I should not see "My subjective" # behat_hooks::i_look_for_exceptions()
Scenario: Perform an advanced search using whole words # C:\Apache24\htdocs\integration\mod\forum\tests\behat\advanced_search.feature:60
Given database family used is one of the following: # behat_hooks::i_look_for_exceptions()
| mysql |
| postgres |
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Announcements" # behat_hooks::i_look_for_exceptions()
And I press "Search forums" # behat_hooks::i_look_for_exceptions()
And I should see "Advanced search" # behat_hooks::i_look_for_exceptions()
And I set the field "fullwords" to "subject" # behat_hooks::i_look_for_exceptions()
When I press "Search forums" # behat_hooks::i_look_for_exceptions()
Then I should see "My subject" # behat_hooks::i_look_for_exceptions()
And I should not see "My subjective" # behat_hooks::i_look_for_exceptions()
Scenario: Perform an advanced search matching the subject # C:\Apache24\htdocs\integration\mod\forum\tests\behat\advanced_search.feature:74
Given I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Announcements" # behat_hooks::i_look_for_exceptions()
And I press "Search forums" # behat_hooks::i_look_for_exceptions()
And I should see "Advanced search" # behat_hooks::i_look_for_exceptions()
And I set the field "subject" to "subjective" # behat_hooks::i_look_for_exceptions()
When I press "Search forums" # behat_hooks::i_look_for_exceptions()
Then I should not see "My message" # behat_hooks::i_look_for_exceptions()
And I should see "My subjective" # behat_hooks::i_look_for_exceptions()
Scenario: Perform an advanced search matching the author # C:\Apache24\htdocs\integration\mod\forum\tests\behat\advanced_search.feature:85
Given I log in as "teacher2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I add a new topic to "Announcements" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | My Subjects |
| Message | My message |
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Announcements" # behat_hooks::i_look_for_exceptions()
And I press "Search forums" # behat_hooks::i_look_for_exceptions()
And I should see "Advanced search" # behat_hooks::i_look_for_exceptions()
And I set the field "user" to "TWO" # behat_hooks::i_look_for_exceptions()
And I press "Search forums" # behat_hooks::i_look_for_exceptions()
Then I should see "Teacher TWO" # behat_hooks::i_look_for_exceptions()
And I should not see "Teacher ONE" # behat_hooks::i_look_for_exceptions()
Scenario: Perform an advanced search with multiple words # C:\Apache24\htdocs\integration\mod\forum\tests\behat\advanced_search.feature:102
Given I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Announcements" # behat_hooks::i_look_for_exceptions()
And I press "Search forums" # behat_hooks::i_look_for_exceptions()
And I should see "Advanced search" # behat_hooks::i_look_for_exceptions()
And I set the field "subject" to "my subjective" # behat_hooks::i_look_for_exceptions()
When I press "Search forums" # behat_hooks::i_look_for_exceptions()
Then I should not see "My message" # behat_hooks::i_look_for_exceptions()
And I should see "My subjective" # behat_hooks::i_look_for_exceptions()
@gradereport @gradereport_grader
Feature: Using the AJAX grading feature of Grader report to update grades and feedback
In order to use AJAX grading
As a teacher
I need to be able to update and verify grades
Background: # C:\Apache24\htdocs\integration\grade\report\grader\tests\behat\ajax_grader.feature:8
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | t1 |
| student1 | Student | 1 | student1@example.com | s1 |
| student2 | Student | 2 | student2@example.com | s2 |
| student3 | Student | 3 | student3@example.com | s3 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
And the following "scales" exist: # behat_hooks::i_look_for_exceptions()
| name | scale |
| Test Scale | Disappointing,Good,Very good,Excellent |
And the following "grade categories" exist: # behat_hooks::i_look_for_exceptions()
| fullname | course |
| Grade Cat | C1 |
And the following "grade categories" exist: # behat_hooks::i_look_for_exceptions()
| fullname | course | gradecategory |
| Grade Sub Cat | C1 | Grade Cat |
And the following "grade items" exist: # behat_hooks::i_look_for_exceptions()
| itemname | course | locked | gradetype | gradecategory |
| Item 1 | C1 | 0 | value | Grade Cat |
| Item VU | C1 | 0 | value | Grade Cat |
| Item VL | C1 | 1 | value | Grade Cat |
| Item TU | C1 | 0 | text | Grade Cat |
| Item TL | C1 | 1 | text | Grade Cat |
| Item 3 | C1 | 0 | value | Grade Cat |
| Calc Item | C1 | 0 | value | Grade Cat |
| Item VUSub | C1 | 0 | value | Grade Sub Cat |
And the following "grade items" exist: # behat_hooks::i_look_for_exceptions()
| itemname | course | locked | gradetype | scale | gradecategory |
| Item SU | C1 | 0 | scale | Test Scale | Grade Cat |
| Item SL | C1 | 1 | scale | Test Scale | Grade Cat |
And the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| grade_report_showaverages | 0 |
| grade_report_enableajax | 1 |
@javascript
Scenario: Use the grader report without editing, with AJAX on and quick feedback off # C:\Apache24\htdocs\integration\grade\report\grader\tests\behat\ajax_grader.feature:52
When the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| grade_overridecat | 1 |
| grade_report_showquickfeedback | 0 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I click on student "Student 2" for grade item "Item VU" # behat_hooks::i_look_for_exceptions()
Then I should see a grade field for "Student 2" and grade item "Item VU" # behat_hooks::i_look_for_exceptions()
And I should not see a feedback field for "Student 2" and grade item "Item VU" # behat_hooks::i_look_for_exceptions()
And I set the field "ajaxgrade" to "33" # behat_hooks::i_look_for_exceptions()
And I press key "13" in the field "ajaxgrade" # behat_hooks::i_look_for_exceptions()
And I should not see a grade field for "Student 2" and grade item "Item VU" # behat_hooks::i_look_for_exceptions()
And I should not see a feedback field for "Student 2" and grade item "Item VU" # behat_hooks::i_look_for_exceptions()
And I click on student "Student 3" for grade item "Item VU" # behat_hooks::i_look_for_exceptions()
And I set the field "ajaxgrade" to "50" # behat_hooks::i_look_for_exceptions()
And I press key "13" in the field "ajaxgrade" # behat_hooks::i_look_for_exceptions()
And I click on student "Student 3" for grade item "Item 1" # behat_hooks::i_look_for_exceptions()
And I set the field "ajaxgrade" to "80" # behat_hooks::i_look_for_exceptions()
And I press key "13" in the field "ajaxgrade" # behat_hooks::i_look_for_exceptions()
And I click on student "Student 3" for grade item "Item SU" # behat_hooks::i_look_for_exceptions()
And I set the field "ajaxgrade" to "Very good" # behat_hooks::i_look_for_exceptions()
And I press key "13" in the field "ajaxgrade" # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grades" table: # behat_hooks::i_look_for_exceptions()
| -1- | -6- | -7- | -13- | -16- |
| Student 2 | - | 33.00 | - | 33.00 |
| Student 3 | 80.00 | 50.00 | Very good | 133.00 |
And I click on student "Student 3" for grade item "Item VL" # behat_hooks::i_look_for_exceptions()
And I should not see a grade field for "Student 3" and grade item "Item VL" # behat_hooks::i_look_for_exceptions()
And I should not see a feedback field for "Student 3" and grade item "Item VL" # behat_hooks::i_look_for_exceptions()
And I click on student "Student 3" for grade item "Item SL" # behat_hooks::i_look_for_exceptions()
And I should not see a grade field for "Student 3" and grade item "Item SL" # behat_hooks::i_look_for_exceptions()
And I should not see a feedback field for "Student 3" and grade item "Item SL" # behat_hooks::i_look_for_exceptions()
And I click on student "Student 3" for grade item "Item TU" # behat_hooks::i_look_for_exceptions()
And I should not see a grade field for "Student 3" and grade item "Item TU" # behat_hooks::i_look_for_exceptions()
And I should not see a feedback field for "Student 3" and grade item "Item TU" # behat_hooks::i_look_for_exceptions()
And I click on student "Student 1" for grade item "Course total" # behat_hooks::i_look_for_exceptions()
And I should see a grade field for "Student 1" and grade item "Course total" # behat_hooks::i_look_for_exceptions()
And I should not see a feedback field for "Student 1" and grade item "Course total" # behat_hooks::i_look_for_exceptions()
And I set the field "ajaxgrade" to "90" # behat_hooks::i_look_for_exceptions()
And I press key "13" in the field "ajaxgrade" # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grades" table: # behat_hooks::i_look_for_exceptions()
| -1- | -16- |
| Student 1 | 90.00 |
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grades" table: # behat_hooks::i_look_for_exceptions()
| -1- | -6- | -7- | -13- | -16- |
| Student 1 | - | - | - | 90.00 |
| Student 2 | - | 33.00 | - | 33.00 |
| Student 3 | 80.00 | 50.00 | Very good | 133.00 |
@javascript
Scenario: Use the grader report without editing, with AJAX and quick feedback on # C:\Apache24\htdocs\integration\grade\report\grader\tests\behat\ajax_grader.feature:104
When the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| grade_overridecat | 1 |
| grade_report_showquickfeedback | 1 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I click on student "Student 2" for grade item "Item VU" # behat_hooks::i_look_for_exceptions()
Then I should see a grade field for "Student 2" and grade item "Item VU" # behat_hooks::i_look_for_exceptions()
And I should see a feedback field for "Student 2" and grade item "Item VU" # behat_hooks::i_look_for_exceptions()
And I set the field "ajaxgrade" to "33" # behat_hooks::i_look_for_exceptions()
And I set the field "ajaxfeedback" to "Student 2 VU feedback" # behat_hooks::i_look_for_exceptions()
And I press key "13" in the field "ajaxfeedback" # behat_hooks::i_look_for_exceptions()
And I click on student "Student 3" for grade item "Item VL" # behat_hooks::i_look_for_exceptions()
And I should not see a grade field for "Student 3" and grade item "Item VL" # behat_hooks::i_look_for_exceptions()
And I should not see a feedback field for "Student 3" and grade item "Item VL" # behat_hooks::i_look_for_exceptions()
And I click on student "Student 3" for grade item "Item TU" # behat_hooks::i_look_for_exceptions()
And I should not see a grade field for "Student 3" and grade item "Item TU" # behat_hooks::i_look_for_exceptions()
And I should see a feedback field for "Student 3" and grade item "Item TU" # behat_hooks::i_look_for_exceptions()
And I set the field "ajaxfeedback" to "Student 3 TU feedback" # behat_hooks::i_look_for_exceptions()
And I press key "13" in the field "ajaxfeedback" # behat_hooks::i_look_for_exceptions()
And I click on student "Student 2" for grade item "Item SU" # behat_hooks::i_look_for_exceptions()
And I set the field "ajaxgrade" to "Very good" # behat_hooks::i_look_for_exceptions()
And I set the field "ajaxfeedback" to "Student 2 SU feedback" # behat_hooks::i_look_for_exceptions()
And I press key "13" in the field "ajaxfeedback" # behat_hooks::i_look_for_exceptions()
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grades" table: # behat_hooks::i_look_for_exceptions()
| -1- | -7- | -13- | -16- |
| Student 2 | 33.00 | Very good | 36.00 |
And I click on student "Student 3" for grade item "Item TU" # behat_hooks::i_look_for_exceptions()
And the field "ajaxfeedback" matches value "Student 3 TU feedback" # behat_hooks::i_look_for_exceptions()
And I click on student "Student 2" for grade item "Item SU" # behat_hooks::i_look_for_exceptions()
And the field "ajaxfeedback" matches value "Student 2 SU feedback" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Use the grader report without editing, with AJAX and quick feedback on, without category override # C:\Apache24\htdocs\integration\grade\report\grader\tests\behat\ajax_grader.feature:141
When the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| grade_overridecat | 0 |
| grade_report_showquickfeedback | 1 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I click on student "Student 2" for grade item "Item VU" # behat_hooks::i_look_for_exceptions()
Then I should see a grade field for "Student 2" and grade item "Item VU" # behat_hooks::i_look_for_exceptions()
And I should see a feedback field for "Student 2" and grade item "Item VU" # behat_hooks::i_look_for_exceptions()
And I set the field "ajaxgrade" to "33" # behat_hooks::i_look_for_exceptions()
And I press key "13" in the field "ajaxgrade" # behat_hooks::i_look_for_exceptions()
And I click on student "Student 2" for grade item "Course total" # behat_hooks::i_look_for_exceptions()
And I should not see a grade field for "Student 3" and grade item "Course total" # behat_hooks::i_look_for_exceptions()
And I should not see a feedback field for "Student 3" and grade item "Course total" # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grades" table: # behat_hooks::i_look_for_exceptions()
| -1- | -7- | -16- |
| Student 2 | 33.00 | 33.00 |
@javascript
Scenario: Use the grader report with editing, with AJAX and quick feedback on, with category override # C:\Apache24\htdocs\integration\grade\report\grader\tests\behat\ajax_grader.feature:161
When the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| grade_overridecat | 1 |
| grade_report_showquickfeedback | 1 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
Then I should not see a grade field for "Student 2" and grade item "Item VL" # behat_hooks::i_look_for_exceptions()
And I should not see a feedback field for "Student 2" and grade item "Item VL" # behat_hooks::i_look_for_exceptions()
And I should not see a grade field for "Student 2" and grade item "Item TU" # behat_hooks::i_look_for_exceptions()
And I should see a feedback field for "Student 2" and grade item "Item TU" # behat_hooks::i_look_for_exceptions()
And I should see a grade field for "Student 2" and grade item "Course total" # behat_hooks::i_look_for_exceptions()
And I should see a feedback field for "Student 2" and grade item "Course total" # behat_hooks::i_look_for_exceptions()
And I give the grade "20.00" to the user "Student 2" for the grade item "Item VU" # behat_hooks::i_look_for_exceptions()
And I click away from student "Student 2" and grade item "Item VU" value # behat_hooks::i_look_for_exceptions()
And I give the grade "30.00" to the user "Student 2" for the grade item "Item 1" # behat_hooks::i_look_for_exceptions()
And I give the feedback "Some feedback" to the user "Student 2" for the grade item "Item 1" # behat_hooks::i_look_for_exceptions()
And I click away from student "Student 2" and grade item "Item 1" feedback # behat_hooks::i_look_for_exceptions()
And I give the grade "Very good" to the user "Student 2" for the grade item "Item SU" # behat_hooks::i_look_for_exceptions()
And I click away from student "Student 2" and grade item "Item SU" value # behat_hooks::i_look_for_exceptions()
And the grade for "Student 2" in grade item "Grade Cat" should match "53.00" # behat_hooks::i_look_for_exceptions()
And the grade for "Student 2" in grade item "Course total" should match "53.00" # behat_hooks::i_look_for_exceptions()
And I turn editing mode off # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grades" table: # behat_hooks::i_look_for_exceptions()
| -1- | -6- | -7- | -13- | -15- | -16- |
| Student 2 | 30.00 | 20.00 | Very good | 53.00 | 53.00 |
And I click on student "Student 2" for grade item "Item 1" # behat_hooks::i_look_for_exceptions()
And the field "ajaxfeedback" matches value "Some feedback" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Use the grader report with editing, with AJAX and quick feedback on, without category override # C:\Apache24\htdocs\integration\grade\report\grader\tests\behat\ajax_grader.feature:192
When the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| grade_overridecat | 0 |
| grade_report_showquickfeedback | 1 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I change window size to "large" # behat_hooks::i_look_for_exceptions()
And I set "=[[i1]] + [[i3]] + [[gsc]]" calculation for grade item "Calc Item" with idnumbers: # behat_hooks::i_look_for_exceptions()
| Item 1 | i1 |
| Item 3 | i3 |
| Grade Sub Cat | gsc |
Then I should not see a grade field for "Student 2" and grade item "Course total" # behat_hooks::i_look_for_exceptions()
And I should not see a feedback field for "Student 2" and grade item "Course total" # behat_hooks::i_look_for_exceptions()
And I give the grade "20.00" to the user "Student 2" for the grade item "Item VU" # behat_hooks::i_look_for_exceptions()
And I click away from student "Student 2" and grade item "Item VU" value # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grades" table: # behat_hooks::i_look_for_exceptions()
| -1- | -15- | -16- |
| Student 2 | 20.00 | 20.00 |
And I give the grade "30.00" to the user "Student 2" for the grade item "Item 1" # behat_hooks::i_look_for_exceptions()
And I click away from student "Student 2" and grade item "Item 1" value # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grades" table: # behat_hooks::i_look_for_exceptions()
| -1- | -15- | -16- |
| Student 2 | 80.00 | 80.00 |
And the field "Student 2 Calc Item grade" matches value "30.00" # behat_hooks::i_look_for_exceptions()
And I give the grade "5.00" to the user "Student 2" for the grade item "Item 3" # behat_hooks::i_look_for_exceptions()
And I click away from student "Student 2" and grade item "Item 3" value # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grades" table: # behat_hooks::i_look_for_exceptions()
| -1- | -15- | -16- |
| Student 2 | 90.00 | 90.00 |
And the field "Student 2 Calc Item grade" matches value "35.00" # behat_hooks::i_look_for_exceptions()
And I give the grade "10.00" to the user "Student 2" for the grade item "Item VUSub" # behat_hooks::i_look_for_exceptions()
And I click away from student "Student 2" and grade item "Item VUSub" value # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grades" table: # behat_hooks::i_look_for_exceptions()
| -1- | -5- | -15- | -16- |
| Student 2 | 10.00 | 110.00 | 110.00 |
And the field "Student 2 Calc Item grade" matches value "45.00" # behat_hooks::i_look_for_exceptions()
And I give the feedback "Some feedback" to the user "Student 2" for the grade item "Item 1" # behat_hooks::i_look_for_exceptions()
And I click away from student "Student 2" and grade item "Item 1" feedback # behat_hooks::i_look_for_exceptions()
And I turn editing mode off # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grades" table: # behat_hooks::i_look_for_exceptions()
| -1- | -4- | -6- | -7- | -11- | -12- | -15- | -16- |
| Student 2 | 10.00 | 30.00 | 20.00 | 5.00 | 45.00 | 110.00 | 110.00 |
And I click on student "Student 2" for grade item "Item 1" # behat_hooks::i_look_for_exceptions()
And the field "ajaxfeedback" matches value "Some feedback" # behat_hooks::i_look_for_exceptions()
@editor @editor_atto @atto @atto_align
Feature: Atto align text
To format text in Atto, I need to use the align buttons.
@javascript
Scenario: Right align some text # C:\Apache24\htdocs\integration\lib\editor\atto\plugins\align\tests\behat\align.feature:6
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I follow "Profile" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I set the field "Description" to "Fascism
" # behat_hooks::i_look_for_exceptions()
And I click on "Show more buttons" "button" # behat_hooks::i_look_for_exceptions()
And I select the text in the "Description" Atto editor # behat_hooks::i_look_for_exceptions()
When I click on "Right align" "button" # behat_hooks::i_look_for_exceptions()
And I press "Update profile" # behat_hooks::i_look_for_exceptions()
And I follow "Preferences" in the user menu # behat_hooks::i_look_for_exceptions()
And I follow "Editor preferences" # behat_hooks::i_look_for_exceptions()
And I set the field "Text editor" to "Plain text area" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
Then I should see "style=\"text-align:right;\"" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Left align some text # C:\Apache24\htdocs\integration\lib\editor\atto\plugins\align\tests\behat\align.feature:23
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I follow "Profile" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I set the field "Description" to "Communism
" # behat_hooks::i_look_for_exceptions()
And I click on "Show more buttons" "button" # behat_hooks::i_look_for_exceptions()
And I select the text in the "Description" Atto editor # behat_hooks::i_look_for_exceptions()
When I click on "Right align" "button" # behat_hooks::i_look_for_exceptions()
And I click on "Left align" "button" # behat_hooks::i_look_for_exceptions()
And I press "Update profile" # behat_hooks::i_look_for_exceptions()
And I follow "Preferences" in the user menu # behat_hooks::i_look_for_exceptions()
And I follow "Editor preferences" # behat_hooks::i_look_for_exceptions()
And I set the field "Text editor" to "Plain text area" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
Then I should see "style=\"text-align:left;\"" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Center align some text # C:\Apache24\htdocs\integration\lib\editor\atto\plugins\align\tests\behat\align.feature:41
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I follow "Profile" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I set the field "Description" to "United Future
" # behat_hooks::i_look_for_exceptions()
And I click on "Show more buttons" "button" # behat_hooks::i_look_for_exceptions()
And I select the text in the "Description" Atto editor # behat_hooks::i_look_for_exceptions()
When I click on "Center" "button" # behat_hooks::i_look_for_exceptions()
And I press "Update profile" # behat_hooks::i_look_for_exceptions()
And I follow "Preferences" in the user menu # behat_hooks::i_look_for_exceptions()
And I follow "Editor preferences" # behat_hooks::i_look_for_exceptions()
And I set the field "Text editor" to "Plain text area" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
Then I should see "style=\"text-align:center;\"" # behat_hooks::i_look_for_exceptions()
@mod @mod_assign
Feature: In an assignment, students start a new attempt based on their previous one
In order to improve my submission
As a student
I need to submit my assignment editing an online form, receive feedback, and then improve my submission.
@javascript
Scenario: Submit a text online and edit the submission # C:\Apache24\htdocs\integration\mod\assign\tests\behat\allow_another_attempt.feature:8
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment name |
| Description | Submit your online text |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_file_enabled | 0 |
| Attempts reopened | Manually |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
When I press "Add submission" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Online text | I'm the student first submission |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I click on "Grade" "link" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Allow another attempt | 1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Ok" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I press "Add a new attempt based on previous submission" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I click on "Grade" "link" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "I'm the student first submission" # behat_hooks::i_look_for_exceptions()
@javascript @_alert
Scenario: Allow new attempt does not display incorrect error message on group submission # C:\Apache24\htdocs\integration\mod\assign\tests\behat\allow_another_attempt.feature:63
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
| student3 | Student | 3 | student3@example.com |
| student4 | Student | 4 | student4@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
| student4 | C1 | student |
And the following "groups" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| Group 1 | C1 | G1 |
| Group 2 | C1 | G2 |
And the following "group members" exist: # behat_hooks::i_look_for_exceptions()
| user | group |
| student1 | G1 |
| student2 | G1 |
| student3 | G2 |
| student4 | G2 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment name |
| Description | Test assignment description |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_file_enabled | 0 |
| Students submit in groups | Yes |
| Attempts reopened | Manually |
| Maximum attempts | 3 |
| Group mode | Separate groups |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I press "Add submission" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Online text | I'm the student's first submission |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
When I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
Then "Student 1" row "Status" column of "generaltable" table should contain "Submitted for grading" # behat_hooks::i_look_for_exceptions()
And "Student 2" row "Status" column of "generaltable" table should contain "Submitted for grading" # behat_hooks::i_look_for_exceptions()
And "Student 3" row "Status" column of "generaltable" table should contain "No submission" # behat_hooks::i_look_for_exceptions()
And "Student 4" row "Status" column of "generaltable" table should contain "No submission" # behat_hooks::i_look_for_exceptions()
And I click on "Quick grading" "checkbox" # behat_hooks::i_look_for_exceptions()
And I click on "Student 1" "checkbox" # behat_hooks::i_look_for_exceptions()
And I set the field "User grade" to "60.0" # behat_hooks::i_look_for_exceptions()
And I press "Save all quick grading changes" # behat_hooks::i_look_for_exceptions()
And I should see "The grade changes were saved" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I click on "Student 1" "checkbox" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| operation | Allow another attempt |
And I click on "Go" "button" confirming the dialogue # behat_hooks::i_look_for_exceptions()
And I should not see "The grades were not saved because someone has modified one or more records more recently than when you loaded the page." # behat_hooks::i_look_for_exceptions()
@mod @mod_choice
Feature: Allow choice preview
In order to allow students to preview options before a choice activity is opened for submission
As a teacher
I need to enable the choice preview option
Background: # C:\Apache24\htdocs\integration\mod\choice\tests\behat\allow_preview.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
Scenario: Enable the choice preview option and view the activity as a student before the opening time # C:\Apache24\htdocs\integration\mod\choice\tests\behat\allow_preview.feature:23
Given I add a "Choice" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Choice name | Choice name |
| Description | Choice Description |
| option[0] | Option 1 |
| option[1] | Option 2 |
| timeopen[enabled] | 1 |
| timeclose[enabled] | 1 |
| timeopen[day] | 30 |
| timeopen[month] | December |
| timeopen[year] | 2037 |
| timeclose[day] | 31 |
| timeclose[month] | December |
| timeclose[year] | 2037 |
| Show preview | 1 |
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Choice name" # behat_hooks::i_look_for_exceptions()
Then I should see "This is just a preview of the available options for this activity" # behat_hooks::i_look_for_exceptions()
And the "choice_1" "radio" should be disabled # behat_hooks::i_look_for_exceptions()
And the "choice_2" "radio" should be disabled # behat_hooks::i_look_for_exceptions()
And "Save my choice" "button" should not exist # behat_hooks::i_look_for_exceptions()
@mod @mod_assign @assignfeedback @assignfeedback_editpdf @_file_upload
Feature: In an assignment, teacher can annotate PDF files during grading
In order to provide visual report on a graded PDF
As a teacher
I need to use the PDF editor
@javascript
Scenario: Submit a PDF file as a student and annotate the PDF as a teacher # C:\Apache24\htdocs\integration\mod\assign\feedback\editpdf\tests\behat\annotate_pdf.feature:8
Given ghostscript is installed # behat_assignfeedback_editpdf::ghostscript_is_installed()
And the following "courses" exist: # behat_data_generators::the_following_exist()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_data_generators::the_following_exist()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "course enrolments" exist: # behat_data_generators::the_following_exist()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin" # behat_auth::i_log_in_as()
And I navigate to "Annotate PDF" node in "Site administration > Plugins > Activity modules > Assignment > Feedback plugins" # behat_theme_boost_behat_navigation::i_navigate_to_node_in()
And I upload "pix/help.png" file to "" filemanager # behat_theme_boost_behat_repository_upload::i_upload_file_to_filemanager()
And I upload "pix/docs.png" file to "" filemanager # behat_theme_boost_behat_repository_upload::i_upload_file_to_filemanager()
When I press "Save changes" # behat_forms::press_button()
Then I should see "Changes saved" # behat_general::assert_page_contains_text()
And I follow "Test ghostscript path" # behat_general::click_link()
And I should see "The ghostscript path appears to be OK" # behat_general::assert_page_contains_text()
And I press "Continue" # behat_forms::press_button()
And I log out # behat_auth::i_log_out()
And I log in as "teacher1" # behat_auth::i_log_in_as()
And I follow "Course 1" # behat_general::click_link()
And I turn editing mode on # behat_theme_boost_behat_course::i_turn_editing_mode_on()
And I add a "Assignment" to section "1" and I fill the form with: # behat_theme_boost_behat_course::i_add_to_section_and_i_fill_the_form_with()
| Assignment name | Test assignment name |
| Description | Submit your PDF file |
| assignsubmission_file_enabled | 1 |
| Maximum number of uploaded files | 2 |
And I log out # behat_auth::i_log_out()
And I log in as "student1" # behat_auth::i_log_in_as()
And I follow "Course 1" # behat_general::click_link()
And I follow "Test assignment name" # behat_general::click_link()
And I press "Add submission" # behat_forms::press_button()
And I upload "mod/assign/feedback/editpdf/tests/fixtures/submission.pdf" file to "File submissions" filemanager # behat_theme_boost_behat_repository_upload::i_upload_file_to_filemanager()
And I upload "mod/assign/feedback/editpdf/tests/fixtures/testgs.pdf" file to "File submissions" filemanager # behat_theme_boost_behat_repository_upload::i_upload_file_to_filemanager()
And I press "Save changes" # behat_forms::press_button()
And I should see "Submitted for grading" # behat_general::assert_page_contains_text()
And I should see "submission.pdf" # behat_general::assert_page_contains_text()
And I should see "Not graded" # behat_general::assert_page_contains_text()
And I log out # behat_auth::i_log_out()
And I log in as "teacher1" # behat_auth::i_log_in_as()
And I follow "Course 1" # behat_general::click_link()
And I follow "Test assignment name" # behat_general::click_link()
And I click on "View all submissions" "link" in the "Administration" "block" # behat_general::i_click_on_in_the()
And I click on "Edit" "link" in the "Submitted for grading" "table_row" # behat_general::i_click_on_in_the()
And I click on "Grade" "link" in the "Submitted for grading" "table_row" # behat_general::i_click_on_in_the()
And I should see "Page 1 of 3" # behat_general::assert_page_contains_text()
And I click on ".navigate-next-button" "css_element" # behat_general::i_click_on()
And I should see "Page 2 of 3" # behat_general::assert_page_contains_text()
And I click on ".stampbutton" "css_element" # behat_general::i_click_on()
And I click on ".linebutton" "css_element" # behat_general::i_click_on()
And I click on ".commentcolourbutton" "css_element" # behat_general::i_click_on()
And I click on "//img[@alt=\"Blue\"]/parent::button" "xpath_element" # behat_general::i_click_on()
And I wait until the page is ready # behat_general::wait_until_the_page_is_ready()
And I press "Save changes" # behat_forms::press_button()
And I wait until the page is ready # behat_general::wait_until_the_page_is_ready()
And I should see "The changes to the grade and feedback were saved" # behat_general::assert_page_contains_text()
@javascript
Scenario: Submit a PDF file as a student in a team and annotate the PDF as a teacher # C:\Apache24\htdocs\integration\mod\assign\feedback\editpdf\tests\behat\annotate_pdf.feature:70
Given ghostscript is installed # behat_assignfeedback_editpdf::ghostscript_is_installed()
And the following "courses" exist: # behat_data_generators::the_following_exist()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_data_generators::the_following_exist()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
| student3 | Student | 3 | student3@example.com |
| student4 | Student | 4 | student4@example.com |
And the following "course enrolments" exist: # behat_data_generators::the_following_exist()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
| student4 | C1 | student |
And the following "groups" exist: # behat_data_generators::the_following_exist()
| name | course | idnumber |
| G1 | C1 | G1 |
| G2 | C1 | G2 |
And the following "groupings" exist: # behat_data_generators::the_following_exist()
| name | course | idnumber |
| G1 | C1 | G1 |
And the following "group members" exist: # behat_data_generators::the_following_exist()
| user | group |
| student1 | G1 |
| student2 | G1 |
| student3 | G2 |
| student4 | G2 |
And the following "grouping groups" exist: # behat_data_generators::the_following_exist()
| grouping | group |
| G1 | G1 |
| G1 | G2 |
And I log in as "teacher1" # behat_auth::i_log_in_as()
And I follow "Course 1" # behat_general::click_link()
And I turn editing mode on # behat_theme_boost_behat_course::i_turn_editing_mode_on()
And I add a "Assignment" to section "1" and I fill the form with: # behat_theme_boost_behat_course::i_add_to_section_and_i_fill_the_form_with()
| Assignment name | Test assignment name |
| Description | Submit your PDF file |
| assignsubmission_file_enabled | 1 |
| Maximum number of uploaded files | 2 |
| Students submit in groups | Yes |
| Grouping for student groups | G1 |
And I log out # behat_auth::i_log_out()
When I log in as "student1" # behat_auth::i_log_in_as()
And I follow "Course 1" # behat_general::click_link()
And I follow "Test assignment name" # behat_general::click_link()
And I press "Add submission" # behat_forms::press_button()
And I upload "mod/assign/feedback/editpdf/tests/fixtures/submission.pdf" file to "File submissions" filemanager # behat_theme_boost_behat_repository_upload::i_upload_file_to_filemanager()
And I press "Save changes" # behat_forms::press_button()
Then I should see "Submitted for grading" # behat_general::assert_page_contains_text()
And I should see "submission.pdf" # behat_general::assert_page_contains_text()
And I should see "Not graded" # behat_general::assert_page_contains_text()
And I log out # behat_auth::i_log_out()
And I log in as "teacher1" # behat_auth::i_log_in_as()
And I follow "Course 1" # behat_general::click_link()
And I follow "Test assignment name" # behat_general::click_link()
And I click on "View all submissions" "link" in the "Administration" "block" # behat_general::i_click_on_in_the()
And I click on "Edit" "link" in the "Student 2" "table_row" # behat_general::i_click_on_in_the()
And I click on "Grade" "link" in the "Student 2" "table_row" # behat_general::i_click_on_in_the()
And I wait until the page is ready # behat_general::wait_until_the_page_is_ready()
And I click on ".linebutton" "css_element" # behat_general::i_click_on()
And I draw on the pdf # behat_assignfeedback_editpdf::i_draw_on_the_pdf()
And I press "Save changes" # behat_forms::press_button()
And I should see "The changes to the grade and feedback were saved" # behat_general::assert_page_contains_text()
And I press "Ok" # behat_forms::press_button()
And I click on "Edit settings" "link" # behat_general::i_click_on()
And I follow "Test assignment name" # behat_general::click_link()
And I click on "View all submissions" "link" in the "Administration" "block" # behat_general::i_click_on_in_the()
And I should see "View annotated PDF..." in the "student2@example.com" "table_row" # behat_general::assert_element_contains_text()
@mod @mod_feedback
Feature: Anonymous feedback
In order to collect feedbacks
As an admin
I need to be able to allow anonymous feedbacks
Background: # C:\Apache24\htdocs\integration\mod\feedback\tests\behat\anonymous.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname |
| user1 | Username | 1 |
| user2 | Username | 2 |
| teacher | Teacher | 3 |
| manager | Manager | 4 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname |
| Course 1 | C1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| user1 | C1 | student |
| user2 | C1 | student |
| teacher | C1 | editingteacher |
And the following "system role assigns" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| manager | Acceptance test site | manager |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | course | idnumber | anonymous | publish_stats |
| feedback | Site feedback | Acceptance test site | feedback0 | 1 | 1 |
| feedback | Course feedback | C1 | feedback1 | 1 | 1 |
When I log in as "manager" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I navigate to "Site feedback" node in "Site pages" # behat_hooks::i_look_for_exceptions()
And I click on "Edit questions" "link" in the "[role=main]" "css_element" # behat_hooks::i_look_for_exceptions()
And I add a "Multiple choice" question to the feedback with: # behat_hooks::i_look_for_exceptions()
| Question | Do you like our site? |
| Label | multichoice2 |
| Multiple choice type | Multiple choice - single answer |
| Hide the "Not selected" option | Yes |
| Multiple choice values | Yes\nNo\nI don't know |
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Guests can see anonymous feedback on front page but can not complete # C:\Apache24\htdocs\integration\mod\feedback\tests\behat\anonymous.feature:41
When I follow "Site feedback" # behat_hooks::i_look_for_exceptions()
Then I should not see "Answer the questions..." # behat_hooks::i_look_for_exceptions()
And I follow "Preview" # behat_hooks::i_look_for_exceptions()
And I should see "Do you like our site?" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
Scenario: Complete anonymous feedback on the front page as an authenticated user # C:\Apache24\htdocs\integration\mod\feedback\tests\behat\anonymous.feature:48
And I log in as "user1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
When I navigate to "Site feedback" node in "Site pages" # behat_hooks::i_look_for_exceptions()
And I follow "Preview" # behat_hooks::i_look_for_exceptions()
And I should see "Do you like our site?" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I follow "Answer the questions..." # behat_hooks::i_look_for_exceptions()
And I should see "Do you like our site?" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Yes | 1 |
And I press "Submit your answers" # behat_hooks::i_look_for_exceptions()
And I should not see "Submitted answers" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Complete anonymous feedback and view analysis on the front page as an authenticated user # C:\Apache24\htdocs\integration\mod\feedback\tests\behat\anonymous.feature:64
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I set the following system permissions of "Authenticated user on frontpage" role: # behat_hooks::i_look_for_exceptions()
| capability | permission |
| mod/feedback:viewanalysepage | Allow |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "user1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
When I navigate to "Site feedback" node in "Site pages" # behat_hooks::i_look_for_exceptions()
And I follow "Preview" # behat_hooks::i_look_for_exceptions()
And I should see "Do you like our site?" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I follow "Answer the questions..." # behat_hooks::i_look_for_exceptions()
And I should see "Do you like our site?" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Yes | 1 |
And I press "Submit your answers" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "user2" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I navigate to "Site feedback" node in "Site pages" # behat_hooks::i_look_for_exceptions()
And I follow "Preview" # behat_hooks::i_look_for_exceptions()
And I should see "Do you like our site?" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I follow "Answer the questions..." # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| No | 1 |
And I press "Submit your answers" # behat_hooks::i_look_for_exceptions()
And I follow "Submitted answers" # behat_hooks::i_look_for_exceptions()
And I should see "Submitted answers: 2" # behat_hooks::i_look_for_exceptions()
And I should see "Questions: 1" # behat_hooks::i_look_for_exceptions()
And I show chart data for the "multichoice2" feedback # behat_hooks::i_look_for_exceptions()
And I should see "Do you like our site?" # behat_hooks::i_look_for_exceptions()
And I should see "1 (50.00 %)" in the "Yes" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "1 (50.00 %)" in the "No" "table_row" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "manager" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I navigate to "Site feedback" node in "Site pages" # behat_hooks::i_look_for_exceptions()
And I click on "Show responses" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Username" # behat_hooks::i_look_for_exceptions()
And I should see "Anonymous entries (2)" # behat_hooks::i_look_for_exceptions()
And I follow "Response number: 1" # behat_hooks::i_look_for_exceptions()
And I should not see "Username" # behat_hooks::i_look_for_exceptions()
And I should see "Response number: 1 (Anonymous)" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Complete fully anonymous feedback on the front page as a guest # C:\Apache24\htdocs\integration\mod\feedback\tests\behat\anonymous.feature:112
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I set the following administration settings values: # behat_hooks::i_look_for_exceptions()
| feedback_allowfullanonymous | 1 |
And I log out # behat_hooks::i_look_for_exceptions()
When I follow "Site feedback" # behat_hooks::i_look_for_exceptions()
And I follow "Preview" # behat_hooks::i_look_for_exceptions()
And I should see "Do you like our site?" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I follow "Answer the questions..." # behat_hooks::i_look_for_exceptions()
And I should see "Do you like our site?" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Yes | 1 |
And I press "Submit your answers" # behat_hooks::i_look_for_exceptions()
And I should not see "Submitted answers" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Complete fully anonymous feedback and view analyze on the front page as a guest # C:\Apache24\htdocs\integration\mod\feedback\tests\behat\anonymous.feature:130
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I set the following administration settings values: # behat_hooks::i_look_for_exceptions()
| feedback_allowfullanonymous | 1 |
And I set the following system permissions of "Guest" role: # behat_hooks::i_look_for_exceptions()
| capability | permission |
| mod/feedback:viewanalysepage | Allow |
And I log out # behat_hooks::i_look_for_exceptions()
When I follow "Site feedback" # behat_hooks::i_look_for_exceptions()
And I follow "Preview" # behat_hooks::i_look_for_exceptions()
And I should see "Do you like our site?" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I follow "Answer the questions..." # behat_hooks::i_look_for_exceptions()
And I should see "Do you like our site?" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Yes | 1 |
And I press "Submit your answers" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
When I follow "Site feedback" # behat_hooks::i_look_for_exceptions()
And I follow "Preview" # behat_hooks::i_look_for_exceptions()
And I should see "Do you like our site?" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I follow "Answer the questions..." # behat_hooks::i_look_for_exceptions()
And I should see "Do you like our site?" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| No | 1 |
And I press "Submit your answers" # behat_hooks::i_look_for_exceptions()
And I follow "Submitted answers" # behat_hooks::i_look_for_exceptions()
And I should see "Submitted answers: 2" # behat_hooks::i_look_for_exceptions()
And I should see "Questions: 1" # behat_hooks::i_look_for_exceptions()
And I show chart data for the "multichoice2" feedback # behat_hooks::i_look_for_exceptions()
And I should see "Do you like our site?" # behat_hooks::i_look_for_exceptions()
And I should see "1 (50.00 %)" in the "Yes" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "1 (50.00 %)" in the "No" "table_row" # behat_hooks::i_look_for_exceptions()
And I log in as "manager" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I navigate to "Site feedback" node in "Site pages" # behat_hooks::i_look_for_exceptions()
And I click on "Show responses" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Anonymous entries (2)" # behat_hooks::i_look_for_exceptions()
And I follow "Response number: 1" # behat_hooks::i_look_for_exceptions()
And I should see "Response number: 1 (Anonymous)" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Anonymous feedback in a course # C:\Apache24\htdocs\integration\mod\feedback\tests\behat\anonymous.feature:176
When I log in as "teacher" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Course feedback" # behat_hooks::i_look_for_exceptions()
And I click on "Edit questions" "link" in the "[role=main]" "css_element" # behat_hooks::i_look_for_exceptions()
And I add a "Multiple choice" question to the feedback with: # behat_hooks::i_look_for_exceptions()
| Question | Do you like this course? |
| Label | multichoice1 |
| Multiple choice type | Multiple choice - single answer |
| Hide the "Not selected" option | Yes |
| Multiple choice values | Yes\nNo\nI don't know |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "user1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Course feedback" # behat_hooks::i_look_for_exceptions()
And I follow "Preview" # behat_hooks::i_look_for_exceptions()
Then I should see "Do you like this course?" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I follow "Answer the questions..." # behat_hooks::i_look_for_exceptions()
And I should see "Do you like this course?" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Yes | 1 |
And I press "Submit your answers" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "user2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Course feedback" # behat_hooks::i_look_for_exceptions()
And I follow "Preview" # behat_hooks::i_look_for_exceptions()
And I should see "Do you like this course?" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I follow "Answer the questions..." # behat_hooks::i_look_for_exceptions()
And I should see "Do you like this course?" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| No | 1 |
And I press "Submit your answers" # behat_hooks::i_look_for_exceptions()
And I follow "Submitted answers" # behat_hooks::i_look_for_exceptions()
And I should see "Submitted answers: 2" # behat_hooks::i_look_for_exceptions()
And I should see "Questions: 1" # behat_hooks::i_look_for_exceptions()
And I show chart data for the "multichoice1" feedback # behat_hooks::i_look_for_exceptions()
And I should see "Do you like this course?" # behat_hooks::i_look_for_exceptions()
And I should see "1 (50.00 %)" in the "Yes" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "1 (50.00 %)" in the "No" "table_row" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Course feedback" # behat_hooks::i_look_for_exceptions()
And I follow "Preview" # behat_hooks::i_look_for_exceptions()
And I should see "Do you like this course?" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should not see "Answer the questions..." # behat_hooks::i_look_for_exceptions()
And I click on "Show responses" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Username" # behat_hooks::i_look_for_exceptions()
And I should see "Anonymous entries (2)" # behat_hooks::i_look_for_exceptions()
And I follow "Response number: 1" # behat_hooks::i_look_for_exceptions()
And I should not see "Username" # behat_hooks::i_look_for_exceptions()
And I should see "Response number: 1 (Anonymous)" # behat_hooks::i_look_for_exceptions()
And I should not see "Prev" # behat_hooks::i_look_for_exceptions()
And I follow "Next" # behat_hooks::i_look_for_exceptions()
And I should see "Response number: 2 (Anonymous)" # behat_hooks::i_look_for_exceptions()
And I should see "Prev" # behat_hooks::i_look_for_exceptions()
And I should not see "Next" # behat_hooks::i_look_for_exceptions()
And I click on "Back" "link" in the "[role=main]" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Delete entry" "link" in the "Response number: 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I press "Yes" # behat_hooks::i_look_for_exceptions()
And I should see "Anonymous entries (1)" # behat_hooks::i_look_for_exceptions()
And I should not see "Response number: 1" # behat_hooks::i_look_for_exceptions()
And I should see "Response number: 2" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@mod @mod_assign
Feature: Assign reset
In order to reuse past Assignss
As a teacher
I need to remove all previous data.
Background: # C:\Apache24\htdocs\integration\mod\assign\tests\behat\assign_course_reset.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Tina | Teacher1 | teacher1@example.com |
| student1 | Sam1 | Student1 | student1@example.com |
| student2 | Sam2 | Student2 | student2@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And the following "groups" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| Group 1 | C1 | G1 |
| Group 2 | C1 | G2 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment name |
| Description | Submit your online text |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_onlinetext_wordlimit_enabled | 1 |
| assignsubmission_onlinetext_wordlimit | 10 |
| assignsubmission_file_enabled | 0 |
Scenario: Use course reset to clear all attempt data # C:\Apache24\htdocs\integration\mod\assign\tests\behat\assign_course_reset.feature:36
When I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
When I press "Add submission" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Online text | I'm the student first submission |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Submitted for grading" # behat_hooks::i_look_for_exceptions()
And I should see "I'm the student first submission" # behat_hooks::i_look_for_exceptions()
And I should see "Not graded" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I navigate to "View all submissions" node in "Assignment administration" # behat_hooks::i_look_for_exceptions()
And I should see "Submitted for grading" # behat_hooks::i_look_for_exceptions()
And I navigate to "Reset" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Delete all submissions | 1 |
And I press "Reset course" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I navigate to "View all submissions" node in "Assignment administration" # behat_hooks::i_look_for_exceptions()
Then I should not see "Submitted for grading" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Use course reset to remove user overrides. # C:\Apache24\htdocs\integration\mod\assign\tests\behat\assign_course_reset.feature:65
When I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I navigate to "User overrides" node in "Assignment administration" # behat_hooks::i_look_for_exceptions()
And I press "Add user override" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Override user | Student1 |
| id_duedate_enabled | 1 |
| duedate[day] | 1 |
| duedate[month] | January |
| duedate[year] | 2020 |
| duedate[hour] | 08 |
| duedate[minute] | 00 |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "Sam1 Student1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Reset" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Delete all user overrides | 1 |
And I press "Reset course" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I navigate to "User overrides" node in "Assignment administration" # behat_hooks::i_look_for_exceptions()
Then I should not see "Sam1 Student1" # behat_hooks::i_look_for_exceptions()
Scenario: Use course reset to remove group overrides. # C:\Apache24\htdocs\integration\mod\assign\tests\behat\assign_course_reset.feature:89
When I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I navigate to "Group overrides" node in "Assignment administration" # behat_hooks::i_look_for_exceptions()
And I press "Add group override" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Override group | Group 1 |
| id_duedate_enabled | 1 |
| duedate[day] | 1 |
| duedate[month] | January |
| duedate[year] | 2020 |
| duedate[hour] | 08 |
| duedate[minute] | 00 |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "Group 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Reset" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Delete all group overrides | 1 |
And I press "Reset course" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I navigate to "Group overrides" node in "Assignment administration" # behat_hooks::i_look_for_exceptions()
Then I should not see "Group 1" # behat_hooks::i_look_for_exceptions()
@mod @mod_assign
Feature: Assign group override
In order to grant a group special access to an assignment
As a teacher
I need to create an override for that group.
Background: # C:\Apache24\htdocs\integration\mod\assign\tests\behat\assign_group_override.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Tina | Teacher1 | teacher1@example.com |
| student1 | Sam1 | Student1 | student1@example.com |
| student2 | Sam2 | Student2 | student2@example.com |
| student3 | Sam3 | Student3 | student3@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
And the following "groups" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| Group 1 | C1 | G1 |
| Group 2 | C1 | G2 |
Given the following "group members" exist: # behat_hooks::i_look_for_exceptions()
| user | group |
| student1 | G1 |
| student2 | G2 |
| student3 | G1 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment name |
| Description | Submit your online text |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_onlinetext_wordlimit_enabled | 1 |
| assignsubmission_onlinetext_wordlimit | 10 |
| assignsubmission_file_enabled | 0 |
Scenario: Add, modify then delete a group override # C:\Apache24\htdocs\integration\mod\assign\tests\behat\assign_group_override.feature:43
When I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I navigate to "Group overrides" node in "Assignment administration" # behat_hooks::i_look_for_exceptions()
And I press "Add group override" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Override group | Group 1 |
| id_duedate_enabled | 1 |
| duedate[day] | 1 |
| duedate[month] | January |
| duedate[year] | 2020 |
| duedate[hour] | 08 |
| duedate[minute] | 00 |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "Wednesday, 1 January 2020, 8:00" # behat_hooks::i_look_for_exceptions()
Then I click on "Edit" "link" in the "Group 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| duedate[year] | 2030 |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "Tuesday, 1 January 2030, 8:00" # behat_hooks::i_look_for_exceptions()
And I click on "Delete" "link" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should not see "Group 1" # behat_hooks::i_look_for_exceptions()
Scenario: Duplicate a user override # C:\Apache24\htdocs\integration\mod\assign\tests\behat\assign_group_override.feature:66
When I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I navigate to "Group overrides" node in "Assignment administration" # behat_hooks::i_look_for_exceptions()
And I press "Add group override" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Override group | Group 1 |
| id_duedate_enabled | 1 |
| duedate[day] | 1 |
| duedate[month] | January |
| duedate[year] | 2020 |
| duedate[hour] | 08 |
| duedate[minute] | 00 |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "Wednesday, 1 January 2020, 8:00" # behat_hooks::i_look_for_exceptions()
Then I click on "copy" "link" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Override group | Group 2 |
| duedate[year] | 2030 |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "Tuesday, 1 January 2030, 8:00" # behat_hooks::i_look_for_exceptions()
And I should see "Group 2" # behat_hooks::i_look_for_exceptions()
Scenario: Allow a group to have a different due date # C:\Apache24\htdocs\integration\mod\assign\tests\behat\assign_group_override.feature:88
When I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Assignment administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_duedate_enabled | 1 |
| id_allowsubmissionsfromdate_enabled | 0 |
| id_cutoffdate_enabled | 0 |
| duedate[day] | 1 |
| duedate[month] | January |
| duedate[year] | 2000 |
| duedate[hour] | 08 |
| duedate[minute] | 00 |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I navigate to "Group overrides" node in "Assignment administration" # behat_hooks::i_look_for_exceptions()
And I press "Add group override" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Override group | Group 1 |
| id_duedate_enabled | 1 |
| duedate[day] | 1 |
| duedate[month] | January |
| duedate[year] | 2020 |
| duedate[hour] | 08 |
| duedate[minute] | 00 |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "Wednesday, 1 January 2020, 8:00" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
Then I should see "Saturday, 1 January 2000, 8:00" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I should see "Wednesday, 1 January 2020, 8:00" # behat_hooks::i_look_for_exceptions()
Scenario: Allow a group to have a different cut off date # C:\Apache24\htdocs\integration\mod\assign\tests\behat\assign_group_override.feature:124
When I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Assignment administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_duedate_enabled | 0 |
| id_allowsubmissionsfromdate_enabled | 0 |
| id_cutoffdate_enabled | 1 |
| cutoffdate[day] | 1 |
| cutoffdate[month] | January |
| cutoffdate[year] | 2000 |
| cutoffdate[hour] | 08 |
| cutoffdate[minute] | 00 |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I navigate to "Group overrides" node in "Assignment administration" # behat_hooks::i_look_for_exceptions()
And I press "Add group override" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Override group | Group 1 |
| id_cutoffdate_enabled | 1 |
| cutoffdate[day] | 1 |
| cutoffdate[month] | January |
| cutoffdate[year] | 2020 |
| cutoffdate[hour] | 08 |
| cutoffdate[minute] | 00 |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "Wednesday, 1 January 2020, 8:00" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
Then I should not see "Make changes to your submission" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I should see "Make changes to your submission" # behat_hooks::i_look_for_exceptions()
Scenario: Allow a group to have a different start date # C:\Apache24\htdocs\integration\mod\assign\tests\behat\assign_group_override.feature:160
When I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Assignment administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_duedate_enabled | 0 |
| id_allowsubmissionsfromdate_enabled | 1 |
| id_cutoffdate_enabled | 0 |
| allowsubmissionsfromdate[day] | 1 |
| allowsubmissionsfromdate[month] | January |
| allowsubmissionsfromdate[year] | 2020 |
| allowsubmissionsfromdate[hour] | 08 |
| allowsubmissionsfromdate[minute] | 00 |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I navigate to "Group overrides" node in "Assignment administration" # behat_hooks::i_look_for_exceptions()
And I press "Add group override" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Override group | Group 1 |
| id_allowsubmissionsfromdate_enabled | 1 |
| allowsubmissionsfromdate[day] | 1 |
| allowsubmissionsfromdate[month] | January |
| allowsubmissionsfromdate[year] | 2015 |
| allowsubmissionsfromdate[hour] | 08 |
| allowsubmissionsfromdate[minute] | 00 |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "Thursday, 1 January 2015, 8:00" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
Then I should see "This assignment will accept submissions from Wednesday, 1 January 2020, 8:00" # behat_hooks::i_look_for_exceptions()
And I should not see "Add submission" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I should not see "This assignment will accept submissions from Wednesday, 1 January 2020, 8:00" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Add both a user and group override and verify that both are applied correctly # C:\Apache24\htdocs\integration\mod\assign\tests\behat\assign_group_override.feature:198
When I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Assignment administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_duedate_enabled | 0 |
| id_allowsubmissionsfromdate_enabled | 1 |
| id_cutoffdate_enabled | 0 |
| allowsubmissionsfromdate[day] | 1 |
| allowsubmissionsfromdate[month] | January |
| allowsubmissionsfromdate[year] | 2030 |
| allowsubmissionsfromdate[hour] | 08 |
| allowsubmissionsfromdate[minute] | 00 |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I navigate to "Group overrides" node in "Assignment administration" # behat_hooks::i_look_for_exceptions()
And I press "Add group override" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Override group | Group 1 |
| id_allowsubmissionsfromdate_enabled | 1 |
| allowsubmissionsfromdate[day] | 1 |
| allowsubmissionsfromdate[month] | January |
| allowsubmissionsfromdate[year] | 2020 |
| allowsubmissionsfromdate[hour] | 08 |
| allowsubmissionsfromdate[minute] | 00 |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "Wednesday, 1 January 2020, 8:00" # behat_hooks::i_look_for_exceptions()
And I navigate to "User overrides" node in "Assignment administration" # behat_hooks::i_look_for_exceptions()
And I press "Add user override" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Override user | Student1 |
| id_allowsubmissionsfromdate_enabled | 1 |
| allowsubmissionsfromdate[day] | 1 |
| allowsubmissionsfromdate[month] | January |
| allowsubmissionsfromdate[year] | 2021 |
| allowsubmissionsfromdate[hour] | 08 |
| allowsubmissionsfromdate[minute] | 00 |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "Friday, 1 January 2021, 8:00" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Then I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I should see "This assignment will accept submissions from Friday, 1 January 2021, 8:00" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I should see "This assignment will accept submissions from Tuesday, 1 January 2030, 8:00" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student3" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I should see "This assignment will accept submissions from Wednesday, 1 January 2020, 8:00" # behat_hooks::i_look_for_exceptions()
@mod @mod_assign @javascript
Feature: Assign user override
In order to grant a student special access to an assignment
As a teacher
I need to create an override for that user.
Background: # C:\Apache24\htdocs\integration\mod\assign\tests\behat\assign_user_override.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Tina | Teacher1 | teacher1@example.com |
| student1 | Sam1 | Student1 | student1@example.com |
| student2 | Sam2 | Student2 | student2@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment name |
| Description | Submit your online text |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_onlinetext_wordlimit_enabled | 1 |
| assignsubmission_onlinetext_wordlimit | 10 |
| assignsubmission_file_enabled | 0 |
Scenario: Add, modify then delete a user override # C:\Apache24\htdocs\integration\mod\assign\tests\behat\assign_user_override.feature:32
When I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I navigate to "User overrides" node in "Assignment administration" # behat_hooks::i_look_for_exceptions()
And I press "Add user override" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Override user | Student1 |
| id_duedate_enabled | 1 |
| duedate[day] | 1 |
| duedate[month] | January |
| duedate[year] | 2020 |
| duedate[hour] | 08 |
| duedate[minute] | 00 |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "Wednesday, 1 January 2020, 8:00" # behat_hooks::i_look_for_exceptions()
Then I click on "Edit" "link" in the "Sam1 Student1" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| duedate[year] | 2030 |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "Tuesday, 1 January 2030, 8:00" # behat_hooks::i_look_for_exceptions()
And I click on "Delete" "link" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should not see "Sam1 Student1" # behat_hooks::i_look_for_exceptions()
Scenario: Duplicate a user override # C:\Apache24\htdocs\integration\mod\assign\tests\behat\assign_user_override.feature:55
When I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I navigate to "User overrides" node in "Assignment administration" # behat_hooks::i_look_for_exceptions()
And I press "Add user override" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Override user | Student1 |
| id_duedate_enabled | 1 |
| duedate[day] | 1 |
| duedate[month] | January |
| duedate[year] | 2020 |
| duedate[hour] | 08 |
| duedate[minute] | 00 |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "Wednesday, 1 January 2020, 8:00" # behat_hooks::i_look_for_exceptions()
Then I click on "copy" "link" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Override user | Student2 |
| duedate[year] | 2030 |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "Tuesday, 1 January 2030, 8:00" # behat_hooks::i_look_for_exceptions()
And I should see "Sam2 Student2" # behat_hooks::i_look_for_exceptions()
Scenario: Allow a user to have a different due date # C:\Apache24\htdocs\integration\mod\assign\tests\behat\assign_user_override.feature:77
When I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Assignment administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_duedate_enabled | 1 |
| id_allowsubmissionsfromdate_enabled | 0 |
| id_cutoffdate_enabled | 0 |
| duedate[day] | 1 |
| duedate[month] | January |
| duedate[year] | 2000 |
| duedate[hour] | 08 |
| duedate[minute] | 00 |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I navigate to "User overrides" node in "Assignment administration" # behat_hooks::i_look_for_exceptions()
And I press "Add user override" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Override user | Student1 |
| id_duedate_enabled | 1 |
| duedate[day] | 1 |
| duedate[month] | January |
| duedate[year] | 2020 |
| duedate[hour] | 08 |
| duedate[minute] | 00 |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "Wednesday, 1 January 2020, 8:00" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
Then I should see "Saturday, 1 January 2000, 8:00" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I should see "Wednesday, 1 January 2020, 8:00" # behat_hooks::i_look_for_exceptions()
Scenario: Allow a user to have a different cut off date # C:\Apache24\htdocs\integration\mod\assign\tests\behat\assign_user_override.feature:113
When I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Assignment administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_duedate_enabled | 0 |
| id_allowsubmissionsfromdate_enabled | 0 |
| id_cutoffdate_enabled | 1 |
| cutoffdate[day] | 1 |
| cutoffdate[month] | January |
| cutoffdate[year] | 2000 |
| cutoffdate[hour] | 08 |
| cutoffdate[minute] | 00 |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I navigate to "User overrides" node in "Assignment administration" # behat_hooks::i_look_for_exceptions()
And I press "Add user override" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Override user | Student1 |
| id_cutoffdate_enabled | 1 |
| cutoffdate[day] | 1 |
| cutoffdate[month] | January |
| cutoffdate[year] | 2020 |
| cutoffdate[hour] | 08 |
| cutoffdate[minute] | 00 |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "Wednesday, 1 January 2020, 8:00" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
Then I should not see "Make changes to your submission" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I should see "Make changes to your submission" # behat_hooks::i_look_for_exceptions()
Scenario: Allow a user to have a different start date # C:\Apache24\htdocs\integration\mod\assign\tests\behat\assign_user_override.feature:149
When I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Assignment administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_duedate_enabled | 0 |
| id_allowsubmissionsfromdate_enabled | 1 |
| id_cutoffdate_enabled | 0 |
| allowsubmissionsfromdate[day] | 1 |
| allowsubmissionsfromdate[month] | January |
| allowsubmissionsfromdate[year] | 2020 |
| allowsubmissionsfromdate[hour] | 08 |
| allowsubmissionsfromdate[minute] | 00 |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I navigate to "User overrides" node in "Assignment administration" # behat_hooks::i_look_for_exceptions()
And I press "Add user override" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Override user | Student1 |
| id_allowsubmissionsfromdate_enabled | 1 |
| allowsubmissionsfromdate[day] | 1 |
| allowsubmissionsfromdate[month] | January |
| allowsubmissionsfromdate[year] | 2015 |
| allowsubmissionsfromdate[hour] | 08 |
| allowsubmissionsfromdate[minute] | 00 |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "Thursday, 1 January 2015, 8:00" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
Then I should see "This assignment will accept submissions from Wednesday, 1 January 2020, 8:00" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I should not see "This assignment will accept submissions from Wednesday, 1 January 2020, 8:00" # behat_hooks::i_look_for_exceptions()
@mod @mod_quiz
Feature: Attemp a quiz where some questions require that the previous question has been answered.
As a student
In order to demonstrate what I know
I need to be able to attempt quizzes
Background: # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\attempt_basic.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student | Student | One | student@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| student | C1 | student |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 |
@javascript
Scenario: Attempt a quiz with a single unnamed section # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\attempt_basic.feature:25
Given the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | TF1 | First question |
| Test questions | truefalse | TF2 | Second question |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page | maxmark |
| TF1 | 1 | |
| TF2 | 1 | 3.0 |
When I log in as "student" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I press "Attempt quiz now" # behat_hooks::i_look_for_exceptions()
And I click on "True" "radio" in the "First question" "question" # behat_hooks::i_look_for_exceptions()
And I click on "False" "radio" in the "Second question" "question" # behat_hooks::i_look_for_exceptions()
And I press "Finish attempt ..." # behat_hooks::i_look_for_exceptions()
And I press "Submit all and finish" # behat_hooks::i_look_for_exceptions()
And I click on "Submit all and finish" "button" in the "Confirmation" "dialogue" # behat_hooks::i_look_for_exceptions()
Then I should see "25.00 out of 100.00" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Attempt a quiz with mulitple sections # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\attempt_basic.feature:46
Given the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | TF1 | First question |
| Test questions | truefalse | TF2 | Second question |
| Test questions | truefalse | TF3 | Third question |
| Test questions | truefalse | TF4 | Fourth question |
| Test questions | truefalse | TF5 | Fifth question |
| Test questions | truefalse | TF6 | Sixth question |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page |
| TF1 | 1 |
| TF2 | 1 |
| TF3 | 2 |
| TF4 | 3 |
| TF5 | 4 |
| TF6 | 4 |
And quiz "Quiz 1" contains the following sections: # behat_hooks::i_look_for_exceptions()
| heading | firstslot | shuffle |
| Section 1 | 1 | 1 |
| Section 2 | 3 | 0 |
| | 4 | 1 |
| Section 3 | 5 | 0 |
When I log in as "student" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I press "Attempt quiz now" # behat_hooks::i_look_for_exceptions()
Then I should see "Section 1" in the "Quiz navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should see question "1" in section "Section 1" in the quiz navigation # behat_hooks::i_look_for_exceptions()
And I should see question "2" in section "Section 1" in the quiz navigation # behat_hooks::i_look_for_exceptions()
And I should see question "3" in section "Section 2" in the quiz navigation # behat_hooks::i_look_for_exceptions()
And I should see question "4" in section "Section 2" in the quiz navigation # behat_hooks::i_look_for_exceptions()
And I should see question "5" in section "Section 3" in the quiz navigation # behat_hooks::i_look_for_exceptions()
And I should see question "6" in section "Section 3" in the quiz navigation # behat_hooks::i_look_for_exceptions()
And I follow "Finish attempt ..." # behat_hooks::i_look_for_exceptions()
And I should see question "1" in section "Section 1" in the quiz navigation # behat_hooks::i_look_for_exceptions()
And I should see question "2" in section "Section 1" in the quiz navigation # behat_hooks::i_look_for_exceptions()
And I should see question "3" in section "Section 2" in the quiz navigation # behat_hooks::i_look_for_exceptions()
And I should see question "4" in section "Section 2" in the quiz navigation # behat_hooks::i_look_for_exceptions()
And I should see question "5" in section "Section 3" in the quiz navigation # behat_hooks::i_look_for_exceptions()
And I should see question "6" in section "Section 3" in the quiz navigation # behat_hooks::i_look_for_exceptions()
And I should see "Section 1" in the "quizsummaryofattempt" "table" # behat_hooks::i_look_for_exceptions()
And I should see "Section 2" in the "quizsummaryofattempt" "table" # behat_hooks::i_look_for_exceptions()
And I should see "Section 3" in the "quizsummaryofattempt" "table" # behat_hooks::i_look_for_exceptions()
And I press "Submit all and finish" # behat_hooks::i_look_for_exceptions()
And I click on "Submit all and finish" "button" in the "Confirmation" "dialogue" # behat_hooks::i_look_for_exceptions()
And I should see question "1" in section "Section 1" in the quiz navigation # behat_hooks::i_look_for_exceptions()
And I should see question "2" in section "Section 1" in the quiz navigation # behat_hooks::i_look_for_exceptions()
And I should see question "3" in section "Section 2" in the quiz navigation # behat_hooks::i_look_for_exceptions()
And I should see question "4" in section "Section 2" in the quiz navigation # behat_hooks::i_look_for_exceptions()
And I should see question "5" in section "Section 3" in the quiz navigation # behat_hooks::i_look_for_exceptions()
And I should see question "6" in section "Section 3" in the quiz navigation # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Next and previous navigation # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\attempt_basic.feature:104
Given the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | TF1 | Text of the first question |
| Test questions | truefalse | TF2 | Text of the second question |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page |
| TF1 | 1 |
| TF2 | 2 |
When I log in as "student" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I press "Attempt quiz now" # behat_hooks::i_look_for_exceptions()
Then I should see "Text of the first question" # behat_hooks::i_look_for_exceptions()
And I should not see "Text of the second question" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Text of the second question" # behat_hooks::i_look_for_exceptions()
And I should not see "Text of the first question" # behat_hooks::i_look_for_exceptions()
And I click on "Finish attempt ..." "button" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I should see "Summary of attempt" # behat_hooks::i_look_for_exceptions()
And I press "Return to attempt" # behat_hooks::i_look_for_exceptions()
And I should see "Text of the second question" # behat_hooks::i_look_for_exceptions()
And I should not see "Text of the first question" # behat_hooks::i_look_for_exceptions()
And I press "Previous page" # behat_hooks::i_look_for_exceptions()
And I should see "Text of the first question" # behat_hooks::i_look_for_exceptions()
And I should not see "Text of the second question" # behat_hooks::i_look_for_exceptions()
And I follow "Finish attempt ..." # behat_hooks::i_look_for_exceptions()
And I press "Submit all and finish" # behat_hooks::i_look_for_exceptions()
And I click on "Submit all and finish" "button" in the "Confirmation" "dialogue" # behat_hooks::i_look_for_exceptions()
And I should see "Text of the first question" # behat_hooks::i_look_for_exceptions()
And I should see "Text of the second question" # behat_hooks::i_look_for_exceptions()
And I follow "Show one page at a time" # behat_hooks::i_look_for_exceptions()
And I should see "Text of the first question" # behat_hooks::i_look_for_exceptions()
And I should not see "Text of the second question" # behat_hooks::i_look_for_exceptions()
And I follow "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Text of the second question" # behat_hooks::i_look_for_exceptions()
And I should not see "Text of the first question" # behat_hooks::i_look_for_exceptions()
And I follow "Previous page" # behat_hooks::i_look_for_exceptions()
And I should see "Text of the first question" # behat_hooks::i_look_for_exceptions()
And I should not see "Text of the second question" # behat_hooks::i_look_for_exceptions()
@mod @mod_quiz
Feature: The various checks that may happen when an attept is started
As a student
In order to start a quiz with confidence
I need to be waned if there is a time limit, or various similar things
Background: # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\attempt_begin.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student | Student | One | student@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| student | C1 | student |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | TF1 | Text of the first question |
@javascript
Scenario: Start a quiz with no time limit # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\attempt_begin.feature:25
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page |
| TF1 | 1 |
When I log in as "student" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I press "Attempt quiz now" # behat_hooks::i_look_for_exceptions()
Then I should see "Text of the first question" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Start a quiz with time limit and password # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\attempt_begin.feature:39
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | timelimit | quizpassword |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | 3600 | Frog |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page |
| TF1 | 1 |
When I log in as "student" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I press "Attempt quiz now" # behat_hooks::i_look_for_exceptions()
Then I should see "To attempt this quiz you need to know the quiz password" in the "Start attempt" "dialogue" # behat_hooks::i_look_for_exceptions()
And I should see "The quiz has a time limit of 1 hour. Time will " in the "Start attempt" "dialogue" # behat_hooks::i_look_for_exceptions()
And I set the field "Quiz password" to "Frog" # behat_hooks::i_look_for_exceptions()
And I click on "Start attempt" "button" in the "Start attempt" "dialogue" # behat_hooks::i_look_for_exceptions()
And I should see "Text of the first question" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Cancel starting a quiz with time limit and password # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\attempt_begin.feature:57
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | timelimit | quizpassword |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | 3600 | Frog |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page |
| TF1 | 1 |
When I log in as "student" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I press "Attempt quiz now" # behat_hooks::i_look_for_exceptions()
And I click on "Cancel" "button" in the "Start attempt" "dialogue" # behat_hooks::i_look_for_exceptions()
Then I should see "Quiz 1 description" # behat_hooks::i_look_for_exceptions()
And "Attempt quiz now" "button" should be visible # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Start a quiz with time limit and password, get the password wrong first time # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\attempt_begin.feature:73
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | timelimit | quizpassword |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | 3600 | Frog |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page |
| TF1 | 1 |
When I log in as "student" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I press "Attempt quiz now" # behat_hooks::i_look_for_exceptions()
And I set the field "Quiz password" to "Toad" # behat_hooks::i_look_for_exceptions()
And I click on "Start attempt" "button" in the "Start attempt" "dialogue" # behat_hooks::i_look_for_exceptions()
Then I should see "Quiz 1 description" # behat_hooks::i_look_for_exceptions()
And I should see "To attempt this quiz you need to know the quiz password" # behat_hooks::i_look_for_exceptions()
And I should see "The quiz has a time limit of 1 hour. Time will " # behat_hooks::i_look_for_exceptions()
And I should see "The password entered was incorrect" # behat_hooks::i_look_for_exceptions()
And I set the field "Quiz password" to "Frog" # behat_hooks::i_look_for_exceptions()
And I press tab key in "Quiz password" "field" # behat_hooks::i_look_for_exceptions()
And I press "Start attempt" # behat_hooks::i_look_for_exceptions()
And I should see "Text of the first question" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Start a quiz with time limit and password, get the password wrong first time then cancel # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\attempt_begin.feature:97
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | timelimit | quizpassword |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | 3600 | Frog |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page |
| TF1 | 1 |
When I log in as "student" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I press "Attempt quiz now" # behat_hooks::i_look_for_exceptions()
And I set the field "Quiz password" to "Toad" # behat_hooks::i_look_for_exceptions()
And I click on "Start attempt" "button" in the "Start attempt" "dialogue" # behat_hooks::i_look_for_exceptions()
And I should see "Quiz 1 description" # behat_hooks::i_look_for_exceptions()
And I should see "To attempt this quiz you need to know the quiz password" # behat_hooks::i_look_for_exceptions()
And I should see "The quiz has a time limit of 1 hour. Time will " # behat_hooks::i_look_for_exceptions()
And I should see "The password entered was incorrect" # behat_hooks::i_look_for_exceptions()
And I set the field "Quiz password" to "Frog" # behat_hooks::i_look_for_exceptions()
And I press tab key in "Quiz password" "field" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
Then I should see "Quiz 1 description" # behat_hooks::i_look_for_exceptions()
And "Attempt quiz now" "button" should be visible # behat_hooks::i_look_for_exceptions()
@mod @mod_quiz
Feature: Allow students to redo questions in a practice quiz, without starting a whole new attempt
In order to practice particular skills I am struggling with
As a student
I need to be able to redo each question in a quiz as often as necessary without starting a whole new attempt, if my teacher allows it.
Background: # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\attempt_redo_questions.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student | Student | One | student@example.com |
| teacher | Teacher | One | teacher@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| student | C1 | student |
| teacher | C1 | teacher |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | TF1 | First question |
| Test questions | truefalse | TF2 | Second question |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | preferredbehaviour | canredoquestions |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | immediatefeedback | 1 |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page | maxmark |
| TF1 | 1 | 2 |
| TF2 | 1 | 1 |
And I log in as "student" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: After completing a question, there is a redo question button that restarts the question # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\attempt_redo_questions.feature:37
When I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I press "Attempt quiz now" # behat_hooks::i_look_for_exceptions()
And I click on "False" "radio" in the "First question" "question" # behat_hooks::i_look_for_exceptions()
And I click on "Check" "button" in the "First question" "question" # behat_hooks::i_look_for_exceptions()
And I press "Try another question like this one" # behat_hooks::i_look_for_exceptions()
Then the state of "First question" question is shown as "Not complete" # behat_hooks::i_look_for_exceptions()
And I should see "Marked out of 2.00" in the "First question" "question" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: The redo question button is visible but disabled for teachers # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\attempt_redo_questions.feature:47
When I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I press "Attempt quiz now" # behat_hooks::i_look_for_exceptions()
And I click on "False" "radio" in the "First question" "question" # behat_hooks::i_look_for_exceptions()
And I click on "Check" "button" in the "First question" "question" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I follow "Attempts: 1" # behat_hooks::i_look_for_exceptions()
And I follow "Review attempt" # behat_hooks::i_look_for_exceptions()
Then the "Try another question like this one" "button" should be disabled # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: The redo question buttons are no longer visible after the attempt is submitted. # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\attempt_redo_questions.feature:61
When I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I press "Attempt quiz now" # behat_hooks::i_look_for_exceptions()
And I click on "False" "radio" in the "First question" "question" # behat_hooks::i_look_for_exceptions()
And I click on "Check" "button" in the "First question" "question" # behat_hooks::i_look_for_exceptions()
And I press "Finish attempt ..." # behat_hooks::i_look_for_exceptions()
And I press "Submit all and finish" # behat_hooks::i_look_for_exceptions()
And I click on "Submit all and finish" "button" in the "Confirmation" "dialogue" # behat_hooks::i_look_for_exceptions()
Then "Try another question like this one" "button" should not exist # behat_hooks::i_look_for_exceptions()
@javascript @_switch_window
Scenario: Teachers reviewing can see all the qestions attempted in a slot # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\attempt_redo_questions.feature:72
When I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I press "Attempt quiz now" # behat_hooks::i_look_for_exceptions()
And I click on "False" "radio" in the "First question" "question" # behat_hooks::i_look_for_exceptions()
And I click on "Check" "button" in the "First question" "question" # behat_hooks::i_look_for_exceptions()
And I press "Try another question like this one" # behat_hooks::i_look_for_exceptions()
And I press "Finish attempt ..." # behat_hooks::i_look_for_exceptions()
And I press "Submit all and finish" # behat_hooks::i_look_for_exceptions()
And I click on "Submit all and finish" "button" in the "Confirmation" "dialogue" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I follow "Attempts: 1" # behat_hooks::i_look_for_exceptions()
And I follow "Review attempt" # behat_hooks::i_look_for_exceptions()
And I click on "1" "link" in the "First question" "question" # behat_hooks::i_look_for_exceptions()
And I switch to "reviewquestion" window # behat_hooks::i_look_for_exceptions()
Then the state of "First question" question is shown as "Incorrect" # behat_hooks::i_look_for_exceptions()
And I click on "1" "link" in the "First question" "question" # behat_hooks::i_look_for_exceptions()
And the state of "First question" question is shown as "Not complete" # behat_hooks::i_look_for_exceptions()
And I switch to the main window # behat_hooks::i_look_for_exceptions()
And the state of "First question" question is shown as "Not answered" # behat_hooks::i_look_for_exceptions()
And I should not see "Submit" in the ".history" "css_element" # behat_hooks::i_look_for_exceptions()
And I navigate to "Statistics" node in "Quiz administration > Results" # behat_hooks::i_look_for_exceptions()
And I follow "TF1" # behat_hooks::i_look_for_exceptions()
And "False" row "Frequency" column of "quizresponseanalysis" table should contain "100.00%" # behat_hooks::i_look_for_exceptions()
And "True" row "Frequency" column of "quizresponseanalysis" table should contain "0.00%" # behat_hooks::i_look_for_exceptions()
And "[No response]" row "Frequency" column of "quizresponseanalysis" table should contain "100.00%" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Redoing question 1 should save any changes to question 2 on the same page # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\attempt_redo_questions.feature:102
When I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I press "Attempt quiz now" # behat_hooks::i_look_for_exceptions()
And I click on "False" "radio" in the "First question" "question" # behat_hooks::i_look_for_exceptions()
And I click on "Check" "button" in the "First question" "question" # behat_hooks::i_look_for_exceptions()
And I click on "True" "radio" in the "Second question" "question" # behat_hooks::i_look_for_exceptions()
And I press "Try another question like this one" # behat_hooks::i_look_for_exceptions()
And I click on "Check" "button" in the "Second question" "question" # behat_hooks::i_look_for_exceptions()
Then the state of "Second question" question is shown as "Correct" # behat_hooks::i_look_for_exceptions()
@mod @mod_quiz
Feature: Attemp a quiz where some questions require that the previous question has been answered.
In order to complete a quiz where questions require previous ones to be complete
As a student
I need later questions to appear once earlier ones have been answered.
Background: # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\attempt_require_previous.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student | Student | One | student@example.com |
| teacher | Teacher | One | teacher@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| student | C1 | student |
| teacher | C1 | teacher |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
@javascript
Scenario: A question that requires the previous one is initally blocked # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\attempt_require_previous.feature:24
Given the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | TF1 | First question |
| Test questions | truefalse | TF2 | Second question |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | preferredbehaviour |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | immediatefeedback |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page | requireprevious |
| TF1 | 1 | 0 |
| TF2 | 1 | 1 |
When I log in as "student" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I press "Attempt quiz now" # behat_hooks::i_look_for_exceptions()
Then I should see "First question" # behat_hooks::i_look_for_exceptions()
And I should see "This question cannot be attempted until the previous question has been completed." # behat_hooks::i_look_for_exceptions()
And I should not see "Second question" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I follow "Attempts: 1" # behat_hooks::i_look_for_exceptions()
And I follow "Review attempt" # behat_hooks::i_look_for_exceptions()
And I should see "First question" # behat_hooks::i_look_for_exceptions()
And I should see "This question cannot be attempted until the previous question has been completed." # behat_hooks::i_look_for_exceptions()
And I should not see "Second question" # behat_hooks::i_look_for_exceptions()
And "Question 1" "link" should exist # behat_hooks::i_look_for_exceptions()
And "Question 2" "link" should not exist # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: A question requires the previous one becomes available when the first one is answered # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\attempt_require_previous.feature:58
Given the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | TF1 | First question |
| Test questions | truefalse | TF2 | Second question |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | preferredbehaviour |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | immediatefeedback |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page | requireprevious |
| TF1 | 1 | 0 |
| TF2 | 1 | 1 |
When I log in as "student" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I press "Attempt quiz now" # behat_hooks::i_look_for_exceptions()
And I click on "True" "radio" in the "First question" "question" # behat_hooks::i_look_for_exceptions()
And I press "Check" # behat_hooks::i_look_for_exceptions()
Then I should see "First question" # behat_hooks::i_look_for_exceptions()
And I should not see "This question cannot be attempted until the previous question has been completed." # behat_hooks::i_look_for_exceptions()
And I should see "Second question" # behat_hooks::i_look_for_exceptions()
And "Question 1" "link" should exist # behat_hooks::i_look_for_exceptions()
And "Question 2" "link" should exist # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: After quiz submitted, all questions show on the review page # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\attempt_require_previous.feature:85
Given the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | TF1 | First question |
| Test questions | truefalse | TF2 | Second question |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | preferredbehaviour |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | immediatefeedback |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page | requireprevious |
| TF1 | 1 | 0 |
| TF2 | 1 | 1 |
When I log in as "student" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I press "Attempt quiz now" # behat_hooks::i_look_for_exceptions()
And I press "Finish attempt ..." # behat_hooks::i_look_for_exceptions()
And I press "Submit all and finish" # behat_hooks::i_look_for_exceptions()
And I click on "Submit all and finish" "button" in the "Confirmation" "dialogue" # behat_hooks::i_look_for_exceptions()
Then the state of "First question" question is shown as "Not answered" # behat_hooks::i_look_for_exceptions()
And the state of "Second question" question is shown as "Not answered" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: A questions cannot be blocked in a deferred feedback quiz (despite what is set in the DB). # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\attempt_require_previous.feature:110
Given the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | TF1 | First question |
| Test questions | truefalse | TF2 | Second question |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | preferredbehaviour |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | deferredfeedback |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page | requireprevious |
| TF1 | 1 | 0 |
| TF2 | 1 | 1 |
When I log in as "student" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I press "Attempt quiz now" # behat_hooks::i_look_for_exceptions()
Then I should see "First question" # behat_hooks::i_look_for_exceptions()
And I should see "Second question" # behat_hooks::i_look_for_exceptions()
And I should not see "This question cannot be attempted until the previous question has been completed." # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Questions cannot be blocked in a shuffled section (despite what is set in the DB). # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\attempt_require_previous.feature:133
Given the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | TF1 | First question |
| Test questions | truefalse | TF2 | Second question |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | preferredbehaviour | questionsperpage |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | immediatefeedback | 2 |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page | requireprevious |
| TF1 | 1 | 1 |
| TF2 | 2 | 1 |
And quiz "Quiz 1" contains the following sections: # behat_hooks::i_look_for_exceptions()
| heading | firstslot | shuffle |
| Section 1 | 1 | 1 |
When I log in as "student" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I press "Attempt quiz now" # behat_hooks::i_look_for_exceptions()
Then I should see "First question" # behat_hooks::i_look_for_exceptions()
And I should see "Second question" # behat_hooks::i_look_for_exceptions()
And I should not see "This question cannot be attempted until the previous question has been completed." # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Question dependency cannot apply to the first questions in section when the previous section is shuffled # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\attempt_require_previous.feature:159
Given the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | TF1 | First question |
| Test questions | truefalse | TF2 | Second question |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | preferredbehaviour | questionsperpage |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | immediatefeedback | 2 |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page | requireprevious |
| TF1 | 1 | 1 |
| TF2 | 2 | 1 |
And quiz "Quiz 1" contains the following sections: # behat_hooks::i_look_for_exceptions()
| heading | firstslot | shuffle |
| Section 1 | 1 | 1 |
| Section 2 | 2 | 0 |
When I log in as "student" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I press "Attempt quiz now" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
Then I should see "Second question" # behat_hooks::i_look_for_exceptions()
And I should not see "This question cannot be attempted until the previous question has been completed." # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: A questions cannot be blocked in sequential quiz (despite what is set in the DB). # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\attempt_require_previous.feature:186
Given the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | TF1 | First question |
| Test questions | truefalse | TF2 | Second question |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | preferredbehaviour | navmethod |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | immediatefeedback | sequential |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page | requireprevious |
| TF1 | 1 | 1 |
| TF2 | 1 | 1 |
When I log in as "student" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I press "Attempt quiz now" # behat_hooks::i_look_for_exceptions()
Then I should see "First question" # behat_hooks::i_look_for_exceptions()
And I should see "Second question" # behat_hooks::i_look_for_exceptions()
And I should not see "This question cannot be attempted until the previous question has been completed." # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: A questions not blocked if the previous one cannot finish, e.g. essay (despite what is set in the DB). # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\attempt_require_previous.feature:209
Given the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | essay | Story | First question |
| Test questions | truefalse | TF2 | Second question |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | preferredbehaviour |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | immediatefeedback |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page | requireprevious |
| Story | 1 | 0 |
| TF2 | 1 | 1 |
When I log in as "student" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I press "Attempt quiz now" # behat_hooks::i_look_for_exceptions()
Then I should see "First question" # behat_hooks::i_look_for_exceptions()
And I should see "Second question" # behat_hooks::i_look_for_exceptions()
And I should not see "This question cannot be attempted until the previous question has been completed." # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: A questions not blocked if the previous one cannot finish, e.g. description (despite what is set in the DB). # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\attempt_require_previous.feature:232
Given the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | description | Info | Read me |
| Test questions | truefalse | TF1 | First question |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | preferredbehaviour |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | immediatefeedback |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page | requireprevious |
| Info | 1 | 0 |
| TF1 | 1 | 1 |
When I log in as "student" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I press "Attempt quiz now" # behat_hooks::i_look_for_exceptions()
Then I should see "Read me" # behat_hooks::i_look_for_exceptions()
And I should see "First question" # behat_hooks::i_look_for_exceptions()
And I should not see "This question cannot be attempted until the previous question has been completed." # behat_hooks::i_look_for_exceptions()
@auth @auth_manual
Feature: Test manual authentication works.
In order to check manual authentication
As a teacher
I need to go on login page and enter username and password.
Background: # C:\Apache24\htdocs\integration\auth\manual\tests\behat\auth_manual.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username |
| teacher1 |
@javascript
Scenario: Check login works with javascript. # C:\Apache24\htdocs\integration\auth\manual\tests\behat\auth_manual.feature:13
Given I am on homepage # behat_hooks::i_look_for_exceptions()
And I expand navigation bar # behat_hooks::i_look_for_exceptions()
And I click on "Log in" "link" in the ".logininfo" "css_element" # behat_hooks::i_look_for_exceptions()
When I set the field "Username" to "teacher1" # behat_hooks::i_look_for_exceptions()
And I set the field "Password" to "teacher1" # behat_hooks::i_look_for_exceptions()
When I press "Log in" # behat_hooks::i_look_for_exceptions()
Then I should see "You are logged in as" # behat_hooks::i_look_for_exceptions()
Scenario: Check login works without javascript. # C:\Apache24\htdocs\integration\auth\manual\tests\behat\auth_manual.feature:22
Given I am on homepage # behat_hooks::i_look_for_exceptions()
And I click on "Log in" "link" in the ".logininfo" "css_element" # behat_hooks::i_look_for_exceptions()
When I set the field "Username" to "teacher1" # behat_hooks::i_look_for_exceptions()
And I set the field "Password" to "teacher1" # behat_hooks::i_look_for_exceptions()
When I press "Log in" # behat_hooks::i_look_for_exceptions()
Then I should see "You are logged in as" # behat_hooks::i_look_for_exceptions()
@core @core_group
Feature: Automatic creation of groups
In order to quickly create groups
As a teacher
I need to create groups automatically and allocate them in groupings if necessary
Background: # C:\Apache24\htdocs\integration\group\tests\behat\auto_creation.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
| student3 | Student | 3 | student3@example.com |
| student4 | Student | 4 | student4@example.com |
| student5 | Student | 5 | student5@example.com |
| student6 | Student | 6 | student6@example.com |
| student7 | Student | 7 | student7@example.com |
| student8 | Student | 8 | student8@example.com |
| student9 | Student | 9 | student9@example.com |
| student10 | Student | 10 | student10@example.com |
| suspendedstudent11 | Suspended student | 11 | suspendedstudent11@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role | status |
| teacher1 | C1 | editingteacher | 0 |
| student1 | C1 | student | 0 |
| student2 | C1 | student | 0 |
| student3 | C1 | student | 0 |
| student4 | C1 | student | 0 |
| student5 | C1 | student | 0 |
| student6 | C1 | student | 0 |
| student7 | C1 | student | 0 |
| student8 | C1 | student | 0 |
| student9 | C1 | student | 0 |
| student10 | C1 | student | 0 |
| suspendedstudent11 | C1 | student | 1 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I expand "Users" node # behat_hooks::i_look_for_exceptions()
And I follow "Groups" # behat_hooks::i_look_for_exceptions()
When I press "Auto-create groups" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Split automatically the course users in groups and add the groups to a new grouping # C:\Apache24\htdocs\integration\group\tests\behat\auto_creation.feature:47
Given I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Auto create based on | Number of groups |
| Group/member count | 2 |
| Grouping of auto-created groups | New grouping |
| Grouping name | Grouping name |
And I press "Preview" # behat_hooks::i_look_for_exceptions()
Then I should see "Group members" # behat_hooks::i_look_for_exceptions()
And I should see "User count" # behat_hooks::i_look_for_exceptions()
And I should see "Group A" # behat_hooks::i_look_for_exceptions()
And I should see "Group B" # behat_hooks::i_look_for_exceptions()
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And the "groups" select box should contain "Group A (5)" # behat_hooks::i_look_for_exceptions()
And the "groups" select box should contain "Group B (5)" # behat_hooks::i_look_for_exceptions()
And I follow "Groupings" # behat_hooks::i_look_for_exceptions()
And I should see "Grouping name" # behat_hooks::i_look_for_exceptions()
And I click on "Show groups in grouping" "link" in the "Grouping name" "table_row" # behat_hooks::i_look_for_exceptions()
And the "removeselect" select box should contain "Group A" # behat_hooks::i_look_for_exceptions()
And the "removeselect" select box should contain "Group B" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Split automatically the course users in groups based on group member count # C:\Apache24\htdocs\integration\group\tests\behat\auto_creation.feature:68
Given I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Auto create based on | Members per group |
| Group/member count | 4 |
| Grouping of auto-created groups | New grouping |
| Grouping name | Grouping name |
And I press "Preview" # behat_hooks::i_look_for_exceptions()
Then I should see "Group members" # behat_hooks::i_look_for_exceptions()
And I should see "User count" # behat_hooks::i_look_for_exceptions()
And I should see "Group A" in the ".generaltable" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Group B" in the ".generaltable" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Group C" in the ".generaltable" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "4" in the "Group A" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "4" in the "Group B" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "2" in the "Group C" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the field "Prevent last small group" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Preview" # behat_hooks::i_look_for_exceptions()
And I should see "Group A" in the ".generaltable" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Group B" in the ".generaltable" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "5" in the "Group A" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "5" in the "Group B" "table_row" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Split automatically the course users in groups that are not in groups # C:\Apache24\htdocs\integration\group\tests\behat\auto_creation.feature:91
Given I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I press "Create group" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Group name | Group 1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Create group" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Group name | Group 2 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
When I add "Student 1" user to "Group 1" group members # behat_hooks::i_look_for_exceptions()
And I add "Student 2" user to "Group 1" group members # behat_hooks::i_look_for_exceptions()
And I add "Student 3" user to "Group 2" group members # behat_hooks::i_look_for_exceptions()
And I add "Student 4" user to "Group 2" group members # behat_hooks::i_look_for_exceptions()
And I press "Auto-create groups" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I set the field "Auto create based on" to "Number of groups" # behat_hooks::i_look_for_exceptions()
And I set the field "Group/member count" to "2" # behat_hooks::i_look_for_exceptions()
And I set the field "Grouping of auto-created groups" to "No grouping" # behat_hooks::i_look_for_exceptions()
And I set the field "Ignore users in groups" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And the "groups" select box should contain "Group A (3)" # behat_hooks::i_look_for_exceptions()
And the "groups" select box should contain "Group B (3)" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Split users into groups based on existing groups or groupings # C:\Apache24\htdocs\integration\group\tests\behat\auto_creation.feature:116
Given I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Naming scheme | Group @ |
| Auto create based on | Number of groups |
| Group/member count | 2 |
| Grouping of auto-created groups | No grouping |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Auto-create groups" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Naming scheme | Test @ |
| Auto create based on | Number of groups |
| Group/member count | 2 |
| groupid | Group A |
| Grouping of auto-created groups | New grouping |
| Grouping name | Sub Grouping |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And the "groups" select box should contain "Test A (3)" # behat_hooks::i_look_for_exceptions()
And the "groups" select box should contain "Test B (2)" # behat_hooks::i_look_for_exceptions()
And I press "Auto-create groups" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Naming scheme | Test # |
| Auto create based on | Number of groups |
| Group/member count | 2 |
| Select members from grouping | Sub Grouping |
| Grouping of auto-created groups | No grouping |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And the "groups" select box should contain "Test 1 (3)" # behat_hooks::i_look_for_exceptions()
And the "groups" select box should contain "Test 2 (2)" # behat_hooks::i_look_for_exceptions()
Scenario: Exclude suspended users when auto-creating groups # C:\Apache24\htdocs\integration\group\tests\behat\auto_creation.feature:145
Given I set the field "Include only active enrolments" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Auto create based on" to "Members per group" # behat_hooks::i_look_for_exceptions()
When I set the field "Group/member count" to "11" # behat_hooks::i_look_for_exceptions()
And I press "Preview" # behat_hooks::i_look_for_exceptions()
Then I should not see "Suspended Student 11" # behat_hooks::i_look_for_exceptions()
Scenario: Include suspended users when auto-creating groups # C:\Apache24\htdocs\integration\group\tests\behat\auto_creation.feature:152
Given I set the field "Include only active enrolments" to "0" # behat_hooks::i_look_for_exceptions()
And I set the field "Auto create based on" to "Members per group" # behat_hooks::i_look_for_exceptions()
When I set the field "Group/member count" to "11" # behat_hooks::i_look_for_exceptions()
And I press "Preview" # behat_hooks::i_look_for_exceptions()
Then I should see "Suspended student 11" # behat_hooks::i_look_for_exceptions()
Scenario: Do not display 'Include only active enrolments' if user does not have the 'moodle/course:viewsuspendedusers' capability # C:\Apache24\htdocs\integration\group\tests\behat\auto_creation.feature:159
Given I log out # behat_hooks::i_look_for_exceptions()
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I set the following system permissions of "Teacher" role: # behat_hooks::i_look_for_exceptions()
| capability | permission |
| moodle/course:viewsuspendedusers | Prevent |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I expand "Users" node # behat_hooks::i_look_for_exceptions()
And I follow "Groups" # behat_hooks::i_look_for_exceptions()
When I press "Auto-create groups" # behat_hooks::i_look_for_exceptions()
Then I should not see "Include only active enrolments" # behat_hooks::i_look_for_exceptions()
And I set the field "Group/member count" to "11" # behat_hooks::i_look_for_exceptions()
And I press "Preview" # behat_hooks::i_look_for_exceptions()
And I should not see "Suspended Student 11" # behat_hooks::i_look_for_exceptions()
@editor @editor_atto @atto @_file_upload
Feature: Atto Autosave
To reduce frustration, atto should save drafts of my work.
Background: # C:\Apache24\htdocs\integration\lib\editor\atto\tests\behat\autosave.feature:5
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| teacher2 | Teacher | 2 | teacher2@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| teacher2 | C1 | editingteacher |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "Atto toolbar settings" node in "Site administration > Plugins > Text editors > Atto HTML editor" # behat_hooks::i_look_for_exceptions()
And I set the field "Autosave frequency" to "3" # behat_hooks::i_look_for_exceptions()
And I set the field with xpath "//select[@name='s_editor_atto_autosavefrequency[u]']" to "seconds" # behat_hooks::i_look_for_exceptions()
And I click on "Save changes" "button" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I set the field with xpath "//select[@name='summary_editor[format]']" to "1" # behat_hooks::i_look_for_exceptions()
And I click on "Save and display" "button" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Restore a draft # C:\Apache24\htdocs\integration\lib\editor\atto\tests\behat\autosave.feature:30
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I set the field "Course summary" to "This is my draft" # behat_hooks::i_look_for_exceptions()
And I wait "5" seconds # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I wait "2" seconds # behat_hooks::i_look_for_exceptions()
Then I should see "This is my draft" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Do not restore a draft if files have been modified # C:\Apache24\htdocs\integration\lib\editor\atto\tests\behat\autosave.feature:46
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I set the field "Course summary" to "This is my draft" # behat_hooks::i_look_for_exceptions()
And I wait "5" seconds # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher2" # behat_hooks::i_look_for_exceptions()
And I follow "Manage private files..." # behat_hooks::i_look_for_exceptions()
And I upload "lib/editor/atto/tests/fixtures/moodle-logo.png" file to "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I click on "Save changes" "button" # behat_hooks::i_look_for_exceptions()
And I click on "Dashboard" "link" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I set the field "Course summary" to "Image test
" # behat_hooks::i_look_for_exceptions()
And I select the text in the "Course summary" Atto editor # behat_hooks::i_look_for_exceptions()
And I click on "Image" "button" # behat_hooks::i_look_for_exceptions()
And I click on "Browse repositories..." "button" # behat_hooks::i_look_for_exceptions()
And I click on "Private files" "link" in the ".fp-repo-area" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "moodle-logo.png" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Select this file" "button" # behat_hooks::i_look_for_exceptions()
And I set the field "Describe this image" to "It's the Moodle" # behat_hooks::i_look_for_exceptions()
And I wait until the page is ready # behat_hooks::i_look_for_exceptions()
And I click on "Save image" "button" # behat_hooks::i_look_for_exceptions()
And I click on "Save and display" "button" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Course administration" # behat_hooks::i_look_for_exceptions()
Then I should not see "This is my draft" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Do not restore a draft if text has been modified # C:\Apache24\htdocs\integration\lib\editor\atto\tests\behat\autosave.feature:80
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I set the field "Course summary" to "This is my draft" # behat_hooks::i_look_for_exceptions()
And I wait "5" seconds # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I set the field "Course summary" to "Modified text" # behat_hooks::i_look_for_exceptions()
And I click on "Save and display" "button" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Course administration" # behat_hooks::i_look_for_exceptions()
Then I should not see "This is my draft" # behat_hooks::i_look_for_exceptions()
And I should see "Modified text" # behat_hooks::i_look_for_exceptions()
@availability @availability_completion
Feature: availability_completion
In order to control student access to activities
As a teacher
I need to set completion conditions which prevent student access
Background: # C:\Apache24\htdocs\integration\availability\condition\completion\tests\behat\availability_completion.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format | enablecompletion |
| Course 1 | C1 | topics | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username |
| teacher1 |
| student1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
@javascript
Scenario: Test condition # C:\Apache24\htdocs\integration\availability\condition\completion\tests\behat\availability_completion.feature:21
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Page" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Page 1 |
| Description | Test |
| Page content | Test |
| Completion tracking | 1 |
And I add a "Page" to section "2" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Page 2 |
| Description | Test |
| Page content | Test |
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I click on "Add restriction..." "button" # behat_hooks::i_look_for_exceptions()
And I click on "Activity completion" "button" in the "Add restriction..." "dialogue" # behat_hooks::i_look_for_exceptions()
And I click on ".availability-item .availability-eye img" "css_element" # behat_hooks::i_look_for_exceptions()
And I set the field "Activity or resource" to "Page 1" # behat_hooks::i_look_for_exceptions()
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
When I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then I should not see "Page 2" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
When I click on ".togglecompletion input[type=image]" "css_element" # behat_hooks::i_look_for_exceptions()
Then I should see "Page 2" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
@availability @availability_date
Feature: availability_date
In order to control student access to activities
As a teacher
I need to set date conditions which prevent student access
Background: # C:\Apache24\htdocs\integration\availability\condition\date\tests\behat\availability_date.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format | enablecompletion |
| Course 1 | C1 | topics | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username |
| teacher1 |
| student1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
@javascript
Scenario: Test condition # C:\Apache24\htdocs\integration\availability\condition\date\tests\behat\availability_date.feature:21
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Page" to section "1" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Page 1 |
| Description | Test |
| Page content | Test |
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I click on "Add restriction..." "button" # behat_hooks::i_look_for_exceptions()
And I click on "Date" "button" in the "Add restriction..." "dialogue" # behat_hooks::i_look_for_exceptions()
And I click on ".availability-item .availability-eye img" "css_element" # behat_hooks::i_look_for_exceptions()
And I set the field "year" to "2013" # behat_hooks::i_look_for_exceptions()
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
And I add a "Page" to section "2" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Page 2 |
| Description | Test |
| Page content | Test |
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I click on "Add restriction..." "button" # behat_hooks::i_look_for_exceptions()
And I click on "Date" "button" in the "Add restriction..." "dialogue" # behat_hooks::i_look_for_exceptions()
And I click on ".availability-item .availability-eye img" "css_element" # behat_hooks::i_look_for_exceptions()
And I set the field "Direction" to "until" # behat_hooks::i_look_for_exceptions()
And I set the field "year" to "2013" # behat_hooks::i_look_for_exceptions()
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
When I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then I should see "Page 1" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I should not see "Page 2" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
@availability @availability_grade
Feature: availability_grade
In order to control student access to activities
As a teacher
I need to set date conditions which prevent student access
Background: # C:\Apache24\htdocs\integration\availability\condition\grade\tests\behat\availability_grade.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format | enablecompletion |
| Course 1 | C1 | topics | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | email |
| teacher1 | t@example.com |
| student1 | s@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
@javascript
Scenario: Test condition # C:\Apache24\htdocs\integration\availability\condition\grade\tests\behat\availability_grade.feature:21
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | A1 |
| Description | x |
| Online text | 1 |
And I add a "Page" to section "2" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | P2 |
| Description | x |
| Page content | x |
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I click on "Add restriction..." "button" # behat_hooks::i_look_for_exceptions()
And I click on "Grade" "button" in the "Add restriction..." "dialogue" # behat_hooks::i_look_for_exceptions()
And I click on ".availability-item .availability-eye img" "css_element" # behat_hooks::i_look_for_exceptions()
And I set the field "Grade" to "A1" # behat_hooks::i_look_for_exceptions()
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
And I add a "Page" to section "3" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | P3 |
| Description | x |
| Page content | x |
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I click on "Add restriction..." "button" # behat_hooks::i_look_for_exceptions()
And I click on "Grade" "button" in the "Add restriction..." "dialogue" # behat_hooks::i_look_for_exceptions()
And I click on ".availability-item .availability-eye img" "css_element" # behat_hooks::i_look_for_exceptions()
And I set the field "Grade" to "A1" # behat_hooks::i_look_for_exceptions()
And I click on "min" "checkbox" in the ".availability-item" "css_element" # behat_hooks::i_look_for_exceptions()
And I set the field "Minimum grade percentage (inclusive)" to "50" # behat_hooks::i_look_for_exceptions()
And I click on "max" "checkbox" in the ".availability-item" "css_element" # behat_hooks::i_look_for_exceptions()
And I set the field "Maximum grade percentage (exclusive)" to "80" # behat_hooks::i_look_for_exceptions()
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
And I open "P3" actions menu # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "P3" activity # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I click on "max" "checkbox" in the ".availability-item" "css_element" # behat_hooks::i_look_for_exceptions()
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
And I open "P3" actions menu # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "P3" activity # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And the field "Maximum grade percentage (exclusive)" matches value "" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I add a "Page" to section "4" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | P4 |
| Description | x |
| Page content | x |
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I click on "Add restriction..." "button" # behat_hooks::i_look_for_exceptions()
And I click on "Grade" "button" in the "Add restriction..." "dialogue" # behat_hooks::i_look_for_exceptions()
And I click on ".availability-item .availability-eye img" "css_element" # behat_hooks::i_look_for_exceptions()
And I set the field "Grade" to "A1" # behat_hooks::i_look_for_exceptions()
And I click on "min" "checkbox" in the ".availability-item" "css_element" # behat_hooks::i_look_for_exceptions()
And I set the field "Minimum grade percentage (inclusive)" to "10" # behat_hooks::i_look_for_exceptions()
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
When I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "A1" # behat_hooks::i_look_for_exceptions()
And I click on "Add submission" "button" # behat_hooks::i_look_for_exceptions()
And I set the field "Online text" to "Q" # behat_hooks::i_look_for_exceptions()
And I click on "Save changes" "button" # behat_hooks::i_look_for_exceptions()
And I follow "C1" # behat_hooks::i_look_for_exceptions()
Then I should not see "P2" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I should not see "P3" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I should not see "P4" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I should see "A1" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
When I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "A1" # behat_hooks::i_look_for_exceptions()
And I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I click on "Grade" "link" in the "s@example.com" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the field "Grade out of 100" to "40" # behat_hooks::i_look_for_exceptions()
And I click on "Save changes" "button" # behat_hooks::i_look_for_exceptions()
And I press "Ok" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then I should see "P2" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I should see "P4" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I should not see "P3" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
@availability @availability_group
Feature: availability_group
In order to control student access to activities
As a teacher
I need to set group conditions which prevent student access
Background: # C:\Apache24\htdocs\integration\availability\condition\group\tests\behat\availability_group.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format | enablecompletion |
| Course 1 | C1 | topics | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username |
| teacher1 |
| student1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
@javascript
Scenario: Test condition # C:\Apache24\htdocs\integration\availability\condition\group\tests\behat\availability_group.feature:21
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Page" to section "1" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I click on "Add restriction..." "button" # behat_hooks::i_look_for_exceptions()
Then "Group" "button" should not exist in the "Add restriction..." "dialogue" # behat_hooks::i_look_for_exceptions()
And I click on "Cancel" "button" in the "Add restriction..." "dialogue" # behat_hooks::i_look_for_exceptions()
Given the following "groups" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| G1 | C1 | GI1 |
| G2 | C1 | GI2 |
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I add a "Page" to section "1" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I click on "Add restriction..." "button" # behat_hooks::i_look_for_exceptions()
Then "Group" "button" should exist in the "Add restriction..." "dialogue" # behat_hooks::i_look_for_exceptions()
Given I click on "Group" "button" # behat_hooks::i_look_for_exceptions()
And I set the field "Group" to "(Any group)" # behat_hooks::i_look_for_exceptions()
And I click on ".availability-item .availability-eye img" "css_element" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | P1 |
| Description | x |
| Page content | x |
And I click on "Save and return to course" "button" # behat_hooks::i_look_for_exceptions()
And I add a "Page" to section "2" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | P2 |
| Description | x |
| Page content | x |
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I click on "Add restriction..." "button" # behat_hooks::i_look_for_exceptions()
And I click on "Group" "button" # behat_hooks::i_look_for_exceptions()
And I set the field "Group" to "G1" # behat_hooks::i_look_for_exceptions()
And I click on ".availability-item .availability-eye img" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Save and return to course" "button" # behat_hooks::i_look_for_exceptions()
And I add a "Page" to section "3" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | P3 |
| Description | x |
| Page content | x |
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I click on "Add restriction..." "button" # behat_hooks::i_look_for_exceptions()
And I click on "Group" "button" # behat_hooks::i_look_for_exceptions()
And I set the field "Group" to "G2" # behat_hooks::i_look_for_exceptions()
And I click on ".availability-item .availability-eye img" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Save and return to course" "button" # behat_hooks::i_look_for_exceptions()
When I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then I should not see "P1" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I should not see "P2" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I should not see "P3" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
Given the following "group members" exist: # behat_hooks::i_look_for_exceptions()
| user | group |
| student1 | GI1 |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then I should see "P1" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I should see "P2" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I should not see "P3" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
@availability @availability_grouping
Feature: availability_grouping
In order to control student access to activities
As a teacher
I need to set grouping conditions which prevent student access
Background: # C:\Apache24\htdocs\integration\availability\condition\grouping\tests\behat\availability_grouping.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format | enablecompletion |
| Course 1 | C1 | topics | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username |
| teacher1 |
| student1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "groups" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| G1 | C1 | GI1 |
And the following "group members" exist: # behat_hooks::i_look_for_exceptions()
| user | group |
| student1 | GI1 |
@javascript
Scenario: Test condition # C:\Apache24\htdocs\integration\availability\condition\grouping\tests\behat\availability_grouping.feature:27
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Page" to section "1" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I click on "Add restriction..." "button" # behat_hooks::i_look_for_exceptions()
Then "Grouping" "button" should not exist in the "Add restriction..." "dialogue" # behat_hooks::i_look_for_exceptions()
And I click on "Cancel" "button" in the "Add restriction..." "dialogue" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And the following "groupings" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| GX1 | C1 | GXI1 |
| GX2 | C1 | GXI2 |
And I add a "Page" to section "1" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I click on "Add restriction..." "button" # behat_hooks::i_look_for_exceptions()
Then "Grouping" "button" should exist in the "Add restriction..." "dialogue" # behat_hooks::i_look_for_exceptions()
Given I click on "Grouping" "button" # behat_hooks::i_look_for_exceptions()
And I set the field "Grouping" to "GX1" # behat_hooks::i_look_for_exceptions()
And I click on ".availability-item .availability-eye img" "css_element" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | P1 |
| Description | x |
| Page content | x |
And I click on "Save and return to course" "button" # behat_hooks::i_look_for_exceptions()
And I add a "Page" to section "2" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | P2 |
| Description | x |
| Page content | x |
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I click on "Add restriction..." "button" # behat_hooks::i_look_for_exceptions()
And I click on "Grouping" "button" # behat_hooks::i_look_for_exceptions()
And I set the field "Grouping" to "GX2" # behat_hooks::i_look_for_exceptions()
And I click on ".availability-item .availability-eye img" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Save and return to course" "button" # behat_hooks::i_look_for_exceptions()
When I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then I should not see "P1" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I should not see "P2" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And the following "grouping groups" exist: # behat_hooks::i_look_for_exceptions()
| grouping | group |
| GXI1 | GI1 |
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then I should see "P1" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I should not see "P2" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
@availability @availability_profile
Feature: availability_profile
In order to control student access to activities
As a teacher
I need to set profile conditions which prevent student access
Background: # C:\Apache24\htdocs\integration\availability\condition\profile\tests\behat\availability_profile.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format | enablecompletion |
| Course 1 | C1 | topics | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | email |
| teacher1 | t@example.com |
| student1 | s@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
@javascript
Scenario: Test condition # C:\Apache24\htdocs\integration\availability\condition\profile\tests\behat\availability_profile.feature:21
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Page" to section "1" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | P1 |
| Description | x |
| Page content | x |
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I click on "Add restriction..." "button" # behat_hooks::i_look_for_exceptions()
And I click on "User profile" "button" # behat_hooks::i_look_for_exceptions()
And I set the field "User profile field" to "Email address" # behat_hooks::i_look_for_exceptions()
And I set the field "Value to compare against" to "s@example.com" # behat_hooks::i_look_for_exceptions()
And I click on ".availability-item .availability-eye img" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Save and return to course" "button" # behat_hooks::i_look_for_exceptions()
And I add a "Page" to section "2" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | P2 |
| Description | x |
| Page content | x |
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I click on "Add restriction..." "button" # behat_hooks::i_look_for_exceptions()
And I click on "User profile" "button" # behat_hooks::i_look_for_exceptions()
And I set the field "User profile field" to "Email address" # behat_hooks::i_look_for_exceptions()
And I set the field "Value to compare against" to "q@example.com" # behat_hooks::i_look_for_exceptions()
And I click on ".availability-item .availability-eye img" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Save and return to course" "button" # behat_hooks::i_look_for_exceptions()
When I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then I should see "P1" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I should not see "P2" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Test with custom user profile field # C:\Apache24\htdocs\integration\availability\condition\profile\tests\behat\availability_profile.feature:67
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "User profile fields" node in "Site administration > Users > Accounts" # behat_hooks::i_look_for_exceptions()
And I set the field "datatype" to "Text input" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Short name | superfield |
| Name | Super field |
And I click on "Save changes" "button" # behat_hooks::i_look_for_exceptions()
And I navigate to "Browse list of users" node in "Site administration > Users > Accounts" # behat_hooks::i_look_for_exceptions()
And I click on "a[title=Edit]" "css_element" in the "s@example.com" "table_row" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I set the field "Super field" to "Bananaman" # behat_hooks::i_look_for_exceptions()
And I click on "Update profile" "button" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Page" to section "1" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | P1 |
| Description | x |
| Page content | x |
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I click on "Add restriction..." "button" # behat_hooks::i_look_for_exceptions()
And I click on "User profile" "button" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| User profile field | Super field |
| Value to compare against | Bananaman |
And I click on ".availability-item .availability-eye img" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Save and return to course" "button" # behat_hooks::i_look_for_exceptions()
When I follow "P1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Page module administration" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
Then the field "User profile field" matches value "Super field" # behat_hooks::i_look_for_exceptions()
And the field "Value to compare against" matches value "Bananaman" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then I should see "P1" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
@core @core_badges @_file_upload
Feature: Award badges
In order to award badges to users for their achievements
As an admin
I need to add criteria to badges in the system
@javascript
Scenario: Award profile badge # C:\Apache24\htdocs\integration\badges\tests\behat\award_badge.feature:8
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "Add a new badge" node in "Site administration > Badges" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Profile Badge |
| Description | Test badge description |
| issuername | Test Badge Site |
| issuercontact | testuser@example.com |
And I upload "badges/tests/behat/badge.png" file to "Image" filemanager # behat_hooks::i_look_for_exceptions()
And I press "Create badge" # behat_hooks::i_look_for_exceptions()
And I set the field "type" to "Profile completion" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I set the field "First name" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Email address" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Phone" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "id_description" to "Criterion description" # behat_hooks::i_look_for_exceptions()
When I press "Save" # behat_hooks::i_look_for_exceptions()
Then I should see "Profile completion" # behat_hooks::i_look_for_exceptions()
And I should see "First name" # behat_hooks::i_look_for_exceptions()
And I should see "Email address" # behat_hooks::i_look_for_exceptions()
And I should see "Phone" # behat_hooks::i_look_for_exceptions()
And I should see "Criterion description" # behat_hooks::i_look_for_exceptions()
And I should not see "Criteria for this badge have not been set up yet." # behat_hooks::i_look_for_exceptions()
And I press "Enable access" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I click on "Admin User" "link" # behat_hooks::i_look_for_exceptions()
And I choose "Profile" in the open action menu # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I set the field "Phone" to "123456789" # behat_hooks::i_look_for_exceptions()
And I press "Update profile" # behat_hooks::i_look_for_exceptions()
And I follow "Profile" in the user menu # behat_hooks::i_look_for_exceptions()
Then I should see "Profile Badge" # behat_hooks::i_look_for_exceptions()
And I should not see "There are no badges available." # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Award site badge # C:\Apache24\htdocs\integration\badges\tests\behat\award_badge.feature:44
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher | teacher | 1 | teacher1@example.com |
| student | student | 1 | student1@example.com |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "Add a new badge" node in "Site administration > Badges" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Site Badge |
| Description | Site badge description |
| issuername | Tester of site badge |
And I upload "badges/tests/behat/badge.png" file to "Image" filemanager # behat_hooks::i_look_for_exceptions()
And I press "Create badge" # behat_hooks::i_look_for_exceptions()
And I set the field "type" to "Manual issue by role" # behat_hooks::i_look_for_exceptions()
And I set the field "Teacher" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I press "Enable access" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I follow "Recipients (0)" # behat_hooks::i_look_for_exceptions()
And I press "Award badge" # behat_hooks::i_look_for_exceptions()
And I set the field "potentialrecipients[]" to "teacher 1 (teacher1@example.com)" # behat_hooks::i_look_for_exceptions()
And I press "Award badge" # behat_hooks::i_look_for_exceptions()
And I set the field "potentialrecipients[]" to "student 1 (student1@example.com)" # behat_hooks::i_look_for_exceptions()
And I press "Award badge" # behat_hooks::i_look_for_exceptions()
When I follow "Site Badge" # behat_hooks::i_look_for_exceptions()
Then I should see "Recipients (2)" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student" # behat_hooks::i_look_for_exceptions()
And I follow "Profile" in the user menu # behat_hooks::i_look_for_exceptions()
Then I should see "Site Badge" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Award course badge # C:\Apache24\htdocs\integration\badges\tests\behat\award_badge.feature:76
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Add a new badge" node in "Course administration > Badges" # behat_hooks::i_look_for_exceptions()
And I follow "Add a new badge" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Course Badge |
| Description | Course badge description |
| issuername | Tester of course badge |
And I upload "badges/tests/behat/badge.png" file to "Image" filemanager # behat_hooks::i_look_for_exceptions()
And I press "Create badge" # behat_hooks::i_look_for_exceptions()
And I set the field "type" to "Manual issue by role" # behat_hooks::i_look_for_exceptions()
And I set the field "Teacher" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I press "Enable access" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I follow "Recipients (0)" # behat_hooks::i_look_for_exceptions()
And I press "Award badge" # behat_hooks::i_look_for_exceptions()
And I set the field "potentialrecipients[]" to "Student 2 (student2@example.com)" # behat_hooks::i_look_for_exceptions()
And I press "Award badge" # behat_hooks::i_look_for_exceptions()
And I set the field "potentialrecipients[]" to "Student 1 (student1@example.com)" # behat_hooks::i_look_for_exceptions()
When I press "Award badge" # behat_hooks::i_look_for_exceptions()
And I follow "Course Badge" # behat_hooks::i_look_for_exceptions()
Then I should see "Recipients (2)" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Profile" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "Course 1" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I should see "Course Badge" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Award badge on activity completion # C:\Apache24\htdocs\integration\badges\tests\behat\award_badge.feature:120
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | Frist | teacher1@example.com |
| student1 | Student | First | student1@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Enable completion tracking | Yes |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment name |
| Description | Submit your online text |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Add a new badge" node in "Course administration > Badges" # behat_hooks::i_look_for_exceptions()
And I follow "Add a new badge" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Course Badge |
| Description | Course badge description |
| issuername | Tester of course badge |
And I upload "badges/tests/behat/badge.png" file to "Image" filemanager # behat_hooks::i_look_for_exceptions()
And I press "Create badge" # behat_hooks::i_look_for_exceptions()
And I set the field "type" to "Activity completion" # behat_hooks::i_look_for_exceptions()
And I set the field "Test assignment name" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I press "Enable access" # behat_hooks::i_look_for_exceptions()
When I press "Continue" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Profile" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "Course 1" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
Then I should not see "badges" # behat_hooks::i_look_for_exceptions()
And I am on homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I press "Mark as complete: Test assignment name" # behat_hooks::i_look_for_exceptions()
And I follow "Profile" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "Course 1" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
Then I should see "Course Badge" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Award badge on course completion # C:\Apache24\htdocs\integration\badges\tests\behat\award_badge.feature:169
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | Frist | teacher1@example.com |
| student1 | Student | First | student1@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Enable completion tracking | Yes |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment name |
| Description | Submit your online text |
| assignsubmission_onlinetext_enabled | 1 |
And I navigate to "Course completion" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I set the field "id_overall_aggregation" to "2" # behat_hooks::i_look_for_exceptions()
And I click on "Condition: Activity completion" "link" # behat_hooks::i_look_for_exceptions()
And I set the field "Assignment - Test assignment name" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Add a new badge" node in "Course administration > Badges" # behat_hooks::i_look_for_exceptions()
And I follow "Add a new badge" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Course Badge |
| Description | Course badge description |
| issuername | Tester of course badge |
And I upload "badges/tests/behat/badge.png" file to "Image" filemanager # behat_hooks::i_look_for_exceptions()
And I press "Create badge" # behat_hooks::i_look_for_exceptions()
And I set the field "type" to "Course completion" # behat_hooks::i_look_for_exceptions()
And I set the field with xpath ".//*[contains(., 'Minimum grade required')]/ancestor::*[contains(concat(' ', @class, ' '), ' fitem ')]//input[1]" to "0" # behat_hooks::i_look_for_exceptions()
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I press "Enable access" # behat_hooks::i_look_for_exceptions()
When I press "Continue" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Profile" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "Course 1" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
Then I should not see "badges" # behat_hooks::i_look_for_exceptions()
And I am on homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I press "Mark as complete: Test assignment name" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I run the scheduled task "core\task\completion_regular_task" # behat_hooks::i_look_for_exceptions()
And I wait "1" seconds # behat_hooks::i_look_for_exceptions()
And I run the scheduled task "core\task\completion_regular_task" # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Profile" in the user menu # behat_hooks::i_look_for_exceptions()
Then I should see "Course Badge" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: All of the selected roles can award badges # C:\Apache24\htdocs\integration\badges\tests\behat\award_badge.feature:232
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Add a new badge" node in "Course administration > Badges" # behat_hooks::i_look_for_exceptions()
And I follow "Add a new badge" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Course Badge 1 |
| Description | Course badge description |
| issuername | Tester of course badge |
And I upload "badges/tests/behat/badge.png" file to "Image" filemanager # behat_hooks::i_look_for_exceptions()
And I press "Create badge" # behat_hooks::i_look_for_exceptions()
And I set the field "type" to "Manual issue by role" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I set the field "Teacher" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Any of the selected roles awards the badge" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I press "Enable access" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I follow "Recipients (0)" # behat_hooks::i_look_for_exceptions()
And I press "Award badge" # behat_hooks::i_look_for_exceptions()
And I set the field "potentialrecipients[]" to "Student 1 (student1@example.com)" # behat_hooks::i_look_for_exceptions()
When I press "Award badge" # behat_hooks::i_look_for_exceptions()
And I follow "Course Badge 1" # behat_hooks::i_look_for_exceptions()
And I follow "Recipients (1)" # behat_hooks::i_look_for_exceptions()
Then I should see "Recipients (1)" # behat_hooks::i_look_for_exceptions()
And I navigate to "Add a new badge" node in "Course administration > Badges" # behat_hooks::i_look_for_exceptions()
And I follow "Add a new badge" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Course Badge 2 |
| Description | Course badge description |
| issuername | Tester of course badge |
And I upload "badges/tests/behat/badge.png" file to "Image" filemanager # behat_hooks::i_look_for_exceptions()
And I press "Create badge" # behat_hooks::i_look_for_exceptions()
And I set the field "type" to "Manual issue by role" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I set the field "Teacher" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "All of the selected roles award the badge" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I press "Enable access" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I follow "Recipients (0)" # behat_hooks::i_look_for_exceptions()
And I press "Award badge" # behat_hooks::i_look_for_exceptions()
And I set the field "potentialrecipients[]" to "Student 2 (student2@example.com)" # behat_hooks::i_look_for_exceptions()
When I press "Award badge" # behat_hooks::i_look_for_exceptions()
And I follow "Course Badge 2" # behat_hooks::i_look_for_exceptions()
And I follow "Recipients (1)" # behat_hooks::i_look_for_exceptions()
Then I should see "Recipients (1)" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I trigger cron # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Profile" in the user menu # behat_hooks::i_look_for_exceptions()
When I click on "Course 1" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
Then I should see "Course Badge 1" # behat_hooks::i_look_for_exceptions()
And I should not see "Course Badge 2" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Profile" in the user menu # behat_hooks::i_look_for_exceptions()
When I click on "Course 1" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
Then I should see "Course Badge 2" # behat_hooks::i_look_for_exceptions()
Then I should not see "Course Badge 1" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Revoke badge # C:\Apache24\htdocs\integration\badges\tests\behat\award_badge.feature:315
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Add a new badge" node in "Course administration > Badges" # behat_hooks::i_look_for_exceptions()
And I follow "Add a new badge" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Course Badge |
| Description | Course badge description |
| issuername | Tester of course badge |
And I upload "badges/tests/behat/badge.png" file to "Image" filemanager # behat_hooks::i_look_for_exceptions()
And I press "Create badge" # behat_hooks::i_look_for_exceptions()
And I set the field "type" to "Manual issue by role" # behat_hooks::i_look_for_exceptions()
And I set the field "Teacher" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I press "Enable access" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I follow "Recipients (0)" # behat_hooks::i_look_for_exceptions()
And I press "Award badge" # behat_hooks::i_look_for_exceptions()
And I set the field "potentialrecipients[]" to "Student 2 (student2@example.com)" # behat_hooks::i_look_for_exceptions()
And I press "Award badge" # behat_hooks::i_look_for_exceptions()
And I set the field "potentialrecipients[]" to "Student 1 (student1@example.com)" # behat_hooks::i_look_for_exceptions()
When I press "Award badge" # behat_hooks::i_look_for_exceptions()
And I follow "Course Badge" # behat_hooks::i_look_for_exceptions()
Then I should see "Recipients (2)" # behat_hooks::i_look_for_exceptions()
And I follow "Recipients (2)" # behat_hooks::i_look_for_exceptions()
And I press "Award badge" # behat_hooks::i_look_for_exceptions()
And I set the field "existingrecipients[]" to "Student 2 (student2@example.com)" # behat_hooks::i_look_for_exceptions()
And I press "Revoke badge" # behat_hooks::i_look_for_exceptions()
And I set the field "existingrecipients[]" to "Student 1 (student1@example.com)" # behat_hooks::i_look_for_exceptions()
When I press "Revoke badge" # behat_hooks::i_look_for_exceptions()
And I follow "Course Badge" # behat_hooks::i_look_for_exceptions()
Then I should see "Recipients (0)" # behat_hooks::i_look_for_exceptions()
@qtype @qtype_ddimageortext
Feature: Test duplicating a quiz containing a drag and drop onto image question
As a teacher
In order re-use my courses containing drag and drop onto image questions
I need to be able to backup and restore them
Background: # C:\Apache24\htdocs\integration\question\type\ddimageortext\tests\behat\backup_and_restore.feature:7
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | template |
| Test questions | ddimageortext | Drag onto image | xsection |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | course | idnumber |
| quiz | Test quiz | C1 | quiz1 |
And quiz "Test quiz" contains the following questions: # behat_hooks::i_look_for_exceptions()
| Drag onto image | 1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Backup and restore a course containing a drag and drop onto image question # C:\Apache24\htdocs\integration\question\type\ddimageortext\tests\behat\backup_and_restore.feature:27
When I backup "Course 1" course using this options: # behat_hooks::i_look_for_exceptions()
| Confirmation | Filename | test_backup.mbz |
And I restore "test_backup.mbz" backup into a new course using this options: # behat_hooks::i_look_for_exceptions()
| Schema | Course name | Course 2 |
And I navigate to "Question bank" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I click on "Edit" "link" in the "Drag onto image" "table_row" # behat_hooks::i_look_for_exceptions()
Then the following fields match these values: # behat_hooks::i_look_for_exceptions()
| Question name | Drag onto image |
| General feedback | More information about the major features of the Earth's surface can be found in Block 3, Section 6.2.
|
| Default mark | 1 |
| Shuffle | 0 |
| id_drags_0_dragitemtype | Draggable text |
| id_drags_0_draggroup | 1 |
| id_draglabel_0 | island
arc |
| id_drags_1_dragitemtype | Draggable text |
| id_drags_1_draggroup | 1 |
| id_draglabel_1 | mid-ocean
ridge |
| id_drags_2_dragitemtype | Draggable text |
| id_drags_2_draggroup | 1 |
| id_draglabel_2 | abyssal
plain |
| id_drags_3_dragitemtype | Draggable text |
| id_drags_3_draggroup | 1 |
| id_draglabel_3 | continental
rise |
| id_drags_4_dragitemtype | Draggable text |
| id_drags_4_draggroup | 1 |
| id_draglabel_4 | ocean
trench |
| id_drags_5_dragitemtype | Draggable text |
| id_drags_5_draggroup | 1 |
| id_draglabel_5 | continental
slope |
| id_drags_6_dragitemtype | Draggable text |
| id_drags_6_draggroup | 1 |
| id_draglabel_6 | mountain
belt |
| id_drags_7_dragitemtype | Draggable text |
| id_drags_7_draggroup | 1 |
| id_draglabel_7 | continental
shelf |
| id_drops_0_xleft | 53 |
| id_drops_0_ytop | 17 |
| id_drops_0_choice | 7. mountainbelt |
| id_drops_1_xleft | 172 |
| id_drops_1_ytop | 2 |
| id_drops_1_choice | 8. continentalshelf |
| id_drops_2_xleft | 363 |
| id_drops_2_ytop | 31 |
| id_drops_2_choice | 5. oceantrench |
| id_drops_3_xleft | 440 |
| id_drops_3_ytop | 13 |
| id_drops_3_choice | 3. abyssalplain |
| id_drops_4_xleft | 115 |
| id_drops_4_ytop | 74 |
| id_drops_4_choice | 6. continentalslope |
| id_drops_5_xleft | 210 |
| id_drops_5_ytop | 94 |
| id_drops_5_choice | 4. continentalrise |
| id_drops_6_xleft | 310 |
| id_drops_6_ytop | 87 |
| id_drops_6_choice | 1. islandarc |
| id_drops_7_xleft | 479 |
| id_drops_7_ytop | 84 |
| id_drops_7_choice | 2. mid-oceanridge |
| For any correct response | Well done! |
| For any partially correct response | Parts, but only parts, of your response are correct. |
| id_shownumcorrect | 1 |
| For any incorrect response | That is not right at all. |
| Penalty for each incorrect try | 0.3333333 |
| Hint 1 | Incorrect placements will be removed. |
| id_hintclearwrong_0 | 1 |
| id_hintshownumcorrect_0 | 1 |
| id_hintclearwrong_1 | 0 |
| id_hintshownumcorrect_1 | 1 |
| Hint 3 | Incorrect placements will be removed. |
| id_hintclearwrong_2 | 1 |
| id_hintshownumcorrect_2 | 1 |
| id_hintclearwrong_3 | 0 |
| id_hintshownumcorrect_3 | 1 |
@qtype @qtype_ddmarker
Feature: Test duplicating a quiz containing a drag and drop markers question
As a teacher
In order re-use my courses containing drag and drop markers questions
I need to be able to backup and restore them
Background: # C:\Apache24\htdocs\integration\question\type\ddmarker\tests\behat\backup_and_restore.feature:7
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | template |
| Test questions | ddmarker | Drag markers | mkmap |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | course | idnumber |
| quiz | Test quiz | C1 | quiz1 |
And quiz "Test quiz" contains the following questions: # behat_hooks::i_look_for_exceptions()
| Drag markers | 1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Backup and restore a course containing a drag and drop markers question # C:\Apache24\htdocs\integration\question\type\ddmarker\tests\behat\backup_and_restore.feature:27
When I backup "Course 1" course using this options: # behat_hooks::i_look_for_exceptions()
| Confirmation | Filename | test_backup.mbz |
And I restore "test_backup.mbz" backup into a new course using this options: # behat_hooks::i_look_for_exceptions()
| Schema | Course name | Course 2 |
And I navigate to "Question bank" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I click on "Edit" "link" in the "Drag markers" "table_row" # behat_hooks::i_look_for_exceptions()
Then the following fields match these values: # behat_hooks::i_look_for_exceptions()
| Question name | Drag markers |
| Question text | Please place the markers on the map of Milton Keynes and be aware that there is more than one railway station. |
| General feedback | The Open University is at the junction of Brickhill Street and Groveway. There are three railway stations, Wolverton, Milton Keynes Central and Bletchley. |
| Default mark | 1 |
| id_shuffleanswers | 0 |
| id_drags_0_label | OU |
| id_drags_0_noofdrags | 1 |
| id_drags_1_label | Railway station |
| id_drags_1_noofdrags | 3 |
| id_drops_0_shape | Circle |
| id_drops_0_coords | 322,213;10 |
| id_drops_0_choice | OU |
| id_drops_1_shape | Circle |
| id_drops_1_coords | 144,84;10 |
| id_drops_1_choice | Railway station |
| id_drops_2_shape | Circle |
| id_drops_2_coords | 195,180;10 |
| id_drops_2_choice | Railway station |
| id_drops_3_shape | Circle |
| id_drops_3_coords | 267,302;10 |
| id_drops_3_choice | Railway station |
| For any correct response | Well done! |
| For any partially correct response | Parts, but only parts, of your response are correct. |
| id_shownumcorrect | 1 |
| For any incorrect response | That is not right at all. |
| Penalty for each incorrect try | 0.3333333 |
| Hint 1 | You are trying to place four markers on the map. |
| id_hintshownumcorrect_0 | 1 |
| id_hintclearwrong_0 | 0 |
| id_hintoptions_0 | 0 |
| Hint 2 | You are trying to mark three railway stations. |
| id_hintshownumcorrect_1 | 1 |
| id_hintclearwrong_1 | 1 |
| id_hintoptions_1 | 1 |
@qtype @qtype_ddwtos
Feature: Test duplicating a quiz containing a drag and drop into text question
As a teacher
In order re-use my courses containing drag and drop into text questions
I need to be able to backup and restore them
Background: # C:\Apache24\htdocs\integration\question\type\ddwtos\tests\behat\backup_and_restore.feature:7
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | template |
| Test questions | ddwtos | Drag to text | fox |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | course | idnumber |
| quiz | Test quiz | C1 | quiz1 |
And quiz "Test quiz" contains the following questions: # behat_hooks::i_look_for_exceptions()
| Drag to text | 1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Backup and restore a course containing a drag and drop into text question # C:\Apache24\htdocs\integration\question\type\ddwtos\tests\behat\backup_and_restore.feature:27
When I backup "Course 1" course using this options: # behat_hooks::i_look_for_exceptions()
| Confirmation | Filename | test_backup.mbz |
And I restore "test_backup.mbz" backup into a new course using this options: # behat_hooks::i_look_for_exceptions()
| Schema | Course name | Course 2 |
And I navigate to "Question bank" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I click on "Edit" "link" in the "Drag to text" "table_row" # behat_hooks::i_look_for_exceptions()
Then the following fields match these values: # behat_hooks::i_look_for_exceptions()
| Question name | Drag to text |
| Question text | The [[1]] brown [[2]] jumped over the [[3]] dog. |
| General feedback | This sentence uses each letter of the alphabet. |
| Default mark | 1 |
| Shuffle | 0 |
| id_choices_0_answer | quick |
| id_choices_0_choicegroup | 1 |
| id_choices_1_answer | fox |
| id_choices_1_choicegroup | 2 |
| id_choices_2_answer | lazy |
| id_choices_2_choicegroup | 3 |
| id_choices_3_answer | slow |
| id_choices_3_choicegroup | 1 |
| id_choices_4_answer | dog |
| id_choices_4_choicegroup | 2 |
| id_choices_5_answer | assiduous |
| id_choices_5_choicegroup | 3 |
| For any correct response | Well done! |
| For any partially correct response | Parts, but only parts, of your response are correct. |
| id_shownumcorrect | 0 |
| For any incorrect response | That is not right at all. |
@qtype @qtype_description
Feature: Test duplicating a quiz containing a Description question
As a teacher
In order re-use my courses containing Description questions
I need to be able to backup and restore them
Background: # C:\Apache24\htdocs\integration\question\type\description\tests\behat\backup_and_restore.feature:7
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | template |
| Test questions | description | description-001 | info |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | course | idnumber |
| quiz | Test quiz | C1 | quiz1 |
And quiz "Test quiz" contains the following questions: # behat_hooks::i_look_for_exceptions()
| description-001 | 1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Backup and restore a course containing a Description question # C:\Apache24\htdocs\integration\question\type\description\tests\behat\backup_and_restore.feature:27
When I backup "Course 1" course using this options: # behat_theme_boost_behat_backup::i_backup_course_using_this_options()
| Confirmation | Filename | test_backup.mbz |
Element is not clickable at point (357, 397.5). Other element would receive the click: c
Command duration or timeout: 484 milliseconds
Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'
System info: host: 'DESKTOP-PLNP405', ip: '172.20.255.45', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_101'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{applicationCacheEnabled=true, rotatable=false, handlesAlerts=true, databaseEnabled=true, version=47.0.1, platform=WINDOWS, nativeEvents=false, acceptSslCerts=true, webStorageEnabled=true, locationContextEnabled=true, browserName=firefox, takesScreenshot=true, javascriptEnabled=true, cssSelectorsEnabled=true}]
Session ID: 1bd70640-c48c-4b85-91a9-e4003d1f529b (WebDriver\Exception\UnknownError)
And I restore "test_backup.mbz" backup into a new course using this options: # behat_theme_boost_behat_backup::i_restore_backup_into_a_new_course_using_this_options()
| Schema | Course name | Course 2 |
And I navigate to "Question bank" node in "Course administration" # behat_theme_boost_behat_navigation::i_navigate_to_node_in()
And I click on "Edit" "link" in the "description-001" "table_row" # behat_general::i_click_on_in_the()
Then the following fields match these values: # behat_forms::the_following_fields_match_these_values()
| Question name | description-001 |
| Question text | Here is some information about the questions you are about to attempt. |
| General feedback | And here is some more text shown only on the review page. |
@qtype @qtype_essay
Feature: Test duplicating a quiz containing an Assay question
As a teacher
In order re-use my courses containing Essay questions
I need to be able to backup and restore them
Background: # C:\Apache24\htdocs\integration\question\type\essay\tests\behat\backup_and_restore.feature:7
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | template |
| Test questions | essay | essay-001 | editor |
| Test questions | essay | essay-002 | editorfilepicker |
| Test questions | essay | essay-003 | plain |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | course | idnumber |
| quiz | Test quiz | C1 | quiz1 |
And quiz "Test quiz" contains the following questions: # behat_hooks::i_look_for_exceptions()
| essay-001 | 1 |
| essay-002 | 1 |
| essay-003 | 1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Backup and restore a course containing 3 Essay questions # C:\Apache24\htdocs\integration\question\type\essay\tests\behat\backup_and_restore.feature:31
When I backup "Course 1" course using this options: # behat_hooks::i_look_for_exceptions()
| Confirmation | Filename | test_backup.mbz |
And I restore "test_backup.mbz" backup into a new course using this options: # behat_hooks::i_look_for_exceptions()
| Schema | Course name | Course 2 |
And I navigate to "Question bank" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I should see "essay-001" # behat_hooks::i_look_for_exceptions()
And I should see "essay-002" # behat_hooks::i_look_for_exceptions()
And I should see "essay-003" # behat_hooks::i_look_for_exceptions()
And I click on "Edit" "link" in the "essay-001" "table_row" # behat_hooks::i_look_for_exceptions()
Then the following fields match these values: # behat_hooks::i_look_for_exceptions()
| Question name | essay-001 |
| Question text | Please write a story about a frog. |
| General feedback | I hope your story had a beginning, a middle and an end. |
| Response format | HTML editor |
| Require text | Require the student to enter text |
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I click on "Edit" "link" in the "essay-002" "table_row" # behat_hooks::i_look_for_exceptions()
Then the following fields match these values: # behat_hooks::i_look_for_exceptions()
| Question name | essay-002 |
| Question text | Please write a story about a frog. |
| General feedback | I hope your story had a beginning, a middle and an end. |
| Response format | HTML editor with file picker |
| Require text | Require the student to enter text |
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I click on "Edit" "link" in the "essay-003" "table_row" # behat_hooks::i_look_for_exceptions()
Then the following fields match these values: # behat_hooks::i_look_for_exceptions()
| Question name | essay-003 |
| Question text | Please write a story about a frog. |
| General feedback | I hope your story had a beginning, a middle and an end. |
| Response format | Plain text |
| Require text | Require the student to enter text |
@qtype @qtype_match
Feature: Test duplicating a quiz containing a Matching question
As a teacher
In order re-use my courses containing Matching questions
I need to be able to backup and restore them
Background: # C:\Apache24\htdocs\integration\question\type\match\tests\behat\backup_and_restore.feature:7
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | template |
| Test questions | match | matching-001 | foursubq |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | course | idnumber |
| quiz | Test quiz | C1 | quiz1 |
And quiz "Test quiz" contains the following questions: # behat_hooks::i_look_for_exceptions()
| matching-001 | 1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Backup and restore a course containing a Matching question # C:\Apache24\htdocs\integration\question\type\match\tests\behat\backup_and_restore.feature:27
When I backup "Course 1" course using this options: # behat_hooks::i_look_for_exceptions()
| Confirmation | Filename | test_backup.mbz |
And I restore "test_backup.mbz" backup into a new course using this options: # behat_hooks::i_look_for_exceptions()
| Schema | Course name | Course 2 |
And I navigate to "Question bank" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I click on "Edit" "link" in the "matching-001" "table_row" # behat_hooks::i_look_for_exceptions()
Then the following fields match these values: # behat_hooks::i_look_for_exceptions()
| Question name | matching-001 |
| Question text | Classify the animals. |
| General feedback | General feedback. |
| Default mark | 1 |
| Shuffle | 1 |
| Question 1 | frog |
| Question 2 | cat |
| Question 3 | newt |
| Question 4 | |
| id_subanswers_0 | amphibian |
| id_subanswers_1 | mammal |
| id_subanswers_2 | amphibian |
| id_subanswers_3 | insect |
@qtype @qtype_multichoice
Feature: Test duplicating a quiz containing a Multiple choice question
As a teacher
In order re-use my courses containing Multiple choice questions
I need to be able to backup and restore them
Background: # C:\Apache24\htdocs\integration\question\type\multichoice\tests\behat\backup_and_restore.feature:7
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | template |
| Test questions | multichoice | Multi-choice-001 | two_of_four |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | course | idnumber |
| quiz | Test quiz | C1 | quiz1 |
And quiz "Test quiz" contains the following questions: # behat_hooks::i_look_for_exceptions()
| Multi-choice-001 | 1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Backup and restore a course containing a Multiple choice question # C:\Apache24\htdocs\integration\question\type\multichoice\tests\behat\backup_and_restore.feature:27
When I backup "Course 1" course using this options: # behat_hooks::i_look_for_exceptions()
| Confirmation | Filename | test_backup.mbz |
And I restore "test_backup.mbz" backup into a new course using this options: # behat_hooks::i_look_for_exceptions()
| Schema | Course name | Course 2 |
And I navigate to "Question bank" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I click on "Edit" "link" in the "Multi-choice-001" "table_row" # behat_hooks::i_look_for_exceptions()
Then the following fields match these values: # behat_hooks::i_look_for_exceptions()
| Question name | Multi-choice-001 |
| Question text | Which are the odd numbers? |
| General feedback | The odd numbers are One and Three. |
| Default mark | 1 |
| One or multiple answers? | Multiple answers allowed |
| Shuffle the choices? | 1 |
| Choice 1 | One |
| Choice 2 | Two |
| Choice 3 | Three |
| Choice 4 | Four |
| id_fraction_0 | 50% |
| id_fraction_1 | None |
| id_fraction_2 | 50% |
| id_fraction_3 | None |
| For any correct response | Well done! |
| For any partially correct response | Parts, but only parts, of your response are correct. |
| For any incorrect response | That is not right at all. |
@qtype @qtype_shortanswer
Feature: Test duplicating a quiz containing a Short answer question
As a teacher
In order re-use my courses containing Short answer questions
I need to be able to backup and restore them
Background: # C:\Apache24\htdocs\integration\question\type\shortanswer\tests\behat\backup_and_restore.feature:7
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | template |
| Test questions | shortanswer | shortanswer-001 | frogtoad |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | course | idnumber |
| quiz | Test quiz | C1 | quiz1 |
And quiz "Test quiz" contains the following questions: # behat_hooks::i_look_for_exceptions()
| shortanswer-001 | 1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Backup and restore a course containing a Short answer question # C:\Apache24\htdocs\integration\question\type\shortanswer\tests\behat\backup_and_restore.feature:27
When I backup "Course 1" course using this options: # behat_hooks::i_look_for_exceptions()
| Confirmation | Filename | test_backup.mbz |
And I restore "test_backup.mbz" backup into a new course using this options: # behat_hooks::i_look_for_exceptions()
| Schema | Course name | Course 2 |
And I navigate to "Question bank" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I click on "Edit" "link" in the "shortanswer-001" "table_row" # behat_hooks::i_look_for_exceptions()
Then the following fields match these values: # behat_hooks::i_look_for_exceptions()
| Question name | shortanswer-001 |
| Question text | Name an amphibian: __________ |
| General feedback | Generalfeedback: frog or toad would have been OK. |
| Default mark | 1 |
| Case sensitivity | No, case is unimportant |
| id_answer_0 | frog |
| id_fraction_0 | 100% |
| id_feedback_0 | Frog is a very good answer. |
| id_answer_1 | toad |
| id_fraction_1 | 80% |
| id_feedback_1 | Toad is an OK good answer. |
| id_answer_2 | * |
| id_fraction_2 | None |
| id_feedback_2 | That is a bad answer. |
@qtype @qtype_truefalse
Feature: Test duplicating a quiz containing a True/False question
As a teacher
In order re-use my courses containing True/False questions
I need to be able to backup and restore them
Background: # C:\Apache24\htdocs\integration\question\type\truefalse\tests\behat\backup_and_restore.feature:7
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | template |
| Test questions | truefalse | true-false-001 | true |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | course | idnumber |
| quiz | Test quiz | C1 | quiz1 |
And quiz "Test quiz" contains the following questions: # behat_hooks::i_look_for_exceptions()
| true-false-001 | 1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Backup and restore a course containing a True/False question # C:\Apache24\htdocs\integration\question\type\truefalse\tests\behat\backup_and_restore.feature:27
When I backup "Course 1" course using this options: # behat_hooks::i_look_for_exceptions()
| Confirmation | Filename | test_backup.mbz |
And I restore "test_backup.mbz" backup into a new course using this options: # behat_hooks::i_look_for_exceptions()
| Schema | Course name | Course 2 |
And I navigate to "Question bank" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I click on "Edit" "link" in the "true-false-001" "table_row" # behat_hooks::i_look_for_exceptions()
Then the following fields match these values: # behat_hooks::i_look_for_exceptions()
| Question name | true-false-001 |
| Question text | The answer is true. |
| Default mark | 1 |
| General feedback | You should have selected true. |
| Correct answer | True |
| Feedback for the response 'True'. | This is the right answer. |
| Feedback for the response 'False'. | This is the wrong answer. |
@mod @mod_quiz
Feature: Backup and restore of quizzes
In order to reuse my quizzes
As a teacher
I need to be able to back them up and restore them.
Background: # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\backup.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Duplicate a quiz with two questions # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\backup.feature:17
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber |
| quiz | Quiz 1 | For testing backup | C1 | quiz1 |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | TF1 | First question |
| Test questions | truefalse | TF2 | Second question |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page |
| TF1 | 1 |
| TF2 | 2 |
And I am on site homepage # behat_hooks::i_look_for_exceptions()
When I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I duplicate "Quiz 1" activity editing the new copy with: # behat_hooks::i_look_for_exceptions()
| Name | Quiz 2 |
And I follow "Quiz 2" # behat_hooks::i_look_for_exceptions()
And I click on "Edit quiz" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
Then I should see "TF1" # behat_hooks::i_look_for_exceptions()
And I should see "TF2" # behat_hooks::i_look_for_exceptions()
@javascript @_file_upload
Scenario: Restore a Moodle 2.8 quiz backup # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\backup.feature:40
And I am on site homepage # behat_hooks::i_look_for_exceptions()
When I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Restore" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I press "Manage backup files" # behat_hooks::i_look_for_exceptions()
And I upload "mod/quiz/tests/fixtures/moodle_28_quiz.mbz" file to "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I restore "moodle_28_quiz.mbz" backup into "Course 1" course using this options: # behat_hooks::i_look_for_exceptions()
And I follow "Restored Moodle 2.8 quiz" # behat_hooks::i_look_for_exceptions()
And I click on "Edit quiz" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
Then I should see "TF1" # behat_hooks::i_look_for_exceptions()
And I should see "TF2" # behat_hooks::i_look_for_exceptions()
@core @core_backup
Feature: Backup Moodle courses
In order to save and store course contents
As an admin
I need to create backups of courses
Background: # C:\Apache24\htdocs\integration\backup\util\ui\tests\behat\backup_courses.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | numsections |
| Course 1 | C1 | 0 | 10 |
| Course 2 | C2 | 0 | 2 |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | course | idnumber | name | intro | section |
| assign | C2 | assign1 | Test assign | Assign description | 1 |
| data | C2 | data1 | Test data | Database description | 2 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
Scenario: Backup a course providing options # C:\Apache24\htdocs\integration\backup\util\ui\tests\behat\backup_courses.feature:18
When I backup "Course 1" course using this options: # behat_hooks::i_look_for_exceptions()
| Confirmation | Filename | test_backup.mbz |
Then I should see "Restore" # behat_hooks::i_look_for_exceptions()
And I click on "Restore" "link" in the "test_backup.mbz" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "URL of backup" # behat_hooks::i_look_for_exceptions()
And I should see "Anonymize user information" # behat_hooks::i_look_for_exceptions()
Scenario: Backup a course with default options # C:\Apache24\htdocs\integration\backup\util\ui\tests\behat\backup_courses.feature:26
When I backup "Course 1" course using this options: # behat_hooks::i_look_for_exceptions()
| Initial | Include calendar events | 0 |
| Initial | Include course logs | 1 |
| Schema | Topic 5 | 0 |
| Confirmation | Filename | test_backup.mbz |
Then I should see "Restore" # behat_hooks::i_look_for_exceptions()
And I click on "Restore" "link" in the "test_backup.mbz" "table_row" # behat_hooks::i_look_for_exceptions()
And I should not see "Section 3" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I click on "Continue" "button" in the ".bcs-current-course" "css_element" # behat_hooks::i_look_for_exceptions()
And "//div[contains(concat(' ', normalize-space(@class), ' '), ' fitem ')][contains(., 'Include calendar events')]/descendant::img" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
And "Include course logs" "checkbox" should exist # behat_hooks::i_look_for_exceptions()
And I press "Next" # behat_hooks::i_look_for_exceptions()
Scenario: Backup a course without blocks # C:\Apache24\htdocs\integration\backup\util\ui\tests\behat\backup_courses.feature:41
When I backup "Course 1" course using this options: # behat_hooks::i_look_for_exceptions()
| 1 | setting_root_blocks | 0 |
Then I should see "Course backup area" # behat_hooks::i_look_for_exceptions()
Scenario: Backup selecting just one section # C:\Apache24\htdocs\integration\backup\util\ui\tests\behat\backup_courses.feature:46
When I backup "Course 2" course using this options: # behat_hooks::i_look_for_exceptions()
| Schema | Test data | 0 |
| Schema | Topic 2 | 0 |
| Confirmation | Filename | test_backup.mbz |
Then I should see "Course backup area" # behat_hooks::i_look_for_exceptions()
And I click on "Restore" "link" in the "test_backup.mbz" "table_row" # behat_hooks::i_look_for_exceptions()
And I should not see "Section 2" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I click on "Continue" "button" in the ".bcs-current-course" "css_element" # behat_hooks::i_look_for_exceptions()
And I press "Next" # behat_hooks::i_look_for_exceptions()
And I should see "Test assign" # behat_hooks::i_look_for_exceptions()
And I should not see "Test data" # behat_hooks::i_look_for_exceptions()
Scenario: Backup a course using the one click backup button # C:\Apache24\htdocs\integration\backup\util\ui\tests\behat\backup_courses.feature:60
When I perform a quick backup of course "Course 2" # behat_hooks::i_look_for_exceptions()
Then I should see "Restore course" # behat_hooks::i_look_for_exceptions()
And I should see "Course backup area" # behat_hooks::i_look_for_exceptions()
And I should see "backup-moodle2-course-" # behat_hooks::i_look_for_exceptions()
@tool @tool_recyclebin
Feature: Backup user data
As a teacher
I want user data to be backed up when I delete a course module
So that I can recover student content
Background: Course with teacher and student exist. # C:\Apache24\htdocs\integration\admin\tool\recyclebin\tests\behat\backup_user_data.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher@asd.com |
| student1 | Student | 1 | student@asd.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname |
| Course 1 | C1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| coursebinenable | 1 | tool_recyclebin |
| autohide | 0 | tool_recyclebin |
@javascript
Scenario: Delete and restore a quiz with user data # C:\Apache24\htdocs\integration\admin\tool\recyclebin\tests\behat\backup_user_data.feature:24
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Quiz" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Quiz 1 |
| Description | Test quiz description |
And I add a "True/False" question to the "Quiz 1" quiz with: # behat_hooks::i_look_for_exceptions()
| Question name | TF1 |
| Question text | First question |
| General feedback | Thank you, this is the general feedback |
| Correct answer | False |
| Feedback for the response 'True'. | So you think it is true |
| Feedback for the response 'False'. | So you think it is false |
And I add a "True/False" question to the "Quiz 1" quiz with: # behat_hooks::i_look_for_exceptions()
| Question name | TF2 |
| Question text | Second question |
| General feedback | Thank you, this is the general feedback |
| Correct answer | False |
| Feedback for the response 'True'. | So you think it is true |
| Feedback for the response 'False'. | So you think it is false |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I press "Attempt quiz now" # behat_hooks::i_look_for_exceptions()
And I click on "True" "radio" in the "First question" "question" # behat_hooks::i_look_for_exceptions()
And I click on "False" "radio" in the "Second question" "question" # behat_hooks::i_look_for_exceptions()
And I press "Finish attempt" # behat_hooks::i_look_for_exceptions()
And I press "Submit all and finish" # behat_hooks::i_look_for_exceptions()
And I click on "Submit all and finish" "button" in the "Confirmation" "dialogue" # behat_hooks::i_look_for_exceptions()
And I should see "5.00 out of 10.00" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I delete "Quiz 1" activity # behat_hooks::i_look_for_exceptions()
And I run all adhoc tasks # behat_hooks::i_look_for_exceptions()
And I navigate to "Recycle bin" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I should see "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I click on "Restore" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
When I go to "User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
Then "Quiz 1" row "Grade" column of "user-grade" table should contain "5" # behat_hooks::i_look_for_exceptions()
And "Quiz 1" row "Percentage" column of "user-grade" table should contain "50" # behat_hooks::i_look_for_exceptions()
@mod @mod_quiz
Feature: Basic use of the Grades report
In order to easily get an overview of quiz attempts
As a teacher
I need to use the Grades report
@javascript
Scenario: Using the Grades report # C:\Apache24\htdocs\integration\mod\quiz\report\overview\tests\behat\basic.feature:8
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | T1 | Teacher1 | teacher1@example.com | T1000 |
| student1 | S1 | Student1 | student1@example.com | S1000 |
| student2 | S2 | Student2 | student2@example.com | S2000 |
| student3 | S3 | Student3 | student3@example.com | S3000 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | TF1 | First question |
| Test questions | truefalse | TF2 | Second question |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page | maxmark |
| TF1 | 1 | |
| TF2 | 1 | 3.0 |
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I press "Attempt quiz now" # behat_hooks::i_look_for_exceptions()
And I click on "True" "radio" in the "First question" "question" # behat_hooks::i_look_for_exceptions()
And I click on "False" "radio" in the "Second question" "question" # behat_hooks::i_look_for_exceptions()
And I press "Finish attempt ..." # behat_hooks::i_look_for_exceptions()
And I press "Submit all and finish" # behat_hooks::i_look_for_exceptions()
And I click on "Submit all and finish" "button" in the "Confirmation" "dialogue" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I press "Attempt quiz now" # behat_hooks::i_look_for_exceptions()
And I click on "True" "radio" in the "First question" "question" # behat_hooks::i_look_for_exceptions()
And I click on "True" "radio" in the "Second question" "question" # behat_hooks::i_look_for_exceptions()
And I press "Finish attempt ..." # behat_hooks::i_look_for_exceptions()
And I press "Submit all and finish" # behat_hooks::i_look_for_exceptions()
And I click on "Submit all and finish" "button" in the "Confirmation" "dialogue" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Grades" node in "Quiz administration > Results" # behat_hooks::i_look_for_exceptions()
Then I should see "Attempts: 2" # behat_hooks::i_look_for_exceptions()
And I should see "25.00" in the "S1 Student1" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "100.00" in the "S2 Student2" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the field "Attempts from" to "enrolled users who have not attempted the quiz" # behat_hooks::i_look_for_exceptions()
And I press "Show report" # behat_hooks::i_look_for_exceptions()
And I should see "-" in the "T1 Teacher1" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "-" in the "S3 Student3" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the field "Attempts from" to "enrolled users who have, or have not, attempted the quiz" # behat_hooks::i_look_for_exceptions()
And I press "Show report" # behat_hooks::i_look_for_exceptions()
And I should see "25.00" in the "S1 Student1" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "100.00" in the "S2 Student2" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "-" in the "T1 Teacher1" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the field "Attempts from" to "all users who have attempted the quiz" # behat_hooks::i_look_for_exceptions()
And I press "Show report" # behat_hooks::i_look_for_exceptions()
And I should see "25.00" in the "S1 Student1" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "100.00" in the "S2 Student2" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the field with xpath "//tr[contains(normalize-space(.), 'student1@example.com')]//input[@type='checkbox']" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Regrade selected attempts" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "student1@example.com" # behat_hooks::i_look_for_exceptions()
And I set the field with xpath "//tr[contains(normalize-space(.), 'student1@example.com')]//input[@type='checkbox']" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Delete selected attempts" # behat_hooks::i_look_for_exceptions()
And I press "Yes" # behat_hooks::i_look_for_exceptions()
And I should not see "student1@example.com" # behat_hooks::i_look_for_exceptions()
@gradereport @gradereport_history @_bug_phantomjs
Feature: A teacher checks the grade history report in a course
In order to check the history of the grades
As a teacher
I need to check that the history report is correctly displaying changes
@javascript
Scenario: Check the history report displays results correctly # C:\Apache24\htdocs\integration\grade\report\history\tests\behat\basic_functionality.feature:8
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| teacher2 | Teacher | 2 | teacher2@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| teacher2 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | The greatest assignment ever |
| Description | Write a behat test for Moodle - it's amazing! |
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Rewarding assignment |
| Description | After writing your behat test go grab a beer! |
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "50.00" to the user "Student 1" for the grade item "The greatest assignment ever" # behat_hooks::i_look_for_exceptions()
And I give the grade "60.00" to the user "Student 1" for the grade item "Rewarding assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "50.00" to the user "Student 2" for the grade item "The greatest assignment ever" # behat_hooks::i_look_for_exceptions()
And I give the grade "60.00" to the user "Student 2" for the grade item "Rewarding assignment" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "70.00" to the user "Student 1" for the grade item "The greatest assignment ever" # behat_hooks::i_look_for_exceptions()
And I give the grade "80.00" to the user "Student 1" for the grade item "Rewarding assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "70.00" to the user "Student 2" for the grade item "The greatest assignment ever" # behat_hooks::i_look_for_exceptions()
And I give the grade "80.00" to the user "Student 2" for the grade item "Rewarding assignment" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Grade history" # behat_hooks::i_look_for_exceptions()
When I press "Submit" # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "gradereport_history" table: # behat_hooks::i_look_for_exceptions()
| First name/Surname | Grade item | Original grade | Revised grade | Grader |
| Student 1 | The greatest assignment ever | | 50.00 | Teacher 1 |
| Student 1 | Rewarding assignment | | 60.00 | Teacher 1 |
| Student 2 | The greatest assignment ever | | 50.00 | Teacher 1 |
| Student 2 | Rewarding assignment | | 60.00 | Teacher 1 |
| Student 1 | The greatest assignment ever | 50.00 | 70.00 | Teacher 2 |
| Student 1 | Rewarding assignment | 60.00 | 80.00 | Teacher 2 |
| Student 2 | The greatest assignment ever | 50.00 | 70.00 | Teacher 2 |
| Student 2 | Rewarding assignment | 60.00 | 80.00 | Teacher 2 |
And I press "Select users" # behat_hooks::i_look_for_exceptions()
And I set the field with xpath "//form/input[@class='usp-search-field']" to "Student 1" # behat_hooks::i_look_for_exceptions()
And I press "Search" # behat_hooks::i_look_for_exceptions()
And I set the field with xpath "//div[@class='usp-checkbox']/input" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Finish selecting users" # behat_hooks::i_look_for_exceptions()
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And the following should exist in the "gradereport_history" table: # behat_hooks::i_look_for_exceptions()
| First name/Surname | Grade item | Original grade | Revised grade | Grader |
| Student 1 | The greatest assignment ever | | 50.00 | Teacher 1 |
| Student 1 | Rewarding assignment | | 60.00 | Teacher 1 |
| Student 1 | The greatest assignment ever | 50.00 | 70.00 | Teacher 2 |
| Student 1 | Rewarding assignment | 60.00 | 80.00 | Teacher 2 |
And the following should not exist in the "gradereport_history" table: # behat_hooks::i_look_for_exceptions()
| Student 2 | The greatest assignment ever | | 50.00 | Teacher 1 |
| Student 2 | Rewarding assignment | | 60.00 | Teacher 1 |
| Student 2 | The greatest assignment ever | 50.00 | 70.00 | Teacher 2 |
| Student 2 | Rewarding assignment | 60.00 | 80.00 | Teacher 2 |
And I click on "The greatest assignment ever" "option" in the "#id_itemid" "css_element" # behat_hooks::i_look_for_exceptions()
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And the following should exist in the "gradereport_history" table: # behat_hooks::i_look_for_exceptions()
| First name/Surname | Grade item | Original grade | Revised grade | Grader |
| Student 1 | The greatest assignment ever | | 50.00 | Teacher 1 |
| Student 1 | The greatest assignment ever | 50.00 | 70.00 | Teacher 2 |
And the following should not exist in the "gradereport_history" table: # behat_hooks::i_look_for_exceptions()
| Student 1 | Rewarding assignment | | 60.00 | Teacher 1 |
| Student 1 | Rewarding assignment | 60.00 | 80.00 | Teacher 2 |
And I click on "Teacher 1" "option" in the "#id_grader" "css_element" # behat_hooks::i_look_for_exceptions()
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And the following should exist in the "gradereport_history" table: # behat_hooks::i_look_for_exceptions()
| First name/Surname | Grade item | Original grade | Revised grade | Grader |
| Student 1 | The greatest assignment ever | | 50.00 | Teacher 1 |
And the following should not exist in the "gradereport_history" table: # behat_hooks::i_look_for_exceptions()
| Student 1 | The greatest assignment ever | 50.00 | 70.00 | Teacher 2 |
And I click on "id_revisedonly" "checkbox" # behat_hooks::i_look_for_exceptions()
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And the following should exist in the "gradereport_history" table: # behat_hooks::i_look_for_exceptions()
| First name/Surname | Grade item | Original grade | Revised grade | Grader |
| Student 1 | The greatest assignment ever | | 50.00 | Teacher 1 |
@tool @tool_recyclebin
Feature: Basic recycle bin functionality
As a teacher
I want be able to recover deleted content and manage the recycle bin content
So that I can fix an accidental deletion and clean the recycle bin
Background: Course with teacher exists. # C:\Apache24\htdocs\integration\admin\tool\recyclebin\tests\behat\basic_functionality.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher@asd.com |
| student1 | Student | 1 | student@asd.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname |
| Course 1 | C1 |
| Course 2 | C2 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| coursebinenable | 1 | tool_recyclebin |
| categorybinenable | 1 | tool_recyclebin |
| coursebinexpiry | 604800 | tool_recyclebin |
| categorybinexpiry | 1209600 | tool_recyclebin |
| autohide | 0 | tool_recyclebin |
Scenario: Restore a deleted assignment # C:\Apache24\htdocs\integration\admin\tool\recyclebin\tests\behat\basic_functionality.feature:26
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assign |
| Description | Test |
And I delete "Test assign" activity # behat_hooks::i_look_for_exceptions()
When I navigate to "Recycle bin" node in "Course administration" # behat_hooks::i_look_for_exceptions()
Then I should see "Test assign" # behat_hooks::i_look_for_exceptions()
And I should see "Contents will be permanently deleted after 7 days" # behat_hooks::i_look_for_exceptions()
And I click on "Restore" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I should see "'Test assign' has been restored" # behat_hooks::i_look_for_exceptions()
And I wait to be redirected # behat_hooks::i_look_for_exceptions()
And I am on homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Test assign" in the "Topic 1" "section" # behat_hooks::i_look_for_exceptions()
Scenario: Restore a deleted course # C:\Apache24\htdocs\integration\admin\tool\recyclebin\tests\behat\basic_functionality.feature:44
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I click on "delete" action for "Course 2" in management course listing # behat_hooks::i_look_for_exceptions()
And I press "Delete" # behat_hooks::i_look_for_exceptions()
And I should see "Deleting C2" # behat_hooks::i_look_for_exceptions()
And I should see "C2 has been completely deleted" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I should not see "Course 2" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
When I navigate to "Recycle bin" node in "Category: Miscellaneous" # behat_hooks::i_look_for_exceptions()
Then I should see "Course 2" # behat_hooks::i_look_for_exceptions()
And I should see "Contents will be permanently deleted after 14 days" # behat_hooks::i_look_for_exceptions()
And I click on "Restore" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I should see "'Course 2' has been restored" # behat_hooks::i_look_for_exceptions()
And I wait to be redirected # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I should see "Course 2" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Deleting a single item from the recycle bin # C:\Apache24\htdocs\integration\admin\tool\recyclebin\tests\behat\basic_functionality.feature:64
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assign |
| Description | Test |
And I delete "Test assign" activity # behat_hooks::i_look_for_exceptions()
And I run all adhoc tasks # behat_hooks::i_look_for_exceptions()
And I navigate to "Recycle bin" node in "Course administration" # behat_hooks::i_look_for_exceptions()
When I click on "Delete" "link" # behat_hooks::i_look_for_exceptions()
Then I should see "Are you sure you want to delete the selected item from the recycle bin?" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I should see "Test assign" # behat_hooks::i_look_for_exceptions()
And I click on "Delete" "link" # behat_hooks::i_look_for_exceptions()
And I press "Yes" # behat_hooks::i_look_for_exceptions()
And I should see "'Test assign' has been deleted" # behat_hooks::i_look_for_exceptions()
And I should see "There are no items in the recycle bin." # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Deleting all the items from the recycle bin # C:\Apache24\htdocs\integration\admin\tool\recyclebin\tests\behat\basic_functionality.feature:84
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assign 1 |
| Description | Test 1 |
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assign 2 |
| Description | Test 2 |
And I delete "Test assign 1" activity # behat_hooks::i_look_for_exceptions()
And I delete "Test assign 2" activity # behat_hooks::i_look_for_exceptions()
And I run all adhoc tasks # behat_hooks::i_look_for_exceptions()
And I navigate to "Recycle bin" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I should see "Test assign 1" # behat_hooks::i_look_for_exceptions()
And I should see "Test assign 2" # behat_hooks::i_look_for_exceptions()
When I click on "Delete all" "link" # behat_hooks::i_look_for_exceptions()
Then I should see "Are you sure you want to delete all items from the recycle bin?" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I should see "Test assign 1" # behat_hooks::i_look_for_exceptions()
And I should see "Test assign 2" # behat_hooks::i_look_for_exceptions()
And I click on "Delete all" "link" # behat_hooks::i_look_for_exceptions()
And I press "Yes" # behat_hooks::i_look_for_exceptions()
And I should see "Recycle bin has been emptied" # behat_hooks::i_look_for_exceptions()
And I should see "There are no items in the recycle bin." # behat_hooks::i_look_for_exceptions()
@enrol @enrol_lti
Feature: Check that settings are adhered to when creating an enrolment plugin
In order to create an LTI enrolment instance
As an admin
I need to ensure the site-wide settings are used
Background: # C:\Apache24\htdocs\integration\enrol\lti\tests\behat\basic_settings.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "Manage enrol plugins" node in "Site administration > Plugins > Enrolments" # behat_hooks::i_look_for_exceptions()
And I click on "Enable" "link" in the "Publish as LTI tool" "table_row" # behat_hooks::i_look_for_exceptions()
And I navigate to "Publish as LTI tool" node in "Site administration > Plugins > Enrolments" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Email display | Allow everyone to see my email address |
| City/town | Perth |
| Select a country | Australia |
| Timezone | Australia/Perth |
| Institution | Moodle Pty Ltd |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: As an admin set site-wide settings for the enrolment plugin and ensure they are used # C:\Apache24\htdocs\integration\enrol\lti\tests\behat\basic_settings.feature:31
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Enrolment methods" node in "Course administration > Users" # behat_hooks::i_look_for_exceptions()
And I select "Publish as LTI tool" from the "Add method" singleselect # behat_hooks::i_look_for_exceptions()
When I expand all fieldsets # behat_hooks::i_look_for_exceptions()
Then the field "Email display" matches value "Allow everyone to see my email address" # behat_hooks::i_look_for_exceptions()
And the field "City/town" matches value "Perth" # behat_hooks::i_look_for_exceptions()
And the field "Select a country" matches value "Australia" # behat_hooks::i_look_for_exceptions()
And the field "Timezone" matches value "Australia/Perth" # behat_hooks::i_look_for_exceptions()
And the field "Institution" matches value "Moodle Pty Ltd" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Email display | Hide my email address from everyone |
| City/town | Whistler |
| Select a country | Canada |
| Timezone | America/Vancouver |
| Institution | Moodle Pty Ltd - remote |
And I press "Add method" # behat_hooks::i_look_for_exceptions()
And I click on "Edit" "link" in the "Publish as LTI tool" "table_row" # behat_hooks::i_look_for_exceptions()
And the field "Email display" matches value "Hide my email address from everyone" # behat_hooks::i_look_for_exceptions()
And the field "City/town" matches value "Whistler" # behat_hooks::i_look_for_exceptions()
And the field "Select a country" matches value "Canada" # behat_hooks::i_look_for_exceptions()
And the field "Timezone" matches value "America/Vancouver" # behat_hooks::i_look_for_exceptions()
And the field "Institution" matches value "Moodle Pty Ltd - remote" # behat_hooks::i_look_for_exceptions()
@qtype @qtype_gapselect @_switch_window
Feature: Test all the basic functionality of this question type
In order to evaluate students responses, As a teacher I need to
create and preview gapselect (Select missing words) questions.
Background: # C:\Apache24\htdocs\integration\question\type\gapselect\tests\behat\basic_test.feature:6
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@moodle.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
@javascript
Scenario: Create, edit then preview a gapselect question. # C:\Apache24\htdocs\integration\question\type\gapselect\tests\behat\basic_test.feature:18
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Question bank" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I add a "Select missing words" question filling the form with: # behat_hooks::i_look_for_exceptions()
| Question name | Select missing words 001 |
| Question text | The [[1]] [[2]] on the [[3]]. |
| General feedback | The cat sat on the mat. |
| id_choices_0_answer | cat |
| id_choices_1_answer | sat |
| id_choices_2_answer | mat |
| id_choices_3_answer | dog |
| id_choices_4_answer | table |
| Hint 1 | First hint |
| Hint 2 | Second hint |
Then I should see "Select missing words 001" # behat_hooks::i_look_for_exceptions()
When I click on "Preview" "link" in the "Select missing words 001" "table_row" # behat_hooks::i_look_for_exceptions()
And I switch to "questionpreview" window # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| How questions behave | Interactive with multiple tries |
| Marked out of | 3 |
| Marks | Show mark and max |
| Specific feedback | Shown |
| Right answer | Shown |
And I press "Start again with these options" # behat_hooks::i_look_for_exceptions()
And I set space "1" to "cat" in the select missing words question # behat_hooks::i_look_for_exceptions()
And I set space "2" to "sat" in the select missing words question # behat_hooks::i_look_for_exceptions()
And I set space "3" to "mat" in the select missing words question # behat_hooks::i_look_for_exceptions()
And I press "Check" # behat_hooks::i_look_for_exceptions()
Then I should see "Your answer is correct" # behat_hooks::i_look_for_exceptions()
And I should see "The cat sat on the mat" # behat_hooks::i_look_for_exceptions()
And I should see "The correct answer is: The [cat] [sat] on the [mat]." # behat_hooks::i_look_for_exceptions()
And I press "Start again" # behat_hooks::i_look_for_exceptions()
And I set space "1" to "cat" in the select missing words question # behat_hooks::i_look_for_exceptions()
And I set space "2" to "sat" in the select missing words question # behat_hooks::i_look_for_exceptions()
And I set space "3" to "dog" in the select missing words question # behat_hooks::i_look_for_exceptions()
And I press "Check" # behat_hooks::i_look_for_exceptions()
Then I should see "Your answer is partially correct" # behat_hooks::i_look_for_exceptions()
And I should see "First hint" # behat_hooks::i_look_for_exceptions()
When I press "Try again" # behat_hooks::i_look_for_exceptions()
And I set space "3" to "table" in the select missing words question # behat_hooks::i_look_for_exceptions()
And I press "Check" # behat_hooks::i_look_for_exceptions()
Then I should see "Your answer is partially correct" # behat_hooks::i_look_for_exceptions()
And I should see "Second hint" # behat_hooks::i_look_for_exceptions()
When I press "Try again" # behat_hooks::i_look_for_exceptions()
And I set space "3" to "mat" in the select missing words question # behat_hooks::i_look_for_exceptions()
And I press "Check" # behat_hooks::i_look_for_exceptions()
Then I should see "Your answer is correct" # behat_hooks::i_look_for_exceptions()
And I should see "The cat sat on the mat" # behat_hooks::i_look_for_exceptions()
And I should see "The correct answer is: The [cat] [sat] on the [mat]." # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| behaviour | immediatefeedback |
And I press "Start again with these options" # behat_hooks::i_look_for_exceptions()
When I press "Check" # behat_hooks::i_look_for_exceptions()
Then I should see "Please put an answer in each box." # behat_hooks::i_look_for_exceptions()
And I set space "1" to "cat" in the select missing words question # behat_hooks::i_look_for_exceptions()
And I set space "2" to "sat" in the select missing words question # behat_hooks::i_look_for_exceptions()
And I set space "3" to "mat" in the select missing words question # behat_hooks::i_look_for_exceptions()
And I press "Check" # behat_hooks::i_look_for_exceptions()
Then I should see "Your answer is correct" # behat_hooks::i_look_for_exceptions()
And I should see "The cat sat on the mat" # behat_hooks::i_look_for_exceptions()
And I should see "The correct answer is: The [cat] [sat] on the [mat]." # behat_hooks::i_look_for_exceptions()
And I press "Start again" # behat_hooks::i_look_for_exceptions()
And I set space "1" to "dog" in the select missing words question # behat_hooks::i_look_for_exceptions()
And I set space "2" to "sat" in the select missing words question # behat_hooks::i_look_for_exceptions()
And I set space "3" to "cat" in the select missing words question # behat_hooks::i_look_for_exceptions()
And I press "Check" # behat_hooks::i_look_for_exceptions()
Then I should see "Your answer is partially correct" # behat_hooks::i_look_for_exceptions()
And I should see "You have correctly selected 1." # behat_hooks::i_look_for_exceptions()
And I should see "The cat sat on the mat" # behat_hooks::i_look_for_exceptions()
And I should see "The correct answer is: The [cat] [sat] on the [mat]." # behat_hooks::i_look_for_exceptions()
And I press "Start again" # behat_hooks::i_look_for_exceptions()
And I set space "1" to "mat" in the select missing words question # behat_hooks::i_look_for_exceptions()
And I set space "2" to "cat" in the select missing words question # behat_hooks::i_look_for_exceptions()
And I set space "3" to "sat" in the select missing words question # behat_hooks::i_look_for_exceptions()
And I press "Check" # behat_hooks::i_look_for_exceptions()
Then I should see "Your answer is incorrect" # behat_hooks::i_look_for_exceptions()
And I should see "The cat sat on the mat" # behat_hooks::i_look_for_exceptions()
And I should see "The correct answer is: The [cat] [sat] on the [mat]." # behat_hooks::i_look_for_exceptions()
And I switch to the main window # behat_hooks::i_look_for_exceptions()
When I log out # behat_hooks::i_look_for_exceptions()
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
When I backup "Course 1" course using this options: # behat_hooks::i_look_for_exceptions()
| Confirmation | Filename | test_backup.mbz |
When I restore "test_backup.mbz" backup into a new course using this options: # behat_hooks::i_look_for_exceptions()
| Schema | Course name | Course 2 |
Then I should see "Course 2" # behat_hooks::i_look_for_exceptions()
When I navigate to "Question bank" node in "Course administration" # behat_hooks::i_look_for_exceptions()
Then I should see "Select missing words 001" # behat_hooks::i_look_for_exceptions()
When I click on "Edit" "link" in the "Select missing words 001" "table_row" # behat_hooks::i_look_for_exceptions()
Then the following fields match these values: # behat_hooks::i_look_for_exceptions()
| Question name | Select missing words 001 |
| Question text | The [[1]] [[2]] on the [[3]]. |
| General feedback | The cat sat on the mat. |
| id_choices_0_answer | cat |
| id_choices_1_answer | sat |
| id_choices_2_answer | mat |
| id_choices_3_answer | dog |
| id_choices_4_answer | table |
| Hint 1 | First hint |
| Hint 2 | Second hint |
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Question name | Edited question name |
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Edited question name" # behat_hooks::i_look_for_exceptions()
@block @block_activity_modules
Feature: Block activity modules
In order to overview activity modules in a course
As a manager
I can add activities block in a course or on the frontpage
Scenario: Add activities block on the frontpage # C:\Apache24\htdocs\integration\blocks\activity_modules\tests\behat\block_activity_modules.feature:7
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber |
| assign | Frontpage assignment name | Frontpage assignment description | Acceptance test site | assign0 |
| book | Frontpage book name | Frontpage book description | Acceptance test site | book0 |
| chat | Frontpage chat name | Frontpage chat description | Acceptance test site | chat0 |
| choice | Frontpage choice name | Frontpage choice description | Acceptance test site | choice0 |
| data | Frontpage database name | Frontpage database description | Acceptance test site | data0 |
| feedback | Frontpage feedback name | Frontpage feedback description | Acceptance test site | feedback0 |
| forum | Frontpage forum name | Frontpage forum description | Acceptance test site | forum0 |
| label | Frontpage label name | Frontpage label description | Acceptance test site | label0 |
| lti | Frontpage lti name | Frontpage lti description | Acceptance test site | lti0 |
| page | Frontpage page name | Frontpage page description | Acceptance test site | page0 |
| quiz | Frontpage quiz name | Frontpage quiz description | Acceptance test site | quiz0 |
| resource | Frontpage resource name | Frontpage resource description | Acceptance test site | resource0 |
| imscp | Frontpage imscp name | Frontpage imscp description | Acceptance test site | imscp0 |
| folder | Frontpage folder name | Frontpage folder description | Acceptance test site | folder0 |
| glossary | Frontpage glossary name | Frontpage glossary description | Acceptance test site | glossary0 |
| scorm | Frontpage scorm name | Frontpage scorm description | Acceptance test site | scorm0 |
| lesson | Frontpage lesson name | Frontpage lesson description | Acceptance test site | lesson0 |
| survey | Frontpage survey name | Frontpage survey description | Acceptance test site | survey0 |
| url | Frontpage url name | Frontpage url description | Acceptance test site | url0 |
| wiki | Frontpage wiki name | Frontpage wiki description | Acceptance test site | wiki0 |
| workshop | Frontpage workshop name | Frontpage workshop description | Acceptance test site | workshop0 |
When I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Turn editing on" # behat_hooks::i_look_for_exceptions()
And I add the "Activities" block # behat_hooks::i_look_for_exceptions()
And I click on "Assignments" "link" in the "Activities" "block" # behat_hooks::i_look_for_exceptions()
Then I should see "Frontpage assignment name" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I click on "Chats" "link" in the "Activities" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Frontpage chat name" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I click on "Choices" "link" in the "Activities" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Frontpage choice name" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I click on "Databases" "link" in the "Activities" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Frontpage database name" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I click on "Feedback" "link" in the "Activities" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Frontpage feedback name" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I click on "Forums" "link" in the "Activities" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Frontpage forum name" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I click on "External tools" "link" in the "Activities" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Frontpage lti name" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I click on "Quizzes" "link" in the "Activities" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Frontpage quiz name" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I click on "Glossaries" "link" in the "Activities" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Frontpage glossary name" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I click on "SCORM packages" "link" in the "Activities" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Frontpage scorm name" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I click on "Lessons" "link" in the "Activities" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Frontpage lesson name" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I click on "Wikis" "link" in the "Activities" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Frontpage wiki name" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I click on "Workshop" "link" in the "Activities" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Frontpage workshop name" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I click on "Resources" "link" in the "Activities" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Frontpage book name" # behat_hooks::i_look_for_exceptions()
And I should see "Frontpage page name" # behat_hooks::i_look_for_exceptions()
And I should see "Frontpage resource name" # behat_hooks::i_look_for_exceptions()
And I should see "Frontpage imscp name" # behat_hooks::i_look_for_exceptions()
And I should see "Frontpage folder name" # behat_hooks::i_look_for_exceptions()
And I should see "Frontpage url name" # behat_hooks::i_look_for_exceptions()
Scenario: Add activities block in a course # C:\Apache24\htdocs\integration\blocks\activity_modules\tests\behat\block_activity_modules.feature:83
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber |
| assign | Test assignment name | Test assignment description | C1 | assign1 |
| book | Test book name | Test book description | C1 | book1 |
| chat | Test chat name | Test chat description | C1 | chat1 |
| choice | Test choice name | Test choice description | C1 | choice1 |
| data | Test database name | Test database description | C1 | data1 |
| feedback | Test feedback name | Test feedback description | C1 | feedback1 |
| folder | Test folder name | Test folder description | C1 | folder1 |
| forum | Test forum name | Test forum description | C1 | forum1 |
| glossary | Test glossary name | Test glossary description | C1 | glossary1 |
| imscp | Test imscp name | Test imscp description | C1 | imscp1 |
| label | Test label name | Test label description | C1 | label1 |
| lesson | Test lesson name | Test lesson description | C1 | lesson1 |
| lti | Test lti name | Test lti description | C1 | lti1 |
| page | Test page name | Test page description | C1 | page1 |
| quiz | Test quiz name | Test quiz description | C1 | quiz1 |
| resource | Test resource name | Test resource description | C1 | resource1 |
| scorm | Test scorm name | Test scorm description | C1 | scorm1 |
| survey | Test survey name | Test survey description | C1 | survey1 |
| url | Test url name | Test url description | C1 | url1 |
| wiki | Test wiki name | Test wiki description | C1 | wiki1 |
| workshop | Test workshop name | Test workshop description | C1 | workshop1 |
When I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I follow "Courses" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Activities" block # behat_hooks::i_look_for_exceptions()
And I click on "Assignments" "link" in the "Activities" "block" # behat_hooks::i_look_for_exceptions()
Then I should see "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I click on "Chats" "link" in the "Activities" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Test chat name" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I click on "Choices" "link" in the "Activities" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Test choice name" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I click on "Databases" "link" in the "Activities" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Test database name" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I click on "Feedback" "link" in the "Activities" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Test feedback name" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I click on "Forums" "link" in the "Activities" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Test forum name" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I click on "External tools" "link" in the "Activities" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Test lti name" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I click on "Quizzes" "link" in the "Activities" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Test quiz name" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I click on "Glossaries" "link" in the "Activities" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Test glossary name" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I click on "SCORM packages" "link" in the "Activities" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Test scorm name" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I click on "Lessons" "link" in the "Activities" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I click on "Wikis" "link" in the "Activities" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Test wiki name" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I click on "Workshop" "link" in the "Activities" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Test workshop name" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I click on "Resources" "link" in the "Activities" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Test book name" # behat_hooks::i_look_for_exceptions()
And I should see "Test page name" # behat_hooks::i_look_for_exceptions()
And I should see "Test resource name" # behat_hooks::i_look_for_exceptions()
And I should see "Test imscp name" # behat_hooks::i_look_for_exceptions()
And I should see "Test folder name" # behat_hooks::i_look_for_exceptions()
And I should see "Test url name" # behat_hooks::i_look_for_exceptions()
@block @block_badges
Feature: Enable Block Badges in a course without badges
In order to view the badges block in a course
As a teacher
I can add badges block to a course and view the contents
Background: # C:\Apache24\htdocs\integration\blocks\badges\tests\behat\block_badges.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
Scenario: Add the block to a the course when badges are disabled # C:\Apache24\htdocs\integration\blocks\badges\tests\behat\block_badges.feature:18
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| enablebadges | 0 |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
When I add the "Latest badges" block # behat_hooks::i_look_for_exceptions()
Then I should see "Badges are not enabled on this site." in the "Latest badges" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Add the block to a the course when badges are enabled # C:\Apache24\htdocs\integration\blocks\badges\tests\behat\block_badges.feature:29
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
When I add the "Latest badges" block # behat_hooks::i_look_for_exceptions()
Then I should see "You have no badges to display" in the "Latest badges" "block" # behat_hooks::i_look_for_exceptions()
@block @block_badges @core_badges @_file_upload @javascript
Feature: Enable Block Badges in a course
In order to enable the badges block in a course
As a teacher
I can add badges block to a course
Background: # C:\Apache24\htdocs\integration\blocks\badges\tests\behat\block_badges_course.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Add a new badge" node in "Course administration > Badges" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_name | Badge 1 |
| id_description | Badge 1 |
| id_issuername | Teacher 1 |
And I upload "blocks/badges/tests/fixtures/badge.png" file to "Image" filemanager # behat_hooks::i_look_for_exceptions()
And I press "Create badge" # behat_hooks::i_look_for_exceptions()
And I select "Manual issue by role" from the "Add badge criteria" singleselect # behat_hooks::i_look_for_exceptions()
And I set the field "Teacher" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I press "Enable access" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I follow "Recipients (0)" # behat_hooks::i_look_for_exceptions()
And I press "Award badge" # behat_hooks::i_look_for_exceptions()
And I set the field "potentialrecipients[]" to "Teacher 1 (teacher1@example.com)" # behat_hooks::i_look_for_exceptions()
And I press "Award badge" # behat_hooks::i_look_for_exceptions()
And I navigate to "Add a new badge" node in "Course administration > Badges" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_name | Badge 2 |
| id_description | Badge 2 |
| id_issuername | Teacher 1 |
And I upload "blocks/badges/tests/fixtures/badge.png" file to "Image" filemanager # behat_hooks::i_look_for_exceptions()
And I press "Create badge" # behat_hooks::i_look_for_exceptions()
And I select "Manual issue by role" from the "Add badge criteria" singleselect # behat_hooks::i_look_for_exceptions()
And I set the field "Teacher" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I press "Enable access" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I follow "Recipients (0)" # behat_hooks::i_look_for_exceptions()
And I press "Award badge" # behat_hooks::i_look_for_exceptions()
And I set the field "potentialrecipients[]" to "Teacher 1 (teacher1@example.com)" # behat_hooks::i_look_for_exceptions()
And I press "Award badge" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Add the recent badges block to a course. # C:\Apache24\htdocs\integration\blocks\badges\tests\behat\block_badges_course.feature:55
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
When I add the "Latest badges" block # behat_hooks::i_look_for_exceptions()
Then I should see "Badge 1" in the "Latest badges" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Badge 2" in the "Latest badges" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Add the recent badges block to a course and limit it to only display 1 badge. # C:\Apache24\htdocs\integration\blocks\badges\tests\behat\block_badges_course.feature:63
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
When I add the "Latest badges" block # behat_hooks::i_look_for_exceptions()
And I configure the "Latest badges" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_numberofbadges | 1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Badge 2" in the "Latest badges" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Badge 1" in the "Latest badges" "block" # behat_hooks::i_look_for_exceptions()
@block @block_badges @core_badges @_file_upload @javascript
Feature: Enable Block Badges on the dashboard and view awarded badges
In order to view recent badges on the dashboard
As a teacher
I can add badges block to the dashboard
Scenario: Add the recent badges block to a course. # C:\Apache24\htdocs\integration\blocks\badges\tests\behat\block_badges_dashboard.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Add a new badge" node in "Course administration > Badges" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_name | Badge 1 |
| id_description | Badge 1 |
| id_issuername | Teacher 1 |
And I upload "blocks/badges/tests/fixtures/badge.png" file to "Image" filemanager # behat_hooks::i_look_for_exceptions()
And I press "Create badge" # behat_hooks::i_look_for_exceptions()
And I select "Manual issue by role" from the "Add badge criteria" singleselect # behat_hooks::i_look_for_exceptions()
And I set the field "Teacher" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I press "Enable access" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I follow "Recipients (0)" # behat_hooks::i_look_for_exceptions()
And I press "Award badge" # behat_hooks::i_look_for_exceptions()
And I set the field "potentialrecipients[]" to "Teacher 1 (teacher1@example.com)" # behat_hooks::i_look_for_exceptions()
And I press "Award badge" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I click on "Dashboard" "link" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
Then I should see "Badge 1" in the "Latest badges" "block" # behat_hooks::i_look_for_exceptions()
@block @block_badges @core_badges @_file_upload @javascript
Feature: Enable Block Badges on the frontpage and view awarded badges
In order to enable the badges block on the frontpage
As a admin
I can add badges block to the frontpage
Scenario: Add the recent badges block on the frontpage and view recent badges # C:\Apache24\htdocs\integration\blocks\badges\tests\behat\block_badges_frontpage.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I navigate to "Turn editing on" node in "Front page settings" # behat_hooks::i_look_for_exceptions()
And I add the "Latest badges" block # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Add a new badge" node in "Course administration > Badges" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_name | Badge 1 |
| id_description | Badge 1 |
| id_issuername | Teacher 1 |
And I upload "blocks/badges/tests/fixtures/badge.png" file to "Image" filemanager # behat_hooks::i_look_for_exceptions()
And I press "Create badge" # behat_hooks::i_look_for_exceptions()
And I select "Manual issue by role" from the "Add badge criteria" singleselect # behat_hooks::i_look_for_exceptions()
And I set the field "Teacher" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I press "Enable access" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I follow "Recipients (0)" # behat_hooks::i_look_for_exceptions()
And I press "Award badge" # behat_hooks::i_look_for_exceptions()
And I set the field "potentialrecipients[]" to "Teacher 1 (teacher1@example.com)" # behat_hooks::i_look_for_exceptions()
And I press "Award badge" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
Then I should see "Badge 1" in the "Latest badges" "block" # behat_hooks::i_look_for_exceptions()
@block @block_blog_menu
Feature: Enable Block blog menu in an activity
In order to enable the blog menu in an activity
As a teacher
I can add blog menu block to a course
Background: # C:\Apache24\htdocs\integration\blocks\blog_menu\tests\behat\block_blog_menu_activity.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
| student1 | Student | 1 | student1@example.com | S1 |
| student2 | Student | 2 | student2@example.com | S2 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment 1 |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
And I follow "Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I add the "Blog menu" block # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Students use the blog menu block to post blogs # C:\Apache24\htdocs\integration\blocks\blog_menu\tests\behat\block_blog_menu_activity.feature:32
Given I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I follow "Add a new entry" # behat_hooks::i_look_for_exceptions()
When I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S1 First Blog |
| Blog entry body | This is my awesome blog! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "S1 First Blog" # behat_hooks::i_look_for_exceptions()
And I should see "This is my awesome blog!" # behat_hooks::i_look_for_exceptions()
And I follow "Dashboard" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I follow "Blog entries" # behat_hooks::i_look_for_exceptions()
And I should see "S1 First Blog" # behat_hooks::i_look_for_exceptions()
And I should see "This is my awesome blog!" # behat_hooks::i_look_for_exceptions()
Scenario: Students use the blog menu block to view their blogs about the activity # C:\Apache24\htdocs\integration\blocks\blog_menu\tests\behat\block_blog_menu_activity.feature:50
Given I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I follow "Add an entry about this Assignment" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S1 First Blog |
| Blog entry body | This is my awesome blog about this Assignment! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "S1 First Blog" # behat_hooks::i_look_for_exceptions()
And I should see "This is my awesome blog about this Assignment!" # behat_hooks::i_look_for_exceptions()
And I should see "Associated Assignment: Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I follow "Add a new entry" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S2 Second Blog |
| Blog entry body | My unrelated blog! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "S2 Second Blog" # behat_hooks::i_look_for_exceptions()
And I should see "My unrelated blog!" # behat_hooks::i_look_for_exceptions()
And I should not see "Associated Assignment: Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I follow "Dashboard" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I follow "Add an entry about this Assignment" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S2 First Blog |
| Blog entry body | My course blog is better! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "S2 First Blog" # behat_hooks::i_look_for_exceptions()
And I should see "My course blog is better!" # behat_hooks::i_look_for_exceptions()
And I should see "Associated Assignment: Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I follow "Dashboard" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment 1" # behat_hooks::i_look_for_exceptions()
When I follow "View my entries about this Assignment" # behat_hooks::i_look_for_exceptions()
Then I should see "S2 First Blog" # behat_hooks::i_look_for_exceptions()
And I should not see "S2 Second Blog" # behat_hooks::i_look_for_exceptions()
And I should not see "S1 First Blog" # behat_hooks::i_look_for_exceptions()
Scenario: Students use the blog menu block to view all blogs about the assignment # C:\Apache24\htdocs\integration\blocks\blog_menu\tests\behat\block_blog_menu_activity.feature:93
Given I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I follow "Add an entry about this Assignment" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S1 First Blog |
| Blog entry body | This is my awesome blog about this Assignment! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "S1 First Blog" # behat_hooks::i_look_for_exceptions()
And I should see "This is my awesome blog about this Assignment!" # behat_hooks::i_look_for_exceptions()
And I should see "Associated Assignment: Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I follow "Add a new entry" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S2 Second Blog |
| Blog entry body | My unrelated blog! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "S2 Second Blog" # behat_hooks::i_look_for_exceptions()
And I should see "My unrelated blog!" # behat_hooks::i_look_for_exceptions()
And I should not see "Associated Assignment: Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I follow "Dashboard" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I follow "Add an entry about this Assignment" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S2 First Blog |
| Blog entry body | My course blog is better! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "S2 First Blog" # behat_hooks::i_look_for_exceptions()
And I should see "My course blog is better!" # behat_hooks::i_look_for_exceptions()
And I should see "Associated Assignment: Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I follow "Dashboard" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment 1" # behat_hooks::i_look_for_exceptions()
When I follow "View all entries about this Assignment" # behat_hooks::i_look_for_exceptions()
Then I should see "S1 First Blog" # behat_hooks::i_look_for_exceptions()
And I should see "S2 First Blog" # behat_hooks::i_look_for_exceptions()
And I should not see "S2 Second Blog" # behat_hooks::i_look_for_exceptions()
Scenario: Students use the blog menu block to view all their blog entries # C:\Apache24\htdocs\integration\blocks\blog_menu\tests\behat\block_blog_menu_activity.feature:136
Given I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I follow "Add an entry about this Assignment" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S1 First Blog |
| Blog entry body | This is my awesome blog about this Assignment! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "S1 First Blog" # behat_hooks::i_look_for_exceptions()
And I should see "This is my awesome blog about this Assignment!" # behat_hooks::i_look_for_exceptions()
And I should see "Associated Assignment: Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I follow "Add a new entry" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S2 Second Blog |
| Blog entry body | My unrelated blog! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "S2 Second Blog" # behat_hooks::i_look_for_exceptions()
And I should see "My unrelated blog!" # behat_hooks::i_look_for_exceptions()
And I should not see "Associated Assignment: Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I follow "Dashboard" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I follow "Add an entry about this Assignment" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S2 First Blog |
| Blog entry body | My course blog is better! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "S2 First Blog" # behat_hooks::i_look_for_exceptions()
And I should see "My course blog is better!" # behat_hooks::i_look_for_exceptions()
And I should see "Associated Assignment: Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I follow "Dashboard" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment 1" # behat_hooks::i_look_for_exceptions()
When I follow "Blog entries" # behat_hooks::i_look_for_exceptions()
Then I should see "S2 First Blog" # behat_hooks::i_look_for_exceptions()
And I should see "S2 Second Blog" # behat_hooks::i_look_for_exceptions()
And I should not see "S1 First Blog" # behat_hooks::i_look_for_exceptions()
Scenario: Teacher searches for student blogs # C:\Apache24\htdocs\integration\blocks\blog_menu\tests\behat\block_blog_menu_activity.feature:179
Given I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I follow "Add an entry about this Assignment" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S1 First Blog |
| Blog entry body | This is my awesome blog about this Assignment! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "S1 First Blog" # behat_hooks::i_look_for_exceptions()
And I should see "This is my awesome blog about this Assignment!" # behat_hooks::i_look_for_exceptions()
And I should see "Associated Assignment: Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I follow "Add a new entry" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S2 Second Blog |
| Blog entry body | My unrelated blog! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "S2 Second Blog" # behat_hooks::i_look_for_exceptions()
And I should see "My unrelated blog!" # behat_hooks::i_look_for_exceptions()
And I should not see "Associated Assignment: Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I follow "Dashboard" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I follow "Add an entry about this Assignment" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S2 First Blog |
| Blog entry body | My course blog is better! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "S2 First Blog" # behat_hooks::i_look_for_exceptions()
And I should see "My course blog is better!" # behat_hooks::i_look_for_exceptions()
And I should see "Associated Assignment: Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I set the field "blogsearchquery" to "First" # behat_hooks::i_look_for_exceptions()
And I press "Search" # behat_hooks::i_look_for_exceptions()
Then I should see "S1 First Blog" # behat_hooks::i_look_for_exceptions()
And I should see "S2 First Blog" # behat_hooks::i_look_for_exceptions()
And I should not see "S2 Second Blog" # behat_hooks::i_look_for_exceptions()
@block @block_blog_menu
Feature: Enable Block blog menu in a course
In order to enable the blog menu in a course
As a teacher
I can add blog menu block to a course
Background: # C:\Apache24\htdocs\integration\blocks\blog_menu\tests\behat\block_blog_menu.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
Scenario: Add the block to a the course when blogs are disabled # C:\Apache24\htdocs\integration\blocks\blog_menu\tests\behat\block_blog_menu.feature:18
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| enableblogs | 0 |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
When I add the "Blog menu" block # behat_hooks::i_look_for_exceptions()
Then I should see "Blogging is disabled!" in the "Blog menu" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Add the block to a the course when blog associations are disabled # C:\Apache24\htdocs\integration\blocks\blog_menu\tests\behat\block_blog_menu.feature:29
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| useblogassociations | 0 |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
When I add the "Blog menu" block # behat_hooks::i_look_for_exceptions()
Then I should see "Blog entries" in the "Blog menu" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Add a new entry" in the "Blog menu" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "View all entries for this course" in the "Blog menu" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "View my entries about this course" in the "Blog menu" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Add an entry about this course" in the "Blog menu" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Add the block to a the course when blog associations are enabled # C:\Apache24\htdocs\integration\blocks\blog_menu\tests\behat\block_blog_menu.feature:44
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| useblogassociations | 1 |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
When I add the "Blog menu" block # behat_hooks::i_look_for_exceptions()
Then I should see "Blog entries" in the "Blog menu" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Add a new entry" in the "Blog menu" "block" # behat_hooks::i_look_for_exceptions()
And I should see "View all entries for this course" in the "Blog menu" "block" # behat_hooks::i_look_for_exceptions()
And I should see "View my entries about this course" in the "Blog menu" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Add an entry about this course" in the "Blog menu" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Add the block to a the course when RSS is disabled # C:\Apache24\htdocs\integration\blocks\blog_menu\tests\behat\block_blog_menu.feature:59
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| enablerssfeeds | 0 |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
When I add the "Blog menu" block # behat_hooks::i_look_for_exceptions()
Then I should not see "Blog RSS feed" in the "Blog menu" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Add a new entry" in the "Blog menu" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Add the block to a the course when RSS is enabled # C:\Apache24\htdocs\integration\blocks\blog_menu\tests\behat\block_blog_menu.feature:71
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| enablerssfeeds | 1 |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
When I add the "Blog menu" block # behat_hooks::i_look_for_exceptions()
Then I should see "Blog RSS feed" in the "Blog menu" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Add a new entry" in the "Blog menu" "block" # behat_hooks::i_look_for_exceptions()
@block @block_blog_menu
Feature: Enable Block blog menu in a course
In order to enable the blog menu in a course
As a teacher
I can add blog menu block to a course
Background: # C:\Apache24\htdocs\integration\blocks\blog_menu\tests\behat\block_blog_menu_course.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
| student1 | Student | 1 | student1@example.com | S1 |
| student2 | Student | 2 | student2@example.com | S2 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Blog menu" block # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Students use the blog menu block to post blogs # C:\Apache24\htdocs\integration\blocks\blog_menu\tests\behat\block_blog_menu_course.feature:27
Given I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Add a new entry" # behat_hooks::i_look_for_exceptions()
When I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S1 First Blog |
| Blog entry body | This is my awesome blog! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "S1 First Blog" # behat_hooks::i_look_for_exceptions()
And I should see "This is my awesome blog!" # behat_hooks::i_look_for_exceptions()
And I follow "Dashboard" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Blog entries" # behat_hooks::i_look_for_exceptions()
And I should see "S1 First Blog" # behat_hooks::i_look_for_exceptions()
And I should see "This is my awesome blog!" # behat_hooks::i_look_for_exceptions()
Scenario: Students use the blog menu block to view their blogs about the course # C:\Apache24\htdocs\integration\blocks\blog_menu\tests\behat\block_blog_menu_course.feature:43
Given I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Add an entry about this course" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S1 First Blog |
| Blog entry body | This is my awesome blog about this course! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "S1 First Blog" # behat_hooks::i_look_for_exceptions()
And I should see "This is my awesome blog about this course!" # behat_hooks::i_look_for_exceptions()
And I should see "Associated Course: C1" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Add a new entry" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S2 Second Blog |
| Blog entry body | My unrelated blog! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "S2 Second Blog" # behat_hooks::i_look_for_exceptions()
And I should see "My unrelated blog!" # behat_hooks::i_look_for_exceptions()
And I should not see "Associated Course: C1" # behat_hooks::i_look_for_exceptions()
And I follow "Dashboard" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Add an entry about this course" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S2 First Blog |
| Blog entry body | My course blog is better! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "S2 First Blog" # behat_hooks::i_look_for_exceptions()
And I should see "My course blog is better!" # behat_hooks::i_look_for_exceptions()
And I should see "Associated Course: C1" # behat_hooks::i_look_for_exceptions()
And I follow "Dashboard" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
When I follow "View my entries about this course" # behat_hooks::i_look_for_exceptions()
Then I should see "S2 First Blog" # behat_hooks::i_look_for_exceptions()
And I should not see "S2 Second Blog" # behat_hooks::i_look_for_exceptions()
And I should not see "S1 First Blog" # behat_hooks::i_look_for_exceptions()
Scenario: Students use the blog menu block to view all blogs about the course # C:\Apache24\htdocs\integration\blocks\blog_menu\tests\behat\block_blog_menu_course.feature:82
Given I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Add an entry about this course" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S1 First Blog |
| Blog entry body | This is my awesome blog about this course! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "S1 First Blog" # behat_hooks::i_look_for_exceptions()
And I should see "This is my awesome blog about this course!" # behat_hooks::i_look_for_exceptions()
And I should see "Associated Course: C1" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Add a new entry" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S2 Second Blog |
| Blog entry body | My unrelated blog! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "S2 Second Blog" # behat_hooks::i_look_for_exceptions()
And I should see "My unrelated blog!" # behat_hooks::i_look_for_exceptions()
And I should not see "Associated Course: C1" # behat_hooks::i_look_for_exceptions()
And I follow "Dashboard" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Add an entry about this course" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S2 First Blog |
| Blog entry body | My course blog is better! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "S2 First Blog" # behat_hooks::i_look_for_exceptions()
And I should see "My course blog is better!" # behat_hooks::i_look_for_exceptions()
And I should see "Associated Course: C1" # behat_hooks::i_look_for_exceptions()
And I follow "Dashboard" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
When I follow "View all entries for this course" # behat_hooks::i_look_for_exceptions()
Then I should see "S1 First Blog" # behat_hooks::i_look_for_exceptions()
And I should see "S2 First Blog" # behat_hooks::i_look_for_exceptions()
And I should not see "S2 Second Blog" # behat_hooks::i_look_for_exceptions()
Scenario: Students use the blog menu block to view all their blog entries # C:\Apache24\htdocs\integration\blocks\blog_menu\tests\behat\block_blog_menu_course.feature:121
Given I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Add an entry about this course" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S1 First Blog |
| Blog entry body | This is my awesome blog about this course! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "S1 First Blog" # behat_hooks::i_look_for_exceptions()
And I should see "This is my awesome blog about this course!" # behat_hooks::i_look_for_exceptions()
And I should see "Associated Course: C1" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Add a new entry" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S2 Second Blog |
| Blog entry body | My unrelated blog! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "S2 Second Blog" # behat_hooks::i_look_for_exceptions()
And I should see "My unrelated blog!" # behat_hooks::i_look_for_exceptions()
And I should not see "Associated Course: C1" # behat_hooks::i_look_for_exceptions()
And I follow "Dashboard" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Add an entry about this course" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S2 First Blog |
| Blog entry body | My course blog is better! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "S2 First Blog" # behat_hooks::i_look_for_exceptions()
And I should see "My course blog is better!" # behat_hooks::i_look_for_exceptions()
And I should see "Associated Course: C1" # behat_hooks::i_look_for_exceptions()
And I follow "Dashboard" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
When I follow "Blog entries" # behat_hooks::i_look_for_exceptions()
Then I should see "S2 First Blog" # behat_hooks::i_look_for_exceptions()
And I should see "S2 Second Blog" # behat_hooks::i_look_for_exceptions()
And I should not see "S1 First Blog" # behat_hooks::i_look_for_exceptions()
Scenario: Teacher searches for student blogs # C:\Apache24\htdocs\integration\blocks\blog_menu\tests\behat\block_blog_menu_course.feature:160
Given I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Add an entry about this course" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S1 First Blog |
| Blog entry body | This is my awesome blog about this course! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "S1 First Blog" # behat_hooks::i_look_for_exceptions()
And I should see "This is my awesome blog about this course!" # behat_hooks::i_look_for_exceptions()
And I should see "Associated Course: C1" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Add a new entry" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S2 Second Blog |
| Blog entry body | My unrelated blog! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "S2 Second Blog" # behat_hooks::i_look_for_exceptions()
And I should see "My unrelated blog!" # behat_hooks::i_look_for_exceptions()
And I should not see "Associated Course: C1" # behat_hooks::i_look_for_exceptions()
And I follow "Dashboard" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Add an entry about this course" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S2 First Blog |
| Blog entry body | My course blog is better! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "S2 First Blog" # behat_hooks::i_look_for_exceptions()
And I should see "My course blog is better!" # behat_hooks::i_look_for_exceptions()
And I should see "Associated Course: C1" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I set the field "blogsearchquery" to "First" # behat_hooks::i_look_for_exceptions()
And I press "Search" # behat_hooks::i_look_for_exceptions()
Then I should see "S1 First Blog" # behat_hooks::i_look_for_exceptions()
And I should see "S2 First Blog" # behat_hooks::i_look_for_exceptions()
And I should not see "S2 Second Blog" # behat_hooks::i_look_for_exceptions()
@block @block_blog_menu
Feature: Enable Block blog menu on the frontpage
In order to enable the blog menu on the frontpage
As an admin
I can add blog menu block to the frontpage
Background: # C:\Apache24\htdocs\integration\blocks\blog_menu\tests\behat\block_blog_menu_frontpage.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| student1 | Student | 1 | student1@example.com | S1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I navigate to "Turn editing on" node in "Front page settings" # behat_hooks::i_look_for_exceptions()
And I add the "Blog menu" block # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Students use the blog menu block to post blogs # C:\Apache24\htdocs\integration\blocks\blog_menu\tests\behat\block_blog_menu_frontpage.feature:17
Given I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Add a new entry" # behat_hooks::i_look_for_exceptions()
When I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S1 First Blog |
| Blog entry body | This is my awesome blog! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "S1 First Blog" # behat_hooks::i_look_for_exceptions()
And I should see "This is my awesome blog!" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Blog entries" # behat_hooks::i_look_for_exceptions()
And I should see "S1 First Blog" # behat_hooks::i_look_for_exceptions()
And I should see "This is my awesome blog!" # behat_hooks::i_look_for_exceptions()
@block @block_blog_menu @mod_assign @block_blog_recent
Feature: Students can use the recent blog entries block to view recent entries on an activity page
In order to enable the recent blog entries block an activity page
As a teacher
I can add the recent blog entries block to an activity page
Background: # C:\Apache24\htdocs\integration\blocks\blog_recent\tests\behat\block_blog_recent_activity.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
| student1 | Student | 1 | student1@example.com | S1 |
| student2 | Student | 2 | student2@example.com | S2 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment 1 |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
And I follow "Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I add the "Blog menu" block # behat_hooks::i_look_for_exceptions()
And I add the "Recent blog entries" block # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Students use the recent blog entries block to view blogs # C:\Apache24\htdocs\integration\blocks\blog_recent\tests\behat\block_blog_recent_activity.feature:33
Given I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I follow "Add an entry about this Assignment" # behat_hooks::i_look_for_exceptions()
When I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S1 First Blog |
| Blog entry body | This is my awesome blog! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "S1 First Blog" # behat_hooks::i_look_for_exceptions()
And I should see "This is my awesome blog!" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I should see "S1 First Blog" # behat_hooks::i_look_for_exceptions()
And I follow "S1 First Blog" # behat_hooks::i_look_for_exceptions()
And I should see "This is my awesome blog!" # behat_hooks::i_look_for_exceptions()
Scenario: Students only see a few entries in the recent blog entries block # C:\Apache24\htdocs\integration\blocks\blog_recent\tests\behat\block_blog_recent_activity.feature:49
Given I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I follow "Add an entry about this Assignment" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S1 First Blog |
| Blog entry body | This is my awesome blog! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I wait "1" seconds # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I follow "Add an entry about this Assignment" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S1 Second Blog |
| Blog entry body | This is my awesome blog! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I wait "1" seconds # behat_hooks::i_look_for_exceptions()
And I should see "S1 Second Blog" # behat_hooks::i_look_for_exceptions()
And I should see "This is my awesome blog!" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I follow "Add an entry about this Assignment" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S1 Third Blog |
| Blog entry body | This is my awesome blog! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I wait "1" seconds # behat_hooks::i_look_for_exceptions()
And I should see "S1 Third Blog" # behat_hooks::i_look_for_exceptions()
And I should see "This is my awesome blog!" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I follow "Add an entry about this Assignment" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S1 Fourth Blog |
| Blog entry body | This is my awesome blog! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I wait "1" seconds # behat_hooks::i_look_for_exceptions()
And I should see "S1 Fourth Blog" # behat_hooks::i_look_for_exceptions()
And I should see "This is my awesome blog!" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I follow "Add an entry about this Assignment" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S1 Fifth Blog |
| Blog entry body | This is my awesome blog! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "S1 Fifth Blog" # behat_hooks::i_look_for_exceptions()
And I should see "This is my awesome blog!" # behat_hooks::i_look_for_exceptions()
When I follow "Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I should not see "S1 First Blog" # behat_hooks::i_look_for_exceptions()
And I should see "S1 Second Blog" # behat_hooks::i_look_for_exceptions()
And I should see "S1 Third Blog" # behat_hooks::i_look_for_exceptions()
And I should see "S1 Fourth Blog" # behat_hooks::i_look_for_exceptions()
And I should see "S1 Fifth Blog" # behat_hooks::i_look_for_exceptions()
And I follow "S1 Fifth Blog" # behat_hooks::i_look_for_exceptions()
And I should see "This is my awesome blog!" # behat_hooks::i_look_for_exceptions()
Then I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I configure the "Recent blog entries" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_numberofrecentblogentries | 2 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "S1 Fourth Blog" # behat_hooks::i_look_for_exceptions()
And I should see "S1 Fifth Blog" # behat_hooks::i_look_for_exceptions()
@block @block_blog_recent
Feature: Feature: Users can use the recent blog entries block to view recent blog entries.
In order to enable the recent blog entries in a course
As a teacher
I can add recent blog entries block to a course
Background: # C:\Apache24\htdocs\integration\blocks\blog_recent\tests\behat\block_blog_recent.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
Scenario: Add the recent blogs block to a course when blogs are disabled # C:\Apache24\htdocs\integration\blocks\blog_recent\tests\behat\block_blog_recent.feature:18
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| enableblogs | 0 |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
When I add the "Recent blog entries" block # behat_hooks::i_look_for_exceptions()
Then I should see "Blogging is disabled!" in the "Recent blog entries" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Add the recent blogs block to a course when there are not any blog posts # C:\Apache24\htdocs\integration\blocks\blog_recent\tests\behat\block_blog_recent.feature:29
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
When I add the "Recent blog entries" block # behat_hooks::i_look_for_exceptions()
Then I should see "No recent entries" in the "Recent blog entries" "block" # behat_hooks::i_look_for_exceptions()
@block @block_blog_menu @block_blog_recent
Feature: Students can use the recent blog entries block to view recent entries on a course page
In order to enable the recent blog entries block a course page
As a teacher
I can add the recent blog entries block to a course page
Background: # C:\Apache24\htdocs\integration\blocks\blog_recent\tests\behat\block_blog_recent_course.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| student1 | Student | 1 | student1@example.com | S1 |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Blog menu" block # behat_hooks::i_look_for_exceptions()
And I add the "Recent blog entries" block # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Students use the recent blog entries block to view blogs # C:\Apache24\htdocs\integration\blocks\blog_recent\tests\behat\block_blog_recent_course.feature:26
Given I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Add an entry about this course" # behat_hooks::i_look_for_exceptions()
When I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S1 First Blog |
| Blog entry body | This is my awesome blog! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "S1 First Blog" # behat_hooks::i_look_for_exceptions()
And I should see "This is my awesome blog!" # behat_hooks::i_look_for_exceptions()
And I follow "C1" # behat_hooks::i_look_for_exceptions()
And I should see "S1 First Blog" # behat_hooks::i_look_for_exceptions()
And I follow "S1 First Blog" # behat_hooks::i_look_for_exceptions()
And I should see "This is my awesome blog!" # behat_hooks::i_look_for_exceptions()
Scenario: Students only see a few entries in the recent blog entries block # C:\Apache24\htdocs\integration\blocks\blog_recent\tests\behat\block_blog_recent_course.feature:41
Given I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Add an entry about this course" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S1 First Blog |
| Blog entry body | This is my awesome blog! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I wait "1" seconds # behat_hooks::i_look_for_exceptions()
And I follow "C1" # behat_hooks::i_look_for_exceptions()
And I follow "Add an entry about this course" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S1 Second Blog |
| Blog entry body | This is my awesome blog! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I wait "1" seconds # behat_hooks::i_look_for_exceptions()
And I should see "S1 Second Blog" # behat_hooks::i_look_for_exceptions()
And I should see "This is my awesome blog!" # behat_hooks::i_look_for_exceptions()
And I follow "C1" # behat_hooks::i_look_for_exceptions()
And I follow "Add an entry about this course" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S1 Third Blog |
| Blog entry body | This is my awesome blog! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I wait "1" seconds # behat_hooks::i_look_for_exceptions()
And I should see "S1 Third Blog" # behat_hooks::i_look_for_exceptions()
And I should see "This is my awesome blog!" # behat_hooks::i_look_for_exceptions()
And I follow "C1" # behat_hooks::i_look_for_exceptions()
And I follow "Add an entry about this course" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S1 Fourth Blog |
| Blog entry body | This is my awesome blog! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I wait "1" seconds # behat_hooks::i_look_for_exceptions()
And I should see "S1 Fourth Blog" # behat_hooks::i_look_for_exceptions()
And I should see "This is my awesome blog!" # behat_hooks::i_look_for_exceptions()
And I follow "C1" # behat_hooks::i_look_for_exceptions()
And I follow "Add an entry about this course" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S1 Fifth Blog |
| Blog entry body | This is my awesome blog! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "S1 Fifth Blog" # behat_hooks::i_look_for_exceptions()
And I should see "This is my awesome blog!" # behat_hooks::i_look_for_exceptions()
When I follow "C1" # behat_hooks::i_look_for_exceptions()
And I should not see "S1 First Blog" # behat_hooks::i_look_for_exceptions()
And I should see "S1 Second Blog" # behat_hooks::i_look_for_exceptions()
And I should see "S1 Third Blog" # behat_hooks::i_look_for_exceptions()
And I should see "S1 Fourth Blog" # behat_hooks::i_look_for_exceptions()
And I should see "S1 Fifth Blog" # behat_hooks::i_look_for_exceptions()
And I follow "S1 Fifth Blog" # behat_hooks::i_look_for_exceptions()
And I should see "This is my awesome blog!" # behat_hooks::i_look_for_exceptions()
Then I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I configure the "Recent blog entries" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_numberofrecentblogentries | 2 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "S1 Fourth Blog" # behat_hooks::i_look_for_exceptions()
And I should see "S1 Fifth Blog" # behat_hooks::i_look_for_exceptions()
@block @block_blog_recent
Feature: Feature: Students can use the recent blog entries block to view recent entries on the frontpage
In order to enable the recent blog entries block on the frontpage
As an admin
I can add the recent blog entries block to the frontpage
Background: # C:\Apache24\htdocs\integration\blocks\blog_recent\tests\behat\block_blog_recent_frontpage.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| student1 | Student | 1 | student1@example.com | S1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I navigate to "Turn editing on" node in "Front page settings" # behat_hooks::i_look_for_exceptions()
And I add the "Recent blog entries" block # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Students use the recent blog entries block to view blogs # C:\Apache24\htdocs\integration\blocks\blog_recent\tests\behat\block_blog_recent_frontpage.feature:17
Given I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I navigate to "Site blogs" node in "Site pages" # behat_hooks::i_look_for_exceptions()
And I follow "Add a new entry" # behat_hooks::i_look_for_exceptions()
When I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S1 First Blog |
| Blog entry body | This is my awesome blog! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "S1 First Blog" # behat_hooks::i_look_for_exceptions()
And I should see "This is my awesome blog!" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I should see "S1 First Blog" # behat_hooks::i_look_for_exceptions()
And I follow "S1 First Blog" # behat_hooks::i_look_for_exceptions()
And I should see "This is my awesome blog!" # behat_hooks::i_look_for_exceptions()
Scenario: Students only see a few entries in the recent blog entries block # C:\Apache24\htdocs\integration\blocks\blog_recent\tests\behat\block_blog_recent_frontpage.feature:33
Given I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I navigate to "Site blogs" node in "Site pages" # behat_hooks::i_look_for_exceptions()
And I follow "Add a new entry" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S1 First Blog |
| Blog entry body | This is my awesome blog! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I wait "1" seconds # behat_hooks::i_look_for_exceptions()
And I follow "Add a new entry" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S1 Second Blog |
| Blog entry body | This is my awesome blog! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I wait "1" seconds # behat_hooks::i_look_for_exceptions()
And I should see "S1 Second Blog" # behat_hooks::i_look_for_exceptions()
And I should see "This is my awesome blog!" # behat_hooks::i_look_for_exceptions()
And I follow "Add a new entry" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S1 Third Blog |
| Blog entry body | This is my awesome blog! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I wait "1" seconds # behat_hooks::i_look_for_exceptions()
And I should see "S1 Third Blog" # behat_hooks::i_look_for_exceptions()
And I should see "This is my awesome blog!" # behat_hooks::i_look_for_exceptions()
And I follow "Add a new entry" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S1 Fourth Blog |
| Blog entry body | This is my awesome blog! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I wait "1" seconds # behat_hooks::i_look_for_exceptions()
And I should see "S1 Fourth Blog" # behat_hooks::i_look_for_exceptions()
And I should see "This is my awesome blog!" # behat_hooks::i_look_for_exceptions()
And I follow "Add a new entry" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | S1 Fifth Blog |
| Blog entry body | This is my awesome blog! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "S1 Fifth Blog" # behat_hooks::i_look_for_exceptions()
And I should see "This is my awesome blog!" # behat_hooks::i_look_for_exceptions()
When I am on site homepage # behat_hooks::i_look_for_exceptions()
And I should not see "S1 First Blog" # behat_hooks::i_look_for_exceptions()
And I should see "S1 Second Blog" # behat_hooks::i_look_for_exceptions()
And I should see "S1 Third Blog" # behat_hooks::i_look_for_exceptions()
And I should see "S1 Fourth Blog" # behat_hooks::i_look_for_exceptions()
And I should see "S1 Fifth Blog" # behat_hooks::i_look_for_exceptions()
And I follow "S1 Fifth Blog" # behat_hooks::i_look_for_exceptions()
And I should see "This is my awesome blog!" # behat_hooks::i_look_for_exceptions()
Then I log out # behat_hooks::i_look_for_exceptions()
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I navigate to "Turn editing on" node in "Front page settings" # behat_hooks::i_look_for_exceptions()
And I configure the "Recent blog entries" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_numberofrecentblogentries | 2 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "S1 Fourth Blog" # behat_hooks::i_look_for_exceptions()
And I should see "S1 Fifth Blog" # behat_hooks::i_look_for_exceptions()
@block @block_calendar_month
Feature: Enable the calendar block in a course and test it's functionality
In order to enable the calendar block in a course
As a teacher
I can add the calendar block to a course
Background: # C:\Apache24\htdocs\integration\blocks\calendar_month\tests\behat\block_calendar_month.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
| student1 | Student | 1 | student1@example.com | S1 |
| student2 | Student | 2 | student2@example.com | S2 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
Scenario: Add the block to a the course # C:\Apache24\htdocs\integration\blocks\calendar_month\tests\behat\block_calendar_month.feature:22
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
When I add the "Calendar" block # behat_hooks::i_look_for_exceptions()
Then I should see "Events key" in the "Calendar" "block" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: View a global event in the calendar block # C:\Apache24\htdocs\integration\blocks\calendar_month\tests\behat\block_calendar_month.feature:30
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I create a calendar event with form data: # behat_hooks::i_look_for_exceptions()
| id_eventtype | Site |
| id_name | Site Event |
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Calendar" block # behat_hooks::i_look_for_exceptions()
And I hover over today in the calendar # behat_hooks::i_look_for_exceptions()
Then I should see "Site Event" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Filter site events in the calendar block # C:\Apache24\htdocs\integration\blocks\calendar_month\tests\behat\block_calendar_month.feature:44
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I create a calendar event with form data: # behat_hooks::i_look_for_exceptions()
| id_eventtype | Site |
| id_name | Site Event |
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Calendar" block # behat_hooks::i_look_for_exceptions()
And I create a calendar event with form data: # behat_hooks::i_look_for_exceptions()
| id_eventtype | Course |
| id_name | Course Event |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Hide global events" # behat_hooks::i_look_for_exceptions()
And I hover over today in the calendar # behat_hooks::i_look_for_exceptions()
Then I should not see "Site Event" # behat_hooks::i_look_for_exceptions()
And I should see "Course Event" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: View a course event in the calendar block # C:\Apache24\htdocs\integration\blocks\calendar_month\tests\behat\block_calendar_month.feature:64
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Calendar" block # behat_hooks::i_look_for_exceptions()
And I create a calendar event with form data: # behat_hooks::i_look_for_exceptions()
| id_eventtype | Course |
| id_name | Course Event |
When I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I hover over today in the calendar # behat_hooks::i_look_for_exceptions()
Then I should see "Course Event" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Filter course events in the calendar block # C:\Apache24\htdocs\integration\blocks\calendar_month\tests\behat\block_calendar_month.feature:77
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Calendar" block # behat_hooks::i_look_for_exceptions()
And I create a calendar event with form data: # behat_hooks::i_look_for_exceptions()
| id_eventtype | Course |
| id_name | Course Event |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I create a calendar event with form data: # behat_hooks::i_look_for_exceptions()
| id_eventtype | User |
| id_name | User Event |
When I click on "Dashboard" "link" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Hide course events" # behat_hooks::i_look_for_exceptions()
And I hover over today in the calendar # behat_hooks::i_look_for_exceptions()
Then I should not see "Course Event" # behat_hooks::i_look_for_exceptions()
And I should see "User Event" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: View a user event in the calendar block # C:\Apache24\htdocs\integration\blocks\calendar_month\tests\behat\block_calendar_month.feature:97
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Calendar" block # behat_hooks::i_look_for_exceptions()
And I create a calendar event with form data: # behat_hooks::i_look_for_exceptions()
| id_eventtype | User |
| id_name | User Event |
When I click on "Dashboard" "link" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I hover over today in the calendar # behat_hooks::i_look_for_exceptions()
Then I should see "User Event" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Filter user events in the calendar block # C:\Apache24\htdocs\integration\blocks\calendar_month\tests\behat\block_calendar_month.feature:111
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Calendar" block # behat_hooks::i_look_for_exceptions()
And I create a calendar event with form data: # behat_hooks::i_look_for_exceptions()
| id_eventtype | Course |
| id_name | Course Event |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I create a calendar event with form data: # behat_hooks::i_look_for_exceptions()
| id_eventtype | User |
| id_name | User Event |
When I click on "Dashboard" "link" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Hide user events" # behat_hooks::i_look_for_exceptions()
And I hover over today in the calendar # behat_hooks::i_look_for_exceptions()
Then I should not see "User Event" # behat_hooks::i_look_for_exceptions()
And I should see "Course Event" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: View a group event in the calendar block # C:\Apache24\htdocs\integration\blocks\calendar_month\tests\behat\block_calendar_month.feature:131
Given the following "groups" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| Group 1 | C1 | G1 |
| Group 2 | C1 | G2 |
And the following "group members" exist: # behat_hooks::i_look_for_exceptions()
| user | group |
| student1 | G1 |
| student2 | G2 |
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_groupmode | Separate groups |
| id_groupmodeforce | Yes |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Calendar" block # behat_hooks::i_look_for_exceptions()
And I create a calendar event with form data: # behat_hooks::i_look_for_exceptions()
| id_eventtype | Group |
| id_groupid | Group 1 |
| id_name | Group Event |
And I log out # behat_hooks::i_look_for_exceptions()
Then I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I hover over today in the calendar # behat_hooks::i_look_for_exceptions()
And I should see "Group Event" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I hover over today in the calendar # behat_hooks::i_look_for_exceptions()
And I should not see "Group Event" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Filter group events in the calendar block # C:\Apache24\htdocs\integration\blocks\calendar_month\tests\behat\block_calendar_month.feature:165
Given the following "groups" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| Group 1 | C1 | G1 |
| Group 2 | C1 | G2 |
And the following "group members" exist: # behat_hooks::i_look_for_exceptions()
| user | group |
| student1 | G1 |
| student2 | G2 |
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_groupmode | Separate groups |
| id_groupmodeforce | Yes |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Calendar" block # behat_hooks::i_look_for_exceptions()
And I create a calendar event with form data: # behat_hooks::i_look_for_exceptions()
| id_eventtype | Course |
| id_name | Course Event 1 |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I create a calendar event with form data: # behat_hooks::i_look_for_exceptions()
| id_eventtype | Group |
| id_groupid | Group 1 |
| id_name | Group Event 1 |
And I log out # behat_hooks::i_look_for_exceptions()
Then I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Hide group events" # behat_hooks::i_look_for_exceptions()
And I hover over today in the calendar # behat_hooks::i_look_for_exceptions()
And I should not see "Group Event 1" # behat_hooks::i_look_for_exceptions()
And I should see "Course Event 1" # behat_hooks::i_look_for_exceptions()
@block @block_calendar_month
Feature: Enable the calendar block in a course
In order to enable the calendar block in a course
As a teacher
I can add the calendar block to a course
@javascript
Scenario: View a global event in the calendar block in a course # C:\Apache24\htdocs\integration\blocks\calendar_month\tests\behat\block_calendar_month_course.feature:8
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
When I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I create a calendar event with form data: # behat_hooks::i_look_for_exceptions()
| id_eventtype | Site |
| id_name | Site Event |
And I log out # behat_hooks::i_look_for_exceptions()
Then I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Calendar" block # behat_hooks::i_look_for_exceptions()
And I hover over today in the calendar # behat_hooks::i_look_for_exceptions()
And I should see "Site Event" # behat_hooks::i_look_for_exceptions()
@block @block_calendar_month
Feature: View a site event on the dashboard
In order to view a site event
As a student
I can view the event in the calendar
@javascript
Scenario: View a global event in the calendar block on the dashboard # C:\Apache24\htdocs\integration\blocks\calendar_month\tests\behat\block_calendar_month_dashboard.feature:8
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| student1 | Student | 1 | student1@example.com | S1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I create a calendar event with form data: # behat_hooks::i_look_for_exceptions()
| id_eventtype | Site |
| id_name | Site Event |
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I hover over today in the calendar # behat_hooks::i_look_for_exceptions()
Then I should see "Site Event" # behat_hooks::i_look_for_exceptions()
@block @block_calendar_month
Feature: Enable the calendar block on the site front page
In order to enable the calendar block on the site front page
As an admin
I can add the calendar block on the site front page
@javascript
Scenario: View a global event in the calendar block on the front page # C:\Apache24\htdocs\integration\blocks\calendar_month\tests\behat\block_calendar_month_frontpage.feature:8
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| student1 | Student | 1 | student1@example.com | S1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Calendar" block # behat_hooks::i_look_for_exceptions()
And I create a calendar event with form data: # behat_hooks::i_look_for_exceptions()
| id_eventtype | Site |
| id_name | Site Event |
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I hover over today in the calendar # behat_hooks::i_look_for_exceptions()
Then I should see "Site Event" # behat_hooks::i_look_for_exceptions()
@block @block_calendar_upcoming
Feature: Enable the upcoming events block in a course
In order to enable the calendar block in a course
As a teacher
I can view the event in the upcoming events block
Scenario: View a global event in the upcoming events block in a course # C:\Apache24\htdocs\integration\blocks\calendar_upcoming\tests\behat\block_calendar_upcoming_course.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
When I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I create a calendar event with form data: # behat_hooks::i_look_for_exceptions()
| id_eventtype | Site |
| id_name | My Site Event |
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
Then I should see "My Site Event" in the "Upcoming events" "block" # behat_hooks::i_look_for_exceptions()
@block @block_calendar_upcoming
Feature: View a site event on the dashboard
In order to view a site event
As a student
I can view the event in the upcoming events block
Scenario: View a global event in the upcoming events block on the dashboard # C:\Apache24\htdocs\integration\blocks\calendar_upcoming\tests\behat\block_calendar_upcoming_dashboard.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| student1 | Student | 1 | student1@example.com | S1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I create a calendar event with form data: # behat_hooks::i_look_for_exceptions()
| id_eventtype | Site |
| id_name | My Site Event |
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
Then I should see "My Site Event" # behat_hooks::i_look_for_exceptions()
@block @block_calendar_upcoming
Feature: View a site event on the frontpage
In order to view a site event
As a teacher
I can view the event in the upcoming events block
Scenario: View a global event in the upcoming events block on the frontpage # C:\Apache24\htdocs\integration\blocks\calendar_upcoming\tests\behat\block_calendar_upcoming_frontpage.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I create a calendar event with form data: # behat_hooks::i_look_for_exceptions()
| id_eventtype | Site |
| id_name | My Site Event |
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I navigate to "Turn editing on" node in "Front page settings" # behat_hooks::i_look_for_exceptions()
And I add the "Upcoming events" block # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
Then I should see "My Site Event" in the "Upcoming events" "block" # behat_hooks::i_look_for_exceptions()
@block @block_comments
Feature: Enable Block comments on an activity page and view comments
In order to enable the comments block on an activity page
As a teacher
I can add the comments block to an activity page
Scenario: Add the comments block on an activity page and add comments # C:\Apache24\htdocs\integration\blocks\comments\tests\behat\block_comment_activity.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | Frist | teacher1@example.com |
| student1 | Student | First | student1@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | course | idnumber | name | intro |
| page | C1 | page1 | Test page name | Test page description |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I follow "Test page name" # behat_hooks::i_look_for_exceptions()
And I add the "Comments" block # behat_hooks::i_look_for_exceptions()
And I follow "Show comments" # behat_hooks::i_look_for_exceptions()
And I add "I'm a comment from the teacher" comment to comments block # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test page name" # behat_hooks::i_look_for_exceptions()
And I follow "Show comments" # behat_hooks::i_look_for_exceptions()
Then I should see "I'm a comment from the teacher" # behat_hooks::i_look_for_exceptions()
@block @block_comments
Feature: Enable Block comments on a course page and view comments
In order to enable the comments block on a course page
As a teacher
I can add the comments block to the course page
Scenario: Add the comments block on the course page and add comments # C:\Apache24\htdocs\integration\blocks\comments\tests\behat\block_comment_course.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | Frist | teacher1@example.com |
| student1 | Student | First | student1@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Comments" block # behat_hooks::i_look_for_exceptions()
And I follow "Show comments" # behat_hooks::i_look_for_exceptions()
And I add "I'm a comment from the teacher" comment to comments block # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Show comments" # behat_hooks::i_look_for_exceptions()
Then I should see "I'm a comment from the teacher" # behat_hooks::i_look_for_exceptions()
@block @block_comments
Feature: Enable Block comments on the dashboard and view comments
In order to enable the comments block on a the dashboard
As a teacher
I can add the comments block to my dashboard
Background: # C:\Apache24\htdocs\integration\blocks\comments\tests\behat\block_comment_dashboard.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | Frist | teacher1@example.com |
Scenario: Add the comments block on the dashboard and add comments with Javascript disabled # C:\Apache24\htdocs\integration\blocks\comments\tests\behat\block_comment_dashboard.feature:15
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I press "Customise this page" # behat_hooks::i_look_for_exceptions()
And I add the "Comments" block # behat_hooks::i_look_for_exceptions()
And I follow "Show comments" # behat_hooks::i_look_for_exceptions()
And I add "I'm a comment from the teacher" comment to comments block # behat_hooks::i_look_for_exceptions()
Then I should see "I'm a comment from the teacher" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Add the comments block on the dashboard and add comments with Javascript enabled # C:\Apache24\htdocs\integration\blocks\comments\tests\behat\block_comment_dashboard.feature:24
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I press "Customise this page" # behat_hooks::i_look_for_exceptions()
And I add the "Comments" block # behat_hooks::i_look_for_exceptions()
And I add "I'm a comment from the teacher" comment to comments block # behat_hooks::i_look_for_exceptions()
Then I should see "I'm a comment from the teacher" # behat_hooks::i_look_for_exceptions()
@block @block_comments
Feature: Enable Block comments on the frontpage and view comments
In order to enable the comments block on the frontpage
As a admin
I can add the comments block to the frontpage
Scenario: Add the comments block on the frontpage and add comments # C:\Apache24\htdocs\integration\blocks\comments\tests\behat\block_comment_frontpage.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I navigate to "Turn editing on" node in "Front page settings" # behat_hooks::i_look_for_exceptions()
And I add the "Comments" block # behat_hooks::i_look_for_exceptions()
And I follow "Show comments" # behat_hooks::i_look_for_exceptions()
And I add "I'm a comment from admin" comment to comments block # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Show comments" # behat_hooks::i_look_for_exceptions()
Then I should see "I'm a comment from admin" # behat_hooks::i_look_for_exceptions()
@block @block_completionstatus
Feature: Enable Block Completion in a course using activity completion
In order to view the completion block in a course
As a teacher
I can add completion block to a course and set up activity completion
Background: # C:\Apache24\htdocs\integration\blocks\completionstatus\tests\behat\block_completionstatus_activity_completion.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
| student1 | Student | 1 | student1@example.com | S1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | enablecompletion |
| Course 1 | C1 | 0 | 1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | course | idnumber | name | intro |
| page | C1 | page1 | Test page name | Test page description |
Scenario: Add the block to a the course and add course completion items # C:\Apache24\htdocs\integration\blocks\completionstatus\tests\behat\block_completionstatus_activity_completion.feature:23
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I follow "Test page name" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Page module administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Completion tracking | Show activity as complete when conditions are met |
| Require view | 1 |
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
And I add the "Course completion status" block # behat_hooks::i_look_for_exceptions()
And I navigate to "Course completion" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Test page name | 1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then I should see "Status: Not yet started" in the "Course completion status" "block" # behat_hooks::i_look_for_exceptions()
And I should see "0 of 1" in the "Activity completion" "table_row" # behat_hooks::i_look_for_exceptions()
Scenario: Add the block to a the course and add course completion items # C:\Apache24\htdocs\integration\blocks\completionstatus\tests\behat\block_completionstatus_activity_completion.feature:45
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I follow "Test page name" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Page module administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Completion tracking | Show activity as complete when conditions are met |
| Require view | 1 |
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
And I add the "Course completion status" block # behat_hooks::i_look_for_exceptions()
And I navigate to "Course completion" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Test page name | 1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test page name" # behat_hooks::i_look_for_exceptions()
And I follow "C1" # behat_hooks::i_look_for_exceptions()
Then I should see "Status: Pending" in the "Course completion status" "block" # behat_hooks::i_look_for_exceptions()
And I should see "0 of 1" in the "Activity completion" "table_row" # behat_hooks::i_look_for_exceptions()
And I trigger cron # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "1 of 1" in the "Activity completion" "table_row" # behat_hooks::i_look_for_exceptions()
And I follow "More details" # behat_hooks::i_look_for_exceptions()
And I should see "Yes" in the "Activity completion" "table_row" # behat_hooks::i_look_for_exceptions()
@block @block_completionstatus
Feature: Enable Block Completion in a course
In order to view the completion block in a course
As a teacher
I can add completion block to a course
Background: # C:\Apache24\htdocs\integration\blocks\completionstatus\tests\behat\block_completionstatus.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
| student1 | Student | 1 | student1@example.com | S1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | enablecompletion |
| Course 1 | C1 | 0 | 1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
Scenario: Add the block to a the course where completion is disabled # C:\Apache24\htdocs\integration\blocks\completionstatus\tests\behat\block_completionstatus.feature:20
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Enable completion tracking | No |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
When I add the "Course completion status" block # behat_hooks::i_look_for_exceptions()
Then I should see "Completion is not enabled for this course" in the "Course completion status" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Add the block to a the course where completion is not set # C:\Apache24\htdocs\integration\blocks\completionstatus\tests\behat\block_completionstatus.feature:31
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
When I add the "Course completion status" block # behat_hooks::i_look_for_exceptions()
Then I should see "No completion criteria set for this course" in the "Course completion status" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Add the block to a course with criteria and view as an untracked role. # C:\Apache24\htdocs\integration\blocks\completionstatus\tests\behat\block_completionstatus.feature:38
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | course | idnumber | name | intro |
| page | C1 | page1 | Test page name | Test page description |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I follow "Test page name" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Page module administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Completion tracking | Show activity as complete when conditions are met |
| Require view | 1 |
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
When I add the "Course completion status" block # behat_hooks::i_look_for_exceptions()
And I navigate to "Course completion" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Test page name | 1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "You are currently not being tracked by completion in this course" in the "Course completion status" "block" # behat_hooks::i_look_for_exceptions()
@block @block_completionstatus
Feature: Enable Block Completion in a course using manual completion by others
In order to view the completion block in a course
As a teacher
I can add completion block to a course and set up manual completion by others
Background: # C:\Apache24\htdocs\integration\blocks\completionstatus\tests\behat\block_completionstatus_manual_other.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
| teacher2 | Teacher | 2 | teacher1@example.com | T2 |
| student1 | Student | 1 | student1@example.com | S1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | enablecompletion |
| Course 1 | C1 | 0 | 1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| teacher2 | C1 | teacher |
| student1 | C1 | student |
Scenario: Add the block to a the course and mark a student complete. # C:\Apache24\htdocs\integration\blocks\completionstatus\tests\behat\block_completionstatus_manual_other.feature:22
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Course completion status" block # behat_hooks::i_look_for_exceptions()
And I navigate to "Course completion" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Teacher | 1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Status: Not yet started" in the "Course completion status" "block" # behat_hooks::i_look_for_exceptions()
And I should see "No" in the "Teacher" "table_row" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Course completion" node in "Course administration > Reports" # behat_hooks::i_look_for_exceptions()
And I follow "Click to mark user complete" # behat_hooks::i_look_for_exceptions()
And I wait "1" seconds # behat_hooks::i_look_for_exceptions()
And I run the scheduled task "core\task\completion_regular_task" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then I should see "Status: Complete" in the "Course completion status" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Yes" in the "Teacher" "table_row" # behat_hooks::i_look_for_exceptions()
And I follow "More details" # behat_hooks::i_look_for_exceptions()
And I should see "Yes" in the "Marked complete by Teacher" "table_row" # behat_hooks::i_look_for_exceptions()
Scenario: Add the block to a the course and require multiple roles to mark a student complete. # C:\Apache24\htdocs\integration\blocks\completionstatus\tests\behat\block_completionstatus_manual_other.feature:56
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Course completion status" block # behat_hooks::i_look_for_exceptions()
And I navigate to "Course completion" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Teacher | 1 |
| Non-editing teacher | 1 |
| id_role_aggregation | ALL selected roles to mark when the condition is met |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Status: Not yet started" in the "Course completion status" "block" # behat_hooks::i_look_for_exceptions()
And I should see "No" in the "Teacher" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "No" in the "Non-editing teacher" "table_row" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Course completion" node in "Course administration > Reports" # behat_hooks::i_look_for_exceptions()
And I follow "Click to mark user complete" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Status: In progress" in the "Course completion status" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Yes" in the "Teacher" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "No" in the "Non-editing teacher" "table_row" # behat_hooks::i_look_for_exceptions()
And I follow "More details" # behat_hooks::i_look_for_exceptions()
And I should see "Yes" in the "Marked complete by Teacher" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "No" in the "Marked complete by Non-editing teacher" "table_row" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Course completion" node in "Course administration > Reports" # behat_hooks::i_look_for_exceptions()
And I follow "Click to mark user complete" # behat_hooks::i_look_for_exceptions()
And I wait "1" seconds # behat_hooks::i_look_for_exceptions()
And I run the scheduled task "core\task\completion_regular_task" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then I should see "Status: Complete" in the "Course completion status" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Yes" in the "Teacher" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Yes" in the "Non-editing teacher" "table_row" # behat_hooks::i_look_for_exceptions()
And I follow "More details" # behat_hooks::i_look_for_exceptions()
And I should see "Yes" in the "Marked complete by Teacher" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Yes" in the "Marked complete by Non-editing teacher" "table_row" # behat_hooks::i_look_for_exceptions()
@block @block_completionstatus @block_selfcompletion
Feature: Enable Block Completion in a course using manual self completion
In order to view the completion block in a course
As a teacher
I can add completion block to a course and set up manual self completion
Scenario: Add the block to a the course and manually complete the course # C:\Apache24\htdocs\integration\blocks\completionstatus\tests\behat\block_completionstatus_manual_self.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
| student1 | Student | 1 | student1@example.com | S1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | enablecompletion |
| Course 1 | C1 | 0 | 1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Course completion status" block # behat_hooks::i_look_for_exceptions()
And I add the "Self completion" block # behat_hooks::i_look_for_exceptions()
And I navigate to "Course completion" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_criteria_self | 1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Status: Not yet started" in the "Course completion status" "block" # behat_hooks::i_look_for_exceptions()
And I should see "No" in the "Self completion" "table_row" # behat_hooks::i_look_for_exceptions()
And I follow "Complete course" # behat_hooks::i_look_for_exceptions()
And I should see "Confirm self completion" # behat_hooks::i_look_for_exceptions()
And I press "Yes" # behat_hooks::i_look_for_exceptions()
And I should see "Status: In progress" in the "Course completion status" "block" # behat_hooks::i_look_for_exceptions()
And I wait "1" seconds # behat_hooks::i_look_for_exceptions()
And I run the scheduled task "core\task\completion_regular_task" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then I should see "Status: Complete" in the "Course completion status" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Yes" in the "Self completion" "table_row" # behat_hooks::i_look_for_exceptions()
And I follow "More details" # behat_hooks::i_look_for_exceptions()
And I should see "Yes" in the "Self completion" "table_row" # behat_hooks::i_look_for_exceptions()
@block @block_course_list
Feature: Enable the course_list block on a category page and view it's contents
In order to enable the course list block on a category page
As an admin
I can add the course list block to a category page
Background: # C:\Apache24\htdocs\integration\blocks\course_list\tests\behat\block_course_list_category.feature:7
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Category 1 | 0 | CAT1 |
| Category 2 | 0 | CAT2 |
| Category 3 | CAT2 | CAT3 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
| Course 2 | C2 | CAT1 |
| Course 3 | C3 | CAT2 |
| Course 4 | C4 | CAT3 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | First | teacher1@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| teacher1 | C2 | editingteacher |
| teacher1 | C3 | editingteacher |
Scenario: Add the course list block on category page and navigate to the course listing # C:\Apache24\htdocs\integration\blocks\course_list\tests\behat\block_course_list_category.feature:28
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I am on course index # behat_hooks::i_look_for_exceptions()
And I follow "Miscellaneous" # behat_hooks::i_look_for_exceptions()
And I add the "Courses" block # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I am on course index # behat_hooks::i_look_for_exceptions()
And I follow "Miscellaneous" # behat_hooks::i_look_for_exceptions()
Then I should see "Course 1" in the "My courses" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Course 2" in the "My courses" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Course 3" in the "My courses" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 4" in the "My courses" "block" # behat_hooks::i_look_for_exceptions()
And I follow "All courses" # behat_hooks::i_look_for_exceptions()
And I should see "Miscellaneous" # behat_hooks::i_look_for_exceptions()
Scenario: Add the course list block on category page and navigate to another course # C:\Apache24\htdocs\integration\blocks\course_list\tests\behat\block_course_list_category.feature:46
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I am on course index # behat_hooks::i_look_for_exceptions()
And I follow "Miscellaneous" # behat_hooks::i_look_for_exceptions()
And I add the "Courses" block # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I am on course index # behat_hooks::i_look_for_exceptions()
And I follow "Miscellaneous" # behat_hooks::i_look_for_exceptions()
Then I should see "Course 1" in the "My courses" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Course 2" in the "My courses" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Course 3" in the "My courses" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 4" in the "My courses" "block" # behat_hooks::i_look_for_exceptions()
And I follow "Course 3" # behat_hooks::i_look_for_exceptions()
And I should see "Course 3" # behat_hooks::i_look_for_exceptions()
Scenario: Add the course list block on category page and view as an admin # C:\Apache24\htdocs\integration\blocks\course_list\tests\behat\block_course_list_category.feature:64
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I am on course index # behat_hooks::i_look_for_exceptions()
And I follow "Miscellaneous" # behat_hooks::i_look_for_exceptions()
When I add the "Courses" block # behat_hooks::i_look_for_exceptions()
Then I should see "Miscellaneous" in the "Course categories" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Category 1" in the "Course categories" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Category 2" in the "Course categories" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Category 3" in the "Course categories" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 1" in the "Course categories" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 2" in the "Course categories" "block" # behat_hooks::i_look_for_exceptions()
And I follow "All courses" # behat_hooks::i_look_for_exceptions()
And I should see "Miscellaneous" # behat_hooks::i_look_for_exceptions()
@block @block_course_list
Feature: Enable the course_list block on a course page and view it's contents
In order to enable the course list block on an course page
As a teacher
I can add the course list block to a course page
Background: # C:\Apache24\htdocs\integration\blocks\course_list\tests\behat\block_course_list_course.feature:7
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Category 1 | 0 | CAT1 |
| Category 2 | 0 | CAT2 |
| Category 3 | CAT2 | CAT3 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
| Course 2 | C2 | CAT1 |
| Course 3 | C3 | CAT2 |
| Course 4 | C4 | CAT3 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | First | teacher1@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| teacher1 | C2 | editingteacher |
| teacher1 | C3 | editingteacher |
Scenario: Add the course list block on course page and navigate to the course listing # C:\Apache24\htdocs\integration\blocks\course_list\tests\behat\block_course_list_course.feature:28
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
When I add the "Courses" block # behat_hooks::i_look_for_exceptions()
Then I should see "Course 1" in the "My courses" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Course 2" in the "My courses" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Course 3" in the "My courses" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 4" in the "My courses" "block" # behat_hooks::i_look_for_exceptions()
And I follow "All courses" # behat_hooks::i_look_for_exceptions()
And I should see "Miscellaneous" # behat_hooks::i_look_for_exceptions()
Scenario: Add the course list block on course page and navigate to another course # C:\Apache24\htdocs\integration\blocks\course_list\tests\behat\block_course_list_course.feature:40
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
When I add the "Courses" block # behat_hooks::i_look_for_exceptions()
Then I should see "Course 1" in the "My courses" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Course 2" in the "My courses" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Course 3" in the "My courses" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 4" in the "My courses" "block" # behat_hooks::i_look_for_exceptions()
And I follow "Course 3" # behat_hooks::i_look_for_exceptions()
And I should see "Course 3" # behat_hooks::i_look_for_exceptions()
Scenario: Add the course list block on course page and view as an admin # C:\Apache24\htdocs\integration\blocks\course_list\tests\behat\block_course_list_course.feature:52
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
When I add the "Courses" block # behat_hooks::i_look_for_exceptions()
Then I should see "Miscellaneous" in the "Course categories" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Category 1" in the "Course categories" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Category 2" in the "Course categories" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Category 3" in the "Course categories" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 1" in the "Course categories" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 2" in the "Course categories" "block" # behat_hooks::i_look_for_exceptions()
And I follow "All courses" # behat_hooks::i_look_for_exceptions()
And I should see "Miscellaneous" # behat_hooks::i_look_for_exceptions()
Scenario: View the course list block on course page with hide all courses link enabled # C:\Apache24\htdocs\integration\blocks\course_list\tests\behat\block_course_list_course.feature:67
Given the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| block_course_list_hideallcourseslink | 1 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
When I add the "Courses" block # behat_hooks::i_look_for_exceptions()
Then I should not see "All courses" in the "My courses" "block" # behat_hooks::i_look_for_exceptions()
Scenario: View the course list block on course page with admin sees own course enabled # C:\Apache24\htdocs\integration\blocks\course_list\tests\behat\block_course_list_course.feature:76
Given the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| block_course_list_adminview | own |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| admin | C1 | editingteacher |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
When I add the "Courses" block # behat_hooks::i_look_for_exceptions()
Then I should not see "Miscellaneous" in the "My courses" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Category 1" in the "My courses" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Category 2" in the "My courses" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Category 3" in the "My courses" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Course 1" in the "My courses" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 2" in the "My courses" "block" # behat_hooks::i_look_for_exceptions()
And I follow "All courses" # behat_hooks::i_look_for_exceptions()
And I should see "Miscellaneous" # behat_hooks::i_look_for_exceptions()
@block @block_course_list
Feature: Enable the course_list block on the dashboard and view it's contents
In order to enable the course list block on the dashboard
As a user
I can add the course list block to the dashboard
Background: # C:\Apache24\htdocs\integration\blocks\course_list\tests\behat\block_course_list_dashboard.feature:7
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Category 1 | 0 | CAT1 |
| Category 2 | 0 | CAT2 |
| Category 3 | CAT2 | CAT3 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
| Course 2 | C2 | CAT1 |
| Course 3 | C3 | CAT2 |
| Course 4 | C4 | CAT3 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | First | teacher1@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| teacher1 | C2 | editingteacher |
| teacher1 | C3 | editingteacher |
Scenario: Add the course list block on the dashboard and navigate to the course listing # C:\Apache24\htdocs\integration\blocks\course_list\tests\behat\block_course_list_dashboard.feature:28
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I press "Customise this page" # behat_hooks::i_look_for_exceptions()
When I add the "Courses" block # behat_hooks::i_look_for_exceptions()
Then I should see "Course 1" in the "My courses" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Course 2" in the "My courses" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Course 3" in the "My courses" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 4" in the "My courses" "block" # behat_hooks::i_look_for_exceptions()
And I follow "All courses" # behat_hooks::i_look_for_exceptions()
And I should see "Miscellaneous" # behat_hooks::i_look_for_exceptions()
Scenario: Add the course list block on the dashboard and navigate to another course # C:\Apache24\htdocs\integration\blocks\course_list\tests\behat\block_course_list_dashboard.feature:39
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I press "Customise this page" # behat_hooks::i_look_for_exceptions()
When I add the "Courses" block # behat_hooks::i_look_for_exceptions()
Then I should see "Course 1" in the "My courses" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Course 2" in the "My courses" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Course 3" in the "My courses" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 4" in the "My courses" "block" # behat_hooks::i_look_for_exceptions()
And I follow "Course 3" # behat_hooks::i_look_for_exceptions()
And I should see "Course 3" # behat_hooks::i_look_for_exceptions()
Scenario: Add the course list block on the dashboard and view as an admin # C:\Apache24\htdocs\integration\blocks\course_list\tests\behat\block_course_list_dashboard.feature:50
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I press "Customise this page" # behat_hooks::i_look_for_exceptions()
When I add the "Courses" block # behat_hooks::i_look_for_exceptions()
Then I should see "Miscellaneous" in the "Course categories" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Category 1" in the "Course categories" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Category 2" in the "Course categories" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Category 3" in the "Course categories" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 1" in the "Course categories" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 2" in the "Course categories" "block" # behat_hooks::i_look_for_exceptions()
And I follow "All courses" # behat_hooks::i_look_for_exceptions()
And I should see "Miscellaneous" # behat_hooks::i_look_for_exceptions()
@block @block_course_list
Feature: Enable the course_list block on the frontpage and view it's contents
In order to enable the course list block on the frontpage
As an admin
I can add the course list block to the frontpage
Background: # C:\Apache24\htdocs\integration\blocks\course_list\tests\behat\block_course_list_frontpage.feature:7
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Category 1 | 0 | CAT1 |
| Category 2 | 0 | CAT2 |
| Category 3 | CAT2 | CAT3 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
| Course 2 | C2 | CAT1 |
| Course 3 | C3 | CAT2 |
| Course 4 | C4 | CAT3 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | First | teacher1@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| teacher1 | C2 | editingteacher |
| teacher1 | C3 | editingteacher |
Scenario: Add the course list block on the frontpage and navigate to the course listing # C:\Apache24\htdocs\integration\blocks\course_list\tests\behat\block_course_list_frontpage.feature:28
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I navigate to "Turn editing on" node in "Front page settings" # behat_hooks::i_look_for_exceptions()
And I add the "Courses" block # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
Then I should see "Course 1" in the "My courses" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Course 2" in the "My courses" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Course 3" in the "My courses" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 4" in the "My courses" "block" # behat_hooks::i_look_for_exceptions()
And I follow "All courses" # behat_hooks::i_look_for_exceptions()
And I should see "Miscellaneous" # behat_hooks::i_look_for_exceptions()
Scenario: Add the course list block on the frontpage page and navigate to another course # C:\Apache24\htdocs\integration\blocks\course_list\tests\behat\block_course_list_frontpage.feature:43
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I navigate to "Turn editing on" node in "Front page settings" # behat_hooks::i_look_for_exceptions()
And I add the "Courses" block # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
Then I should see "Course 1" in the "My courses" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Course 2" in the "My courses" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Course 3" in the "My courses" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 4" in the "My courses" "block" # behat_hooks::i_look_for_exceptions()
And I follow "Course 3" # behat_hooks::i_look_for_exceptions()
And I should see "Course 3" # behat_hooks::i_look_for_exceptions()
Scenario: Add the course list block on the frontpage page and view as an admin # C:\Apache24\htdocs\integration\blocks\course_list\tests\behat\block_course_list_frontpage.feature:58
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I navigate to "Turn editing on" node in "Front page settings" # behat_hooks::i_look_for_exceptions()
When I add the "Courses" block # behat_hooks::i_look_for_exceptions()
Then I should see "Miscellaneous" in the "Course categories" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Category 1" in the "Course categories" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Category 2" in the "Course categories" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Category 3" in the "Course categories" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 1" in the "Course categories" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 2" in the "Course categories" "block" # behat_hooks::i_look_for_exceptions()
And I follow "All courses" # behat_hooks::i_look_for_exceptions()
And I should see "Miscellaneous" # behat_hooks::i_look_for_exceptions()
Scenario: Add the course list block on the frontpage page and view as a guest # C:\Apache24\htdocs\integration\blocks\course_list\tests\behat\block_course_list_frontpage.feature:72
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I navigate to "Turn editing on" node in "Front page settings" # behat_hooks::i_look_for_exceptions()
And I add the "Courses" block # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "guest" # behat_hooks::i_look_for_exceptions()
Then I should see "Miscellaneous" in the "Course categories" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Category 1" in the "Course categories" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Category 2" in the "Course categories" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Category 3" in the "Course categories" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 1" in the "Course categories" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 2" in the "Course categories" "block" # behat_hooks::i_look_for_exceptions()
And I follow "All courses" # behat_hooks::i_look_for_exceptions()
And I should see "Miscellaneous" # behat_hooks::i_look_for_exceptions()
@block @block_course_overview
Feature: View the course overview block on the dashboard and test it's functionality
In order to view the course overview block on the dashboard
As an admin
I can configure the course overview block
Background: # C:\Apache24\htdocs\integration\blocks\course_overview\tests\behat\block_course_overview.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| student1 | Student | 1 | student1@example.com | S1 |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
And the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Category 1 | 0 | CAT1 |
| Category 2 | CAT1 | CAT2 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
| Course 2 | C2 | CAT1 |
| Course 3 | C3 | CAT2 |
Scenario: View the block by a user without any enrolments # C:\Apache24\htdocs\integration\blocks\course_overview\tests\behat\block_course_overview.feature:22
Given I log in as "student1" # behat_hooks::i_look_for_exceptions()
Then I should see "No course information to show" in the "Course overview" "block" # behat_hooks::i_look_for_exceptions()
Scenario: View the block by a user with several enrolments # C:\Apache24\htdocs\integration\blocks\course_overview\tests\behat\block_course_overview.feature:26
Given the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| student1 | C1 | student |
| student1 | C2 | student |
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
Then I should see "Course 1" in the "Course overview" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Course 2" in the "Course overview" "block" # behat_hooks::i_look_for_exceptions()
Scenario: View the block by a user with several enrolments and limit the number of courses. # C:\Apache24\htdocs\integration\blocks\course_overview\tests\behat\block_course_overview.feature:35
Given the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| student1 | C1 | student |
| student1 | C2 | student |
| student1 | C3 | student |
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I press "Customise this page" # behat_hooks::i_look_for_exceptions()
And I select "1" from the "Number of courses to display:" singleselect # behat_hooks::i_look_for_exceptions()
Then I should see "Course 1" in the "Course overview" "block" # behat_hooks::i_look_for_exceptions()
And I should see "You have 2 hidden courses" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 2" in the "Course overview" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 3" in the "Course overview" "block" # behat_hooks::i_look_for_exceptions()
And I follow "Show all courses" # behat_hooks::i_look_for_exceptions()
And I should see "Course 1" in the "Course overview" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Course 2" in the "Course overview" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Course 3" in the "Course overview" "block" # behat_hooks::i_look_for_exceptions()
Scenario: View the block by a user with several enrolments and an admin set default max courses. # C:\Apache24\htdocs\integration\blocks\course_overview\tests\behat\block_course_overview.feature:53
Given the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| defaultmaxcourses | 2 | block_course_overview |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| student1 | C1 | student |
| student1 | C2 | student |
| student1 | C3 | student |
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
Then I should see "Course 1" in the "Course overview" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Course 2" in the "Course overview" "block" # behat_hooks::i_look_for_exceptions()
And I should see "You have 1 hidden course" # behat_hooks::i_look_for_exceptions()
And I press "Customise this page" # behat_hooks::i_look_for_exceptions()
And I select "Always show all" from the "Number of courses to display:" singleselect # behat_hooks::i_look_for_exceptions()
And I should see "Course 3" in the "Course overview" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "You have 1 hidden course" # behat_hooks::i_look_for_exceptions()
Scenario: View the block by a user with several enrolments and an admin enforced maximum displayed courses. # C:\Apache24\htdocs\integration\blocks\course_overview\tests\behat\block_course_overview.feature:70
Given the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| defaultmaxcourses | 2 | block_course_overview |
| forcedefaultmaxcourses | 1 | block_course_overview |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| student1 | C1 | student |
| student1 | C2 | student |
| student1 | C3 | student |
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
Then I should see "Course 1" in the "Course overview" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Course 2" in the "Course overview" "block" # behat_hooks::i_look_for_exceptions()
And I should see "You have 1 hidden course" # behat_hooks::i_look_for_exceptions()
And I press "Customise this page" # behat_hooks::i_look_for_exceptions()
And I should not see "Always show all" # behat_hooks::i_look_for_exceptions()
Scenario: View the block by a user with the welcome area enabled and messaging disabled. # C:\Apache24\htdocs\integration\blocks\course_overview\tests\behat\block_course_overview.feature:86
Given the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| showwelcomearea | 1 | block_course_overview |
| messaging | 0 | |
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
Then I should see "Welcome Student" in the "Course overview" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "messages" in the "Course overview" "block" # behat_hooks::i_look_for_exceptions()
Scenario: View the block by a user with both the welcome area and messaging enabled. # C:\Apache24\htdocs\integration\blocks\course_overview\tests\behat\block_course_overview.feature:94
Given the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| showwelcomearea | 1 | block_course_overview |
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
Then I should see "Welcome Student" in the "Course overview" "block" # behat_hooks::i_look_for_exceptions()
And I should see "You have no unread messages" in the "Course overview" "block" # behat_hooks::i_look_for_exceptions()
And I follow "messages" # behat_hooks::i_look_for_exceptions()
And I should see "No messages" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: View the block by a user with the welcome area and the user having messages. # C:\Apache24\htdocs\integration\blocks\course_overview\tests\behat\block_course_overview.feature:104
Given the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| showwelcomearea | 1 | block_course_overview |
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I should see "Welcome Student" in the "Course overview" "block" # behat_hooks::i_look_for_exceptions()
And I should see "You have no unread messages" in the "Course overview" "block" # behat_hooks::i_look_for_exceptions()
And I follow "messages" # behat_hooks::i_look_for_exceptions()
And I send "This is message 1" message to "Teacher 1" user # behat_hooks::i_look_for_exceptions()
And I send "This is message 2" message to "Teacher 1" user # behat_hooks::i_look_for_exceptions()
When I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
Then I should see "Welcome Teacher" in the "Course overview" "block" # behat_hooks::i_look_for_exceptions()
And I should see "You have 2 unread messages" in the "Course overview" "block" # behat_hooks::i_look_for_exceptions()
Scenario: View the block by a user with the parent categories displayed. # C:\Apache24\htdocs\integration\blocks\course_overview\tests\behat\block_course_overview.feature:118
Given the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| showcategories | Parent category only | block_course_overview |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| student1 | C1 | student |
| student1 | C2 | student |
| student1 | C3 | student |
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
Then I should see "Miscellaneous" in the "Course overview" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Category 1" in the "Course overview" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Category 2" in the "Course overview" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Category 1 / Category 1" in the "Course overview" "block" # behat_hooks::i_look_for_exceptions()
Scenario: View the block by a user with the full categories displayed. # C:\Apache24\htdocs\integration\blocks\course_overview\tests\behat\block_course_overview.feature:132
Given the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| showcategories | 2 | block_course_overview |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| student1 | C1 | student |
| student1 | C2 | student |
| student1 | C3 | student |
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
Then I should see "Miscellaneous" in the "Course overview" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Category 1 / Category 2" in the "Course overview" "block" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: View the block by a user with the show children option enabled. # C:\Apache24\htdocs\integration\blocks\course_overview\tests\behat\block_course_overview.feature:145
Given the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| showchildren | 1 | block_course_overview |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| student1 | C1 | student |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "Manage enrol plugins" node in "Site administration > Plugins > Enrolments" # behat_hooks::i_look_for_exceptions()
And I click on "Enable" "link" in the "Course meta link" "table_row" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 2" # behat_hooks::i_look_for_exceptions()
And I navigate to "Enrolment methods" node in "Course administration > Users" # behat_hooks::i_look_for_exceptions()
And I add "Course meta link" enrolment method with: # behat_hooks::i_look_for_exceptions()
| Link course | C1 |
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
Then I should see "Course 1" in the "Course overview" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Course 2" in the "Course overview" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Includes C1" in the "Course overview" "block" # behat_hooks::i_look_for_exceptions()
@block @block_course_summary
Feature: Course summary block used in a course
In order to help particpants know the summary of a course
As a teacher
I can add the course summary block to a course page
Background: # C:\Apache24\htdocs\integration\blocks\course_summary\tests\behat\block_course_summary_course.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | summary | category |
| Course 1 | C101 | Proved the course summary block works! | 0 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Sam | Student | student1@example.com |
| teacher1 | Teacher | One | teacher1@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| student1 | C101 | student |
| teacher1 | C101 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Course/site summary" block # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Student can view course summary # C:\Apache24\htdocs\integration\blocks\course_summary\tests\behat\block_course_summary_course.feature:25
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then "Course summary" "block" should exist # behat_hooks::i_look_for_exceptions()
And I should see "Course summary" in the "Course summary" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Proved the course summary block works!" in the "Course summary" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Teacher can not see edit icon when edit mode is off # C:\Apache24\htdocs\integration\blocks\course_summary\tests\behat\block_course_summary_course.feature:32
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then I should see "Proved the course summary block works!" in the "Course summary" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Course summary" in the "Course summary" "block" # behat_hooks::i_look_for_exceptions()
And "Edit" "link" should not exist in the "Course summary" "block" # behat_hooks::i_look_for_exceptions()
@block @block_course_summary
Feature: Course summary block used on the frontpage
In order to help particpants know the summary of a site
As admin
I can use the course summary block on the frontpage
Background: # C:\Apache24\htdocs\integration\blocks\course_summary\tests\behat\block_course_summary_frontpage.feature:7
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Course/site summary" block # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Front page settings" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| summary | Proved the summary block works! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Guest can view site summary # C:\Apache24\htdocs\integration\blocks\course_summary\tests\behat\block_course_summary_frontpage.feature:19
When I am on site homepage # behat_hooks::i_look_for_exceptions()
Then "Course/site summary" "block" should exist # behat_hooks::i_look_for_exceptions()
And I should not see "Course summary" in the "Course/site summary" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Proved the summary block works!" in the "Course/site summary" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Admin can not see edit icon when edit mode is off # C:\Apache24\htdocs\integration\blocks\course_summary\tests\behat\block_course_summary_frontpage.feature:25
When I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
Then I should see "Proved the summary block works!" in the "Course/site summary" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Course summary" in the "Course/site summary" "block" # behat_hooks::i_look_for_exceptions()
And "Edit" "link" should not exist in the "Course/site summary" "block" # behat_hooks::i_look_for_exceptions()
@mod @mod_choice
Feature: Add choice activity
In order to customise choice page
As a teacher or admin
I need to add remove block from the choice page
Scenario: Add a choice activity as admin and check blog menu block should contain link. # C:\Apache24\htdocs\integration\mod\choice\tests\behat\block_editing.feature:8
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Choice" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Choice name | Choice name 1 |
| Description | Choice Description 1 |
| option[0] | Option 1 |
| option[1] | Option 2 |
And I follow "Choice name 1" # behat_hooks::i_look_for_exceptions()
And I add the "Blog menu" block # behat_hooks::i_look_for_exceptions()
And I should see "View all entries about this Choice" # behat_hooks::i_look_for_exceptions()
When I configure the "Blog menu" block # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "View all entries about this Choice" # behat_hooks::i_look_for_exceptions()
And I open the "Blog menu" blocks action menu # behat_hooks::i_look_for_exceptions()
And I click on "Delete" "link" in the "Blog menu" "block" # behat_hooks::i_look_for_exceptions()
And I press "Yes" # behat_hooks::i_look_for_exceptions()
And I should not see "View all entries about this Choice" # behat_hooks::i_look_for_exceptions()
And I should see "Choice Description 1" # behat_hooks::i_look_for_exceptions()
Scenario: Add a choice activity as teacher and check blog menu block contain choice link. # C:\Apache24\htdocs\integration\mod\choice\tests\behat\block_editing.feature:33
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Choice" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Choice name | Choice name 1 |
| Description | Choice Description 1 |
| option[0] | Option 1 |
| option[1] | Option 2 |
And I follow "Choice name 1" # behat_hooks::i_look_for_exceptions()
And I add the "Blog menu" block # behat_hooks::i_look_for_exceptions()
And I should see "View all entries about this Choice" # behat_hooks::i_look_for_exceptions()
When I configure the "Blog menu" block # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "View all entries about this Choice" # behat_hooks::i_look_for_exceptions()
And I open the "Blog menu" blocks action menu # behat_hooks::i_look_for_exceptions()
And I click on "Delete" "link" in the "Blog menu" "block" # behat_hooks::i_look_for_exceptions()
And I press "Yes" # behat_hooks::i_look_for_exceptions()
And I should not see "View all entries about this Choice" # behat_hooks::i_look_for_exceptions()
And I should see "Choice Description 1" # behat_hooks::i_look_for_exceptions()
Scenario: Add a choice activity as teacher (with dual role) and check blog menu block contain choice link. # C:\Apache24\htdocs\integration\mod\choice\tests\behat\block_editing.feature:65
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| teacher1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Choice" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Choice name | Choice name 1 |
| Description | Choice Description 1 |
| option[0] | Option 1 |
| option[1] | Option 2 |
And I follow "Choice name 1" # behat_hooks::i_look_for_exceptions()
And I add the "Blog menu" block # behat_hooks::i_look_for_exceptions()
And I should see "View all entries about this Choice" # behat_hooks::i_look_for_exceptions()
When I configure the "Blog menu" block # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "View all entries about this Choice" # behat_hooks::i_look_for_exceptions()
And I open the "Blog menu" blocks action menu # behat_hooks::i_look_for_exceptions()
And I click on "Delete" "link" in the "Blog menu" "block" # behat_hooks::i_look_for_exceptions()
And I press "Yes" # behat_hooks::i_look_for_exceptions()
And I should not see "View all entries about this Choice" # behat_hooks::i_look_for_exceptions()
And I should see "Choice Description 1" # behat_hooks::i_look_for_exceptions()
@block @block_messages
Feature: The messages block allows users to list new messages an a course
In order to enable the messages block in a course
As a teacher
I can add the messages block to a course and view my messages
Background: # C:\Apache24\htdocs\integration\blocks\messages\tests\behat\block_messages_course.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
| student1 | Student | 1 | student1@example.com | S1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
Scenario: View the block by a user with messaging disabled. # C:\Apache24\htdocs\integration\blocks\messages\tests\behat\block_messages_course.feature:20
Given the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| messaging | 0 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
When I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Messages" block # behat_hooks::i_look_for_exceptions()
Then I should see "Messaging is disabled on this site" in the "Messages" "block" # behat_hooks::i_look_for_exceptions()
Scenario: View the block by a user who does not have any messages. # C:\Apache24\htdocs\integration\blocks\messages\tests\behat\block_messages_course.feature:29
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
When I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Messages" block # behat_hooks::i_look_for_exceptions()
Then I should see "No messages" in the "Messages" "block" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: View the block by a user who has messages. # C:\Apache24\htdocs\integration\blocks\messages\tests\behat\block_messages_course.feature:37
Given I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Messages" in the user menu # behat_hooks::i_look_for_exceptions()
And I send "This is message 1" message to "Teacher 1" user # behat_hooks::i_look_for_exceptions()
And I send "This is message 2" message to "Teacher 1" user # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
When I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Messages" block # behat_hooks::i_look_for_exceptions()
Then I should see "Student 1" in the "Messages" "block" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Use the block to send a message to a user. # C:\Apache24\htdocs\integration\blocks\messages\tests\behat\block_messages_course.feature:50
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Messages" block # behat_hooks::i_look_for_exceptions()
And I click on "//a[normalize-space(.) = 'Messages']" "xpath_element" in the "Messages" "block" # behat_hooks::i_look_for_exceptions()
And I send "This is message 1" message to "Student 1" user # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then I should see "Teacher 1" in the "Messages" "block" # behat_hooks::i_look_for_exceptions()
@block @block_messages
Feature: The messages block allows users to list new messages on the dashboard
In order to enable the messages block on the dashboard
As a user
I can add the messages block to a my dashboard and view my messages
Background: # C:\Apache24\htdocs\integration\blocks\messages\tests\behat\block_messages_dashboard.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
| student1 | Student | 1 | student1@example.com | S1 |
Scenario: View the block by a user with messaging disabled. # C:\Apache24\htdocs\integration\blocks\messages\tests\behat\block_messages_dashboard.feature:13
Given the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| messaging | 0 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I press "Customise this page" # behat_hooks::i_look_for_exceptions()
When I add the "Messages" block # behat_hooks::i_look_for_exceptions()
Then I should see "Messaging is disabled on this site" in the "Messages" "block" # behat_hooks::i_look_for_exceptions()
Scenario: View the block by a user who does not have any messages. # C:\Apache24\htdocs\integration\blocks\messages\tests\behat\block_messages_dashboard.feature:21
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I press "Customise this page" # behat_hooks::i_look_for_exceptions()
When I add the "Messages" block # behat_hooks::i_look_for_exceptions()
Then I should see "No messages" in the "Messages" "block" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: View the block by a user who has messages. # C:\Apache24\htdocs\integration\blocks\messages\tests\behat\block_messages_dashboard.feature:28
Given I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Messages" in the user menu # behat_hooks::i_look_for_exceptions()
And I send "This is message 1" message to "Teacher 1" user # behat_hooks::i_look_for_exceptions()
And I send "This is message 2" message to "Teacher 1" user # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I press "Customise this page" # behat_hooks::i_look_for_exceptions()
And I add the "Messages" block # behat_hooks::i_look_for_exceptions()
Then I should see "Student 1" in the "Messages" "block" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Use the block to send a message to a user. # C:\Apache24\htdocs\integration\blocks\messages\tests\behat\block_messages_dashboard.feature:40
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I press "Customise this page" # behat_hooks::i_look_for_exceptions()
And I add the "Messages" block # behat_hooks::i_look_for_exceptions()
And I click on "//a[normalize-space(.) = 'Messages']" "xpath_element" in the "Messages" "block" # behat_hooks::i_look_for_exceptions()
And I send "This is message 1" message to "Student 1" user # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I press "Customise this page" # behat_hooks::i_look_for_exceptions()
And I add the "Messages" block # behat_hooks::i_look_for_exceptions()
Then I should see "Teacher 1" in the "Messages" "block" # behat_hooks::i_look_for_exceptions()
@block @block_messages
Feature: The messages block allows users to list new messages on the frontpage
In order to enable the messages block on the frontpage
As an admin
I can add the messages block to a the frontpage and view my messages
Background: # C:\Apache24\htdocs\integration\blocks\messages\tests\behat\block_messages_frontpage.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
| student1 | Student | 1 | student1@example.com | S1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I navigate to "Turn editing on" node in "Front page settings" # behat_hooks::i_look_for_exceptions()
And I add the "Messages" block # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: View the block by a user with messaging disabled. # C:\Apache24\htdocs\integration\blocks\messages\tests\behat\block_messages_frontpage.feature:18
Given the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| messaging | 0 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
When I navigate to "Turn editing on" node in "Front page settings" # behat_hooks::i_look_for_exceptions()
And I should see "Messaging is disabled on this site" in the "Messages" "block" # behat_hooks::i_look_for_exceptions()
Then I navigate to "Turn editing off" node in "Front page settings" # behat_hooks::i_look_for_exceptions()
And I should not see "Messaging is disabled on this site" # behat_hooks::i_look_for_exceptions()
Scenario: View the block by a user who does not have any messages. # C:\Apache24\htdocs\integration\blocks\messages\tests\behat\block_messages_frontpage.feature:28
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
When I am on site homepage # behat_hooks::i_look_for_exceptions()
Then I should see "No messages" in the "Messages" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to view the block as a guest user. # C:\Apache24\htdocs\integration\blocks\messages\tests\behat\block_messages_frontpage.feature:33
Given I log in as "guest" # behat_hooks::i_look_for_exceptions()
When I am on site homepage # behat_hooks::i_look_for_exceptions()
Then I should not see "Messages" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: View the block by a user who has messages. # C:\Apache24\htdocs\integration\blocks\messages\tests\behat\block_messages_frontpage.feature:39
Given I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Messages" in the user menu # behat_hooks::i_look_for_exceptions()
And I send "This is message 1" message to "Teacher 1" user # behat_hooks::i_look_for_exceptions()
And I send "This is message 2" message to "Teacher 1" user # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
Then I should see "Student 1" in the "Messages" "block" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Use the block to send a message to a user. # C:\Apache24\htdocs\integration\blocks\messages\tests\behat\block_messages_frontpage.feature:50
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I click on "//a[normalize-space(.) = 'Messages']" "xpath_element" in the "Messages" "block" # behat_hooks::i_look_for_exceptions()
And I send "This is message 1" message to "Student 1" user # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
Then I should see "Teacher 1" in the "Messages" "block" # behat_hooks::i_look_for_exceptions()
@block @block_myprofile
Feature: The logged in user block allows users to view their profile information in an activity
In order to enable the logged in user block in an activity
As a teacher
I can add the logged in user block to an activity and view my information
Scenario: View the logged in user block by a user in an activity # C:\Apache24\htdocs\integration\blocks\myprofile\tests\behat\block_myprofile_activity.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | One | teacher1@example.com | T1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | course | idnumber | name | intro |
| page | C1 | page1 | Test page name | Test page description |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I follow "Test page name" # behat_hooks::i_look_for_exceptions()
When I add the "Logged in user" block # behat_hooks::i_look_for_exceptions()
Then I should see "Teacher One" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
@block @block_myprofile
Feature: The logged in user block allows users to view their profile information
In order to enable the logged in user block
As a user
I can add the logged in user block and configure it to show my information
Scenario: Configure the logged in user block to show / hide the users country # C:\Apache24\htdocs\integration\blocks\myprofile\tests\behat\block_myprofile.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | country |
| teacher1 | Teacher | One | teacher1@example.com | AU |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I press "Customise this page" # behat_hooks::i_look_for_exceptions()
When I add the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I configure the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Display country | No |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Teacher One" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Australia" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
And I configure the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Display country | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "Australia" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Configure the logged in user block to show / hide the users city # C:\Apache24\htdocs\integration\blocks\myprofile\tests\behat\block_myprofile.feature:26
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | city |
| teacher1 | Teacher | One | teacher1@example.com | Perth |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I press "Customise this page" # behat_hooks::i_look_for_exceptions()
When I add the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I configure the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Display city | No |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Teacher One" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Perth" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
And I configure the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Display city | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "Perth" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Configure the logged in user block to show / hide the users email # C:\Apache24\htdocs\integration\blocks\myprofile\tests\behat\block_myprofile.feature:45
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | One | teacher1@example.com |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I press "Customise this page" # behat_hooks::i_look_for_exceptions()
When I add the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I configure the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Display email | No |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Teacher One" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "teacher1@example.com" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
And I configure the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Display email | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "teacher1@example.com" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Configure the logged in user block to show / hide the users ICQ # C:\Apache24\htdocs\integration\blocks\myprofile\tests\behat\block_myprofile.feature:64
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | icq |
| teacher1 | Teacher | One | teacher1@example.com | myicq |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I press "Customise this page" # behat_hooks::i_look_for_exceptions()
When I add the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I configure the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Display ICQ | No |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Teacher One" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "myicq" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
And I configure the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Display ICQ | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "myicq" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Configure the logged in user block to show / hide the users Skype # C:\Apache24\htdocs\integration\blocks\myprofile\tests\behat\block_myprofile.feature:83
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | skype |
| teacher1 | Teacher | One | teacher1@example.com | myskype |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I press "Customise this page" # behat_hooks::i_look_for_exceptions()
When I add the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I configure the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Display Skype | No |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Teacher One" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "myskype" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
And I configure the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Display Skype | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "myskype" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Configure the logged in user block to show / hide the users Yahoo # C:\Apache24\htdocs\integration\blocks\myprofile\tests\behat\block_myprofile.feature:102
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | yahoo |
| teacher1 | Teacher | One | teacher1@example.com | myyahoo |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I press "Customise this page" # behat_hooks::i_look_for_exceptions()
When I add the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I configure the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Display Yahoo | No |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Teacher One" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "myyahoo" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
And I configure the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Display Yahoo | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "myyahoo" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Configure the logged in user block to show / hide the users AIM # C:\Apache24\htdocs\integration\blocks\myprofile\tests\behat\block_myprofile.feature:121
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | aim |
| teacher1 | Teacher | One | teacher1@example.com | myaim |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I press "Customise this page" # behat_hooks::i_look_for_exceptions()
When I add the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I configure the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Display AIM | No |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Teacher One" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "myaim" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
And I configure the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Display AIM | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "myaim" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Configure the logged in user block to show / hide the users MSN # C:\Apache24\htdocs\integration\blocks\myprofile\tests\behat\block_myprofile.feature:140
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | msn |
| teacher1 | Teacher | One | teacher1@example.com | mymsn |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I press "Customise this page" # behat_hooks::i_look_for_exceptions()
When I add the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I configure the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Display MSN | No |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Teacher One" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "mymsn" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
And I configure the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Display MSN | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "mymsn" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Configure the logged in user block to show / hide the users phone # C:\Apache24\htdocs\integration\blocks\myprofile\tests\behat\block_myprofile.feature:159
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | phone1 |
| teacher1 | Teacher | One | teacher1@example.com | 555-5555 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I press "Customise this page" # behat_hooks::i_look_for_exceptions()
When I add the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I configure the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Display phone | No |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Teacher One" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "555-5555" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
And I configure the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Display phone | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "555-5555" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Configure the logged in user block to show / hide the users mobile phone # C:\Apache24\htdocs\integration\blocks\myprofile\tests\behat\block_myprofile.feature:178
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | phone2 |
| teacher1 | Teacher | One | teacher1@example.com | 555-5555 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I press "Customise this page" # behat_hooks::i_look_for_exceptions()
When I add the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I configure the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Display mobile phone | No |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Teacher One" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "555-5555" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
And I configure the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Display mobile phone | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "555-5555" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Configure the logged in user block to show / hide the users Institution # C:\Apache24\htdocs\integration\blocks\myprofile\tests\behat\block_myprofile.feature:197
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | institution |
| teacher1 | Teacher | One | teacher1@example.com | myinstitution |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I press "Customise this page" # behat_hooks::i_look_for_exceptions()
When I add the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I configure the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Display institution | No |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Teacher One" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "myinstitution" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
And I configure the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Display institution | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "myinstitution" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Configure the logged in user block to show / hide the users address # C:\Apache24\htdocs\integration\blocks\myprofile\tests\behat\block_myprofile.feature:216
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | address |
| teacher1 | Teacher | One | teacher1@example.com | myaddress |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I press "Customise this page" # behat_hooks::i_look_for_exceptions()
When I add the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I configure the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Display address | No |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Teacher One" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "myaddress" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
And I configure the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Display address | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "myaddress" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Configure the logged in user block to show / hide the users first access # C:\Apache24\htdocs\integration\blocks\myprofile\tests\behat\block_myprofile.feature:235
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | One | teacher1@example.com |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I press "Customise this page" # behat_hooks::i_look_for_exceptions()
When I add the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I configure the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Display first access | No |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Teacher One" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "First access:" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
And I configure the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Display first access | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "First access:" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Configure the logged in user block to show / hide the users last access # C:\Apache24\htdocs\integration\blocks\myprofile\tests\behat\block_myprofile.feature:254
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | One | teacher1@example.com |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I press "Customise this page" # behat_hooks::i_look_for_exceptions()
When I add the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I configure the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Display last access | No |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Teacher One" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Last access:" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
And I configure the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Display last access | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "Last access:" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Configure the logged in user block to show / hide the users current login # C:\Apache24\htdocs\integration\blocks\myprofile\tests\behat\block_myprofile.feature:273
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | One | teacher1@example.com |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I press "Customise this page" # behat_hooks::i_look_for_exceptions()
When I add the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I configure the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Display current login | No |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Teacher One" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Log in:" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
And I configure the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Display current login | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "Log in:" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Configure the logged in user block to show / hide the users last ip # C:\Apache24\htdocs\integration\blocks\myprofile\tests\behat\block_myprofile.feature:292
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | One | teacher1@example.com |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I press "Customise this page" # behat_hooks::i_look_for_exceptions()
When I add the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I configure the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Display last IP | No |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Teacher One" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "IP:" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
And I configure the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Display last IP | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "IP:" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
@block @block_myprofile
Feature: The logged in user block allows users to view their profile information in a course
In order to enable the logged in user block in a course
As a teacher
I can add the logged in user block to a course and view my information
Scenario: View the logged in user block by a user in a course # C:\Apache24\htdocs\integration\blocks\myprofile\tests\behat\block_myprofile_course.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | One | teacher1@example.com | T1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Logged in user" block # behat_hooks::i_look_for_exceptions()
Then I should see "Teacher One" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
@block @block_myprofile
Feature: The logged in user block allows users to view their profile information in on the dashboard
In order to enable the logged in user block on the dashboard
As a user
I can add the logged in user block to a the dashboard and view my information
Scenario: View the logged in user block by a user on the dashboard # C:\Apache24\htdocs\integration\blocks\myprofile\tests\behat\block_myprofile_dashboard.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | One | teacher1@example.com |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I press "Customise this page" # behat_hooks::i_look_for_exceptions()
When I add the "Logged in user" block # behat_hooks::i_look_for_exceptions()
Then I should see "Teacher One" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
@block @block_myprofile
Feature: The logged in user block allows users to view their profile information on the front page
In order to enable the logged in user block on the frontpage
As an admin
I can add the logged in user block to the frontpage and view my information
Background: # C:\Apache24\htdocs\integration\blocks\myprofile\tests\behat\block_myprofile_frontpage.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | One | teacher1@example.com | T1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I navigate to "Turn editing on" node in "Front page settings" # behat_hooks::i_look_for_exceptions()
And I add the "Logged in user" block # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Try to view the logged in user block as a guest # C:\Apache24\htdocs\integration\blocks\myprofile\tests\behat\block_myprofile_frontpage.feature:17
Given I log in as "guest" # behat_hooks::i_look_for_exceptions()
When I am on site homepage # behat_hooks::i_look_for_exceptions()
Then I should not see "Logged in user" # behat_hooks::i_look_for_exceptions()
Scenario: View the logged in user block by a logged in user # C:\Apache24\htdocs\integration\blocks\myprofile\tests\behat\block_myprofile_frontpage.feature:22
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
When I am on site homepage # behat_hooks::i_look_for_exceptions()
Then I should see "Teacher One" in the "Logged in user" "block" # behat_hooks::i_look_for_exceptions()
@block @block_online_users
Feature: The online users block allow you to see who is currently online
In order to enable the online users block on an course page
As a teacher
I can add the online users block to a course page
Background: # C:\Apache24\htdocs\integration\blocks\online_users\tests\behat\block_online_users_course.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
Scenario: Add the online users on course page and see myself # C:\Apache24\htdocs\integration\blocks\online_users\tests\behat\block_online_users_course.feature:22
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
When I add the "Online users" block # behat_hooks::i_look_for_exceptions()
Then I should see "Teacher 1" in the "Online users" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Add the online users on course page and see other logged in users # C:\Apache24\htdocs\integration\blocks\online_users\tests\behat\block_online_users_course.feature:29
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Online users" block # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then I should see "Teacher 1" in the "Online users" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Student 1" in the "Online users" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 2" in the "Online users" "block" # behat_hooks::i_look_for_exceptions()
@block @block_online_users
Feature: The online users block allow you to see who is currently online
In order to use the online users block on the dashboard
As a user
I can view the online users block on my dashboard
Background: # C:\Apache24\htdocs\integration\blocks\online_users\tests\behat\block_online_users_dashboard.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
Scenario: View the online users block on the dashboard and see myself # C:\Apache24\htdocs\integration\blocks\online_users\tests\behat\block_online_users_dashboard.feature:14
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
Then I should see "Teacher 1" in the "Online users" "block" # behat_hooks::i_look_for_exceptions()
Scenario: View the online users block on the dashboard and see other logged in users # C:\Apache24\htdocs\integration\blocks\online_users\tests\behat\block_online_users_dashboard.feature:18
Given I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
Then I should see "Teacher 1" in the "Online users" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Student 1" in the "Online users" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Student 2" in the "Online users" "block" # behat_hooks::i_look_for_exceptions()
@block @block_online_users
Feature: The online users block allow you to see who is currently online
In order to enable the online users block on the front page page
As an admin
I can add the online users block to the front page page
Background: # C:\Apache24\htdocs\integration\blocks\online_users\tests\behat\block_online_users_frontpage.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
Scenario: View the online users block on the front page and see myself # C:\Apache24\htdocs\integration\blocks\online_users\tests\behat\block_online_users_frontpage.feature:13
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I navigate to "Turn editing on" node in "Front page settings" # behat_hooks::i_look_for_exceptions()
When I add the "Online users" block # behat_hooks::i_look_for_exceptions()
Then I should see "Admin User" in the "Online users" "block" # behat_hooks::i_look_for_exceptions()
Scenario: View the online users block on the front page as a logged in user # C:\Apache24\htdocs\integration\blocks\online_users\tests\behat\block_online_users_frontpage.feature:20
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I navigate to "Turn editing on" node in "Front page settings" # behat_hooks::i_look_for_exceptions()
And I add the "Online users" block # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
Then I should see "Admin User" in the "Online users" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Student 1" in the "Online users" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Student 2" in the "Online users" "block" # behat_hooks::i_look_for_exceptions()
Scenario: View the online users block on the front page as a guest # C:\Apache24\htdocs\integration\blocks\online_users\tests\behat\block_online_users_frontpage.feature:34
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I navigate to "Turn editing on" node in "Front page settings" # behat_hooks::i_look_for_exceptions()
And I add the "Online users" block # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "guest" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
Then I should see "Admin User" in the "Online users" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Student 1" in the "Online users" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Student 2" in the "Online users" "block" # behat_hooks::i_look_for_exceptions()
@block @block_participants
Feature: People Block used in a course
In order to view participants in a course
As a teacher
I can add the people block to a course
Background: # C:\Apache24\htdocs\integration\blocks\participants\tests\behat\block_participants_course.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C101 | 0 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Sam | Student | student1@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| student1 | C101 | student |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "People" block # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Student can view participants link # C:\Apache24\htdocs\integration\blocks\participants\tests\behat\block_participants_course.feature:24
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then "People" "block" should exist # behat_hooks::i_look_for_exceptions()
And I should see "Participants" in the "People" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Student can follow participants link and be directed to the correct page # C:\Apache24\htdocs\integration\blocks\participants\tests\behat\block_participants_course.feature:30
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I click on "Participants" "link" in the "People" "block" # behat_hooks::i_look_for_exceptions()
Then I should see "All participants" in the "#page-content" "css_element" # behat_hooks::i_look_for_exceptions()
And the "My courses" select box should contain "C101" # behat_hooks::i_look_for_exceptions()
Scenario: Student without permission can not view participants link # C:\Apache24\htdocs\integration\blocks\participants\tests\behat\block_participants_course.feature:37
Given the following "permission overrides" exist: # behat_hooks::i_look_for_exceptions()
| capability | permission | role | contextlevel | reference |
| moodle/course:viewparticipants | Prevent | student | Course | C101 |
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then "People" "block" should not exist # behat_hooks::i_look_for_exceptions()
@block @block_participants
Feature: People Block used on frontpage
In order to view participants in a site
As a admin
I can add the people block to the front page
Background: # C:\Apache24\htdocs\integration\blocks\participants\tests\behat\block_participants_frontpage.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Sam | Student | student1@example.com |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I navigate to "Turn editing on" node in "Front page settings" # behat_hooks::i_look_for_exceptions()
And I add the "People" block # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Admin can view site participants link # C:\Apache24\htdocs\integration\blocks\participants\tests\behat\block_participants_frontpage.feature:17
When I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
Then "People" "block" should exist # behat_hooks::i_look_for_exceptions()
And I should see "Participants" in the "People" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Student can not follow participants link on frontpage # C:\Apache24\htdocs\integration\blocks\participants\tests\behat\block_participants_frontpage.feature:23
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
Then "People" "block" should not exist # behat_hooks::i_look_for_exceptions()
@block @block_private_files @file_upload @javascript
Feature: The private files block allows users to store files privately in moodle
In order to store a private file in moodle
As a teacher
I can upload the file to my private files area using the private files block in an activity
Scenario: Upload a file to the private files block in an activity # C:\Apache24\htdocs\integration\blocks\private_files\tests\behat\block_private_files_activity.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | course | idnumber | name | intro |
| page | C1 | page1 | Test page name | Test page description |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I follow "Test page name" # behat_hooks::i_look_for_exceptions()
And I add the "Private files" block # behat_hooks::i_look_for_exceptions()
And I should see "No files available" in the "Private files" "block" # behat_hooks::i_look_for_exceptions()
When I follow "Manage private files..." # behat_hooks::i_look_for_exceptions()
And I upload "blocks/private_files/tests/fixtures/testfile.txt" file to "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "testfile.txt" in the "Private files" "block" # behat_hooks::i_look_for_exceptions()
@block @block_private_files @file_upload @javascript
Feature: The private files block allows users to store files privately in moodle
In order to store a private file in moodle
As a teacher
I can upload the file to my private files area using the private files block in a course
Scenario: Upload a file to the private files block from a course # C:\Apache24\htdocs\integration\blocks\private_files\tests\behat\block_private_files_course.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Private files" block # behat_hooks::i_look_for_exceptions()
And I should see "No files available" in the "Private files" "block" # behat_hooks::i_look_for_exceptions()
When I follow "Manage private files..." # behat_hooks::i_look_for_exceptions()
And I upload "blocks/private_files/tests/fixtures/testfile.txt" file to "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "testfile.txt" in the "Private files" "block" # behat_hooks::i_look_for_exceptions()
@block @block_private_files @_file_upload @javascript
Feature: The private files block allows users to store files privately in moodle
In order to store a private file in moodle
As a user
I can upload the file to my private files area using the private files block on the dashboard
Scenario: Upload a file to the private files block from the dashboard # C:\Apache24\htdocs\integration\blocks\private_files\tests\behat\block_private_files_dashboard.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And "Private files" "block" should exist # behat_hooks::i_look_for_exceptions()
And I should see "No files available" in the "Private files" "block" # behat_hooks::i_look_for_exceptions()
When I follow "Manage private files..." # behat_hooks::i_look_for_exceptions()
And I upload "blocks/private_files/tests/fixtures/testfile.txt" file to "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "testfile.txt" in the "Private files" "block" # behat_hooks::i_look_for_exceptions()
@block @block_private_files @_file_upload
Feature: The private files block allows users to store files privately in moodle
In order to store a private file in moodle
As a teacher
I can upload the file to my private files area using the private files block from the front page
Background: # C:\Apache24\htdocs\integration\blocks\private_files\tests\behat\block_private_files_frontpage.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I navigate to "Turn editing on" node in "Front page settings" # behat_hooks::i_look_for_exceptions()
And I add the "Private files" block # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Try to view the private files block as a guest # C:\Apache24\htdocs\integration\blocks\private_files\tests\behat\block_private_files_frontpage.feature:20
Given I log in as "guest" # behat_hooks::i_look_for_exceptions()
When I am on site homepage # behat_hooks::i_look_for_exceptions()
Then "Private files" "block" should not exist # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Upload a file to the private files block from the frontpage # C:\Apache24\htdocs\integration\blocks\private_files\tests\behat\block_private_files_frontpage.feature:26
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And "Private files" "block" should exist # behat_hooks::i_look_for_exceptions()
And I should see "No files available" in the "Private files" "block" # behat_hooks::i_look_for_exceptions()
When I follow "Manage private files..." # behat_hooks::i_look_for_exceptions()
And I upload "blocks/private_files/tests/fixtures/testfile.txt" file to "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "testfile.txt" in the "Private files" "block" # behat_hooks::i_look_for_exceptions()
@block @block_search_forums @mod_forum
Feature: The search forums block allows users to search for forum posts
In order to search for a forum post
As a user
I can use the search forums block
Background: # C:\Apache24\htdocs\integration\blocks\search_forums\tests\behat\block_search_forums_course.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
| student1 | Student | 1 | student1@example.com | S1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I set the field "id_newsitems" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Latest announcements" block # behat_hooks::i_look_for_exceptions()
And I add the "Search forums" block # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Use the search forum block in a course without any forum posts # C:\Apache24\htdocs\integration\blocks\search_forums\tests\behat\block_search_forums_course.feature:29
Given I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
When I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| searchform_search | Moodle |
And I press "Go" # behat_hooks::i_look_for_exceptions()
Then I should see "No posts" # behat_hooks::i_look_for_exceptions()
Scenario: Use the search forum block in a course with a hidden forum and search for posts # C:\Apache24\htdocs\integration\blocks\search_forums\tests\behat\block_search_forums_course.feature:37
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I add a new topic to "Announcements" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | My subject |
| Message | My message |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I follow "Announcements" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Forum administration" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I set the field "id_visible" to "0" # behat_hooks::i_look_for_exceptions()
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And "Search forums" "block" should exist # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| searchform_search | message |
And I press "Go" # behat_hooks::i_look_for_exceptions()
Then I should see "No posts" # behat_hooks::i_look_for_exceptions()
Scenario: Use the search forum block in a course and search for posts # C:\Apache24\htdocs\integration\blocks\search_forums\tests\behat\block_search_forums_course.feature:59
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I add a new topic to "Announcements" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | My subject |
| Message | My message |
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And "Search forums" "block" should exist # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| searchform_search | message |
And I press "Go" # behat_hooks::i_look_for_exceptions()
Then I should see "My subject" # behat_hooks::i_look_for_exceptions()
@block @block_search_forums @mod_forum
Feature: The search forums block allows users to search for forum posts
In order to search for a forum post
As an administrator
I can add the search forums block
Background: # C:\Apache24\htdocs\integration\blocks\search_forums\tests\behat\block_search_forums_frontpage.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| student1 | Student | 1 | student1@example.com | S1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I navigate to "Turn editing on" node in "Front page settings" # behat_hooks::i_look_for_exceptions()
And I add the "Search forums" block # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Use the search forum block on the frontpage and search for posts as a user # C:\Apache24\htdocs\integration\blocks\search_forums\tests\behat\block_search_forums_frontpage.feature:17
Given I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
When I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| searchform_search | Moodle |
And I press "Go" # behat_hooks::i_look_for_exceptions()
Then I should see "No posts" # behat_hooks::i_look_for_exceptions()
Scenario: Use the search forum block on the frontpage and search for posts as a guest # C:\Apache24\htdocs\integration\blocks\search_forums\tests\behat\block_search_forums_frontpage.feature:25
Given I log in as "guest" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
When I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| searchform_search | Moodle |
And I press "Go" # behat_hooks::i_look_for_exceptions()
Then I should see "No posts" # behat_hooks::i_look_for_exceptions()
@block @block_section_links
Feature: The section links block allows users to quickly navigate around a moodle course
In order to navigate a moodle course
As a teacher
I can use the section links block
Background: # C:\Apache24\htdocs\integration\blocks\section_links\tests\behat\block_section_links_course.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "5" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment 1 |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
And I navigate to "Edit settings" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_numsections | 20 |
| id_coursedisplay | Show one section per page |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
Scenario: Add the section links block to a course. # C:\Apache24\htdocs\integration\blocks\section_links\tests\behat\block_section_links_course.feature:31
Given I add the "Section links" block # behat_hooks::i_look_for_exceptions()
And I turn editing mode off # behat_hooks::i_look_for_exceptions()
And I should see "5" in the "Section links" "block" # behat_hooks::i_look_for_exceptions()
When I follow "5" # behat_hooks::i_look_for_exceptions()
Then I should see "Test assignment 1" # behat_hooks::i_look_for_exceptions()
Scenario: Add the section links block to a course and limit the sections displayed. # C:\Apache24\htdocs\integration\blocks\section_links\tests\behat\block_section_links_course.feature:38
Given I add the "Section links" block # behat_hooks::i_look_for_exceptions()
And I configure the "Section links" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_numsections1 | 5 |
| id_config_incby1 | 5 |
| id_config_numsections2 | 40 |
| id_config_incby2 | 10 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I turn editing mode off # behat_hooks::i_look_for_exceptions()
And I should see "5" in the "Section links" "block" # behat_hooks::i_look_for_exceptions()
When I follow "5" # behat_hooks::i_look_for_exceptions()
Then I should see "Test assignment 1" # behat_hooks::i_look_for_exceptions()
Scenario: Add the section links block to a course and limit the sections displayed using the alternative number of sections. # C:\Apache24\htdocs\integration\blocks\section_links\tests\behat\block_section_links_course.feature:52
Given I add the "Section links" block # behat_hooks::i_look_for_exceptions()
And I configure the "Section links" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_numsections1 | 5 |
| id_config_incby1 | 1 |
| id_config_numsections2 | 10 |
| id_config_incby2 | 5 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I turn editing mode off # behat_hooks::i_look_for_exceptions()
And I should see "5" in the "Section links" "block" # behat_hooks::i_look_for_exceptions()
When I follow "5" # behat_hooks::i_look_for_exceptions()
Then I should see "Test assignment 1" # behat_hooks::i_look_for_exceptions()
@core @core_blog
Feature: Blogs can be set to be only visible by the author.
In order to make blogs personal only
As a user
I need to set the blog level to Users can only see their own blogs.
Background: # C:\Apache24\htdocs\integration\blog\tests\behat\blog_visibility.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| testuser | Test | User | moodle@example.com |
| testuser2 | Test2 | User2 | moodle2@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname |
| Course 1 | C1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| testuser | C1 | student |
| testuser2 | C1 | student |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I navigate to "Blog" node in "Site administration > Appearance" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Blog visibility | Users can only see their own blog |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: A student can not see another student's blog entries. # C:\Apache24\htdocs\integration\blog\tests\behat\blog_visibility.feature:27
Given I log in as "testuser" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Participants" # behat_hooks::i_look_for_exceptions()
And I follow "Test2 User2" # behat_hooks::i_look_for_exceptions()
And I should see "Miscellaneous" # behat_hooks::i_look_for_exceptions()
Then I should not see "Blog entries" # behat_hooks::i_look_for_exceptions()
And I follow "Profile" in the user menu # behat_hooks::i_look_for_exceptions()
And I follow "Blog entries" # behat_hooks::i_look_for_exceptions()
And I should see "User blog: Test User" # behat_hooks::i_look_for_exceptions()
@block @block_blog_tag @core_blog @core_tag
Feature: Adding blog tag block
In order to search blog post by tag
As a user
I need to be able to use block blog tag
@javascript
Scenario: Adding block blog tag to the course # C:\Apache24\htdocs\integration\blocks\blog_tags\tests\behat\blogtag.feature:8
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname |
| Course 1 | c1 |
And the following "tags" exist: # behat_hooks::i_look_for_exceptions()
| name | isstandard |
| Neverusedtag | 1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | c1 | editingteacher |
| student1 | c1 | student |
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Blog tags" block # behat_hooks::i_look_for_exceptions()
And I navigate to "Course blogs" node in "My courses > c1 > Participants" # behat_hooks::i_look_for_exceptions()
And I follow "Blog about this Course" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | Blog post from teacher |
| Blog entry body | Teacher blog post content |
| Tags | Cats, dogs |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Course blogs" node in "My courses > c1 > Participants" # behat_hooks::i_look_for_exceptions()
And I follow "Blog about this Course" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | Blog post from student |
| Blog entry body | Student blog post content |
| Tags | dogs, mice |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "c1" # behat_hooks::i_look_for_exceptions()
Then I should see "Cats" in the "Blog tags" "block" # behat_hooks::i_look_for_exceptions()
And I should see "dogs" in the "Blog tags" "block" # behat_hooks::i_look_for_exceptions()
And I should see "mice" in the "Blog tags" "block" # behat_hooks::i_look_for_exceptions()
And I click on "Cats" "link" in the "Blog tags" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Blog post from teacher" # behat_hooks::i_look_for_exceptions()
And I should see "Teacher blog post content" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@editor @editor_atto @atto @atto_bold @_bug_phantomjs
Feature: Atto bold button
To format text in Atto, I need to use the bold button.
@javascript
Scenario: Bold some text # C:\Apache24\htdocs\integration\lib\editor\atto\plugins\bold\tests\behat\bold.feature:6
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I follow "Profile" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I set the field "Description" to "Badger" # behat_hooks::i_look_for_exceptions()
And I select the text in the "Description" Atto editor # behat_hooks::i_look_for_exceptions()
When I click on "Bold" "button" # behat_hooks::i_look_for_exceptions()
And I press "Update profile" # behat_hooks::i_look_for_exceptions()
And I follow "Preferences" in the user menu # behat_hooks::i_look_for_exceptions()
And I follow "Editor preferences" # behat_hooks::i_look_for_exceptions()
And I set the field "Text editor" to "Plain text area" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
Then I should see "Badger" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Unbold some text # C:\Apache24\htdocs\integration\lib\editor\atto\plugins\bold\tests\behat\bold.feature:22
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I follow "Profile" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I set the field "Description" to "Mouse" # behat_hooks::i_look_for_exceptions()
And I select the text in the "Description" Atto editor # behat_hooks::i_look_for_exceptions()
When I click on "Bold" "button" # behat_hooks::i_look_for_exceptions()
And I click on "Bold" "button" # behat_hooks::i_look_for_exceptions()
And I press "Update profile" # behat_hooks::i_look_for_exceptions()
And I follow "Preferences" in the user menu # behat_hooks::i_look_for_exceptions()
And I follow "Editor preferences" # behat_hooks::i_look_for_exceptions()
And I set the field "Text editor" to "Plain text area" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
Then I should not see "Mouse" # behat_hooks::i_look_for_exceptions()
And I should see "Mouse" # behat_hooks::i_look_for_exceptions()
@block @block_admin_bookmarks
Feature: Add a bookmarks to an admin pages
In order to speed up common tasks
As an admin
I need to add and access pages through bookmarks
Background: # C:\Apache24\htdocs\integration\blocks\admin_bookmarks\tests\behat\bookmark_admin_pages.feature:7
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "Scheduled tasks" node in "Site administration > Server" # behat_hooks::i_look_for_exceptions()
And I click on "Bookmark this page" "link" in the "Admin bookmarks" "block" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Admin page can be bookmarked # C:\Apache24\htdocs\integration\blocks\admin_bookmarks\tests\behat\bookmark_admin_pages.feature:14
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "User profile fields" node in "Site administration > Users > Accounts" # behat_hooks::i_look_for_exceptions()
When I click on "Bookmark this page" "link" in the "Admin bookmarks" "block" # behat_hooks::i_look_for_exceptions()
Then I should see "User profile fields" in the "Admin bookmarks" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Scheduled tasks" in the "Admin bookmarks" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Admin page can be accessed through bookmarks block # C:\Apache24\htdocs\integration\blocks\admin_bookmarks\tests\behat\bookmark_admin_pages.feature:22
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "Notifications" node in "Site administration" # behat_hooks::i_look_for_exceptions()
And I click on "Scheduled tasks" "link" in the "Admin bookmarks" "block" # behat_hooks::i_look_for_exceptions()
Then I should see "Scheduled tasks" in the "h1" "css_element" # behat_hooks::i_look_for_exceptions()
Scenario: Admin page can be removed from bookmarks # C:\Apache24\htdocs\integration\blocks\admin_bookmarks\tests\behat\bookmark_admin_pages.feature:29
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "Notifications" node in "Site administration" # behat_hooks::i_look_for_exceptions()
And I click on "Scheduled tasks" "link" in the "Admin bookmarks" "block" # behat_hooks::i_look_for_exceptions()
When I click on "Unbookmark this page" "link" in the "Admin bookmarks" "block" # behat_hooks::i_look_for_exceptions()
Then I should see "Bookmark deleted" # behat_hooks::i_look_for_exceptions()
And I wait to be redirected # behat_hooks::i_look_for_exceptions()
And I should not see "Scheduled tasks" in the "Admin bookmarks" "block" # behat_hooks::i_look_for_exceptions()
@core @core_grades @gradereport_singleview @javascript
Feature: We can bulk insert grades for students in a course
As a teacher
In order to quickly grade items
I can bulk insert values for all or empty grades.
Background: # C:\Apache24\htdocs\integration\grade\report\singleview\tests\behat\bulk_insert_grades.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber | alternatename |
| teacher1 | Teacher | 1 | teacher1@example.com | t1 | fred |
| student1 | Student | 1 | student1@example.com | s1 | james |
| student2 | Student | 2 | student1@example.com | s2 | holly |
| student3 | Student | 3 | student1@example.com | s3 | anna |
| student4 | Student | 4 | student1@example.com | s4 | zac |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
| student4 | C1 | student |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | course | idnumber | name | intro |
| assign | C1 | a1 | Test assignment one | Submit something! |
| assign | C1 | a2 | Test assignment two | Submit something! |
| assign | C1 | a3 | Test assignment three | Submit something! |
| assign | C1 | a4 | Test assignment four | Submit nothing! |
Scenario: I can bulk insert grades and check their override flags for grade view. # C:\Apache24\htdocs\integration\grade\report\singleview\tests\behat\bulk_insert_grades.feature:32
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment one" # behat_hooks::i_look_for_exceptions()
And I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I click on "Grade" "link" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Grade out of 100 | 50 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Ok" # behat_hooks::i_look_for_exceptions()
And I follow "Edit settings" # behat_hooks::i_look_for_exceptions()
And I follow "View gradebook" # behat_hooks::i_look_for_exceptions()
And I follow "Single view for Test assignment one" # behat_hooks::i_look_for_exceptions()
Then the field "Grade for james (Student) 1" matches value "50.00" # behat_hooks::i_look_for_exceptions()
And the field "Override for james (Student) 1" matches value "0" # behat_hooks::i_look_for_exceptions()
And I set the field "Perform bulk insert" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Insert value" to "1.0" # behat_hooks::i_look_for_exceptions()
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And the field "Grade for james (Student) 1" matches value "50.00" # behat_hooks::i_look_for_exceptions()
And the field "Override for james (Student) 1" matches value "0" # behat_hooks::i_look_for_exceptions()
And the field "Grade for holly (Student) 2" matches value "1.00" # behat_hooks::i_look_for_exceptions()
And the field "Override for holly (Student) 2" matches value "1" # behat_hooks::i_look_for_exceptions()
And the field "Grade for anna (Student) 3" matches value "1.00" # behat_hooks::i_look_for_exceptions()
And the field "Override for anna (Student) 3" matches value "1" # behat_hooks::i_look_for_exceptions()
And the field "Grade for zac (Student) 4" matches value "1.00" # behat_hooks::i_look_for_exceptions()
And the field "Override for zac (Student) 4" matches value "1" # behat_hooks::i_look_for_exceptions()
And I set the field "For" to "All grades" # behat_hooks::i_look_for_exceptions()
And I set the field "Perform bulk insert" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Insert value" to "2.0" # behat_hooks::i_look_for_exceptions()
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And the field "Grade for james (Student) 1" matches value "2.00" # behat_hooks::i_look_for_exceptions()
And the field "Override for james (Student) 1" matches value "1" # behat_hooks::i_look_for_exceptions()
And the field "Grade for holly (Student) 2" matches value "2.00" # behat_hooks::i_look_for_exceptions()
And the field "Override for holly (Student) 2" matches value "1" # behat_hooks::i_look_for_exceptions()
And the field "Grade for anna (Student) 3" matches value "2.00" # behat_hooks::i_look_for_exceptions()
And the field "Override for anna (Student) 3" matches value "1" # behat_hooks::i_look_for_exceptions()
And the field "Grade for zac (Student) 4" matches value "2.00" # behat_hooks::i_look_for_exceptions()
And the field "Override for zac (Student) 4" matches value "1" # behat_hooks::i_look_for_exceptions()
Scenario: I can bulk insert grades and check their override flags for user view. # C:\Apache24\htdocs\integration\grade\report\singleview\tests\behat\bulk_insert_grades.feature:73
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment two" # behat_hooks::i_look_for_exceptions()
And I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I click on "Grade" "link" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Grade out of 100 | 50 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Ok" # behat_hooks::i_look_for_exceptions()
And I follow "Edit settings" # behat_hooks::i_look_for_exceptions()
And I follow "View gradebook" # behat_hooks::i_look_for_exceptions()
And I follow "Single view for Test assignment two" # behat_hooks::i_look_for_exceptions()
And I select "Student 1" from the "Select user..." singleselect # behat_hooks::i_look_for_exceptions()
Then the field "Grade for Test assignment two" matches value "50.00" # behat_hooks::i_look_for_exceptions()
And the field "Override for Test assignment two" matches value "0" # behat_hooks::i_look_for_exceptions()
And I set the field "For" to "Empty grades" # behat_hooks::i_look_for_exceptions()
And I set the field "Perform bulk insert" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Insert value" to "1.0" # behat_hooks::i_look_for_exceptions()
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And the field "Grade for Test assignment two" matches value "50.00" # behat_hooks::i_look_for_exceptions()
And the field "Override for Test assignment two" matches value "0" # behat_hooks::i_look_for_exceptions()
And the field "Grade for Test assignment one" matches value "1.00" # behat_hooks::i_look_for_exceptions()
And the field "Override for Test assignment one" matches value "1" # behat_hooks::i_look_for_exceptions()
And the field "Grade for Test assignment three" matches value "1.00" # behat_hooks::i_look_for_exceptions()
And the field "Override for Test assignment three" matches value "1" # behat_hooks::i_look_for_exceptions()
And the field "Grade for Test assignment four" matches value "1.00" # behat_hooks::i_look_for_exceptions()
And the field "Override for Test assignment four" matches value "1" # behat_hooks::i_look_for_exceptions()
@core @core_calendar
Feature: Perform basic calendar functionality
In order to ensure the calendar works as expected
As an admin
I need to create calendar data
Background: # C:\Apache24\htdocs\integration\calendar\tests\behat\calendar.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
| student3 | Student | 3 | student3@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| student1 | C1 | student |
| student3 | C1 | student |
And the following "groups" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| Group 1 | C1 | G1 |
And the following "group members" exist: # behat_hooks::i_look_for_exceptions()
| user | group |
| student1 | G1 |
When I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Calendar" block # behat_hooks::i_look_for_exceptions()
Scenario: Create a site event # C:\Apache24\htdocs\integration\calendar\tests\behat\calendar.feature:32
And I create a calendar event with form data: # behat_hooks::i_look_for_exceptions()
| Type of event | site |
| Event title | Really awesome event! |
| Description | Come join this awesome event, sucka! |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "This month" # behat_hooks::i_look_for_exceptions()
And I should see "Really awesome event!" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "This month" # behat_hooks::i_look_for_exceptions()
And I should see "Really awesome event!" # behat_hooks::i_look_for_exceptions()
Scenario: Create a course event # C:\Apache24\htdocs\integration\calendar\tests\behat\calendar.feature:48
And I create a calendar event with form data: # behat_hooks::i_look_for_exceptions()
| Type of event | course |
| Event title | Really awesome event! |
| Description | Come join this awesome event, sucka! |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "This month" # behat_hooks::i_look_for_exceptions()
And I should see "Really awesome event!" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "This month" # behat_hooks::i_look_for_exceptions()
And I should not see "Really awesome event!" # behat_hooks::i_look_for_exceptions()
Scenario: Create a group event # C:\Apache24\htdocs\integration\calendar\tests\behat\calendar.feature:64
And I create a calendar event with form data: # behat_hooks::i_look_for_exceptions()
| Type of event | group |
| Group | Group 1 |
| Event title | Really awesome event! |
| Description | Come join this awesome event |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "This month" # behat_hooks::i_look_for_exceptions()
And I follow "Really awesome event!" # behat_hooks::i_look_for_exceptions()
And "Group 1" "text" should exist in the ".eventlist" "css_element" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student3" # behat_hooks::i_look_for_exceptions()
And I follow "This month" # behat_hooks::i_look_for_exceptions()
And I should not see "Really awesome event!" # behat_hooks::i_look_for_exceptions()
Scenario: Create a user event # C:\Apache24\htdocs\integration\calendar\tests\behat\calendar.feature:82
And I create a calendar event with form data: # behat_hooks::i_look_for_exceptions()
| Type of event | user |
| Event title | Really awesome event! |
| Description | Come join this awesome event, sucka! |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "This month" # behat_hooks::i_look_for_exceptions()
And I should not see "Really awesome event!" # behat_hooks::i_look_for_exceptions()
Scenario: Delete an event # C:\Apache24\htdocs\integration\calendar\tests\behat\calendar.feature:94
And I create a calendar event with form data: # behat_hooks::i_look_for_exceptions()
| Type of event | user |
| Event title | Really awesome event! |
| Description | Come join this awesome event, sucka! |
And I click on "Delete event" "link" in the ".event div.commands" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Delete" "button" # behat_hooks::i_look_for_exceptions()
And I should not see "Really awesome event!" # behat_hooks::i_look_for_exceptions()
Scenario: Edit an event # C:\Apache24\htdocs\integration\calendar\tests\behat\calendar.feature:103
And I create a calendar event with form data: # behat_hooks::i_look_for_exceptions()
| Type of event | user |
| Event title | Really awesome event! |
| Description | Come join this awesome event, sucka! |
And I click on "Edit event" "link" in the ".event div.commands" "css_element" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Event title | Mediocre event :( |
| Description | Wait, this event isn't that great. |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "Mediocre event" # behat_hooks::i_look_for_exceptions()
@core @core_calendar
Feature: Limit displayed upcoming events
In order to filter what is displayed on the calendar
As a user
I need to interact with the calendar
Background: # C:\Apache24\htdocs\integration\calendar\tests\behat\calendar_lookahead.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | teacher | 1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
Scenario: I view calendar details for a future event # C:\Apache24\htdocs\integration\calendar\tests\behat\calendar_lookahead.feature:19
Given I follow "C1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Calendar" block # behat_hooks::i_look_for_exceptions()
And I add the "Upcoming events" block # behat_hooks::i_look_for_exceptions()
And I follow "This month" # behat_hooks::i_look_for_exceptions()
And I click on "a.next" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "a.next" "css_element" # behat_hooks::i_look_for_exceptions()
And I create a calendar event: # behat_hooks::i_look_for_exceptions()
| Type of event | course |
| Event title | Two months away event |
When I follow "C1" # behat_hooks::i_look_for_exceptions()
Then I should not see "Two months away event" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Preferences" in the user menu # behat_hooks::i_look_for_exceptions()
And I follow "Calendar preferences" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Upcoming events look-ahead | 3 months |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I wait to be redirected # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Two months away event" # behat_hooks::i_look_for_exceptions()
@core @core_filepicker @_file_upload
Feature: A selected file can be cancelled
In order to refine the file manager contents
As a user
I need to cancel a selected file
@javascript @_bug_phantomjs
Scenario: Cancel a selected recent file from being added to a folder # C:\Apache24\htdocs\integration\repository\tests\behat\cancel_add_file.feature:8
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I follow "Manage private files" # behat_hooks::i_look_for_exceptions()
And I upload "lib/tests/fixtures/empty.txt" file to "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
When I add a "Folder" to section "1" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Folder name |
| Description | Folder description |
And I upload "lib/tests/fixtures/upload_users.csv" file to "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I click on "//label[contains(., 'Files')]/ancestor::div[contains(concat(' ', @class, ' '), ' fitem ')]//*[contains(@title, 'Add...')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I click on "Recent files" "link" in the ".fp-repo-area" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "//a[contains(concat(' ', normalize-space(@class), ' '), ' fp-file ')][normalize-space(.)='empty.txt']" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I click on ".moodle-dialogue-focused .fp-select .fp-select-cancel" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on ".moodle-dialogue-focused.filepicker .yui3-button.closebutton" "css_element" # behat_hooks::i_look_for_exceptions()
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
Then I should see "upload_users.csv" # behat_hooks::i_look_for_exceptions()
And I should not see "empty.txt" # behat_hooks::i_look_for_exceptions()
And I should see "Folder description" # behat_hooks::i_look_for_exceptions()
@mod @mod_glossary
Feature: Glossary entries can be organised in categories
In order to organise glossary entries
As a teacher
I need to be able to create, edit and delete categories
@javascript
Scenario: Glossary entries can be organised in categories and categories can be autolinked # C:\Apache24\htdocs\integration\mod\glossary\tests\behat\categories.feature:8
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | displayformat | course | idnumber |
| glossary | MyGlossary | Test glossary description | encyclopedia | C1 | glossary1 |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber |
| label | name | check autolinking of CategoryAutoLinks and CategoryNoLinks text | C1 | label1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I expand "Site administration" node # behat_hooks::i_look_for_exceptions()
And I expand "Plugins" node # behat_hooks::i_look_for_exceptions()
And I expand "Filters" node # behat_hooks::i_look_for_exceptions()
And I follow "Manage filters" # behat_hooks::i_look_for_exceptions()
And I click on "On" "option" in the "Glossary auto-linking" "table_row" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
When I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then I should see "CategoryAutoLinks" # behat_hooks::i_look_for_exceptions()
And I should see "CategoryNoLinks" # behat_hooks::i_look_for_exceptions()
And "a.glossary.autolink" "css_element" should not exist # behat_hooks::i_look_for_exceptions()
And I follow "MyGlossary" # behat_hooks::i_look_for_exceptions()
And I follow "Browse by category" # behat_hooks::i_look_for_exceptions()
And I press "Edit categories" # behat_hooks::i_look_for_exceptions()
And I press "Add Category" # behat_hooks::i_look_for_exceptions()
And I set the field "name" to "CategoryNoLinks" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "0 Entries" in the "CategoryNoLinks" "table_row" # behat_hooks::i_look_for_exceptions()
And I press "Add Category" # behat_hooks::i_look_for_exceptions()
And I set the field "name" to "CategoryAutoLinks" # behat_hooks::i_look_for_exceptions()
And I set the field "usedynalink" to "Yes" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "0 Entries" in the "CategoryAutoLinks" "table_row" # behat_hooks::i_look_for_exceptions()
And I press "Add Category" # behat_hooks::i_look_for_exceptions()
And I set the field "name" to "Category2" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I click on "Edit" "link" in the "Category2" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the field "name" to "Category3" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "Category3" # behat_hooks::i_look_for_exceptions()
And I should not see "Category2" # behat_hooks::i_look_for_exceptions()
And I click on "Delete" "link" in the "Category3" "table_row" # behat_hooks::i_look_for_exceptions()
And I press "No" # behat_hooks::i_look_for_exceptions()
And I should see "Category3" # behat_hooks::i_look_for_exceptions()
And I click on "Delete" "link" in the "Category3" "table_row" # behat_hooks::i_look_for_exceptions()
And I press "Yes" # behat_hooks::i_look_for_exceptions()
And I should not see "Category3" # behat_hooks::i_look_for_exceptions()
And I press "Back" # behat_hooks::i_look_for_exceptions()
And I add a glossary entry with the following data: # behat_hooks::i_look_for_exceptions()
| Concept | EntryNoCategory |
| Definition | Definition |
And I add a glossary entry with the following data: # behat_hooks::i_look_for_exceptions()
| Concept | EntryCategoryNL |
| Definition | Definition |
| Categories | CategoryNoLinks |
And I add a glossary entry with the following data: # behat_hooks::i_look_for_exceptions()
| Concept | EntryCategoryAL |
| Definition | Definition |
| Categories | CategoryAutoLinks |
And I press "Add a new entry" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Concept | EntryCategoryBoth |
| Definition | Definition |
| Categories | CategoryAutoLinks,CategoryNoLinks |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Browse by category" # behat_hooks::i_look_for_exceptions()
And "//h3[contains(.,'CATEGORYAUTOLINKS')]" "xpath_element" should appear before "//h3[contains(.,'CATEGORYNOLINKS')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And "//h4[contains(.,'EntryCategoryAL')]" "xpath_element" should appear before "//h3[contains(.,'CATEGORYNOLINKS')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And "//h4[contains(.,'EntryCategoryBoth')]" "xpath_element" should appear before "//h3[contains(.,'CATEGORYNOLINKS')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And "//h3[contains(.,'CATEGORYNOLINKS')]" "xpath_element" should appear before "//h4[contains(.,'EntryCategoryBoth')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And "//h4[contains(.,'EntryCategoryNL')]" "xpath_element" should appear after "//h3[contains(.,'CATEGORYNOLINKS')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I should not see "EntryNoCategory" # behat_hooks::i_look_for_exceptions()
And I set the field "hook" to "Not categorised" # behat_hooks::i_look_for_exceptions()
And I click on "Not categorised" "option" in the "#catmenu select" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "EntryNoCategory" # behat_hooks::i_look_for_exceptions()
And I should not see "EntryCategoryNL" # behat_hooks::i_look_for_exceptions()
And I should not see "EntryCategoryAL" # behat_hooks::i_look_for_exceptions()
And I should not see "EntryCategoryBoth" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "CategoryAutoLinks" # behat_hooks::i_look_for_exceptions()
And I should see "CategoryAutoLinks" in the "a.glossary.autolink" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "CategoryNoLinks" # behat_hooks::i_look_for_exceptions()
And "//a[contains(.,'CategoryNoLinks')]" "xpath_element" should not exist # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "MyGlossary" # behat_hooks::i_look_for_exceptions()
And I follow "Browse by category" # behat_hooks::i_look_for_exceptions()
And I press "Edit categories" # behat_hooks::i_look_for_exceptions()
And I should see "2 Entries" in the "CategoryNoLinks" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "2 Entries" in the "CategoryAutoLinks" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "Delete" "link" in the "CategoryAutoLinks" "table_row" # behat_hooks::i_look_for_exceptions()
And I press "Yes" # behat_hooks::i_look_for_exceptions()
And I wait to be redirected # behat_hooks::i_look_for_exceptions()
And I follow "MyGlossary" # behat_hooks::i_look_for_exceptions()
And I follow "Browse by category" # behat_hooks::i_look_for_exceptions()
And I should see "EntryCategoryNL" # behat_hooks::i_look_for_exceptions()
And I should not see "EntryNoCategory" # behat_hooks::i_look_for_exceptions()
And I should not see "EntryCategoryAL" # behat_hooks::i_look_for_exceptions()
And I should see "EntryCategoryBoth" # behat_hooks::i_look_for_exceptions()
And I click on "Not categorised" "option" in the "#catmenu select" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "EntryNoCategory" # behat_hooks::i_look_for_exceptions()
And I should see "EntryCategoryAL" # behat_hooks::i_look_for_exceptions()
And I should not see "EntryCategoryBoth" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@core @core_course
Feature: We can change the visibility of categories in the management interface.
As a moodle admin
I need to test hiding and showing a category.
I need to test hiding and showing a sub category.
I need to test visibility is applied to sub categories.
I need to test visibility is applied to courses.
I need to test visibility of children is reset when changing back.
Scenario: Test making a category hidden and then visible again. # C:\Apache24\htdocs\integration\course\tests\behat\category_change_visibility.feature:11
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#category-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT1" # behat_hooks::i_look_for_exceptions()
And I toggle visibility of category "CAT1" in management listing # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And category in management listing should be dimmed "CAT1" # behat_hooks::i_look_for_exceptions()
And I toggle visibility of category "CAT1" in management listing # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT1" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Test using AJAX to make a category hidden and then visible again. # C:\Apache24\htdocs\integration\course\tests\behat\category_change_visibility.feature:32
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#category-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT1" # behat_hooks::i_look_for_exceptions()
And I toggle visibility of category "CAT1" in management listing # behat_hooks::i_look_for_exceptions()
And a new page should not have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And category in management listing should be dimmed "CAT1" # behat_hooks::i_look_for_exceptions()
And I toggle visibility of category "CAT1" in management listing # behat_hooks::i_look_for_exceptions()
And a new page should not have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT1" # behat_hooks::i_look_for_exceptions()
Scenario: Test making a subcategory hidden and then visible again. # C:\Apache24\htdocs\integration\course\tests\behat\category_change_visibility.feature:51
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
| Cat 2 | CAT1 | CAT2 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#category-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 2" in the "#category-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT1" # behat_hooks::i_look_for_exceptions()
And I click on category "Cat 1" in the management interface # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#category-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2" in the "#category-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT1" # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT2" # behat_hooks::i_look_for_exceptions()
And I toggle visibility of category "CAT2" in management listing # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#category-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2" in the "#category-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT1" # behat_hooks::i_look_for_exceptions()
And category in management listing should be dimmed "CAT2" # behat_hooks::i_look_for_exceptions()
And I toggle visibility of category "CAT2" in management listing # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#category-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2" in the "#category-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT1" # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT2" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Test using AJAX to make a subcategory hidden and then visible again. # C:\Apache24\htdocs\integration\course\tests\behat\category_change_visibility.feature:87
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
| Cat 2 | CAT1 | CAT2 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#category-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 2" in the "#category-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT1" # behat_hooks::i_look_for_exceptions()
And I click to expand category "CAT1" in the management interface # behat_hooks::i_look_for_exceptions()
And a new page should not have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT1" # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT2" # behat_hooks::i_look_for_exceptions()
And I toggle visibility of category "CAT2" in management listing # behat_hooks::i_look_for_exceptions()
And a new page should not have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT1" # behat_hooks::i_look_for_exceptions()
And category in management listing should be dimmed "CAT2" # behat_hooks::i_look_for_exceptions()
And I toggle visibility of category "CAT2" in management listing # behat_hooks::i_look_for_exceptions()
And a new page should not have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT1" # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT2" # behat_hooks::i_look_for_exceptions()
Scenario: Test relation between category and course when changing visibility. # C:\Apache24\htdocs\integration\course\tests\behat\category_change_visibility.feature:114
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
| Cat 2 | 0 | CAT2 |
| Cat 3 | CAT1 | CAT3 |
| Cat 4 | CAT1 | CAT4 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| category | fullname | shortname | idnumber |
| CAT1 | Course 1 | Course 1 | C1 |
| CAT1 | Course 2 | Course 2 | C2 |
| CAT1 | Course 3 | Course 3 | C3 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on category "Cat 1" in the management interface # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#category-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2" in the "#category-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 3" in the "#category-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 4" in the "#category-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Course 1" in the "#course-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Course 2" in the "#course-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Course 3" in the "#course-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT1" # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT2" # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT3" # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT4" # behat_hooks::i_look_for_exceptions()
And course in management listing should be visible "C1" # behat_hooks::i_look_for_exceptions()
And course in management listing should be visible "C2" # behat_hooks::i_look_for_exceptions()
And course in management listing should be visible "C3" # behat_hooks::i_look_for_exceptions()
And I toggle visibility of course "C2" in management listing # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page with a course selected # behat_hooks::i_look_for_exceptions()
And course in management listing should be visible "C1" # behat_hooks::i_look_for_exceptions()
And course in management listing should be dimmed "C2" # behat_hooks::i_look_for_exceptions()
And course in management listing should be visible "C3" # behat_hooks::i_look_for_exceptions()
And I toggle visibility of category "CAT3" in management listing # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on "Cat 1" "link" # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT1" # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT2" # behat_hooks::i_look_for_exceptions()
And category in management listing should be dimmed "CAT3" # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT4" # behat_hooks::i_look_for_exceptions()
And course in management listing should be visible "C1" # behat_hooks::i_look_for_exceptions()
And course in management listing should be dimmed "C2" # behat_hooks::i_look_for_exceptions()
And course in management listing should be visible "C3" # behat_hooks::i_look_for_exceptions()
And I toggle visibility of category "CAT1" in management listing # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And category in management listing should be dimmed "CAT1" # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT2" # behat_hooks::i_look_for_exceptions()
And category in management listing should be dimmed "CAT3" # behat_hooks::i_look_for_exceptions()
And category in management listing should be dimmed "CAT4" # behat_hooks::i_look_for_exceptions()
And course in management listing should be dimmed "C1" # behat_hooks::i_look_for_exceptions()
And course in management listing should be dimmed "C2" # behat_hooks::i_look_for_exceptions()
And course in management listing should be dimmed "C3" # behat_hooks::i_look_for_exceptions()
And I toggle visibility of category "CAT1" in management listing # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT1" # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT2" # behat_hooks::i_look_for_exceptions()
And category in management listing should be dimmed "CAT3" # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT4" # behat_hooks::i_look_for_exceptions()
And course in management listing should be visible "C1" # behat_hooks::i_look_for_exceptions()
And course in management listing should be dimmed "C2" # behat_hooks::i_look_for_exceptions()
And course in management listing should be visible "C3" # behat_hooks::i_look_for_exceptions()
@javascript @_cross_browser
Scenario: Test the relation between category and course when changing visibility with AJAX # C:\Apache24\htdocs\integration\course\tests\behat\category_change_visibility.feature:189
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
| Cat 2 | 0 | CAT2 |
| Cat 3 | CAT1 | CAT3 |
| Cat 4 | CAT1 | CAT4 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| category | fullname | shortname | idnumber |
| CAT1 | Course 1 | Course 1 | C1 |
| CAT1 | Course 2 | Course 2 | C2 |
| CAT1 | Course 3 | Course 3 | C3 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on category "Cat 1" in the management interface # behat_hooks::i_look_for_exceptions()
And a new page should have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#category-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2" in the "#category-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 3" in the "#category-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 4" in the "#category-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Course 1" in the "#course-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Course 2" in the "#course-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Course 3" in the "#course-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT1" # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT2" # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT3" # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT4" # behat_hooks::i_look_for_exceptions()
And course in management listing should be visible "C1" # behat_hooks::i_look_for_exceptions()
And course in management listing should be visible "C2" # behat_hooks::i_look_for_exceptions()
And course in management listing should be visible "C3" # behat_hooks::i_look_for_exceptions()
And I toggle visibility of course "C2" in management listing # behat_hooks::i_look_for_exceptions()
And a new page should not have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I should see "Cat 3" in the "#category-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And course in management listing should be visible "C1" # behat_hooks::i_look_for_exceptions()
And course in management listing should be dimmed "C2" # behat_hooks::i_look_for_exceptions()
And course in management listing should be visible "C3" # behat_hooks::i_look_for_exceptions()
And I toggle visibility of category "CAT3" in management listing # behat_hooks::i_look_for_exceptions()
And a new page should not have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT1" # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT2" # behat_hooks::i_look_for_exceptions()
And category in management listing should be dimmed "CAT3" # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT4" # behat_hooks::i_look_for_exceptions()
And course in management listing should be visible "C1" # behat_hooks::i_look_for_exceptions()
And course in management listing should be dimmed "C2" # behat_hooks::i_look_for_exceptions()
And course in management listing should be visible "C3" # behat_hooks::i_look_for_exceptions()
And I toggle visibility of category "CAT1" in management listing # behat_hooks::i_look_for_exceptions()
And a new page should not have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And category in management listing should be dimmed "CAT1" # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT2" # behat_hooks::i_look_for_exceptions()
And category in management listing should be dimmed "CAT3" # behat_hooks::i_look_for_exceptions()
And category in management listing should be dimmed "CAT4" # behat_hooks::i_look_for_exceptions()
And course in management listing should be dimmed "C1" # behat_hooks::i_look_for_exceptions()
And course in management listing should be dimmed "C2" # behat_hooks::i_look_for_exceptions()
And course in management listing should be dimmed "C3" # behat_hooks::i_look_for_exceptions()
And I toggle visibility of category "CAT1" in management listing # behat_hooks::i_look_for_exceptions()
And a new page should not have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT1" # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT2" # behat_hooks::i_look_for_exceptions()
And category in management listing should be dimmed "CAT3" # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT4" # behat_hooks::i_look_for_exceptions()
And course in management listing should be visible "C1" # behat_hooks::i_look_for_exceptions()
And course in management listing should be dimmed "C2" # behat_hooks::i_look_for_exceptions()
And course in management listing should be visible "C3" # behat_hooks::i_look_for_exceptions()
@javascript @_cross_browser
Scenario: Test courses are hidden when selected category parent is hidden. # C:\Apache24\htdocs\integration\course\tests\behat\category_change_visibility.feature:259
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
| Cat 2 | CAT1 | CAT2 |
| Cat 3 | CAT2 | CAT3 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| category | fullname | shortname | idnumber |
| CAT3 | Course 1 | Course 1 | C1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on category "Cat 1" in the management interface # behat_hooks::i_look_for_exceptions()
And a new page should have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on category "Cat 2" in the management interface # behat_hooks::i_look_for_exceptions()
And a new page should have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on category "Cat 3" in the management interface # behat_hooks::i_look_for_exceptions()
And a new page should have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT1" # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT2" # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT3" # behat_hooks::i_look_for_exceptions()
And course in management listing should be visible "C1" # behat_hooks::i_look_for_exceptions()
And I toggle visibility of category "CAT1" in management listing # behat_hooks::i_look_for_exceptions()
And a new page should not have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And category in management listing should be dimmed "CAT1" # behat_hooks::i_look_for_exceptions()
And category in management listing should be dimmed "CAT2" # behat_hooks::i_look_for_exceptions()
And category in management listing should be dimmed "CAT3" # behat_hooks::i_look_for_exceptions()
And course in management listing should be dimmed "C1" # behat_hooks::i_look_for_exceptions()
And I toggle visibility of category "CAT1" in management listing # behat_hooks::i_look_for_exceptions()
And a new page should not have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT1" # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT2" # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT3" # behat_hooks::i_look_for_exceptions()
And course in management listing should be visible "C1" # behat_hooks::i_look_for_exceptions()
And I toggle visibility of course "C1" in management listing # behat_hooks::i_look_for_exceptions()
And a new page should not have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT1" # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT2" # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT3" # behat_hooks::i_look_for_exceptions()
And course in management listing should be dimmed "C1" # behat_hooks::i_look_for_exceptions()
And I toggle visibility of category "CAT1" in management listing # behat_hooks::i_look_for_exceptions()
And a new page should not have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And category in management listing should be dimmed "CAT1" # behat_hooks::i_look_for_exceptions()
And category in management listing should be dimmed "CAT2" # behat_hooks::i_look_for_exceptions()
And category in management listing should be dimmed "CAT3" # behat_hooks::i_look_for_exceptions()
And course in management listing should be dimmed "C1" # behat_hooks::i_look_for_exceptions()
And I toggle visibility of category "CAT1" in management listing # behat_hooks::i_look_for_exceptions()
And a new page should not have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT1" # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT2" # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT3" # behat_hooks::i_look_for_exceptions()
And course in management listing should be dimmed "C1" # behat_hooks::i_look_for_exceptions()
@core @core_course
Feature: Test category management actions
As a moodle admin
Test we can create a category
Test we can create a sub category
Test we can edit a category
Test we can delete a category
Test we can move a category
Test we can assign roles within a category
Test we can set permissions on a category
Test we can manage cohorts within a category
Test we can manage filters for a category
Scenario: Test editing a category through the management interface. # C:\Apache24\htdocs\integration\course\tests\behat\category_management.feature:14
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| category | fullname | shortname | idnumber |
| CAT1 | Course 1 | Course 1 | C1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on "edit" action for "Cat 1" in management category listing # behat_hooks::i_look_for_exceptions()
And I should see "Edit category settings" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on "edit" action for "Cat 1" in management category listing # behat_hooks::i_look_for_exceptions()
And I should see "Edit category settings" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Category name | Category 1 (edited) |
| Category ID number | CAT1e |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Category 1 (edited)" in the "#category-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Category 1 (edited)" in the "#course-listing h3" "css_element" # behat_hooks::i_look_for_exceptions()
Scenario: Test deleting a categories through the management interface. # C:\Apache24\htdocs\integration\course\tests\behat\category_management.feature:45
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
| Cat 2 | 0 | CAT2 |
| Cat 3 | 0 | CAT3 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| category | fullname | shortname | idnumber |
| CAT3 | Course 1 | Course 1 | C1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#category-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2" in the "#category-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 3" in the "#category-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "delete" action for "Cat 2" in management category listing # behat_hooks::i_look_for_exceptions()
And I should see "Delete category: Cat 2" # behat_hooks::i_look_for_exceptions()
And I should see "Contents of Cat 2" # behat_hooks::i_look_for_exceptions()
And I should see "This category is empty" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#category-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2" in the "#category-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 3" in the "#category-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "delete" action for "Cat 2" in management category listing # behat_hooks::i_look_for_exceptions()
And I should see "Delete category: Cat 2" # behat_hooks::i_look_for_exceptions()
And I should see "Contents of Cat 2" # behat_hooks::i_look_for_exceptions()
And I should see "This category is empty" # behat_hooks::i_look_for_exceptions()
And I press "Delete" # behat_hooks::i_look_for_exceptions()
And I should see "Delete category: Cat 2" # behat_hooks::i_look_for_exceptions()
And I should see "Deleted course category Cat 2" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#category-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 2" in the "#category-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 3" in the "#category-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "delete" action for "Cat 3" in management category listing # behat_hooks::i_look_for_exceptions()
And I should see "Delete category: Cat 3" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| What to do | Move contents to another category |
| Move into | Cat 1 |
And I press "Delete" # behat_hooks::i_look_for_exceptions()
And I should see "Delete category: Cat 3" # behat_hooks::i_look_for_exceptions()
And I should see "Deleted course category Cat 3" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#category-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 2" in the "#category-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 3" in the "#category-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Course 1" in the "#course-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
Scenario: Test I can assign roles for a category through the management interface. # C:\Apache24\htdocs\integration\course\tests\behat\category_management.feature:106
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| category | fullname | shortname | idnumber |
| CAT1 | Course 1 | Course 1 | C1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on "assignroles" action for "Cat 1" in management category listing # behat_hooks::i_look_for_exceptions()
And I should see "Assign roles in Category: Cat 1" # behat_hooks::i_look_for_exceptions()
And I should see "Please choose a role to assign" # behat_hooks::i_look_for_exceptions()
And I click on "Back to Category: Cat 1" "link" # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And "Cat 1" "link" should exist in the "#category-listing" "css_element" # behat_hooks::i_look_for_exceptions()
Scenario: Test I can set access permissions for a category through the management interface. # C:\Apache24\htdocs\integration\course\tests\behat\category_management.feature:126
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| category | fullname | shortname | idnumber |
| CAT1 | Course 1 | Course 1 | C1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on "permissions" action for "Cat 1" in management category listing # behat_hooks::i_look_for_exceptions()
And I should see "Permissions in Category: Cat 1" # behat_hooks::i_look_for_exceptions()
And I click on "Back to Category: Cat 1" "link" # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
Scenario: Test clicking to manage cohorts for a category through the management interface. # C:\Apache24\htdocs\integration\course\tests\behat\category_management.feature:145
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| category | fullname | shortname | idnumber |
| CAT1 | Course 1 | Course 1 | C1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on "cohorts" action for "Cat 1" in management category listing # behat_hooks::i_look_for_exceptions()
And I should see "Category: Cat 1: available cohorts" # behat_hooks::i_look_for_exceptions()
Scenario: Test configuring filters for a category # C:\Apache24\htdocs\integration\course\tests\behat\category_management.feature:160
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| category | fullname | shortname | idnumber |
| CAT1 | Course 1 | Course 1 | C1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on "filters" action for "Cat 1" in management category listing # behat_hooks::i_look_for_exceptions()
And I should see "Filter settings in Category: Cat 1" # behat_hooks::i_look_for_exceptions()
And I click on "Back to Category: Cat 1" "link" # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#course-listing h3" "css_element" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Test that I can create a category and view it in the management interface # C:\Apache24\htdocs\integration\course\tests\behat\category_management.feature:180
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on "Create new category" "link" in the ".category-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Add new category" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Parent category | Top |
| Category name | Test category 2 |
| Category ID number | TC2 |
And I press "Create category" # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Test category 2" in the "#course-listing h3" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see category listing "Cat 1" before "Test category 2" # behat_hooks::i_look_for_exceptions()
And I should see "No courses in this category" # behat_hooks::i_look_for_exceptions()
And I click on "createnewsubcategory" action for "Test category 2" in management category listing # behat_hooks::i_look_for_exceptions()
And I should see "Add new category" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Parent category | Top |
| Category name | Test category 3 |
| Category ID number | TC3 |
And I press "Create category" # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Test category 3" in the "#course-listing h3" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see category listing "Cat 1" before "Test category 2" # behat_hooks::i_look_for_exceptions()
And I should see "No courses in this category" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Test moving a categories through the management interface. # C:\Apache24\htdocs\integration\course\tests\behat\category_management.feature:215
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
| Cat 2 | 0 | CAT2 |
| Cat 3 | 0 | CAT3 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#category-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2" in the "#category-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 3" in the "#category-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I select category "Cat 2" in the management interface # behat_hooks::i_look_for_exceptions()
And I select category "Cat 3" in the management interface # behat_hooks::i_look_for_exceptions()
And I set the field "menumovecategoriesto" to "Cat 1" # behat_hooks::i_look_for_exceptions()
When I press "bulkmovecategories" # behat_hooks::i_look_for_exceptions()
And I click on category "Cat 1" in the management interface # behat_hooks::i_look_for_exceptions()
Then I should see category "CAT3" as subcategory of "CAT1" in the management interface # behat_hooks::i_look_for_exceptions()
And I move category "Cat 3" to top level in the management interface # behat_hooks::i_look_for_exceptions()
And I should not see category "CAT3" as subcategory of "CAT1" in the management interface # behat_hooks::i_look_for_exceptions()
Then I should see category "CAT2" as subcategory of "CAT1" in the management interface # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Test bulk action is shown only when some category/course is selected # C:\Apache24\htdocs\integration\course\tests\behat\category_management.feature:242
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
| Cat 2 | 0 | CAT2 |
| Cat 3 | 0 | CAT3 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| category | fullname | shortname | idnumber |
| CAT3 | Course 1 | Course 1 | C1 |
| CAT3 | Course 2 | Course 2 | C2 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#category-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2" in the "#category-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 3" in the "#category-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And the "movecategoriesto" "select" should be disabled # behat_hooks::i_look_for_exceptions()
And the "resortcategoriesby" "select" should be disabled # behat_hooks::i_look_for_exceptions()
And the "resortcoursesby" "select" should be disabled # behat_hooks::i_look_for_exceptions()
When I set the field "selectsortby" to "allcategories" # behat_hooks::i_look_for_exceptions()
Then the "resortcategoriesby" "select" should be enabled # behat_hooks::i_look_for_exceptions()
And the "resortcoursesby" "select" should be enabled # behat_hooks::i_look_for_exceptions()
And the "movecategoriesto" "select" should be disabled # behat_hooks::i_look_for_exceptions()
And I select category "Cat 2" in the management interface # behat_hooks::i_look_for_exceptions()
And the "movecategoriesto" "select" should be enabled # behat_hooks::i_look_for_exceptions()
And the "resortcategoriesby" "select" should be enabled # behat_hooks::i_look_for_exceptions()
And the "resortcoursesby" "select" should be enabled # behat_hooks::i_look_for_exceptions()
And I set the field "selectsortby" to "selectedcategories" # behat_hooks::i_look_for_exceptions()
And the "movecategoriesto" "select" should be enabled # behat_hooks::i_look_for_exceptions()
And the "resortcategoriesby" "select" should be enabled # behat_hooks::i_look_for_exceptions()
And the "resortcoursesby" "select" should be enabled # behat_hooks::i_look_for_exceptions()
And I unselect category "Cat 2" in the management interface # behat_hooks::i_look_for_exceptions()
And the "movecategoriesto" "select" should be disabled # behat_hooks::i_look_for_exceptions()
And the "resortcategoriesby" "select" should be disabled # behat_hooks::i_look_for_exceptions()
And the "resortcoursesby" "select" should be disabled # behat_hooks::i_look_for_exceptions()
And I select category "Cat 3" in the management interface # behat_hooks::i_look_for_exceptions()
And the "movecategoriesto" "select" should be enabled # behat_hooks::i_look_for_exceptions()
And the "resortcategoriesby" "select" should be enabled # behat_hooks::i_look_for_exceptions()
And the "resortcoursesby" "select" should be enabled # behat_hooks::i_look_for_exceptions()
And I select category "Cat 2" in the management interface # behat_hooks::i_look_for_exceptions()
And the "movecategoriesto" "select" should be enabled # behat_hooks::i_look_for_exceptions()
And the "resortcategoriesby" "select" should be enabled # behat_hooks::i_look_for_exceptions()
And the "resortcoursesby" "select" should be enabled # behat_hooks::i_look_for_exceptions()
And I unselect category "Cat 2" in the management interface # behat_hooks::i_look_for_exceptions()
And I unselect category "Cat 3" in the management interface # behat_hooks::i_look_for_exceptions()
And the "movecategoriesto" "select" should be disabled # behat_hooks::i_look_for_exceptions()
And the "resortcategoriesby" "select" should be disabled # behat_hooks::i_look_for_exceptions()
And the "resortcoursesby" "select" should be disabled # behat_hooks::i_look_for_exceptions()
And I click on category "Cat 1" in the management interface # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And the "movecategoriesto" "select" should be disabled # behat_hooks::i_look_for_exceptions()
And the "resortcategoriesby" "select" should be disabled # behat_hooks::i_look_for_exceptions()
And the "resortcoursesby" "select" should be disabled # behat_hooks::i_look_for_exceptions()
And the "movecoursesto" "select" should be disabled # behat_hooks::i_look_for_exceptions()
And I click on category "Cat 3" in the management interface # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Course 1" in the "#course-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Course 2" in the "#course-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And the "movecategoriesto" "select" should be disabled # behat_hooks::i_look_for_exceptions()
And the "resortcategoriesby" "select" should be disabled # behat_hooks::i_look_for_exceptions()
And the "resortcoursesby" "select" should be disabled # behat_hooks::i_look_for_exceptions()
And the "movecoursesto" "select" should be disabled # behat_hooks::i_look_for_exceptions()
And I select course "Course 1" in the management interface # behat_hooks::i_look_for_exceptions()
And the "movecoursesto" "select" should be enabled # behat_hooks::i_look_for_exceptions()
And the "movecategoriesto" "select" should be disabled # behat_hooks::i_look_for_exceptions()
And the "resortcategoriesby" "select" should be disabled # behat_hooks::i_look_for_exceptions()
And the "resortcoursesby" "select" should be disabled # behat_hooks::i_look_for_exceptions()
And I select course "Course 2" in the management interface # behat_hooks::i_look_for_exceptions()
And the "movecoursesto" "select" should be enabled # behat_hooks::i_look_for_exceptions()
And the "movecategoriesto" "select" should be disabled # behat_hooks::i_look_for_exceptions()
And the "resortcategoriesby" "select" should be disabled # behat_hooks::i_look_for_exceptions()
And the "resortcoursesby" "select" should be disabled # behat_hooks::i_look_for_exceptions()
And I select category "Cat 3" in the management interface # behat_hooks::i_look_for_exceptions()
And the "movecoursesto" "select" should be enabled # behat_hooks::i_look_for_exceptions()
And the "movecategoriesto" "select" should be enabled # behat_hooks::i_look_for_exceptions()
And the "resortcategoriesby" "select" should be enabled # behat_hooks::i_look_for_exceptions()
And the "resortcoursesby" "select" should be enabled # behat_hooks::i_look_for_exceptions()
And I unselect course "Course 2" in the management interface # behat_hooks::i_look_for_exceptions()
And the "movecoursesto" "select" should be enabled # behat_hooks::i_look_for_exceptions()
And the "movecategoriesto" "select" should be enabled # behat_hooks::i_look_for_exceptions()
And the "resortcategoriesby" "select" should be enabled # behat_hooks::i_look_for_exceptions()
And the "resortcoursesby" "select" should be enabled # behat_hooks::i_look_for_exceptions()
And I unselect course "Course 1" in the management interface # behat_hooks::i_look_for_exceptions()
And the "movecoursesto" "select" should be disabled # behat_hooks::i_look_for_exceptions()
And the "movecategoriesto" "select" should be enabled # behat_hooks::i_look_for_exceptions()
And the "resortcategoriesby" "select" should be enabled # behat_hooks::i_look_for_exceptions()
And the "resortcoursesby" "select" should be enabled # behat_hooks::i_look_for_exceptions()
And I unselect category "Cat 3" in the management interface # behat_hooks::i_look_for_exceptions()
And the "movecoursesto" "select" should be disabled # behat_hooks::i_look_for_exceptions()
And the "movecategoriesto" "select" should be disabled # behat_hooks::i_look_for_exceptions()
And the "resortcategoriesby" "select" should be disabled # behat_hooks::i_look_for_exceptions()
And the "resortcoursesby" "select" should be disabled # behat_hooks::i_look_for_exceptions()
Scenario: Test that is not possible to create a course category with a duplicate idnumber # C:\Apache24\htdocs\integration\course\tests\behat\category_management.feature:338
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I expand "Site administration" node # behat_hooks::i_look_for_exceptions()
And I expand "Courses" node # behat_hooks::i_look_for_exceptions()
And I follow "Add a category" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Category name | Test duplicate |
| Category ID number | CAT1 |
When I press "Create category" # behat_hooks::i_look_for_exceptions()
Then I should see "ID number is already used for another category" # behat_hooks::i_look_for_exceptions()
Scenario: Test that is possible to remove an idnumber from a course category # C:\Apache24\htdocs\integration\course\tests\behat\category_management.feature:352
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
| Cat 2 | 0 | |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I should see "CAT1" in the "#category-listing" "css_element" # behat_hooks::i_look_for_exceptions()
When I click on "edit" action for "Cat 1" in management category listing # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Category name | Category 1 (edited) |
| Category ID number | |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Category 1 (edited)" in the "#category-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "CAT1" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
@core @core_course
Feature: Test we can resort categories in the management interface.
As a moodle admin
I need to test we can resort top level categories.
I need to test we can resort sub categories.
I need to test we can manually sort categories.
Scenario Outline: Test bulk sorting all categories. # C:\Apache24\htdocs\integration\course\tests\behat\category_resort.feature:8
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| category | name | idnumber | sortorder |
| 0 | Social studies | Ext003 | 1 |
| 0 | Applied sciences | Sci001 | 2 |
| 0 | Extended social studies | Ext002 | 3 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I set the field "menuselectsortby" to "All categories" # behat_hooks::i_look_for_exceptions()
And I set the field "menuresortcategoriesby" to # behat_hooks::i_look_for_exceptions()
And I press "Sort" # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see category listing before # behat_hooks::i_look_for_exceptions()
And I should see category listing before # behat_hooks::i_look_for_exceptions()
Examples:
| sortby | cat1 | cat2 | cat3 |
| "Sort by Category name ascending" | "Applied sciences" | "Extended social studies" | "Social studies" |
| "Sort by Category name descending" | "Social studies" | "Extended social studies" | "Applied sciences" |
| "Sort by Category ID number ascending" | "Extended social studies" | "Social studies" | "Applied sciences" |
| "Sort by Category ID number descending" | "Applied sciences" | "Social studies" | "Extended social studies" |
Scenario Outline: Test bulk sorting current category. # C:\Apache24\htdocs\integration\course\tests\behat\category_resort.feature:33
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| category | name | idnumber | sortorder |
| 0 | Test category | Tes001 | 1 |
| Tes001 | Social studies | Ext003 | 2 |
| Tes001 | Applied sciences | Sci001 | 3 |
| Tes001 | Extended social studies | Ext002 | 4 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on "Test category" "link" # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I set the field "menuselectsortby" to "This category" # behat_hooks::i_look_for_exceptions()
And I set the field "menuresortcategoriesby" to # behat_hooks::i_look_for_exceptions()
And I press "Sort" # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see category listing before # behat_hooks::i_look_for_exceptions()
And I should see category listing before # behat_hooks::i_look_for_exceptions()
Examples:
| sortby | cat1 | cat2 | cat3 |
| "Sort by Category name ascending" | "Applied sciences" | "Extended social studies" | "Social studies" |
| "Sort by Category name descending" | "Social studies" | "Extended social studies" | "Applied sciences" |
| "Sort by Category ID number ascending" | "Extended social studies" | "Social studies" | "Applied sciences" |
| "Sort by Category ID number descending" | "Applied sciences" | "Social studies" | "Extended social studies" |
Scenario Outline: Test resorting subcategories. # C:\Apache24\htdocs\integration\course\tests\behat\category_resort.feature:62
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| category | name | idnumber | sortorder |
| 0 | Master cat | CAT1 | 1 |
| CAT1 | Social studies | Ext003 | 1 |
| CAT1 | Applied sciences | Sci001 | 2 |
| CAT1 | Extended social studies | Ext002 | 3 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on "Master cat" "link" # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on action for "Master cat" in management category listing # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see category listing before # behat_hooks::i_look_for_exceptions()
And I should see category listing before # behat_hooks::i_look_for_exceptions()
Examples:
| sortby | cat1 | cat2 | cat3 |
| "resortbyname" | "Applied sciences" | "Extended social studies" | "Social studies" |
| "resortbynamedesc" | "Social studies" | "Extended social studies" | "Applied sciences" |
| "resortbyidnumber" | "Extended social studies" | "Social studies" | "Applied sciences" |
| "resortbyidnumberdesc" | "Applied sciences" | "Social studies" | "Extended social studies" |
@javascript
Scenario Outline: Test resorting subcategories with JS enabled. # C:\Apache24\htdocs\integration\course\tests\behat\category_resort.feature:90
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| category | name | idnumber | sortorder |
| 0 | Master cat | CAT1 | 1 |
| CAT1 | Social studies | Ext003 | 1 |
| CAT1 | Applied sciences | Sci001 | 2 |
| CAT1 | Extended social studies | Ext002 | 3 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on "Master cat" category in the management category listing # behat_hooks::i_look_for_exceptions()
And a new page should have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on action for "Master cat" in management category listing # behat_hooks::i_look_for_exceptions()
And a new page should have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see category listing before # behat_hooks::i_look_for_exceptions()
And I should see category listing before # behat_hooks::i_look_for_exceptions()
Examples:
| sortby | cat1 | cat2 | cat3 |
| "resortbyname" | "Applied sciences" | "Extended social studies" | "Social studies" |
| "resortbynamedesc" | "Social studies" | "Extended social studies" | "Applied sciences" |
| "resortbyidnumber" | "Extended social studies" | "Social studies" | "Applied sciences" |
| "resortbyidnumberdesc" | "Applied sciences" | "Social studies" | "Extended social studies" |
Scenario: Test moving categories up and down by one. # C:\Apache24\htdocs\integration\course\tests\behat\category_resort.feature:120
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| category | idnumber | name |
| 0 | CAT1 | Cat 1 |
| 0 | CAT2 | Cat 2 |
| CAT1 | CATA | Cat 1a |
| CAT1 | CATB | Cat 1b |
| CAT1 | CATC | Cat 1c |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on category "Cat 1" in the management interface # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see category listing "Cat 1" before "Cat 1a" # behat_hooks::i_look_for_exceptions()
And I should see category listing "Cat 1a" before "Cat 1b" # behat_hooks::i_look_for_exceptions()
And I should see category listing "Cat 1b" before "Cat 1c" # behat_hooks::i_look_for_exceptions()
And I should see category listing "Cat 1c" before "Cat 2" # behat_hooks::i_look_for_exceptions()
And I click to move category "CATA" down one # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see category listing "Cat 1" before "Cat 1b" # behat_hooks::i_look_for_exceptions()
And I should see category listing "Cat 1b" before "Cat 1a" # behat_hooks::i_look_for_exceptions()
And I should see category listing "Cat 1a" before "Cat 1c" # behat_hooks::i_look_for_exceptions()
And I should see category listing "Cat 1c" before "Cat 2" # behat_hooks::i_look_for_exceptions()
And I click to move category "CATC" up one # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see category listing "Cat 1" before "Cat 1b" # behat_hooks::i_look_for_exceptions()
And I should see category listing "Cat 1b" before "Cat 1c" # behat_hooks::i_look_for_exceptions()
And I should see category listing "Cat 1c" before "Cat 1a" # behat_hooks::i_look_for_exceptions()
And I should see category listing "Cat 1a" before "Cat 2" # behat_hooks::i_look_for_exceptions()
And I click to move category "CATA" down one # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see category listing "Cat 1" before "Cat 1b" # behat_hooks::i_look_for_exceptions()
And I should see category listing "Cat 1b" before "Cat 1c" # behat_hooks::i_look_for_exceptions()
And I should see category listing "Cat 1c" before "Cat 1a" # behat_hooks::i_look_for_exceptions()
And I should see category listing "Cat 1a" before "Cat 2" # behat_hooks::i_look_for_exceptions()
And I click to move category "CATB" up one # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see category listing "Cat 1" before "Cat 1b" # behat_hooks::i_look_for_exceptions()
And I should see category listing "Cat 1b" before "Cat 1c" # behat_hooks::i_look_for_exceptions()
And I should see category listing "Cat 1c" before "Cat 1a" # behat_hooks::i_look_for_exceptions()
And I should see category listing "Cat 1a" before "Cat 2" # behat_hooks::i_look_for_exceptions()
And I click to move category "CAT2" up one # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see category listing "Cat 2" before "Cat 1" # behat_hooks::i_look_for_exceptions()
And I click on category "Cat 1" in the management interface # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see category listing "Cat 2" before "Cat 1" # behat_hooks::i_look_for_exceptions()
And I should see category listing "Cat 1" before "Cat 1b" # behat_hooks::i_look_for_exceptions()
And I should see category listing "Cat 1b" before "Cat 1c" # behat_hooks::i_look_for_exceptions()
And I should see category listing "Cat 1c" before "Cat 1a" # behat_hooks::i_look_for_exceptions()
@javascript @_cross_browser
Scenario: Test using AJAX to move categories up and down by one. # C:\Apache24\htdocs\integration\course\tests\behat\category_resort.feature:180
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| category | idnumber | name |
| 0 | CAT1 | Cat 1 |
| 0 | CAT2 | Cat 2 |
| CAT1 | CATA | Cat 1a |
| CAT1 | CATB | Cat 1b |
| CAT1 | CATC | Cat 1c |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on category "Cat 1" in the management interface # behat_hooks::i_look_for_exceptions()
And a new page should have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see category listing "Cat 1" before "Cat 1a" # behat_hooks::i_look_for_exceptions()
And I should see category listing "Cat 1a" before "Cat 1b" # behat_hooks::i_look_for_exceptions()
And I should see category listing "Cat 1b" before "Cat 1c" # behat_hooks::i_look_for_exceptions()
And I should see category listing "Cat 1c" before "Cat 2" # behat_hooks::i_look_for_exceptions()
And I click to move category "CATA" down one # behat_hooks::i_look_for_exceptions()
And a new page should not have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I should see category listing "Cat 1" before "Cat 1b" # behat_hooks::i_look_for_exceptions()
And I should see category listing "Cat 1b" before "Cat 1a" # behat_hooks::i_look_for_exceptions()
And I should see category listing "Cat 1a" before "Cat 1c" # behat_hooks::i_look_for_exceptions()
And I should see category listing "Cat 1c" before "Cat 2" # behat_hooks::i_look_for_exceptions()
And I click to move category "CATC" up one # behat_hooks::i_look_for_exceptions()
And a new page should not have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I should see category listing "Cat 1" before "Cat 1b" # behat_hooks::i_look_for_exceptions()
And I should see category listing "Cat 1b" before "Cat 1c" # behat_hooks::i_look_for_exceptions()
And I should see category listing "Cat 1c" before "Cat 1a" # behat_hooks::i_look_for_exceptions()
And I should see category listing "Cat 1a" before "Cat 2" # behat_hooks::i_look_for_exceptions()
@core @core_course
Feature: Role assignments can be made at the category level
In order to grant a user different capabilities
As a user
I can assign roles in categories
Background: # C:\Apache24\htdocs\integration\course\tests\behat\category_role_assignment.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname |
| manager | Manager | Manager |
And the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
And the following "role assigns" exist: # behat_hooks::i_look_for_exceptions()
| user | role | contextlevel | reference |
| manager | manager | Category | CAT1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: A user with a category role can assign roles # C:\Apache24\htdocs\integration\course\tests\behat\category_role_assignment.feature:21
Given I define the allowed role assignments for the "Manager" role as: # behat_hooks::i_look_for_exceptions()
| Teacher | Assignable |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "manager" # behat_hooks::i_look_for_exceptions()
And I follow "Courses" # behat_hooks::i_look_for_exceptions()
When I follow "Cat 1" # behat_hooks::i_look_for_exceptions()
Then I should see "Assign roles" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: A user with a category role cannot assign roles if there are no roles to assign # C:\Apache24\htdocs\integration\course\tests\behat\category_role_assignment.feature:31
Given I define the allowed role assignments for the "Manager" role as: # behat_hooks::i_look_for_exceptions()
| Manager | Not assignable |
| Course creator | Not assignable |
| Teacher | Not assignable |
| Non-editing teacher | Not assignable |
| Student | Not assignable |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "manager" # behat_hooks::i_look_for_exceptions()
And I follow "Courses" # behat_hooks::i_look_for_exceptions()
When I follow "Cat 1" # behat_hooks::i_look_for_exceptions()
Then I should not see "Assign roles" # behat_hooks::i_look_for_exceptions()
@core
Feature: Change password
In order to ensure the password change works as expected
As a user
I need to test all the way to change my password
Background: # C:\Apache24\htdocs\integration\login\tests\behat\change_password.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| testuser | Test | User | moodle@example.com |
Scenario: A user can change his password manually # C:\Apache24\htdocs\integration\login\tests\behat\change_password.feature:12
Given I am on site homepage # behat_hooks::i_look_for_exceptions()
And I log in as "testuser" # behat_hooks::i_look_for_exceptions()
And I follow "Preferences" in the user menu # behat_hooks::i_look_for_exceptions()
When I follow "Change password" # behat_hooks::i_look_for_exceptions()
And I set the field "Current password" to "testuser" # behat_hooks::i_look_for_exceptions()
And I set the field "New password" to "NewPassword1*" # behat_hooks::i_look_for_exceptions()
And I set the field "New password (again)" to "NewPassword1*" # behat_hooks::i_look_for_exceptions()
And I click on "Save changes" "button" # behat_hooks::i_look_for_exceptions()
Then I should see "Password has been changed" # behat_hooks::i_look_for_exceptions()
And I click on "Continue" "button" # behat_hooks::i_look_for_exceptions()
And I should see "Preferences" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I follow "Log in" # behat_hooks::i_look_for_exceptions()
And I set the field "Username" to "testuser" # behat_hooks::i_look_for_exceptions()
And I set the field "Password" to "NewPassword1*" # behat_hooks::i_look_for_exceptions()
And I press "Log in" # behat_hooks::i_look_for_exceptions()
Then I should see "You are logged in as Test User" in the "page-footer" "region" # behat_hooks::i_look_for_exceptions()
Scenario: A user with expired password must change it when log in directly and then be redirected to the home page # C:\Apache24\htdocs\integration\login\tests\behat\change_password.feature:31
Given I force a password change for user "testuser" # behat_hooks::i_look_for_exceptions()
And I log in as "testuser" # behat_hooks::i_look_for_exceptions()
And I should see "You must change your password to proceed" # behat_hooks::i_look_for_exceptions()
When I set the field "Current password" to "testuser" # behat_hooks::i_look_for_exceptions()
And I set the field "New password" to "NewPassword1*" # behat_hooks::i_look_for_exceptions()
And I set the field "New password (again)" to "NewPassword1*" # behat_hooks::i_look_for_exceptions()
And I click on "Save changes" "button" # behat_hooks::i_look_for_exceptions()
Then I should see "Password has been changed" # behat_hooks::i_look_for_exceptions()
And I click on "Continue" "button" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: A user with expired password trying to visit a required login page must change and it and then be redirected to this page # C:\Apache24\htdocs\integration\login\tests\behat\change_password.feature:44
Given I force a password change for user "testuser" # behat_hooks::i_look_for_exceptions()
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | visible |
| Course 1 | c1 | 1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| testuser | c1 | student |
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I expand "Courses" node # behat_hooks::i_look_for_exceptions()
When I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I set the field "Username" to "testuser" # behat_hooks::i_look_for_exceptions()
And I set the field "Password" to "testuser" # behat_hooks::i_look_for_exceptions()
And I press "Log in" # behat_hooks::i_look_for_exceptions()
Then I should see "You must change your password to proceed" # behat_hooks::i_look_for_exceptions()
And I set the field "Current password" to "testuser" # behat_hooks::i_look_for_exceptions()
And I set the field "New password" to "NewPassword1*" # behat_hooks::i_look_for_exceptions()
And I set the field "New password (again)" to "NewPassword1*" # behat_hooks::i_look_for_exceptions()
And I click on "Save changes" "button" # behat_hooks::i_look_for_exceptions()
And I should see "Password has been changed" # behat_hooks::i_look_for_exceptions()
And I click on "Continue" "button" # behat_hooks::i_look_for_exceptions()
And I should see "Course 1" # behat_hooks::i_look_for_exceptions()
@mod @mod_choice
Feature: Teacher can choose whether to allow students to change their choice response
In order to allow students to change their choice
As a teacher
I need to enable the option to change the choice
Scenario: Add a choice activity and complete the activity as a student # C:\Apache24\htdocs\integration\mod\choice\tests\behat\change_response.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Choice" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Choice name | Choice name |
| Description | Choice Description |
| Allow choice to be updated | No |
| option[0] | Option 1 |
| option[1] | Option 2 |
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I choose "Option 1" from "Choice name" choice activity # behat_hooks::i_look_for_exceptions()
Then I should see "Your selection: Option 1" # behat_hooks::i_look_for_exceptions()
And I should see "Your choice has been saved" # behat_hooks::i_look_for_exceptions()
And "Save my choice" "button" should not exist # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Choice name" # behat_hooks::i_look_for_exceptions()
And I follow "Edit settings" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Allow choice to be updated | Yes |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Choice name" # behat_hooks::i_look_for_exceptions()
And I should see "Your selection: Option 1" # behat_hooks::i_look_for_exceptions()
And "Save my choice" "button" should exist # behat_hooks::i_look_for_exceptions()
And "Remove my choice" "link" should exist # behat_hooks::i_look_for_exceptions()
And I set the field "Option 2" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Save my choice" # behat_hooks::i_look_for_exceptions()
And I should see "Your choice has been saved" # behat_hooks::i_look_for_exceptions()
And I should see "Your selection: Option 2" # behat_hooks::i_look_for_exceptions()
@editor @editor_atto @atto @atto_charmap
Feature: Atto charmap button
To format text in Atto, I need to add symbols
@javascript
Scenario: Insert symbols # C:\Apache24\htdocs\integration\lib\editor\atto\plugins\charmap\tests\behat\charmap.feature:6
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I follow "Profile" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I set the field "Description" to "1980 Mullet
" # behat_hooks::i_look_for_exceptions()
And I select the text in the "Description" Atto editor # behat_hooks::i_look_for_exceptions()
When I click on "Show more buttons" "button" # behat_hooks::i_look_for_exceptions()
And I click on "Insert character" "button" # behat_hooks::i_look_for_exceptions()
And I click on "a - macron" "button" # behat_hooks::i_look_for_exceptions()
And I press "Update profile" # behat_hooks::i_look_for_exceptions()
And I follow "Preferences" in the user menu # behat_hooks::i_look_for_exceptions()
And I follow "Editor preferences" # behat_hooks::i_look_for_exceptions()
And I set the field "Text editor" to "Plain text area" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
Then I should see "ā" # behat_hooks::i_look_for_exceptions()
@mod @mod_chat
Feature: Chat calendar entries
In order to notify students of upcoming chat sessons
As a teacher
I need to create a chat activity and publish the event times
Background: # C:\Apache24\htdocs\integration\mod\chat\tests\behat\chat_calendar_events.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Tina | Teacher1 | teacher1@example.com |
| student1 | Sam | Student1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
Scenario: Create a chat activity and do not publish the start date to the calendar # C:\Apache24\htdocs\integration\mod\chat\tests\behat\chat_calendar_events.feature:20
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | schedule |
| chat | Test chat name | Test chat description | C1 | chat1 | 0 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
When I navigate to "Calendar" node in "Site pages" # behat_hooks::i_look_for_exceptions()
Then I should not see "Test chat name" # behat_hooks::i_look_for_exceptions()
Scenario: Create a chat activity and publish the start date to the calendar # C:\Apache24\htdocs\integration\mod\chat\tests\behat\chat_calendar_events.feature:29
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | schedule |
| chat | Test chat name | Test chat description | C1 | chat1 | 1 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
When I navigate to "Calendar" node in "Site pages" # behat_hooks::i_look_for_exceptions()
Then I should see "Test chat name" # behat_hooks::i_look_for_exceptions()
@mod @mod_chat
Feature: Chat reset
In order to reuse past chat activities
As a teacher
I need to remove all previous data.
Background: # C:\Apache24\htdocs\integration\mod\chat\tests\behat\chat_course_reset.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Tina | Teacher1 | teacher1@example.com |
| student1 | Sam | Student1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | Description | course | idnumber |
| chat | Test chat name | Test chat description | C1 | chat1 |
Scenario: Use course reset to update chat start date # C:\Apache24\htdocs\integration\mod\chat\tests\behat\chat_course_reset.feature:23
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| startdate[day] | 1 |
| startdate[month] | January |
| startdate[year] | 2020 |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I follow "Test chat name" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Chat administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| chattime[day] | 1 |
| chattime[month] | January |
| chattime[year] | 2020 |
| chattime[hour] | 12 |
| chattime[minute] | 00 |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
When I navigate to "Reset" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| reset_start_date[enabled] | 1 |
| reset_start_date[day] | 1 |
| reset_start_date[month] | January |
| reset_start_date[year] | 2030 |
And I press "Reset course" # behat_hooks::i_look_for_exceptions()
And I should see "Date changed" in the "Chats" "table_row" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
Then I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test chat name" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Chat administration" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And the "chattime[year]" select box should contain "2030" # behat_hooks::i_look_for_exceptions()
@mod @mod_choice
Feature: Restrict availability of the choice module to a deadline
In order to limit the time a student can mace a selection
As a teacher
I need to restrict answering to within a time period
Background: # C:\Apache24\htdocs\integration\mod\choice\tests\behat\choice_availability.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
Scenario: Enable the choice activity with a start deadline in the future # C:\Apache24\htdocs\integration\mod\choice\tests\behat\choice_availability.feature:23
Given I add a "Choice" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Choice name | Choice name |
| Description | Choice Description |
| option[0] | Option 1 |
| option[1] | Option 2 |
| timeopen[enabled] | 1 |
| timeopen[day] | 30 |
| timeopen[month] | December |
| timeopen[year] | 2037 |
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Choice name" # behat_hooks::i_look_for_exceptions()
Then I should see "Sorry, this activity is not available until" # behat_hooks::i_look_for_exceptions()
Scenario: Enable the choice activity with a start deadline in the past # C:\Apache24\htdocs\integration\mod\choice\tests\behat\choice_availability.feature:39
Given I add a "Choice" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Choice name | Choice name |
| Description | Choice Description |
| option[0] | Option 1 |
| option[1] | Option 2 |
| timeopen[enabled] | 1 |
| timeopen[day] | 30 |
| timeopen[month] | December |
| timeopen[year] | 2007 |
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Choice name" # behat_hooks::i_look_for_exceptions()
And "choice_1" "radio" should exist # behat_hooks::i_look_for_exceptions()
And "choice_2" "radio" should exist # behat_hooks::i_look_for_exceptions()
And "Save my choice" "button" should exist # behat_hooks::i_look_for_exceptions()
Scenario: Enable the choice activity with a end deadline in the future # C:\Apache24\htdocs\integration\mod\choice\tests\behat\choice_availability.feature:57
Given I add a "Choice" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Choice name | Choice name |
| Description | Choice Description |
| option[0] | Option 1 |
| option[1] | Option 2 |
| timeclose[enabled] | 1 |
| timeclose[day] | 30 |
| timeclose[month] | December |
| timeclose[year] | 2037 |
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Choice name" # behat_hooks::i_look_for_exceptions()
And "choice_1" "radio" should exist # behat_hooks::i_look_for_exceptions()
And "choice_2" "radio" should exist # behat_hooks::i_look_for_exceptions()
And "Save my choice" "button" should exist # behat_hooks::i_look_for_exceptions()
Scenario: Enable the choice activity with a end deadline in the past # C:\Apache24\htdocs\integration\mod\choice\tests\behat\choice_availability.feature:75
Given I add a "Choice" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Choice name | Choice name |
| Description | Choice Description |
| option[0] | Option 1 |
| option[1] | Option 2 |
| timeclose[enabled] | 1 |
| timeclose[day] | 30 |
| timeclose[month] | December |
| timeclose[year] | 2007 |
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Choice name" # behat_hooks::i_look_for_exceptions()
Then I should see "Sorry, this activity closed on" # behat_hooks::i_look_for_exceptions()
@editor @editor_atto @atto @atto_clear @_bug_phantomjs
Feature: Atto clear button
To format text in Atto, I need to remove formatting
@javascript
Scenario: Clear formatting # C:\Apache24\htdocs\integration\lib\editor\atto\plugins\clear\tests\behat\clear.feature:6
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I follow "Profile" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I set the field "Description" to "Pisa" # behat_hooks::i_look_for_exceptions()
And I select the text in the "Description" Atto editor # behat_hooks::i_look_for_exceptions()
And I click on "Italic" "button" # behat_hooks::i_look_for_exceptions()
And I click on "Show more buttons" "button" # behat_hooks::i_look_for_exceptions()
And I select the text in the "Description" Atto editor # behat_hooks::i_look_for_exceptions()
When I click on "Clear formatting" "button" # behat_hooks::i_look_for_exceptions()
And I press "Update profile" # behat_hooks::i_look_for_exceptions()
And I follow "Preferences" in the user menu # behat_hooks::i_look_for_exceptions()
And I follow "Editor preferences" # behat_hooks::i_look_for_exceptions()
And I set the field "Text editor" to "Plain text area" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
Then I should not see "Pisa" # behat_hooks::i_look_for_exceptions()
@mod @mod_wiki
Feature: A teacher can set a wiki to be collaborative or individual
In order to allow both collaborative wikis and individual journals with history register
As a teacher
I need to select whether the wiki is collaborative or individual
@javascript
Scenario: Collaborative and individual wikis # C:\Apache24\htdocs\integration\mod\wiki\tests\behat\collaborative_individual.feature:8
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Wiki" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Wiki name | Collaborative wiki name |
| Description | Collaborative wiki description |
| First page name | Collaborative index |
| Wiki mode | Collaborative wiki |
And I follow "Collaborative wiki name" # behat_hooks::i_look_for_exceptions()
And I press "Create page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| HTML format | Collaborative teacher1 edition |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I add a "Wiki" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Wiki name | Individual wiki name |
| Description | Individual wiki description |
| First page name | Individual index |
| Wiki mode | Individual wiki |
And I follow "Individual wiki name" # behat_hooks::i_look_for_exceptions()
And I press "Create page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| HTML format | Individual teacher1 edition |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
When I follow "Collaborative wiki name" # behat_hooks::i_look_for_exceptions()
Then I should see "Collaborative teacher1 edition" # behat_hooks::i_look_for_exceptions()
And I follow "Edit" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| HTML format | Collaborative student1 edition |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should not see "Collaborative teacher1 edition" # behat_hooks::i_look_for_exceptions()
And I should see "Collaborative student1 edition" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Individual wiki name" # behat_hooks::i_look_for_exceptions()
And I should not see "Individual teacher1 edition" # behat_hooks::i_look_for_exceptions()
And I press "Create page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| HTML format | Individual student1 edition |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Individual wiki name" # behat_hooks::i_look_for_exceptions()
And I should not see "Individual teacher1 edition" # behat_hooks::i_look_for_exceptions()
And I should not see "Individual student1 edition" # behat_hooks::i_look_for_exceptions()
And I press "Create page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| HTML format | Individual student2 edition |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Collaborative wiki name" # behat_hooks::i_look_for_exceptions()
And I should see "Collaborative student1 edition" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Individual wiki name" # behat_hooks::i_look_for_exceptions()
And I should see "Individual teacher1 edition" # behat_hooks::i_look_for_exceptions()
And I should not see "Individual student1 edition" # behat_hooks::i_look_for_exceptions()
And I set the field "uid" to "Student 1" # behat_hooks::i_look_for_exceptions()
And I should see "Individual student1 edition" # behat_hooks::i_look_for_exceptions()
And I should not see "Individual teacher1 edition" # behat_hooks::i_look_for_exceptions()
And I set the field "uid" to "Student 2" # behat_hooks::i_look_for_exceptions()
And I should see "Individual student2 edition" # behat_hooks::i_look_for_exceptions()
And I should not see "Individual teacher1 edition" # behat_hooks::i_look_for_exceptions()
@editor @editor_atto @atto @atto_collapse
Feature: Atto collapse button
To access all the tools in Atto, I need to toggle the toolbar
@javascript
Scenario: Toggle toolbar # C:\Apache24\htdocs\integration\lib\editor\atto\plugins\collapse\tests\behat\collapse.feature:6
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I follow "Profile" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
When I click on "Show more buttons" "button" # behat_hooks::i_look_for_exceptions()
Then "Equation editor" "button" should be visible # behat_hooks::i_look_for_exceptions()
And I click on "Show fewer buttons" "button" # behat_hooks::i_look_for_exceptions()
Then "Equation editor" "button" should not be visible # behat_hooks::i_look_for_exceptions()
@core @core_tag @javascript
Feature: Managers can create and manage tag collections
In order to use tags effectively
As a manager
I need to be able to manage tag collections
Background: # C:\Apache24\htdocs\integration\tag\tests\behat\collections.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| manager1 | Manager | 1 | manager1@example.com |
| user1 | User | 1 | user1@example.com |
And the following "system role assigns" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| manager1 | Acceptance test site | manager |
And the following "tags" exist: # behat_hooks::i_look_for_exceptions()
| name | isstandard |
| Tag0 | 1 |
| Tag1 | 1 |
| Tag2 | 1 |
| Tag3 | 1 |
And I log in as "manager1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Manage tags" node in "Site administration > Appearance" # behat_hooks::i_look_for_exceptions()
And I follow "Add tag collection" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Hobbies |
And I press "Create" # behat_hooks::i_look_for_exceptions()
Scenario: Adding tag collections # C:\Apache24\htdocs\integration\tag\tests\behat\collections.feature:28
When I follow "Hobbies" # behat_hooks::i_look_for_exceptions()
Then I should see "Nothing to display" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Editing tag collections # C:\Apache24\htdocs\integration\tag\tests\behat\collections.feature:33
When I click on "Edit tag collection name" "link" in the "//table[contains(@class,'tag-collections-table')]//tr[contains(.,'Hobbies')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I set the field "New name for tag collection Hobbies" to "Newname" # behat_hooks::i_look_for_exceptions()
And I press key "13" in the field "New name for tag collection Hobbies" # behat_hooks::i_look_for_exceptions()
Then I should not see "Hobbies" # behat_hooks::i_look_for_exceptions()
And I should see "Newname" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Resorting tag collections # C:\Apache24\htdocs\integration\tag\tests\behat\collections.feature:41
When I follow "Add tag collection" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Blogging |
And I press "Create" # behat_hooks::i_look_for_exceptions()
Then "Blogging" "link" should appear after "Hobbies" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Move up" "link" in the "Blogging" "table_row" # behat_hooks::i_look_for_exceptions()
And "Blogging" "link" should appear before "Hobbies" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Move down" "link" in the "Blogging" "table_row" # behat_hooks::i_look_for_exceptions()
And "Blogging" "link" should appear after "Hobbies" "link" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Deleting tag collections # C:\Apache24\htdocs\integration\tag\tests\behat\collections.feature:53
When I click on "Delete" "link" in the "Hobbies" "table_row" # behat_hooks::i_look_for_exceptions()
Then I should see "Are you sure you want to delete tag collection \"Hobbies\"?" # behat_hooks::i_look_for_exceptions()
And I press "Yes" # behat_hooks::i_look_for_exceptions()
And I should not see "Hobbies" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Assigning tag area to tag collection # C:\Apache24\htdocs\integration\tag\tests\behat\collections.feature:60
And I should see "User interests" in the "//table[contains(@class,'tag-collections-table')]//tr[contains(.,'Default collection')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I should not see "User interests" in the "//table[contains(@class,'tag-collections-table')]//tr[contains(.,'Hobbies')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
When I click on "Change tag collection" "link" in the "//table[contains(@class,'tag-areas-table')]//tr[contains(.,'User interests')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I set the field "Change tag collection of area User interests" to "Hobbies" # behat_hooks::i_look_for_exceptions()
Then I should not see "User interests" in the "//table[contains(@class,'tag-collections-table')]//tr[contains(.,'Default collection')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I should see "User interests" in the "//table[contains(@class,'tag-collections-table')]//tr[contains(.,'Hobbies')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I should see "Hobbies" in the "//table[contains(@class,'tag-areas-table')]//tr[contains(.,'User interests')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Disabling tag areas # C:\Apache24\htdocs\integration\tag\tests\behat\collections.feature:70
When I click on "Disable" "link" in the "//table[contains(@class,'tag-areas-table')]//tr[contains(.,'User interests')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I should not see "User interests" in the "table.tag-collections-table" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Enable" "link" in the "//table[contains(@class,'tag-areas-table')]//tr[contains(.,'User interests')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I should see "User interests" in the "//table[contains(@class,'tag-collections-table')]//tr[contains(.,'Default collection')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Deleting non-empty tag collections # C:\Apache24\htdocs\integration\tag\tests\behat\collections.feature:77
When I click on "Change tag collection" "link" in the "//table[contains(@class,'tag-areas-table')]//tr[contains(.,'User interests')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I set the field "Change tag collection of area User interests" to "Hobbies" # behat_hooks::i_look_for_exceptions()
And I click on "Delete" "link" in the "Hobbies" "table_row" # behat_hooks::i_look_for_exceptions()
Then I should see "Are you sure you want to delete tag collection \"Hobbies\"?" # behat_hooks::i_look_for_exceptions()
And I press "Yes" # behat_hooks::i_look_for_exceptions()
And I should not see "Hobbies" # behat_hooks::i_look_for_exceptions()
And I should see "User interests" in the "//table[contains(@class,'tag-collections-table')]//tr[contains(.,'Default collection')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Moving tags when changing tag collections # C:\Apache24\htdocs\integration\tag\tests\behat\collections.feature:87
And I follow "Preferences" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I set the field "List of interests" to "Swimming, Tag0, Tag3" # behat_hooks::i_look_for_exceptions()
And I press "Update profile" # behat_hooks::i_look_for_exceptions()
And I navigate to "Manage tags" node in "Site administration > Appearance" # behat_hooks::i_look_for_exceptions()
When I click on "Change tag collection" "link" in the "//table[contains(@class,'tag-areas-table')]//tr[contains(.,'User interests')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I set the field "Change tag collection of area User interests" to "Hobbies" # behat_hooks::i_look_for_exceptions()
And I follow "Hobbies" # behat_hooks::i_look_for_exceptions()
Then I should see "Swimming" # behat_hooks::i_look_for_exceptions()
And I should see "Tag0" # behat_hooks::i_look_for_exceptions()
And I should see "Tag3" # behat_hooks::i_look_for_exceptions()
And I should not see "Tag1" # behat_hooks::i_look_for_exceptions()
And I should not see "Tag2" # behat_hooks::i_look_for_exceptions()
And I follow "Manage tags" # behat_hooks::i_look_for_exceptions()
And I follow "Default collection" # behat_hooks::i_look_for_exceptions()
And I should not see "Swimming" # behat_hooks::i_look_for_exceptions()
And I should see "Tag0" # behat_hooks::i_look_for_exceptions()
And I should see "Tag3" # behat_hooks::i_look_for_exceptions()
And I should see "Tag1" # behat_hooks::i_look_for_exceptions()
And I should see "Tag2" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Creating searchable and non-searchable tag collections # C:\Apache24\htdocs\integration\tag\tests\behat\collections.feature:113
And I follow "Add tag collection" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Hiddencoll |
| Searchable | 0 |
And I press "Create" # behat_hooks::i_look_for_exceptions()
And "Yes" "text" should not exist in the "//table[contains(@class,'tag-collections-table')]//tr[contains(.,'Hiddencoll')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I navigate to "Tags" node in "Site pages" # behat_hooks::i_look_for_exceptions()
Then the "Select tag collection" select box should contain "Default collection" # behat_hooks::i_look_for_exceptions()
And the "Select tag collection" select box should contain "Hobbies" # behat_hooks::i_look_for_exceptions()
And the "Select tag collection" select box should not contain "Hiddencoll" # behat_hooks::i_look_for_exceptions()
And I navigate to "Manage tags" node in "Site administration > Appearance" # behat_hooks::i_look_for_exceptions()
And I click on "Change searchable" "link" in the "Hobbies" "table_row" # behat_hooks::i_look_for_exceptions()
And I navigate to "Tags" node in "Site pages" # behat_hooks::i_look_for_exceptions()
And "Select tag collection" "select" should not exist # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@core @core_blog
Feature: Comment on a blog entry
In order to respond to a blog post
As a user
I need to be able to comment on a blog entry
Background: # C:\Apache24\htdocs\integration\blog\tests\behat\comment.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| testuser | Test | User | moodle@example.com |
| testuser2 | Test2 | User2 | moodle2@example.com |
And I log in as "testuser" # behat_hooks::i_look_for_exceptions()
And I expand "Site pages" node # behat_hooks::i_look_for_exceptions()
And I follow "Site blogs" # behat_hooks::i_look_for_exceptions()
And I follow "Add a new entry" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | Blog post from user 1 |
| Blog entry body | User 1 blog post content |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Commenting on my own blog entry # C:\Apache24\htdocs\integration\blog\tests\behat\comment.feature:23
Given I am on site homepage # behat_hooks::i_look_for_exceptions()
And I log in as "testuser" # behat_hooks::i_look_for_exceptions()
And I expand "Site pages" node # behat_hooks::i_look_for_exceptions()
And I follow "Site blogs" # behat_hooks::i_look_for_exceptions()
And I follow "Blog post from user 1" # behat_hooks::i_look_for_exceptions()
And I should see "User 1 blog post content" # behat_hooks::i_look_for_exceptions()
And I follow "Comments (0)" # behat_hooks::i_look_for_exceptions()
When I set the field "content" to "$My own >nasty< \"string\"!" # behat_hooks::i_look_for_exceptions()
And I follow "Save comment" # behat_hooks::i_look_for_exceptions()
Then I should see "$My own >nasty< \"string\"!" # behat_hooks::i_look_for_exceptions()
And I set the field "content" to "Another $Nasty " # behat_hooks::i_look_for_exceptions()
And I follow "Save comment" # behat_hooks::i_look_for_exceptions()
And I should see "Comments (2)" in the ".comment-link" "css_element" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Deleting my own comment # C:\Apache24\htdocs\integration\blog\tests\behat\comment.feature:39
Given I am on site homepage # behat_hooks::i_look_for_exceptions()
And I log in as "testuser" # behat_hooks::i_look_for_exceptions()
And I expand "Site pages" node # behat_hooks::i_look_for_exceptions()
And I follow "Site blogs" # behat_hooks::i_look_for_exceptions()
And I follow "Blog post from user 1" # behat_hooks::i_look_for_exceptions()
And I should see "User 1 blog post content" # behat_hooks::i_look_for_exceptions()
And I follow "Comments (0)" # behat_hooks::i_look_for_exceptions()
And I set the field "content" to "$My own >nasty< \"string\"!" # behat_hooks::i_look_for_exceptions()
And I follow "Save comment" # behat_hooks::i_look_for_exceptions()
When I click on ".comment-delete a" "css_element" # behat_hooks::i_look_for_exceptions()
And I wait "4" seconds # behat_hooks::i_look_for_exceptions()
Then I should not see "$My own >nasty< \"string\"!" # behat_hooks::i_look_for_exceptions()
And I follow "Blog post from user 1" # behat_hooks::i_look_for_exceptions()
And I click on ".comment-link" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "$My own >nasty< \"string\"!" # behat_hooks::i_look_for_exceptions()
And I should see "Comments (0)" in the ".comment-link" "css_element" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Commenting on someone's blog post # C:\Apache24\htdocs\integration\blog\tests\behat\comment.feature:59
Given I am on site homepage # behat_hooks::i_look_for_exceptions()
And I log in as "testuser2" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I expand "Site pages" node # behat_hooks::i_look_for_exceptions()
And I follow "Site blogs" # behat_hooks::i_look_for_exceptions()
And I follow "Blog post from user 1" # behat_hooks::i_look_for_exceptions()
When I follow "Comments (0)" # behat_hooks::i_look_for_exceptions()
And I set the field "content" to "$My own >nasty< \"string\"!" # behat_hooks::i_look_for_exceptions()
And I follow "Save comment" # behat_hooks::i_look_for_exceptions()
Then I should see "$My own >nasty< \"string\"!" # behat_hooks::i_look_for_exceptions()
@mod @mod_assign
Feature: In an assignment, teachers can edit a students submission inline
In order to easily mark students assignments
As a teacher
I need to have a students submission text copied to the grading online form.
@javascript @_file_upload
Scenario: Submit a text online and edit the submission # C:\Apache24\htdocs\integration\mod\assign\tests\behat\comment_inline.feature:8
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment name |
| Description | Submit your online text |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_file_enabled | 0 |
| assignfeedback_comments_enabled | 1 |
| assignfeedback_file_enabled | 1 |
| assignfeedback_comments_commentinline | 1 |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I press "Add submission" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Online text | I'm the student first submission |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I click on "Grade" "link" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Grade out of 100 | 50 |
| Feedback comments | I'm the teacher feedback |
And I upload "lib/tests/fixtures/empty.txt" file to "Feedback files" filemanager # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Ok" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
Then I should see "50.00" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Submitted for grading" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Graded" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "I'm the student first submission" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "I'm the teacher feedback" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "empty.txt" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I should see "Submitted for grading" in the "Submission status" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Graded" in the "Grading status" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "I'm the student first submission" in the "Online text" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "I'm the teacher feedback" in the "Feedback comments" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "empty.txt" in the "Feedback files" "table_row" # behat_hooks::i_look_for_exceptions()
@mod @mod_quiz
Feature: Set a quiz to be marked complete when the student uses all attempts allowed
In order to ensure a student has learned the material before being marked complete
As a teacher
I need to set a quiz to complete when the student receives a passing grade, or completed_fail if they use all attempts without passing
Background: # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\completion_condition_attempts_used.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | enablecompletion |
| Course 1 | C1 | 0 | 1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| grade_item_advanced | hiddenuntil |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | First question | Answer the first question |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | course | idnumber | attempts | gradepass | completion | completionattemptsexhausted |
| quiz | Test quiz name | C1 | quiz1 | 2 | 5.00 | 2 | 1 |
And quiz "Test quiz name" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page |
| First question | 1 |
Scenario: student1 uses up both attempts without passing # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\completion_condition_attempts_used.feature:34
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And the "Test quiz name" "quiz" activity with "auto" completion should be marked as not complete # behat_hooks::i_look_for_exceptions()
And I follow "Test quiz name" # behat_hooks::i_look_for_exceptions()
And I press "Attempt quiz now" # behat_hooks::i_look_for_exceptions()
And I set the field "False" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Finish attempt ..." # behat_hooks::i_look_for_exceptions()
And I press "Submit all and finish" # behat_hooks::i_look_for_exceptions()
And I follow "C1" # behat_hooks::i_look_for_exceptions()
And the "Test quiz name" "quiz" activity with "auto" completion should be marked as not complete # behat_hooks::i_look_for_exceptions()
And I follow "Test quiz name" # behat_hooks::i_look_for_exceptions()
And I press "Re-attempt quiz" # behat_hooks::i_look_for_exceptions()
And I set the field "False" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Finish attempt ..." # behat_hooks::i_look_for_exceptions()
And I press "Submit all and finish" # behat_hooks::i_look_for_exceptions()
And I follow "C1" # behat_hooks::i_look_for_exceptions()
Then "//img[contains(@alt, 'Completed: Test quiz name')]" "xpath_element" should exist in the "li.modtype_quiz" "css_element" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Activity completion" node in "Course administration > Reports" # behat_hooks::i_look_for_exceptions()
And "//img[contains(@title,'Test quiz name') and @alt='Completed']" "xpath_element" should exist in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
@mod @mod_lesson
Feature: Set end of lesson reached as a completion condition for a lesson
In order to ensure students really see all lesson pages
As a teacher
I need to set end of lesson reached to mark the lesson activity as completed
Scenario: Set end reached as a condition # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\completion_condition_end_reached.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Enable completion tracking | Yes |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I add a "Lesson" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Test lesson |
| Description | Test lesson description |
| Completion tracking | Show activity as complete when conditions are met |
| completionendreached | 1 |
And I follow "Test lesson" # behat_hooks::i_look_for_exceptions()
And I follow "Add a content page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | First page name |
| Page contents | First page contents |
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Add a content page" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Second page name |
| Page contents | Second page contents |
| id_answer_editor_0 | Previous page |
| id_jumpto_0 | Previous page |
| id_answer_editor_1 | Next page |
| id_jumpto_1 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then the "Test lesson" "lesson" activity with "auto" completion should be marked as not complete # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then the "Test lesson" "lesson" activity with "auto" completion should be marked as not complete # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson" # behat_hooks::i_look_for_exceptions()
And I should see "You have seen more than one page of this lesson already." # behat_hooks::i_look_for_exceptions()
And I should see "Do you want to start at the last page you saw?" # behat_hooks::i_look_for_exceptions()
And I click on "No" "link" in the "#page-content" "css_element" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then the "Test lesson" "lesson" activity with "auto" completion should be marked as complete # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And "Student 1" user has completed "Test lesson" activity # behat_hooks::i_look_for_exceptions()
@mod @mod_forum
Feature: Set a certain number of discussions as a completion condition for a forum
In order to ensure students are participating on forums
As a teacher
I need to set a minimum number of discussions to mark the forum activity as completed
Scenario: Set X number of discussions as a condition # C:\Apache24\htdocs\integration\mod\forum\tests\behat\completion_condition_number_discussions.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Enable completion tracking | Yes |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
When I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name |
| Description | Test forum description |
| Completion tracking | Show activity as complete when conditions are met |
| completiondiscussionsenabled | 1 |
| completiondiscussions | 2 |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then the "Test forum name" "forum" activity with "auto" completion should be marked as not complete # behat_hooks::i_look_for_exceptions()
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Post 1 subject |
| Message | Body 1 content |
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Post 2 subject |
| Message | Body 2 content |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then the "Test forum name" "forum" activity with "auto" completion should be marked as complete # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And "Student 1" user has completed "Test forum name" activity # behat_hooks::i_look_for_exceptions()
@mod @mod_quiz
Feature: Set a quiz to be marked complete when the student passes
In order to ensure a student has learned the material before being marked complete
As a teacher
I need to set a quiz to complete when the student recieves a passing grade
Background: # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\completion_condition_passing_grade.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | enablecompletion |
| Course 1 | C1 | 0 | 1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| grade_item_advanced | hiddenuntil |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | First question | Answer the first question |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | course | idnumber | attempts | gradepass | completion | completionpass |
| quiz | Test quiz name | C1 | quiz1 | 4 | 5.00 | 2 | 1 |
And quiz "Test quiz name" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page |
| First question | 1 |
Scenario: student1 passes on the first try # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\completion_condition_passing_grade.feature:34
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And the "Test quiz name" "quiz" activity with "auto" completion should be marked as not complete # behat_hooks::i_look_for_exceptions()
And I follow "Test quiz name" # behat_hooks::i_look_for_exceptions()
And I press "Attempt quiz now" # behat_hooks::i_look_for_exceptions()
And I set the field "True" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Finish attempt ..." # behat_hooks::i_look_for_exceptions()
And I press "Submit all and finish" # behat_hooks::i_look_for_exceptions()
And I follow "C1" # behat_hooks::i_look_for_exceptions()
Then "//img[contains(@alt, 'Completed: Test quiz name')]" "xpath_element" should exist in the "li.modtype_quiz" "css_element" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Activity completion" node in "Course administration > Reports" # behat_hooks::i_look_for_exceptions()
And "//img[contains(@title,'Test quiz name') and @alt='Completed']" "xpath_element" should exist in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
@mod @mod_scorm @_file_upload @_switch_frame
Feature: Scorm multi-sco completion
In order to let students access a scorm package
As a teacher
I need to add scorm activity to a course
Background: # C:\Apache24\htdocs\integration\mod\scorm\tests\behat\completion_condition_require_status.feature:6
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
@javascript
Scenario: Test completion with a single sco completion. # C:\Apache24\htdocs\integration\mod\scorm\tests\behat\completion_condition_require_status.feature:20
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Enable completion tracking | Yes |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I add a "SCORM package" to section "1" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Basic Multi-sco SCORM package |
| Description | Description |
| Completion tracking | Show activity as complete when conditions are met |
| Require all scos to return completion status | 0 |
And I set the field "Completed" to "1" # behat_hooks::i_look_for_exceptions()
And I upload "mod/scorm/tests/packages/RuntimeMinimumCalls_SCORM12.zip" file to "Package file" filemanager # behat_hooks::i_look_for_exceptions()
And I click on "Save and display" "button" # behat_hooks::i_look_for_exceptions()
Then I should see "Basic Multi-sco SCORM package" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Basic Multi-sco SCORM package" # behat_hooks::i_look_for_exceptions()
And I should see "Normal" # behat_hooks::i_look_for_exceptions()
And I press "Enter" # behat_hooks::i_look_for_exceptions()
And I switch to "scorm_object" iframe # behat_hooks::i_look_for_exceptions()
And I should see "Play of the game" # behat_hooks::i_look_for_exceptions()
And I switch to the main frame # behat_hooks::i_look_for_exceptions()
And I follow "Exit activity" # behat_hooks::i_look_for_exceptions()
And I wait until the page is ready # behat_hooks::i_look_for_exceptions()
Then I should see "Basic Multi-sco SCORM package" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then "Student 1" user has completed "Basic Multi-sco SCORM package" activity # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Test completion with all scos # C:\Apache24\htdocs\integration\mod\scorm\tests\behat\completion_condition_require_status.feature:56
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Enable completion tracking | Yes |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I add a "SCORM package" to section "1" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | ADV Multi-sco SCORM package |
| Description | Description |
| Completion tracking | Show activity as complete when conditions are met |
| Require all scos to return completion status | 1 |
And I set the field "Completed" to "1" # behat_hooks::i_look_for_exceptions()
And I upload "mod/scorm/tests/packages/RuntimeMinimumCalls_SCORM12.zip" file to "Package file" filemanager # behat_hooks::i_look_for_exceptions()
And I click on "Save and display" "button" # behat_hooks::i_look_for_exceptions()
Then I should see "ADV Multi-sco SCORM package" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "ADV Multi-sco SCORM package" # behat_hooks::i_look_for_exceptions()
And I should see "Normal" # behat_hooks::i_look_for_exceptions()
And I press "Enter" # behat_hooks::i_look_for_exceptions()
And I switch to "scorm_object" iframe # behat_hooks::i_look_for_exceptions()
And I should see "Play of the game" # behat_hooks::i_look_for_exceptions()
And I switch to the main frame # behat_hooks::i_look_for_exceptions()
And I follow "Exit activity" # behat_hooks::i_look_for_exceptions()
And I wait until the page is ready # behat_hooks::i_look_for_exceptions()
Then I should see "ADV Multi-sco SCORM package" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then "Student 1" user has not completed "ADV Multi-sco SCORM package" activity # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "ADV Multi-sco SCORM package" # behat_hooks::i_look_for_exceptions()
And I should see "Normal" # behat_hooks::i_look_for_exceptions()
And I press "Enter" # behat_hooks::i_look_for_exceptions()
And I switch to "scorm_object" iframe # behat_hooks::i_look_for_exceptions()
And I should see "Play of the game" # behat_hooks::i_look_for_exceptions()
And I switch to the main frame # behat_hooks::i_look_for_exceptions()
And I click on "Par?" "list_item" # behat_hooks::i_look_for_exceptions()
And I switch to "scorm_object" iframe # behat_hooks::i_look_for_exceptions()
And I should see "Par" # behat_hooks::i_look_for_exceptions()
And I switch to the main frame # behat_hooks::i_look_for_exceptions()
And I click on "Keeping Score" "list_item" # behat_hooks::i_look_for_exceptions()
And I switch to "scorm_object" iframe # behat_hooks::i_look_for_exceptions()
And I should see "Scoring" # behat_hooks::i_look_for_exceptions()
And I switch to the main frame # behat_hooks::i_look_for_exceptions()
And I click on "Other Scoring Systems" "list_item" # behat_hooks::i_look_for_exceptions()
And I switch to "scorm_object" iframe # behat_hooks::i_look_for_exceptions()
And I should see "Other Scoring Systems" # behat_hooks::i_look_for_exceptions()
And I switch to the main frame # behat_hooks::i_look_for_exceptions()
And I click on "The Rules of Golf" "list_item" # behat_hooks::i_look_for_exceptions()
And I switch to "scorm_object" iframe # behat_hooks::i_look_for_exceptions()
And I should see "The Rules of Golf" # behat_hooks::i_look_for_exceptions()
And I switch to the main frame # behat_hooks::i_look_for_exceptions()
And I click on "Playing Golf Quiz" "list_item" # behat_hooks::i_look_for_exceptions()
And I switch to "scorm_object" iframe # behat_hooks::i_look_for_exceptions()
And I should see "Knowledge Check" # behat_hooks::i_look_for_exceptions()
And I switch to the main frame # behat_hooks::i_look_for_exceptions()
And I click on "Taking Care of the Course" "list_item" # behat_hooks::i_look_for_exceptions()
And I switch to "scorm_object" iframe # behat_hooks::i_look_for_exceptions()
And I should see "Etiquette - Care For the Course" # behat_hooks::i_look_for_exceptions()
And I switch to the main frame # behat_hooks::i_look_for_exceptions()
And I click on "Avoiding Distraction" "list_item" # behat_hooks::i_look_for_exceptions()
And I switch to "scorm_object" iframe # behat_hooks::i_look_for_exceptions()
And I should see "Etiquette - Avoiding Distraction" # behat_hooks::i_look_for_exceptions()
And I switch to the main frame # behat_hooks::i_look_for_exceptions()
And I click on "Playing Politely" "list_item" # behat_hooks::i_look_for_exceptions()
And I switch to "scorm_object" iframe # behat_hooks::i_look_for_exceptions()
And I should see "Etiquette - Playing the Game" # behat_hooks::i_look_for_exceptions()
And I switch to the main frame # behat_hooks::i_look_for_exceptions()
And I click on "Etiquette Quiz" "list_item" # behat_hooks::i_look_for_exceptions()
And I switch to "scorm_object" iframe # behat_hooks::i_look_for_exceptions()
And I should see "Knowledge Check" # behat_hooks::i_look_for_exceptions()
And I switch to the main frame # behat_hooks::i_look_for_exceptions()
And I click on "Handicapping Overview" "list_item" # behat_hooks::i_look_for_exceptions()
And I switch to "scorm_object" iframe # behat_hooks::i_look_for_exceptions()
And I should see "Handicapping" # behat_hooks::i_look_for_exceptions()
And I switch to the main frame # behat_hooks::i_look_for_exceptions()
And I click on "Calculating a Handicap" "list_item" # behat_hooks::i_look_for_exceptions()
And I switch to "scorm_object" iframe # behat_hooks::i_look_for_exceptions()
And I should see "Calculating a Handicap" # behat_hooks::i_look_for_exceptions()
And I switch to the main frame # behat_hooks::i_look_for_exceptions()
And I click on "Calculating a Handicapped Score" "list_item" # behat_hooks::i_look_for_exceptions()
And I switch to "scorm_object" iframe # behat_hooks::i_look_for_exceptions()
And I should see "Calculating a Score" # behat_hooks::i_look_for_exceptions()
And I switch to the main frame # behat_hooks::i_look_for_exceptions()
And I click on "Handicapping Example" "list_item" # behat_hooks::i_look_for_exceptions()
And I switch to "scorm_object" iframe # behat_hooks::i_look_for_exceptions()
And I should see "Calculating a Score" # behat_hooks::i_look_for_exceptions()
And I switch to the main frame # behat_hooks::i_look_for_exceptions()
And I click on "Handicapping Quiz" "list_item" # behat_hooks::i_look_for_exceptions()
And I switch to "scorm_object" iframe # behat_hooks::i_look_for_exceptions()
And I should see "Knowledge Check" # behat_hooks::i_look_for_exceptions()
And I switch to the main frame # behat_hooks::i_look_for_exceptions()
And I click on "How to Have Fun Playing Golf" "list_item" # behat_hooks::i_look_for_exceptions()
And I switch to "scorm_object" iframe # behat_hooks::i_look_for_exceptions()
And I should see "How to Have Fun Golfing" # behat_hooks::i_look_for_exceptions()
And I switch to the main frame # behat_hooks::i_look_for_exceptions()
And I click on "How to Make Friends Playing Golf" "list_item" # behat_hooks::i_look_for_exceptions()
And I switch to "scorm_object" iframe # behat_hooks::i_look_for_exceptions()
And I should see "How to Make Friends on the Golf Course" # behat_hooks::i_look_for_exceptions()
And I switch to the main frame # behat_hooks::i_look_for_exceptions()
And I click on "Having Fun Quiz" "list_item" # behat_hooks::i_look_for_exceptions()
And I switch to "scorm_object" iframe # behat_hooks::i_look_for_exceptions()
And I should see "Knowledge Check" # behat_hooks::i_look_for_exceptions()
And I switch to the main frame # behat_hooks::i_look_for_exceptions()
And I follow "Exit activity" # behat_hooks::i_look_for_exceptions()
Then I should see "ADV Multi-sco SCORM package" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And "Student 1" user has completed "ADV Multi-sco SCORM package" activity # behat_hooks::i_look_for_exceptions()
@mod @mod_lesson
Feature: Set time spent as a completion condition for a lesson
In order to ensure students spend the needed time to study lessons
As a teacher
I need to set time spent to mark the lesson activity as completed
Scenario: Set time spent as a condition # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\completion_condition_time_spent.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Enable completion tracking | Yes |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I add a "Lesson" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Test lesson |
| Description | Test lesson description |
| Completion tracking | Show activity as complete when conditions are met |
| completiontimespentenabled | 1 |
| completiontimespent[timeunit] | 1 |
| completiontimespent[number] | 10 |
And I follow "Test lesson" # behat_hooks::i_look_for_exceptions()
And I follow "Add a content page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | First page name |
| Page contents | First page contents |
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Add a content page" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Second page name |
| Page contents | Second page contents |
| id_answer_editor_0 | Previous page |
| id_jumpto_0 | Previous page |
| id_answer_editor_1 | Next page |
| id_jumpto_1 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then the "Test lesson" "lesson" activity with "auto" completion should be marked as not complete # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I wait "1" seconds # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "You completed this lesson in" # behat_hooks::i_look_for_exceptions()
And I should see ", which is less than the required time of 10 secs. You might need to attempt the lesson again." # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And the "Test lesson" "lesson" activity with "auto" completion should be marked as not complete # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I wait "11" seconds # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should not see "You might need to attempt the lesson again." # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And the "Test lesson" "lesson" activity with "auto" completion should be marked as complete # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And "Student 1" user has completed "Test lesson" activity # behat_hooks::i_look_for_exceptions()
@availability @availability_completion
Feature: Confirm that conditions on completion no longer cause a bug
In order to use completion conditions
As a teacher
I need it to not break when I set up certain conditions on some modules
Background: # C:\Apache24\htdocs\integration\availability\condition\completion\tests\behat\conditional_bug.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username |
| teacher1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
@javascript
Scenario: Multiple completion conditions on glossary # C:\Apache24\htdocs\integration\availability\condition\completion\tests\behat\conditional_bug.feature:19
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I set the field "Enable completion tracking" to "Yes" # behat_hooks::i_look_for_exceptions()
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Page" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Page1 |
| Page content | x |
And I add a "Page" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Page2 |
| Page content | x |
When I add a "Glossary" to section "1" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | TestGlossary |
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I press "Add restriction..." # behat_hooks::i_look_for_exceptions()
And I click on "Activity completion" "button" in the "Add restriction..." "dialogue" # behat_hooks::i_look_for_exceptions()
And I set the field "Activity or resource" to "Page1" # behat_hooks::i_look_for_exceptions()
And I press "Add restriction..." # behat_hooks::i_look_for_exceptions()
And I click on "Activity completion" "button" in the "Add restriction..." "dialogue" # behat_hooks::i_look_for_exceptions()
And I set the field with xpath "//div[contains(concat(' ', normalize-space(@class), ' '), ' availability-item ')][preceding-sibling::div]//select[@name='cm']" to "Page2" # behat_hooks::i_look_for_exceptions()
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
And I should see "Not available unless:" in the ".activity.glossary" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "The activity Page1 is marked complete" in the ".activity.glossary" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "The activity Page2 is marked complete" in the ".activity.glossary" "css_element" # behat_hooks::i_look_for_exceptions()
And I follow "TestGlossary" # behat_hooks::i_look_for_exceptions()
Then I should see "TestGlossary" # behat_hooks::i_look_for_exceptions()
@core @core_block
Feature: Add and configure blocks throughout the site
In order to maintain some patterns across all the site
As a manager
I need to set and configure blocks throughout the site
Background: # C:\Apache24\htdocs\integration\blocks\tests\behat\configure_block_throughout_site.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| manager1 | Manager | 1 | manager1@example.com |
| teacher1 | teacher | 1 | teacher@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "system role assigns" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| manager1 | Acceptance test site | manager |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "Define roles" node in "Site administration > Users > Permissions" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Non-editing teacher role" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Block | 1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Add and configure a block throughtout the site # C:\Apache24\htdocs\integration\blocks\tests\behat\configure_block_throughout_site.feature:30
Given I log in as "manager1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Turn editing on" # behat_hooks::i_look_for_exceptions()
And I add the "Comments" block # behat_hooks::i_look_for_exceptions()
And I configure the "Comments" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page contexts | Display throughout the entire site |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
When I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then I should see "Comments" in the "Comments" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Save comment" in the "Comments" "block" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I configure the "Comments" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Default weight | -10 (first) |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Comments" in the "//*[@id='region-pre' or @id='block-region-side-pre']/descendant::*[contains(concat(' ', normalize-space(@class), ' '), ' block ')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
Scenario: Blocks on the dashboard page can have roles assigned to them # C:\Apache24\htdocs\integration\blocks\tests\behat\configure_block_throughout_site.feature:51
Given I log in as "manager1" # behat_hooks::i_look_for_exceptions()
And I click on "Dashboard" "link" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
When I press "Customise this page" # behat_hooks::i_look_for_exceptions()
Then I should see "Assign roles in Navigation block" # behat_hooks::i_look_for_exceptions()
Scenario: Blocks on courses can have roles assigned to them # C:\Apache24\htdocs\integration\blocks\tests\behat\configure_block_throughout_site.feature:57
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Turn editing on" # behat_hooks::i_look_for_exceptions()
And I add the "Search forums" block # behat_hooks::i_look_for_exceptions()
Then I should see "Assign roles in Search forums block" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Blocks can safely be customised # C:\Apache24\htdocs\integration\blocks\tests\behat\configure_block_throughout_site.feature:65
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I click on "Dashboard" "link" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I press "Customise this page" # behat_hooks::i_look_for_exceptions()
And I add the "HTML" block # behat_hooks::i_look_for_exceptions()
And I configure the "(new HTML block)" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Block title | Foo " onload="document.getElementsByTagName('body')[0].remove()" alt=" |
| Content | Example |
When I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Course overview" # behat_hooks::i_look_for_exceptions()
@block @block_html @core_block
Feature: Adding and configuring HTML blocks
In order to have custom blocks on a page
As admin
I need to be able to create, configure and change HTML blocks
@javascript
Scenario: Configuring the HTML block with Javascript on # C:\Apache24\htdocs\integration\blocks\html\tests\behat\configuring_html_block.feature:8
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
When I click on "Turn editing on" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I add the "HTML" block # behat_hooks::i_look_for_exceptions()
And I configure the "(new HTML block)" block # behat_hooks::i_look_for_exceptions()
And I set the field "Content" to "Static text without a header" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should not see "(new HTML block)" # behat_hooks::i_look_for_exceptions()
And I configure the "block_html" block # behat_hooks::i_look_for_exceptions()
And I set the field "Block title" to "The HTML block header" # behat_hooks::i_look_for_exceptions()
And I set the field "Content" to "Static text with a header" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And "block_html" "block" should exist # behat_hooks::i_look_for_exceptions()
And "The HTML block header" "block" should exist # behat_hooks::i_look_for_exceptions()
And I should see "Static text with a header" in the "The HTML block header" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Configuring the HTML block with Javascript off # C:\Apache24\htdocs\integration\blocks\html\tests\behat\configuring_html_block.feature:25
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
When I click on "Turn editing on" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I add the "HTML" block # behat_hooks::i_look_for_exceptions()
And I configure the "(new HTML block)" block # behat_hooks::i_look_for_exceptions()
And I set the field "Content" to "Static text without a header" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should not see "(new HTML block)" # behat_hooks::i_look_for_exceptions()
And I configure the "block_html" block # behat_hooks::i_look_for_exceptions()
And I set the field "Block title" to "The HTML block header" # behat_hooks::i_look_for_exceptions()
And I set the field "Content" to "Static text with a header" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And "block_html" "block" should exist # behat_hooks::i_look_for_exceptions()
And "The HTML block header" "block" should exist # behat_hooks::i_look_for_exceptions()
And I should see "Static text with a header" in the "The HTML block header" "block" # behat_hooks::i_look_for_exceptions()
@mod @mod_lti
Feature: Content-Item support
In order to easily add activities and content in a course from an external tool
As a teacher
I need to utilise a tool that supports the Content-Item Message type
Background: # C:\Apache24\htdocs\integration\mod\lti\tests\behat\contentitem.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Terry1 | Teacher1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "Manage tools" node in "Site administration > Plugins > Activity modules > External tool" # behat_hooks::i_look_for_exceptions()
And I follow "configure a tool manually" # behat_hooks::i_look_for_exceptions()
And I set the field "Tool name" to "Teaching Tool 1" # behat_hooks::i_look_for_exceptions()
And I set the field "Tool URL" to local url "/mod/lti/tests/fixtures/tool_provider.php" # behat_hooks::i_look_for_exceptions()
And I set the field "Tool configuration usage" to "Show in activity chooser and as a preconfigured tool" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I set the field "Content-Item Message" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Tool that supports Content-Item Message type should be able to configure a tool via the Select content button # C:\Apache24\htdocs\integration\mod\lti\tests\behat\contentitem.feature:30
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Teaching Tool 1" to section "1" # behat_hooks::i_look_for_exceptions()
Then the "Select content" "button" should be enabled # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Editing a tool's settings that was configured from a preconfigured tool that supports Content-Item. # C:\Apache24\htdocs\integration\mod\lti\tests\behat\contentitem.feature:38
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Teaching Tool 1" to section "1" # behat_hooks::i_look_for_exceptions()
And the "Select content" "button" should be enabled # behat_hooks::i_look_for_exceptions()
And I set the field "Activity name" to "Test tool activity 1" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I set the field "Launch container" to "Embed" # behat_hooks::i_look_for_exceptions()
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
And I open "Test tool activity 1" actions menu # behat_hooks::i_look_for_exceptions()
And I choose "Edit settings" in the open action menu # behat_hooks::i_look_for_exceptions()
Then the field "Preconfigured tool" matches value "Teaching Tool 1" # behat_hooks::i_look_for_exceptions()
And the "Select content" "button" should be enabled # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Changing preconfigured tool selection # C:\Apache24\htdocs\integration\mod\lti\tests\behat\contentitem.feature:54
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "Manage tools" node in "Site administration > Plugins > Activity modules > External tool" # behat_hooks::i_look_for_exceptions()
And I follow "configure a tool manually" # behat_hooks::i_look_for_exceptions()
And I set the field "Tool name" to "Teaching Tool 2" # behat_hooks::i_look_for_exceptions()
And I set the field "Tool URL" to local url "/mod/lti/tests/fixtures/tool_provider.php" # behat_hooks::i_look_for_exceptions()
And I set the field "Tool configuration usage" to "Show in activity chooser and as a preconfigured tool" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "External tool" to section "1" # behat_hooks::i_look_for_exceptions()
And the field "Preconfigured tool" matches value "Automatic, based on tool URL" # behat_hooks::i_look_for_exceptions()
And I set the field "Activity name" to "Test tool activity 1" # behat_hooks::i_look_for_exceptions()
And the "Select content" "button" should be disabled # behat_hooks::i_look_for_exceptions()
And the "Tool URL" "field" should be enabled # behat_hooks::i_look_for_exceptions()
And I set the field "Preconfigured tool" to "Teaching Tool 1" # behat_hooks::i_look_for_exceptions()
And I set the field "Activity name" to "Test tool activity 1" # behat_hooks::i_look_for_exceptions()
Then the "Select content" "button" should be enabled # behat_hooks::i_look_for_exceptions()
And the "Tool URL" "field" should be enabled # behat_hooks::i_look_for_exceptions()
And I set the field "Preconfigured tool" to "Teaching Tool 2" # behat_hooks::i_look_for_exceptions()
And I set the field "Activity name" to "Test tool activity 1" # behat_hooks::i_look_for_exceptions()
And the "Select content" "button" should be disabled # behat_hooks::i_look_for_exceptions()
And the "Tool URL" "field" should be disabled # behat_hooks::i_look_for_exceptions()
And I set the field "Preconfigured tool" to "Automatic, based on tool URL" # behat_hooks::i_look_for_exceptions()
And I set the field "Activity name" to "Test tool activity 1" # behat_hooks::i_look_for_exceptions()
And the "Select content" "button" should be disabled # behat_hooks::i_look_for_exceptions()
And the "Tool URL" "field" should be enabled # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Editing a manually configured external tool # C:\Apache24\htdocs\integration\mod\lti\tests\behat\contentitem.feature:90
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "External tool" to section "1" # behat_hooks::i_look_for_exceptions()
And the field "Preconfigured tool" matches value "Automatic, based on tool URL" # behat_hooks::i_look_for_exceptions()
And I set the field "Activity name" to "Test tool activity 1" # behat_hooks::i_look_for_exceptions()
And the "Select content" "button" should be disabled # behat_hooks::i_look_for_exceptions()
And I set the field "Tool URL" to local url "/mod/lti/tests/fixtures/tool_provider.php" # behat_hooks::i_look_for_exceptions()
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
When I open "Test tool activity 1" actions menu # behat_hooks::i_look_for_exceptions()
And I choose "Edit settings" in the open action menu # behat_hooks::i_look_for_exceptions()
Then the field "Preconfigured tool" matches value "Automatic, based on tool URL" # behat_hooks::i_look_for_exceptions()
And the "Select content" "button" should be disabled # behat_hooks::i_look_for_exceptions()
@mod @mod_lti
Feature: Content-Item support
In order to provide external tools that support the Content-Item Message type for teachers and learners
As an admin
I need to be able to configure external tool registrations that support the Content-Item Message type.
Background: # C:\Apache24\htdocs\integration\mod\lti\tests\behat\contentitemregistration.feature:7
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "Manage tools" node in "Site administration > Plugins > Activity modules > External tool" # behat_hooks::i_look_for_exceptions()
Scenario: Verifying ContentItemSelectionRequest selection support in external tool registration # C:\Apache24\htdocs\integration\mod\lti\tests\behat\contentitemregistration.feature:11
When I follow "Manage external tool registrations" # behat_hooks::i_look_for_exceptions()
And I follow "Configure a new external tool registration" # behat_hooks::i_look_for_exceptions()
Then I should see "ContentItemSelectionRequest" in the "Capabilities" "select" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Creating and editing tool configuration that has Content-Item support # C:\Apache24\htdocs\integration\mod\lti\tests\behat\contentitemregistration.feature:17
When I follow "configure a tool manually" # behat_hooks::i_look_for_exceptions()
And I set the field "Tool name" to "Test tool" # behat_hooks::i_look_for_exceptions()
And I set the field "Tool URL" to local url "/mod/lti/tests/fixtures/tool_provider.php" # behat_hooks::i_look_for_exceptions()
And I set the field "Tool configuration usage" to "Show in activity chooser and as a preconfigured tool" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I set the field "Content-Item Message" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Edit" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
Then the field "Content-Item Message" matches value "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Content-Item Message" to "0" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Edit" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And the field "Content-Item Message" matches value "0" # behat_hooks::i_look_for_exceptions()
@core @core_question
Feature: A teacher can duplicate questions in the question bank
In order to reuse questions
As a teacher
I need to duplicate questions and make small changes
Background: # C:\Apache24\htdocs\integration\question\tests\behat\copy_questions.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | weeks |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | essay | Test question to be copied | Write about whatever you want |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Questions" node in "Course administration > Question bank" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Duplicating a previously created question # C:\Apache24\htdocs\integration\question\tests\behat\copy_questions.feature:28
When I click on "Duplicate" "link" in the "Test question to be copied" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Question name | Duplicated question name |
| Question text | Write a lot about duplicating questions |
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Duplicated question name" # behat_hooks::i_look_for_exceptions()
And I should see "Test question to be copied" # behat_hooks::i_look_for_exceptions()
And "Duplicated question name" row "Last modified by" column of "categoryquestions" table should contain "Teacher 1" # behat_hooks::i_look_for_exceptions()
And "Test question to be copied" row "Created by" column of "categoryquestions" table should contain "Admin User" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Duplicated questions automatically get a new name suggested # C:\Apache24\htdocs\integration\question\tests\behat\copy_questions.feature:40
When I click on "Duplicate" "link" in the "Test question to be copied" "table_row" # behat_hooks::i_look_for_exceptions()
Then the field "Question name" matches value "Test question to be copied (copy)" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: The duplicate operation can be cancelled # C:\Apache24\htdocs\integration\question\tests\behat\copy_questions.feature:45
When I click on "Duplicate" "link" in the "Test question to be copied" "table_row" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
Then I should see "Test question to be copied" # behat_hooks::i_look_for_exceptions()
And the field "Select a category" matches value "Test questions (1)" # behat_hooks::i_look_for_exceptions()
@block @block_html
Feature: HTML blocks in a course
In order to have one or multiple HTML blocks in a course
As a teacher
I need to be able to create and change such blocks
Scenario: Adding HTML block in a course # C:\Apache24\htdocs\integration\blocks\html\tests\behat\course_block.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Terry1 | Teacher1 | teacher@example.com |
| student1 | Sam1 | Student1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname |
| Course 1 | C1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "HTML" block # behat_hooks::i_look_for_exceptions()
And I configure the "(new HTML block)" block # behat_hooks::i_look_for_exceptions()
And I set the field "Content" to "First block content" # behat_hooks::i_look_for_exceptions()
And I set the field "Block title" to "First block header" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I add the "HTML" block # behat_hooks::i_look_for_exceptions()
And I configure the "(new HTML block)" block # behat_hooks::i_look_for_exceptions()
And I set the field "Content" to "Second block content" # behat_hooks::i_look_for_exceptions()
And I set the field "Block title" to "Second block header" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "First block content" in the "First block header" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Second block content" in the "Second block header" "block" # behat_hooks::i_look_for_exceptions()
@core @core_course
Feature: Course category management interface performs as expected
In order to test JS enhanced display of categories and subcategories.
As a moodle admin
I need to expand and collapse categories.
@javascript
Scenario: Test general look of management interface # C:\Apache24\htdocs\integration\course\tests\behat\course_category_management_listing.feature:8
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I should see "Course and category management" in the "h2" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Course categories" in the ".view-mode-selector" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Course categories" in the "#page-content" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Test view mode functionality # C:\Apache24\htdocs\integration\course\tests\behat\course_category_management_listing.feature:20
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | format |
| Course 1 | C1 | CAT1 | topics |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Course categories" in the "#category-listing h3" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#category-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Course categories" in the ".view-mode-selector" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Course categories and courses" in the ".view-mode-selector .menu" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Course categories" in the ".view-mode-selector .menu" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Courses" in the ".view-mode-selector .menu" "css_element" # behat_hooks::i_look_for_exceptions()
When I click on "Course categories" "link" in the ".view-mode-selector" "css_element" # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
Then I should see "Course categories and courses" in the ".view-mode-selector .menu" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Course categories" in the ".view-mode-selector .menu" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Courses" in the ".view-mode-selector .menu" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Course categories and courses" "link" in the ".view-mode-selector .menu" "css_element" # behat_hooks::i_look_for_exceptions()
And a new page should have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Course categories" in the "#category-listing h3" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Miscellaneous" in the "#course-listing h3" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#category-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "No courses in this category" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on category "Cat 1" in the management interface # behat_hooks::i_look_for_exceptions()
And a new page should have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Course categories" in the "#category-listing h3" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#course-listing h3" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#category-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Course 1" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
When I click on "Course categories" "link" in the ".view-mode-selector" "css_element" # behat_hooks::i_look_for_exceptions()
Then I should see "Courses" in the ".view-mode-selector .menu" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Courses" "link" in the ".view-mode-selector .menu" "css_element" # behat_hooks::i_look_for_exceptions()
And a new page should have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#course-listing h3" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Course 1" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on course "Course 1" in the management interface # behat_hooks::i_look_for_exceptions()
And a new page should have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I should see the "Courses" management page with a course selected # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#course-listing h3" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Course 1" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Course 1" in the "#course-detail h3" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "C1" in the "#course-detail .shortname" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Course 1" in the "#course-detail .fullname" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Topics" in the "#course-detail .format" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#course-detail .category" "css_element" # behat_hooks::i_look_for_exceptions()
Scenario: Test displaying of sub categories # C:\Apache24\htdocs\integration\course\tests\behat\course_category_management_listing.feature:77
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
| Cat 2 | 0 | CAT2 |
| Cat 1-1 | CAT1 | CAT3 |
| Cat 1-2 | CAT1 | CAT4 |
| Cat 1-1-1 | CAT3 | CAT5 |
| Cat 1-1-2 | CAT3 | CAT6 |
| Cat 2-1 | CAT2 | CAT7 |
| Cat 2-1-1 | CAT7 | CAT8 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | CAT1 |
| Course 2 | C2 | CAT1 |
| Course 3 | C3 | CAT3 |
| Course 4 | C4 | CAT3 |
| Course 5 | C5 | CAT5 |
| Course 6 | C6 | CAT5 |
| Course 7 | C7 | CAT8 |
| Course 8 | C8 | CAT8 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 1-2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 1-1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 1-1-2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 2-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 2-1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Cat 1" "link" # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1-2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 1-1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 1-1-2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 2-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 2-1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Cat 1-1" "link" # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1-2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1-1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1-1-2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 2-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 2-1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Cat 2" "link" # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 1-2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 1-1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 1-1-2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 2-1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
@javascript @_cross_browser
Scenario: Test AJAX loading of sub categories # C:\Apache24\htdocs\integration\course\tests\behat\course_category_management_listing.feature:147
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
| Cat 2 | 0 | CAT2 |
| Cat 1-1 | CAT1 | CAT3 |
| Cat 1-2 | CAT1 | CAT4 |
| Cat 1-1-1 | CAT3 | CAT5 |
| Cat 1-1-2 | CAT3 | CAT6 |
| Cat 2-1 | CAT2 | CAT7 |
| Cat 2-1-1 | CAT7 | CAT8 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | CAT1 |
| Course 2 | C2 | CAT1 |
| Course 3 | C3 | CAT3 |
| Course 4 | C4 | CAT3 |
| Course 5 | C5 | CAT5 |
| Course 6 | C6 | CAT5 |
| Course 7 | C7 | CAT8 |
| Course 8 | C8 | CAT8 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 1-2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 1-1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 1-1-2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 2-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 2-1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I click to expand category "CAT1" in the management interface # behat_hooks::i_look_for_exceptions()
And a new page should not have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1-2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 1-1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 1-1-2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 2-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 2-1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I click to expand category "CAT3" in the management interface # behat_hooks::i_look_for_exceptions()
And a new page should not have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1-2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1-1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1-1-2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 2-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 2-1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I click to expand category "CAT2" in the management interface # behat_hooks::i_look_for_exceptions()
And a new page should not have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1-2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1-1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1-1-2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 2-1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I click to expand category "CAT7" in the management interface # behat_hooks::i_look_for_exceptions()
And a new page should not have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1-2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1-1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1-1-2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2-1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I click to expand category "CAT1" in the management interface # behat_hooks::i_look_for_exceptions()
And a new page should not have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 1-2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 1-1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 1-1-2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2-1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I click to expand category "CAT1" in the management interface # behat_hooks::i_look_for_exceptions()
And a new page should not have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1-2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1-1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1-1-2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2-1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario Outline: Top level categories are displayed correctly when resorted # C:\Apache24\htdocs\integration\course\tests\behat\course_category_management_listing.feature:243
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| category | name | idnumber | sortorder |
| 0 | Social studies | Ext003 | 1 |
| 0 | Applied sciences | Sci001 | 2 |
| 0 | Extended social studies | Ext002 | 3 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I set the field "menuselectsortby" to "All categories" # behat_hooks::i_look_for_exceptions()
And I set the field "menuresortcategoriesby" to # behat_hooks::i_look_for_exceptions()
And I press "Sort" # behat_hooks::i_look_for_exceptions()
And a new page should have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see category listing before # behat_hooks::i_look_for_exceptions()
And I should see category listing before # behat_hooks::i_look_for_exceptions()
Examples:
| sortby | cat1 | cat2 | cat3 |
| "Sort by Category name ascending" | "Applied sciences" | "Extended social studies" | "Social studies" |
| "Sort by Category name descending" | "Social studies" | "Extended social studies" | "Applied sciences" |
| "Sort by Category ID number ascending" | "Extended social studies" | "Social studies" | "Applied sciences" |
| "Sort by Category ID number descending" | "Applied sciences" | "Social studies" | "Extended social studies" |
@javascript
Scenario Outline: Sub categories are displayed correctly when resorted # C:\Apache24\htdocs\integration\course\tests\behat\course_category_management_listing.feature:270
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| category | name | idnumber | sortorder |
| 0 | Master cat | CAT1 | 1 |
| CAT1 | Social studies | Ext003 | 1 |
| CAT1 | Applied sciences | Sci001 | 2 |
| CAT1 | Extended social studies | Ext002 | 3 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on "Master cat" category in the management category listing # behat_hooks::i_look_for_exceptions()
And a new page should have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on action for "Master cat" in management category listing # behat_hooks::i_look_for_exceptions()
And a new page should have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see category listing before # behat_hooks::i_look_for_exceptions()
And I should see category listing before # behat_hooks::i_look_for_exceptions()
Examples:
| sortby | cat1 | cat2 | cat3 |
| "resortbyname" | "Applied sciences" | "Extended social studies" | "Social studies" |
| "resortbynamedesc" | "Social studies" | "Extended social studies" | "Applied sciences" |
| "resortbyidnumber" | "Extended social studies" | "Social studies" | "Applied sciences" |
| "resortbyidnumberdesc" | "Applied sciences" | "Social studies" | "Extended social studies" |
@javascript
Scenario Outline: Test courses are displayed correctly after being resorted. # C:\Apache24\htdocs\integration\course\tests\behat\course_category_management_listing.feature:300
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category 0 | idnumber |
| Cat 1 | 0 | CAT1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| category | fullname | shortname | idnumber | sortorder | timecreated |
| CAT1 | Social studies | Senior school | Ext003 | 1 | 1000000001 |
| CAT1 | Applied sciences | Middle school | Sci001 | 2 | 1000000002 |
| CAT1 | Extended social studies | Junior school | Ext002 | 3 | 1000000003 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on "Cat 1" "link" # behat_hooks::i_look_for_exceptions()
And a new page should have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on "Sort courses" "link" # behat_hooks::i_look_for_exceptions()
And I should see "Sort by Course full name ascending" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Sort by Course full name descending" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Sort by Course short name ascending" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Sort by Course short name descending" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Sort by Course ID number ascending" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Sort by Course ID number descending" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Sort by Course time created ascending" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Sort by Course time created descending" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "link" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And a new page should have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see course listing before # behat_hooks::i_look_for_exceptions()
And I should see course listing before # behat_hooks::i_look_for_exceptions()
Examples:
| sortby | course1 | course2 | course3 |
| "Sort by Course full name ascending" | "Applied sciences" | "Extended social studies" | "Social studies" |
| "Sort by Course full name descending" | "Social studies" | "Extended social studies" | "Applied sciences" |
| "Sort by Course short name ascending" | "Extended social studies" | "Applied sciences" | "Social studies" |
| "Sort by Course short name descending" | "Social studies" | "Applied sciences" | "Extended social studies" |
| "Sort by Course ID number ascending" | "Extended social studies" | "Social studies" | "Applied sciences" |
| "Sort by Course ID number descending" | "Applied sciences" | "Social studies" | "Extended social studies" |
| "Sort by Course time created ascending" | "Social studies" | "Applied sciences" | "Extended social studies" |
| "Sort by Course time created descending" | "Extended social studies" | "Applied sciences" | "Social studies" |
@javascript
Scenario: Test course pagination # C:\Apache24\htdocs\integration\course\tests\behat\course_category_management_listing.feature:345
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| category | fullname | shortname | idnumber |
| CAT1 | Course 1 | Course 1 | C1 |
| CAT1 | Course 2 | Course 2 | C2 |
| CAT1 | Course 3 | Course 3 | C3 |
| CAT1 | Course 4 | Course 4 | C4 |
| CAT1 | Course 5 | Course 5 | C5 |
| CAT1 | Course 6 | Course 6 | C6 |
| CAT1 | Course 7 | Course 7 | C7 |
| CAT1 | Course 8 | Course 8 | C8 |
| CAT1 | Course 9 | Course 9 | C9 |
| CAT1 | Course 10 | Course 10 | C10 |
| CAT1 | Course 11 | Course 11 | C11 |
| CAT1 | Course 12 | Course 12 | C12 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on "Cat 1" "link" # behat_hooks::i_look_for_exceptions()
And a new page should have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on "Sort courses" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Sort by Course ID number ascending" "link" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And a new page should have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see "Per page: 20" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 1" before "Course 2" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 2" before "Course 3" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 3" before "Course 4" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 4" before "Course 5" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 5" before "Course 6" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 6" before "Course 7" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 7" before "Course 8" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 8" before "Course 9" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 9" before "Course 10" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 10" before "Course 11" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 11" before "Course 12" # behat_hooks::i_look_for_exceptions()
And "#course-listing .listing-pagination" "css_element" should not exist # behat_hooks::i_look_for_exceptions()
And I click on "Per page: 20" "link" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "5" in the ".courses-per-page" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "10" in the ".courses-per-page" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "20" in the ".courses-per-page" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "All" in the ".courses-per-page" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "5" "link" in the ".courses-per-page" "css_element" # behat_hooks::i_look_for_exceptions()
And a new page should have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Per page: 5" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 1" before "Course 2" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 2" before "Course 3" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 3" before "Course 4" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 4" before "Course 5" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 6" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 7" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 8" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 9" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 10" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 11" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 12" # behat_hooks::i_look_for_exceptions()
And "#course-listing .listing-pagination" "css_element" should exist # behat_hooks::i_look_for_exceptions()
And I should see "Showing courses 1 to 5 of 12 courses" # behat_hooks::i_look_for_exceptions()
And I should not see "First" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Prev" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "1" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "2" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "3" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Next" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Last" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "2" "link" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And a new page should have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Per page: 5" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Course 10" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 2" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 3" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 4" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 5" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 6" before "Course 7" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 7" before "Course 8" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 8" before "Course 9" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 9" before "Course 10" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 11" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 12" # behat_hooks::i_look_for_exceptions()
And "#course-listing .listing-pagination" "css_element" should exist # behat_hooks::i_look_for_exceptions()
And I should see "Showing courses 6 to 10 of 12 courses" # behat_hooks::i_look_for_exceptions()
And I should see "First" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Prev" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "1" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "2" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "3" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Next" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Last" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Next" "link" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And a new page should have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Per page: 5" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Course 11" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 2" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 3" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 4" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 5" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 6" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 7" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 8" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 9" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 10" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 11" before "Course 12" # behat_hooks::i_look_for_exceptions()
And "#course-listing .listing-pagination" "css_element" should exist # behat_hooks::i_look_for_exceptions()
And I should see "Showing courses 11 to 12 of 12 courses" # behat_hooks::i_look_for_exceptions()
And I should see "First" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Prev" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "1" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "2" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "3" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Next" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Last" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "First" "link" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And a new page should have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Per page: 5" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 1" before "Course 2" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 2" before "Course 3" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 3" before "Course 4" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 4" before "Course 5" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 6" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 7" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 8" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 9" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 10" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 11" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 12" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And "#course-listing .listing-pagination" "css_element" should exist # behat_hooks::i_look_for_exceptions()
And I should see "Showing courses 1 to 5 of 12 courses" # behat_hooks::i_look_for_exceptions()
And I should not see "First" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Prev" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "1" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "2" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "3" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Next" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Last" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Last" "link" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And a new page should have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Per page: 5" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Course 11" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 2" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 3" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 4" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 5" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 6" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 7" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 8" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 9" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 10" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 11" before "Course 12" # behat_hooks::i_look_for_exceptions()
And "#course-listing .listing-pagination" "css_element" should exist # behat_hooks::i_look_for_exceptions()
And I should see "Showing courses 11 to 12 of 12 courses" # behat_hooks::i_look_for_exceptions()
And I should see "First" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Prev" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "1" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "2" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "3" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Next" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Last" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Prev" "link" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And a new page should have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Per page: 5" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Course 10" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 2" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 3" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 4" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 5" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 6" before "Course 7" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 7" before "Course 8" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 8" before "Course 9" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 9" before "Course 10" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 11" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 12" # behat_hooks::i_look_for_exceptions()
And "#course-listing .listing-pagination" "css_element" should exist # behat_hooks::i_look_for_exceptions()
And I should see "Showing courses 6 to 10 of 12 courses" # behat_hooks::i_look_for_exceptions()
And I should see "First" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Prev" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "1" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "2" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "3" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Next" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Last" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
Scenario: Test pagination is only shown when required # C:\Apache24\htdocs\integration\course\tests\behat\course_category_management_listing.feature:544
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| category | fullname | shortname | idnumber |
| CAT1 | Course 1 | Course 1 | C1 |
| CAT1 | Course 2 | Course 2 | C2 |
| CAT1 | Course 3 | Course 3 | C3 |
| CAT1 | Course 4 | Course 4 | C4 |
| CAT1 | Course 5 | Course 5 | C5 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on "Cat 1" "link" # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on "Sort courses" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Sort by Course ID number ascending" "link" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Per page: 20" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 1" before "Course 2" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 2" before "Course 3" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 3" before "Course 4" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 4" before "Course 5" # behat_hooks::i_look_for_exceptions()
And "#course-listing .listing-pagination" "css_element" should not exist # behat_hooks::i_look_for_exceptions()
And I click on "5" "link" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Per page: 5" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 1" before "Course 2" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 2" before "Course 3" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 3" before "Course 4" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 4" before "Course 5" # behat_hooks::i_look_for_exceptions()
And "#course-listing .listing-pagination" "css_element" should not exist # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Test many course pagination # C:\Apache24\htdocs\integration\course\tests\behat\course_category_management_listing.feature:581
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category 0 | idnumber |
| Cat 1 | 0 | CAT1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| category | fullname | shortname | idnumber |
| CAT1 | Course 1 | Course 1 | C1 |
| CAT1 | Course 2 | Course 2 | C2 |
| CAT1 | Course 3 | Course 3 | C3 |
| CAT1 | Course 4 | Course 4 | C4 |
| CAT1 | Course 5 | Course 5 | C5 |
| CAT1 | Course 6 | Course 6 | C6 |
| CAT1 | Course 7 | Course 7 | C7 |
| CAT1 | Course 8 | Course 8 | C8 |
| CAT1 | Course 9 | Course 9 | C9 |
| CAT1 | Course 10 | Course 10 | C10 |
| CAT1 | Course 11 | Course 11 | C11 |
| CAT1 | Course 12 | Course 12 | C12 |
| CAT1 | Course 13 | Course 13 | C13 |
| CAT1 | Course 14 | Course 14 | C14 |
| CAT1 | Course 15 | Course 15 | C15 |
| CAT1 | Course 16 | Course 16 | C16 |
| CAT1 | Course 17 | Course 17 | C17 |
| CAT1 | Course 18 | Course 18 | C18 |
| CAT1 | Course 19 | Course 19 | C19 |
| CAT1 | Course 20 | Course 20 | C20 |
| CAT1 | Course 21 | Course 21 | C21 |
| CAT1 | Course 22 | Course 22 | C22 |
| CAT1 | Course 23 | Course 23 | C23 |
| CAT1 | Course 24 | Course 24 | C24 |
| CAT1 | Course 25 | Course 25 | C25 |
| CAT1 | Course 26 | Course 26 | C26 |
| CAT1 | Course 27 | Course 27 | C27 |
| CAT1 | Course 28 | Course 28 | C28 |
| CAT1 | Course 29 | Course 29 | C29 |
| CAT1 | Course 30 | Course 30 | C30 |
| CAT1 | Course 31 | Course 31 | C31 |
| CAT1 | Course 32 | Course 32 | C32 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on "Cat 1" "link" # behat_hooks::i_look_for_exceptions()
And a new page should have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on "Sort courses" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Sort by Course ID number ascending" "link" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And a new page should have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Per page: 20" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 1" before "Course 2" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 19" before "Course 20" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 21" # behat_hooks::i_look_for_exceptions()
And I should see "Showing courses 1 to 20 of 32 courses" # behat_hooks::i_look_for_exceptions()
And I click on "Per page: 20" "link" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "100" "link" in the ".courses-per-page" "css_element" # behat_hooks::i_look_for_exceptions()
And a new page should have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Per page: 100" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 1" before "Course 2" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 19" before "Course 20" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 21" before "Course 22" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 31" before "Course 32" # behat_hooks::i_look_for_exceptions()
And "#course-listing .listing-pagination" "css_element" should not exist # behat_hooks::i_look_for_exceptions()
And I click on "Per page: 100" "link" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "5" "link" in the ".courses-per-page" "css_element" # behat_hooks::i_look_for_exceptions()
And a new page should have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Per page: 5" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 1" before "Course 2" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 4" before "Course 5" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 6" # behat_hooks::i_look_for_exceptions()
And I should see "Showing courses 1 to 5 of 32 courses" # behat_hooks::i_look_for_exceptions()
And I should not see "First" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Prev" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "1" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "2" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "3" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "4" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "5" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "6" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "7" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Next" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Last" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Last" "link" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And a new page should have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Per page: 5" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 30" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 31" before "Course 32" # behat_hooks::i_look_for_exceptions()
And I should see "Showing courses 31 to 32 of 32 courses" # behat_hooks::i_look_for_exceptions()
And I should see "First" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Prev" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "1" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "2" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "3" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "4" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "5" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "6" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "7" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Next" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Last" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "4" "link" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And a new page should have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Per page: 5" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 15" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 16" before "Course 17" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 17" before "Course 18" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 18" before "Course 19" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 19" before "Course 20" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 21" # behat_hooks::i_look_for_exceptions()
And I should see "Showing courses 16 to 20 of 32 courses" # behat_hooks::i_look_for_exceptions()
And I should see "First" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Prev" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "1" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "2" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "3" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "4" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "5" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "6" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "7" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Next" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Last" in the "#course-listing .listing-pagination" "css_element" # behat_hooks::i_look_for_exceptions()
Scenario: Test clicking to edit a course. # C:\Apache24\htdocs\integration\course\tests\behat\course_category_management_listing.feature:712
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| category | fullname | shortname | idnumber |
| CAT1 | Course 1 | Course 1 | C1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on category "Cat 1" in the management interface # behat_hooks::i_look_for_exceptions()
And I click on "edit" action for "Course 1" in management course listing # behat_hooks::i_look_for_exceptions()
And I should see "Edit course settings" # behat_hooks::i_look_for_exceptions()
And I should see "Course 1" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Test AJAX expanded categories stay open. # C:\Apache24\htdocs\integration\course\tests\behat\course_category_management_listing.feature:730
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
| Cat 2 | 0 | CAT2 |
| Cat 1-1 | CAT1 | CAT3 |
| Cat 1-2 | CAT1 | CAT4 |
| Cat 1-1-1 | CAT3 | CAT5 |
| Cat 1-1-2 | CAT3 | CAT6 |
| Cat 2-1 | CAT2 | CAT7 |
| Cat 2-1-1 | CAT7 | CAT8 |
| Cat 2-1-1-1 | CAT8 | CAT10 |
| Cat 2-1-2 | CAT7 | CAT9 |
| Cat 2-1-2-1 | CAT9 | CAT11 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 1-2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 2-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I click to expand category "CAT2" in the management interface # behat_hooks::i_look_for_exceptions()
And a new page should not have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I click to expand category "CAT7" in the management interface # behat_hooks::i_look_for_exceptions()
And a new page should not have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I click to expand category "CAT9" in the management interface # behat_hooks::i_look_for_exceptions()
And a new page should not have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 1-2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2-1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2-1-2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 2-1-1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2-1-2-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Cat 1" category in the management category listing # behat_hooks::i_look_for_exceptions()
And a new page should have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1-2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2-1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2-1-2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 2-1-1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2-1-2-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "resortbyidnumber" action for "Cat 1" in management category listing # behat_hooks::i_look_for_exceptions()
And a new page should have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1-2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2-1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2-1-2" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat 2-1-1-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2-1-2-1" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Test category expansion after deletion # C:\Apache24\htdocs\integration\course\tests\behat\course_category_management_listing.feature:796
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Cat A (1) | 0 | CAT1 |
| Cat B (2) | 0 | CAT2 |
| Cat C (1-1) | CAT1 | CAT3 |
| Cat D (2-1) | CAT2 | CAT4 |
| Cat E (2-1-1) | CAT4 | CAT5 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Cat A (1)" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat B (2)" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat C (1-1)" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat D (2-1)" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat E (2-1-1)" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I click to expand category "CAT1" in the management interface # behat_hooks::i_look_for_exceptions()
And I should see "Cat C (1-1)" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And a new page should not have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I click to expand category "CAT2" in the management interface # behat_hooks::i_look_for_exceptions()
And I should see "Cat D (2-1)" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And a new page should not have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I click to expand category "CAT4" in the management interface # behat_hooks::i_look_for_exceptions()
And I should see "Cat E (2-1-1)" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And a new page should not have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I click on "delete" action for "Cat B (2)" in management category listing # behat_hooks::i_look_for_exceptions()
And a new page should have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see "Delete category: Cat B (2)" # behat_hooks::i_look_for_exceptions()
And I should see "Contents of Cat B (2)" # behat_hooks::i_look_for_exceptions()
And I press "Delete" # behat_hooks::i_look_for_exceptions()
And a new page should have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see "Delete category: Cat B (2)" # behat_hooks::i_look_for_exceptions()
And I should see "Deleted course category Cat B (2)" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And a new page should have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Cat A (1)" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat B (2)" in the "#course-category-listings ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
@core @core_course
Feature: We can change the visibility of courses in the management interface.
As a moodle admin
I need to test hiding and then showing a course.
I need to test hiding a course and then hiding and showing the category its within.
Scenario: Test toggling course visibility through the management interfaces. # C:\Apache24\htdocs\integration\course\tests\behat\course_change_visibility.feature:8
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| category | fullname | shortname | idnumber |
| CAT1 | Course 1 | Course 1 | C1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on category "Cat 1" in the management interface # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#category-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Course 1" in the "#course-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT1" # behat_hooks::i_look_for_exceptions()
And course in management listing should be visible "C1" # behat_hooks::i_look_for_exceptions()
And I toggle visibility of course "C1" in management listing # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page with a course selected # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT1" # behat_hooks::i_look_for_exceptions()
And course in management listing should be dimmed "C1" # behat_hooks::i_look_for_exceptions()
And I toggle visibility of course "C1" in management listing # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page with a course selected # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT1" # behat_hooks::i_look_for_exceptions()
And course in management listing should be visible "C1" # behat_hooks::i_look_for_exceptions()
And I toggle visibility of course "C1" in management listing # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page with a course selected # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT1" # behat_hooks::i_look_for_exceptions()
And course in management listing should be dimmed "C1" # behat_hooks::i_look_for_exceptions()
And I toggle visibility of category "CAT1" in management listing # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And category in management listing should be dimmed "CAT1" # behat_hooks::i_look_for_exceptions()
And course in management listing should be dimmed "C1" # behat_hooks::i_look_for_exceptions()
And I toggle visibility of category "CAT1" in management listing # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT1" # behat_hooks::i_look_for_exceptions()
And course in management listing should be dimmed "C1" # behat_hooks::i_look_for_exceptions()
And I toggle visibility of category "CAT1" in management listing # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Test using AJAX to hide a course through the management interfaces. # C:\Apache24\htdocs\integration\course\tests\behat\course_change_visibility.feature:55
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| category | fullname | shortname | idnumber |
| CAT1 | Course 1 | Course 1 | C1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on category "Cat 1" in the management interface # behat_hooks::i_look_for_exceptions()
And a new page should have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#category-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Course 1" in the "#course-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT1" # behat_hooks::i_look_for_exceptions()
And course in management listing should be visible "C1" # behat_hooks::i_look_for_exceptions()
And I toggle visibility of course "C1" in management listing # behat_hooks::i_look_for_exceptions()
And a new page should not have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT1" # behat_hooks::i_look_for_exceptions()
And course in management listing should be dimmed "C1" # behat_hooks::i_look_for_exceptions()
And I toggle visibility of course "C1" in management listing # behat_hooks::i_look_for_exceptions()
And a new page should not have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT1" # behat_hooks::i_look_for_exceptions()
And course in management listing should be visible "C1" # behat_hooks::i_look_for_exceptions()
And I toggle visibility of course "C1" in management listing # behat_hooks::i_look_for_exceptions()
And a new page should not have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT1" # behat_hooks::i_look_for_exceptions()
And course in management listing should be dimmed "C1" # behat_hooks::i_look_for_exceptions()
And I toggle visibility of category "CAT1" in management listing # behat_hooks::i_look_for_exceptions()
And a new page should not have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And category in management listing should be dimmed "CAT1" # behat_hooks::i_look_for_exceptions()
And course in management listing should be dimmed "C1" # behat_hooks::i_look_for_exceptions()
And I toggle visibility of category "CAT1" in management listing # behat_hooks::i_look_for_exceptions()
And a new page should not have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And category in management listing should be visible "CAT1" # behat_hooks::i_look_for_exceptions()
And course in management listing should be dimmed "C1" # behat_hooks::i_look_for_exceptions()
And I toggle visibility of category "CAT1" in management listing # behat_hooks::i_look_for_exceptions()
And I toggle visibility of course "C1" in management listing # behat_hooks::i_look_for_exceptions()
And I click on "Course categories and courses" "link" in the ".view-mode-selector" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Courses" "link" in the ".view-mode-selector" "css_element" # behat_hooks::i_look_for_exceptions()
And a new page should have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see "Course 1" in the "#course-listing ul.ml" "css_element" # behat_hooks::i_look_for_exceptions()
And I toggle visibility of course "C1" in management listing # behat_hooks::i_look_for_exceptions()
And a new page should not have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And course in management listing should be dimmed "C1" # behat_hooks::i_look_for_exceptions()
And I toggle visibility of course "C1" in management listing # behat_hooks::i_look_for_exceptions()
And course in management listing should be visible "C1" # behat_hooks::i_look_for_exceptions()
And a new page should not have loaded since I started watching # behat_hooks::i_look_for_exceptions()
@core @core_course
Feature: Course activity controls works as expected
In order to manage my course's activities
As a teacher
I need to edit, hide, show and indent activities inside course sections
@javascript @_cross_browser
Scenario Outline: General activities course controls using topics and weeks formats, and paged mode and not paged mode works as expected # C:\Apache24\htdocs\integration\course\tests\behat\course_controls.feature:19
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format | coursedisplay | numsections |
| Course 1 | C1 | | | 5 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
When I follow # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Recent activity" block # behat_hooks::i_look_for_exceptions()
And I open the action menu in "Recent activity" "block" # behat_hooks::i_look_for_exceptions()
And I click on "Delete Recent activity block" "link" # behat_hooks::i_look_for_exceptions()
And I press "Yes" # behat_hooks::i_look_for_exceptions()
And "section" exist # behat_hooks::i_look_for_exceptions()
And I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name 1 |
| Description | Test forum description 1 |
And I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name 2 |
| Description | Test forum description 2 |
And "section" exist # behat_hooks::i_look_for_exceptions()
And I indent right "Test forum name 1" activity # behat_hooks::i_look_for_exceptions()
And "section" exist # behat_hooks::i_look_for_exceptions()
And I indent left "Test forum name 1" activity # behat_hooks::i_look_for_exceptions()
And "section" exist # behat_hooks::i_look_for_exceptions()
And I open "Test forum name 1" actions menu # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Test forum name 1" activity # behat_hooks::i_look_for_exceptions()
And I should see "Updating Forum" # behat_hooks::i_look_for_exceptions()
And I should see "Display description on course page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Forum name | Just to check that I can edit the name |
| Description | Just to check that I can edit the description |
| Display description on course page | 1 |
And I click on "Cancel" "button" # behat_hooks::i_look_for_exceptions()
And "section" exist # behat_hooks::i_look_for_exceptions()
And I open "Test forum name 1" actions menu # behat_hooks::i_look_for_exceptions()
And I click on "Hide" "link" in the "Test forum name 1" activity # behat_hooks::i_look_for_exceptions()
And "section" exist # behat_hooks::i_look_for_exceptions()
And I delete "Test forum name 1" activity # behat_hooks::i_look_for_exceptions()
And I should not see "Test forum name 1" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I duplicate "Test forum name 2" activity editing the new copy with: # behat_hooks::i_look_for_exceptions()
| Forum name | Edited test forum name 2 |
And "section" exist # behat_hooks::i_look_for_exceptions()
And I should see "Test forum name 2" # behat_hooks::i_look_for_exceptions()
And I should see "Edited test forum name 2" # behat_hooks::i_look_for_exceptions()
And I hide section "1" # behat_hooks::i_look_for_exceptions()
And "section" exist # behat_hooks::i_look_for_exceptions()
And section "1" should be hidden # behat_hooks::i_look_for_exceptions()
And all activities in section "1" should be hidden # behat_hooks::i_look_for_exceptions()
And I show section "1" # behat_hooks::i_look_for_exceptions()
And "section" exist # behat_hooks::i_look_for_exceptions()
And section "1" should be visible # behat_hooks::i_look_for_exceptions()
And I add the "Section links" block # behat_hooks::i_look_for_exceptions()
And "section" exist # behat_hooks::i_look_for_exceptions()
And I should see "1 2 3 4 5" in the "Section links" "block" # behat_hooks::i_look_for_exceptions()
And I click on "2" "link" in the "Section links" "block" # behat_hooks::i_look_for_exceptions()
And I see "Test forum name 2" # behat_hooks::i_look_for_exceptions()
Examples:
| courseformat | coursedisplay | targetpage | should_see_other_sections | should_see_other_sections_following_block_sections_links | belowpage |
| topics | 0 | "Course 1" | should | should | "Topic 2" |
| topics | 1 | "Topic 1" | should not | should not | "Topic 2" |
| topics | 1 | "Course 1" | should | should not | "Topic 2" |
| weeks | 0 | "Course 1" | should | should | "8 January - 14 January" |
| weeks | 1 | "1 January - 7 January" | should not | should not | "8 January - 14 January" |
| weeks | 1 | "Course 1" | should | should not | "8 January - 14 January" |
Scenario Outline: General activities course controls using topics and weeks formats, and paged mode and not paged mode works as expected # C:\Apache24\htdocs\integration\course\tests\behat\course_controls.feature:91
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format | coursedisplay | numsections |
| Course 1 | C1 | | | 5 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
When I follow # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Recent activity" block # behat_hooks::i_look_for_exceptions()
And I open the action menu in "Recent activity" "block" # behat_hooks::i_look_for_exceptions()
And I click on "Delete Recent activity block" "link" # behat_hooks::i_look_for_exceptions()
And I press "Yes" # behat_hooks::i_look_for_exceptions()
And "section" exist # behat_hooks::i_look_for_exceptions()
And I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name 1 |
| Description | Test forum description 1 |
And I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name 2 |
| Description | Test forum description 2 |
And "section" exist # behat_hooks::i_look_for_exceptions()
And I indent right "Test forum name 1" activity # behat_hooks::i_look_for_exceptions()
And "section" exist # behat_hooks::i_look_for_exceptions()
And I indent left "Test forum name 1" activity # behat_hooks::i_look_for_exceptions()
And "section" exist # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Test forum name 1" activity # behat_hooks::i_look_for_exceptions()
And I should see "Updating Forum" # behat_hooks::i_look_for_exceptions()
And I should see "Display description on course page" # behat_hooks::i_look_for_exceptions()
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
And "section" exist # behat_hooks::i_look_for_exceptions()
And I click on "Hide" "link" in the "Test forum name 1" activity # behat_hooks::i_look_for_exceptions()
And "section" exist # behat_hooks::i_look_for_exceptions()
And I delete "Test forum name 1" activity # behat_hooks::i_look_for_exceptions()
And "section" exist # behat_hooks::i_look_for_exceptions()
And I should not see "Test forum name 1" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I duplicate "Test forum name 2" activity editing the new copy with: # behat_hooks::i_look_for_exceptions()
| Forum name | Edited test forum name 2 |
And "section" exist # behat_hooks::i_look_for_exceptions()
And I should see "Test forum name 2" # behat_hooks::i_look_for_exceptions()
And I should see "Edited test forum name 2" # behat_hooks::i_look_for_exceptions()
And I hide section "1" # behat_hooks::i_look_for_exceptions()
And "section" exist # behat_hooks::i_look_for_exceptions()
And section "1" should be hidden # behat_hooks::i_look_for_exceptions()
And all activities in section "1" should be hidden # behat_hooks::i_look_for_exceptions()
And I show section "1" # behat_hooks::i_look_for_exceptions()
And "section" exist # behat_hooks::i_look_for_exceptions()
And section "1" should be visible # behat_hooks::i_look_for_exceptions()
And I add the "Section links" block # behat_hooks::i_look_for_exceptions()
And "section" exist # behat_hooks::i_look_for_exceptions()
And I should see "1 2 3 4 5" in the "Section links" "block" # behat_hooks::i_look_for_exceptions()
And I click on "2" "link" in the "Section links" "block" # behat_hooks::i_look_for_exceptions()
And I see "Test forum name 2" # behat_hooks::i_look_for_exceptions()
Examples:
| courseformat | coursedisplay | targetpage | should_see_other_sections | should_see_other_sections_following_block_sections_links | belowpage |
| topics | 0 | "Course 1" | should | should | "Topic 2" |
| topics | 1 | "Topic 1" | should not | should not | "Topic 2" |
| topics | 1 | "Course 1" | should | should not | "Topic 2" |
| weeks | 0 | "Course 1" | should | should | "8 January - 14 January" |
| weeks | 1 | "1 January - 7 January" | should not | should not | "8 January - 14 January" |
| weeks | 1 | "Course 1" | should | should not | "8 January - 14 January" |
@core @core_course
Feature: Managers can create courses
In order to group users and contents
As a manager
I need to create courses and set default values on them
@javascript
Scenario: Courses are created with the default forum and blocks # C:\Apache24\htdocs\integration\course\tests\behat\course_creation.feature:8
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I create a course with: # behat_hooks::i_look_for_exceptions()
| Course full name | Course 1 |
| Course short name | C1 |
And I enrol "Teacher 1" user as "Teacher" # behat_hooks::i_look_for_exceptions()
And I enrol "Student 1" user as "Student" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Latest announcements" block # behat_hooks::i_look_for_exceptions()
Then "Latest announcements" "block" should exist # behat_hooks::i_look_for_exceptions()
And I follow "Announcements" # behat_hooks::i_look_for_exceptions()
And "Add a new topic" "button" should exist # behat_hooks::i_look_for_exceptions()
And "Forced subscription" "link" should not exist # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Announcements" # behat_hooks::i_look_for_exceptions()
And "Add a new topic" "button" should not exist # behat_hooks::i_look_for_exceptions()
And I should see "Forced subscription" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Create a course from the management interface and return to it # C:\Apache24\htdocs\integration\course\tests\behat\course_creation.feature:35
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | idnumber | startdate | enddate |
| Course 1 | Course 1 | C1 | 957139200 | 960163200 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I should see the "Categories" management page # behat_hooks::i_look_for_exceptions()
And I click on category "Miscellaneous" in the management interface # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on "Create new course" "link" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
When I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Course full name | Course 2 |
| Course short name | Course 2 |
| Course summary | Course 2 summary |
| id_startdate_day | 24 |
| id_startdate_month | October |
| id_startdate_year | 2015 |
| id_enddate_day | 24 |
| id_enddate_month | October |
| id_enddate_year | 2016 |
And I press "Save and return" # behat_hooks::i_look_for_exceptions()
Then I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on "Sort courses" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Sort by Course time created ascending" "link" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 1" before "Course 2" # behat_hooks::i_look_for_exceptions()
And I click on "Course 2" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I click on "Edit" "link" in the ".course-detail" "css_element" # behat_hooks::i_look_for_exceptions()
And the following fields match these values: # behat_hooks::i_look_for_exceptions()
| Course full name | Course 2 |
| Course short name | Course 2 |
| Course summary | Course 2 summary |
| id_startdate_day | 24 |
| id_startdate_month | October |
| id_startdate_year | 2015 |
| id_enddate_day | 24 |
| id_enddate_month | October |
| id_enddate_year | 2016 |
@core @core_files
Feature: Course files
In order to add legacy files
As a user
I need to upload files
@javascript
Scenario: Add legacy files # C:\Apache24\htdocs\integration\files\tests\behat\course_files.feature:8
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | legacyfiles |
| Course 1 | C1 | 0 | 2 |
And the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| legacyfilesinnewcourses | 1 |
| legacyfilesaddallowed | 1 |
When I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then I should see "Legacy course files" # behat_hooks::i_look_for_exceptions()
And I navigate to "Legacy course files" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I press "Edit legacy course files" # behat_hooks::i_look_for_exceptions()
And "Add..." "link" should be visible # behat_hooks::i_look_for_exceptions()
And "Create folder" "link" should be visible # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Add legacy file disabled # C:\Apache24\htdocs\integration\files\tests\behat\course_files.feature:25
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | legacyfiles |
| Course 1 | C1 | 0 | 2 |
And the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| legacyfilesinnewcourses | 1 |
| legacyfilesaddallowed | 0 |
When I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then I should see "Legacy course files" # behat_hooks::i_look_for_exceptions()
And I navigate to "Legacy course files" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I press "Edit legacy course files" # behat_hooks::i_look_for_exceptions()
And "Add..." "link" should not be visible # behat_hooks::i_look_for_exceptions()
And "Create folder" "link" should not be visible # behat_hooks::i_look_for_exceptions()
@core @core_user
Feature: As a user, "Course preferences" allows me to set my course preference(s).
Background: # C:\Apache24\htdocs\integration\user\tests\behat\course_preference.feature:3
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| admin | C1 | editingteacher |
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Preferences" in the user menu # behat_hooks::i_look_for_exceptions()
And I follow "Course preferences" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: As a user, "activity chooser" should be the default. # C:\Apache24\htdocs\integration\user\tests\behat\course_preference.feature:16
Given the field "enableactivitychooser" matches value "1" # behat_hooks::i_look_for_exceptions()
When I am on homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should not see "Add an activity or resource" in the "Topic 1" "section" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
Then I should see "Add an activity or resource" in the "Topic 1" "section" # behat_hooks::i_look_for_exceptions()
And I should not see "Add a resource..." in the "Topic 1" "section" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: As a user, "activity chooser" should be disabled when I uncheck it in "Course preferences" # C:\Apache24\htdocs\integration\user\tests\behat\course_preference.feature:28
Given I set the field "enableactivitychooser" to "0" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
When I am on homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should not see "Add a resource..." in the "Topic 1" "section" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
Then I should see "Add a resource..." in the "Topic 1" "section" # behat_hooks::i_look_for_exceptions()
And I should not see "Add an activity or resource" in the "Topic 1" "section" # behat_hooks::i_look_for_exceptions()
@core @core_course
Feature: Test we can resort course in the management interface.
As a moodle admin
I need to test we can resort courses within a category.
I need to test we can manually sort courses.
Scenario Outline: Resort courses. # C:\Apache24\htdocs\integration\course\tests\behat\course_resort.feature:8
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category 0 | idnumber |
| Cat 1 | 0 | CAT1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| category | fullname | shortname | idnumber | sortorder | timecreated |
| CAT1 | Social studies | Senior school | Ext003 | 1 | 1000000001 |
| CAT1 | Applied sciences | Middle school | Sci001 | 2 | 1000000002 |
| CAT1 | Extended social studies | Junior school | Ext002 | 3 | 1000000003 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on category "Cat 1" in the management interface # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Sort courses" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Sort by Course full name ascending" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Sort by Course full name descending" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Sort by Course short name ascending" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Sort by Course short name descending" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Sort by Course ID number ascending" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Sort by Course ID number descending" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Sort by Course time created ascending" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Sort by Course time created descending" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "link" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see course listing before # behat_hooks::i_look_for_exceptions()
And I should see course listing before # behat_hooks::i_look_for_exceptions()
Examples:
| sortby | course1 | course2 | course3 |
| "Sort by Course full name ascending" | "Applied sciences" | "Extended social studies" | "Social studies" |
| "Sort by Course full name descending" | "Social studies" | "Extended social studies" | "Applied sciences" |
| "Sort by Course short name ascending" | "Extended social studies" | "Applied sciences" | "Social studies" |
| "Sort by Course short name descending" | "Social studies" | "Applied sciences" | "Extended social studies" |
| "Sort by Course ID number ascending" | "Extended social studies" | "Social studies" | "Applied sciences" |
| "Sort by Course ID number descending" | "Applied sciences" | "Social studies" | "Extended social studies" |
| "Sort by Course time created ascending" | "Social studies" | "Applied sciences" | "Extended social studies" |
| "Sort by Course time created descending" | "Extended social studies" | "Applied sciences" | "Social studies" |
@javascript
Scenario Outline: Resort courses with JavaScript enabled. # C:\Apache24\htdocs\integration\course\tests\behat\course_resort.feature:51
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category 0 | idnumber |
| Cat 1 | 0 | CAT1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| category | fullname | shortname | idnumber | sortorder | timecreated |
| CAT1 | Social studies | Senior school | Ext003 | 1 | 1000000001 |
| CAT1 | Applied sciences | Middle school | Sci001 | 2 | 1000000002 |
| CAT1 | Extended social studies | Junior school | Ext002 | 3 | 1000000003 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on category "Cat 1" in the management interface # behat_hooks::i_look_for_exceptions()
And a new page should have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Sort courses" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Sort by Course full name ascending" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Sort by Course full name descending" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Sort by Course short name ascending" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Sort by Course short name descending" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Sort by Course ID number ascending" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Sort by Course ID number descending" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Sort by Course time created ascending" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Sort by Course time created descending" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Sort courses" "link" # behat_hooks::i_look_for_exceptions()
And I should see "Sort by Course full name ascending" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Sort by Course full name descending" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Sort by Course short name ascending" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Sort by Course short name descending" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Sort by Course ID number ascending" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Sort by Course ID number descending" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Sort by Course time created ascending" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Sort by Course time created descending" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "link" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And a new page should have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see course listing before # behat_hooks::i_look_for_exceptions()
And I should see course listing before # behat_hooks::i_look_for_exceptions()
Examples:
| sortby | course1 | course2 | course3 |
| "Sort by Course full name ascending" | "Applied sciences" | "Extended social studies" | "Social studies" |
| "Sort by Course full name descending" | "Social studies" | "Extended social studies" | "Applied sciences" |
| "Sort by Course short name ascending" | "Extended social studies" | "Applied sciences" | "Social studies" |
| "Sort by Course short name descending" | "Social studies" | "Applied sciences" | "Extended social studies" |
| "Sort by Course ID number ascending" | "Extended social studies" | "Social studies" | "Applied sciences" |
| "Sort by Course ID number descending" | "Applied sciences" | "Social studies" | "Extended social studies" |
| "Sort by Course time created ascending" | "Social studies" | "Applied sciences" | "Extended social studies" |
| "Sort by Course time created descending" | "Extended social studies" | "Applied sciences" | "Social studies" |
Scenario: Test moving courses up and down by one. # C:\Apache24\htdocs\integration\course\tests\behat\course_resort.feature:104
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| category | fullname | shortname | idnumber |
| CAT1 | Course 1 | Course 1 | C1 |
| CAT1 | Course 2 | Course 2 | C2 |
| CAT1 | Course 3 | Course 3 | C3 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on category "Cat 1" in the management interface # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Course categories" in the "#category-listing h3" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#category-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Sort courses" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Sort by Course ID number ascending" "link" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 1" before "Course 2" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 2" before "Course 3" # behat_hooks::i_look_for_exceptions()
And I click to move course "C1" down one # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page with a course selected # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 2" before "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 1" before "Course 3" # behat_hooks::i_look_for_exceptions()
And I click to move course "C3" up one # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page with a course selected # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 2" before "Course 3" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 3" before "Course 1" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Test using AJAX to move courses up and down by one. # C:\Apache24\htdocs\integration\course\tests\behat\course_resort.feature:141
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| category | fullname | shortname | idnumber |
| CAT1 | Course 1 | Course 1 | C1 |
| CAT1 | Course 2 | Course 2 | C2 |
| CAT1 | Course 3 | Course 3 | C3 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on category "Cat 1" in the management interface # behat_hooks::i_look_for_exceptions()
And a new page should have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Course categories" in the "#category-listing h3" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#category-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Sort courses" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Sort by Course ID number ascending" "link" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And a new page should have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I start watching to see if a new page loads # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 1" before "Course 2" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 2" before "Course 3" # behat_hooks::i_look_for_exceptions()
And I click to move course "C1" down one # behat_hooks::i_look_for_exceptions()
And a new page should not have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 2" before "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 1" before "Course 3" # behat_hooks::i_look_for_exceptions()
And I click to move course "C3" up one # behat_hooks::i_look_for_exceptions()
And a new page should not have loaded since I started watching # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 2" before "Course 3" # behat_hooks::i_look_for_exceptions()
And I should see course listing "Course 3" before "Course 1" # behat_hooks::i_look_for_exceptions()
@core @core_course
Feature: Courses can be searched for and moved in bulk.
In order to manage a large number of courses
As a Moodle Administrator
I need to be able to search courses in bulk and move them around
Background: # C:\Apache24\htdocs\integration\course\tests\behat\course_search.feature:7
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Science | 0 | SCI |
| English | 0 | ENG |
| Miscellaneous | 0 | MISC |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Biology Y1 | BIO1 | MISC |
| Biology Y2 | BIO2 | MISC |
| English Y1 | ENG1 | ENG |
| English Y2 | ENG2 | MISC |
Scenario: Search courses finds correct results # C:\Apache24\htdocs\integration\course\tests\behat\course_search.feature:21
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
When I set the field "Search courses:" to "Biology" # behat_hooks::i_look_for_exceptions()
And I press "Go" # behat_hooks::i_look_for_exceptions()
Then I should see "Biology Y1" # behat_hooks::i_look_for_exceptions()
And I should see "Biology Y2" # behat_hooks::i_look_for_exceptions()
And I should not see "English Y1" # behat_hooks::i_look_for_exceptions()
And I should not see "English Y2" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Search courses and move results in bulk # C:\Apache24\htdocs\integration\course\tests\behat\course_search.feature:32
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I set the field "Search courses:" to "Biology" # behat_hooks::i_look_for_exceptions()
And I press "Go" # behat_hooks::i_look_for_exceptions()
When I select course "Biology Y1" in the management interface # behat_hooks::i_look_for_exceptions()
And I select course "Biology Y2" in the management interface # behat_hooks::i_look_for_exceptions()
And I set the field "menumovecoursesto" to "Science" # behat_hooks::i_look_for_exceptions()
And I press "Move" # behat_hooks::i_look_for_exceptions()
Then I should see "Successfully moved 2 courses into Science" # behat_hooks::i_look_for_exceptions()
And I wait to be redirected # behat_hooks::i_look_for_exceptions()
And I click on category "Science" in the management interface # behat_hooks::i_look_for_exceptions()
And I should see "Biology Y1" # behat_hooks::i_look_for_exceptions()
And I should see "Biology Y2" # behat_hooks::i_look_for_exceptions()
@mod @mod_feedback
Feature: Mapping courses in a feedback
In order to collect the same feedback about multiple courses
As a manager
I need to be able to map site feedback to courses
Background: # C:\Apache24\htdocs\integration\mod\feedback\tests\behat\coursemapping.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname |
| user1 | Username | 1 |
| user2 | Username | 2 |
| user3 | Username | 3 |
| teacher | Teacher | 4 |
| manager | Manager | 5 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname |
| Course 1 | C1 |
| Course 2 | C2 |
| Course 3 | C3 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| user1 | C1 | student |
| user1 | C2 | student |
| user2 | C1 | student |
| user2 | C2 | student |
| user3 | C3 | student |
| teacher | C1 | editingteacher |
| teacher | C2 | editingteacher |
| teacher | C3 | editingteacher |
And the following "system role assigns" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| manager | Acceptance test site | manager |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | course | idnumber | anonymous | publish_stats |
| feedback | Course feedback | Acceptance test site | feedback0 | 1 | 1 |
| feedback | Another feedback | C1 | feedback1 | 1 | 1 |
When I log in as "manager" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I navigate to "Course feedback" node in "Site pages" # behat_hooks::i_look_for_exceptions()
And I click on "Edit questions" "link" in the "[role=main]" "css_element" # behat_hooks::i_look_for_exceptions()
And I add a "Information" question to the feedback with: # behat_hooks::i_look_for_exceptions()
| Question | this is an information question |
| Label | info |
| Information type | Course |
And I add a "Multiple choice (rated)" question to the feedback with: # behat_hooks::i_look_for_exceptions()
| Question | this is a multiple choice rated |
| Label | multichoicerated |
| Multiple choice type | Multiple choice - single answer |
| Multiple choice values | 0/option a\n1/option b\n5/option c |
And I add a "Multiple choice" question to the feedback with: # behat_hooks::i_look_for_exceptions()
| Question | this is a simple multiple choice |
| Label | multichoicesimple |
| Multiple choice type | Multiple choice - single answer allowed (dropdownlist) |
| Multiple choice values | option d\noption e\noption f |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Feedback" block # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 2" # behat_hooks::i_look_for_exceptions()
And I add the "Feedback" block # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 3" # behat_hooks::i_look_for_exceptions()
And I add the "Feedback" block # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Course feedback can not be mapped # C:\Apache24\htdocs\integration\mod\feedback\tests\behat\coursemapping.feature:68
And I log in as "manager" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Another feedback" # behat_hooks::i_look_for_exceptions()
And I should not see "Mapped courses" # behat_hooks::i_look_for_exceptions()
And I should not see "Map feedback to courses" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Site feedback is not mapped to any course # C:\Apache24\htdocs\integration\mod\feedback\tests\behat\coursemapping.feature:77
And I log in as "user1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I navigate to "Course feedback" node in "Site pages" # behat_hooks::i_look_for_exceptions()
And I follow "Answer the questions..." # behat_hooks::i_look_for_exceptions()
And I should see "Acceptance test site" in the ".feedback_form" "css_element" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| option a | 1 |
| this is a simple multiple choice | option d |
And I press "Submit your answers" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I click on "Course feedback" "link" in the "Feedback" "block" # behat_hooks::i_look_for_exceptions()
And I follow "Answer the questions..." # behat_hooks::i_look_for_exceptions()
And I should not see "Acceptance test site" in the ".feedback_form" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "C1" in the ".feedback_form" "css_element" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| option b | 1 |
| this is a simple multiple choice | option e |
And I press "Submit your answers" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I click on "Course feedback" "link" in the "Feedback" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Answer the questions..." # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "user2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I click on "Course feedback" "link" in the "Feedback" "block" # behat_hooks::i_look_for_exceptions()
And I follow "Answer the questions..." # behat_hooks::i_look_for_exceptions()
And I should not see "Acceptance test site" in the ".feedback_form" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "C1" in the ".feedback_form" "css_element" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| option c | 1 |
| this is a simple multiple choice | option e |
And I press "Submit your answers" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "manager" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I navigate to "Course feedback" node in "Site pages" # behat_hooks::i_look_for_exceptions()
And I click on "Analysis" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I should see "All courses" in the "#feedback_course_filter [data-fieldtype=autocomplete] .form-autocomplete-selection [role=listitem]" "css_element" # behat_hooks::i_look_for_exceptions()
And I show chart data for the "multichoicerated" feedback # behat_hooks::i_look_for_exceptions()
And I should see "1 (33.33 %)" in the "option a" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "1 (33.33 %)" in the "option b" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "1 (33.33 %)" in the "option c" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Average: 2.00" # behat_hooks::i_look_for_exceptions()
And I follow "Sort by course" # behat_hooks::i_look_for_exceptions()
And I should see "2.50" in the "C1" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "1.00" in the "Acceptance test site" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "Back" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I set the field "Filter by course" to "Course 1" # behat_hooks::i_look_for_exceptions()
And I press "Filter" # behat_hooks::i_look_for_exceptions()
And I should see "Course 1" in the "#feedback_course_filter [data-fieldtype=autocomplete] .form-autocomplete-selection [role=listitem]" "css_element" # behat_hooks::i_look_for_exceptions()
And I show chart data for the "multichoicerated" feedback # behat_hooks::i_look_for_exceptions()
And I should see "0" in the "option a" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "1 (50.00 %)" in the "option b" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "1 (50.00 %)" in the "option c" "table_row" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Site feedback is mapped to courses # C:\Apache24\htdocs\integration\mod\feedback\tests\behat\coursemapping.feature:138
And I log in as "manager" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I navigate to "Course feedback" node in "Site pages" # behat_hooks::i_look_for_exceptions()
And I follow "Map feedback to courses" # behat_hooks::i_look_for_exceptions()
And I set the field "Courses" to "Course 2" # behat_hooks::i_look_for_exceptions()
And I set the field "Courses" to "Course 3" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "user1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I navigate to "Course feedback" node in "Site pages" # behat_hooks::i_look_for_exceptions()
And I should see "You can only access this feedback from a course" # behat_hooks::i_look_for_exceptions()
And I should not see "Answer the questions..." # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And "Feedback" "block" should not exist # behat_hooks::i_look_for_exceptions()
And I should not see "Course feedback" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 2" # behat_hooks::i_look_for_exceptions()
And I click on "Course feedback" "link" in the "Feedback" "block" # behat_hooks::i_look_for_exceptions()
And I follow "Answer the questions..." # behat_hooks::i_look_for_exceptions()
And I should not see "Acceptance test site" in the ".feedback_form" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "C2" in the ".feedback_form" "css_element" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| option b | 1 |
| this is a simple multiple choice | option e |
And I press "Submit your answers" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I click on "Course feedback" "link" in the "Feedback" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Answer the questions..." # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "user2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 2" # behat_hooks::i_look_for_exceptions()
And I click on "Course feedback" "link" in the "Feedback" "block" # behat_hooks::i_look_for_exceptions()
And I follow "Answer the questions..." # behat_hooks::i_look_for_exceptions()
And I should not see "Acceptance test site" in the ".feedback_form" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "C2" in the ".feedback_form" "css_element" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| option c | 1 |
| this is a simple multiple choice | option e |
And I press "Submit your answers" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "user3" # behat_hooks::i_look_for_exceptions()
And I follow "Course 3" # behat_hooks::i_look_for_exceptions()
And I click on "Course feedback" "link" in the "Feedback" "block" # behat_hooks::i_look_for_exceptions()
And I follow "Answer the questions..." # behat_hooks::i_look_for_exceptions()
And I should not see "Acceptance test site" in the ".feedback_form" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "C3" in the ".feedback_form" "css_element" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| option c | 1 |
| this is a simple multiple choice | option d |
And I press "Submit your answers" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "manager" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I navigate to "Course feedback" node in "Site pages" # behat_hooks::i_look_for_exceptions()
And I click on "Analysis" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I should see "All courses" in the "#feedback_course_filter [data-fieldtype=autocomplete] .form-autocomplete-selection [role=listitem]" "css_element" # behat_hooks::i_look_for_exceptions()
And I show chart data for the "multichoicerated" feedback # behat_hooks::i_look_for_exceptions()
And I should see "0" in the "option a" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "1 (33.33 %)" in the "option b" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "2 (66.67 %)" in the "option c" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Average: 3.67" # behat_hooks::i_look_for_exceptions()
And I click on "Sort by course" "link" # behat_hooks::i_look_for_exceptions()
And I should see "3.00" in the "C3" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "2.50" in the "C2" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "Back" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I set the field "Filter by course" to "Course 2" # behat_hooks::i_look_for_exceptions()
And I press "Filter" # behat_hooks::i_look_for_exceptions()
And I show chart data for the "multichoicerated" feedback # behat_hooks::i_look_for_exceptions()
And I should see "0" in the "option a" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "1 (50.00 %)" in the "option b" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "1 (50.00 %)" in the "option c" "table_row" # behat_hooks::i_look_for_exceptions()
And I show chart data for the "multichoicesimple" feedback # behat_hooks::i_look_for_exceptions()
And I should see "2 (100.00 %)" in the "option e" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the field "Filter by course" to "Course 3" # behat_hooks::i_look_for_exceptions()
And I press "Filter" # behat_hooks::i_look_for_exceptions()
And I show chart data for the "multichoicerated" feedback # behat_hooks::i_look_for_exceptions()
And I should see "0" in the "option a" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "0" in the "option b" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "1 (100.00 %)" in the "option c" "table_row" # behat_hooks::i_look_for_exceptions()
And I show chart data for the "multichoicesimple" feedback # behat_hooks::i_look_for_exceptions()
And I should see "1 (100.00 %)" in the "option d" "table_row" # behat_hooks::i_look_for_exceptions()
And I follow "Show all" # behat_hooks::i_look_for_exceptions()
And I show chart data for the "multichoicesimple" feedback # behat_hooks::i_look_for_exceptions()
And I should see "1 (33.33 %)" in the "option d" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "2 (66.67 %)" in the "option e" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "0" in the "option f" "table_row" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Site feedback deletion hides feedback block completely # C:\Apache24\htdocs\integration\mod\feedback\tests\behat\coursemapping.feature:234
When I log in as "manager" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Feedback" block # behat_hooks::i_look_for_exceptions()
And I add the "Main menu" block # behat_hooks::i_look_for_exceptions()
And I click on "Delete" "link" in the "//*[contains(@class,'block_site_main_menu')]//li[contains(.,'Course feedback')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I press "Yes" # behat_hooks::i_look_for_exceptions()
And I follow "Turn editing off" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
Then "Feedback" "block" should not exist # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And "Feedback" "block" should not exist # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@core @core_course @core_tag @javascript
Feature: Tagging courses
In order to search courses
As a teacher
I need to be able to tag courses
Background: # C:\Apache24\htdocs\integration\course\tests\behat\coursetags.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| teacher2 | Teacher | 2 | teacher2@example.com |
| user1 | User | 1 | user1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname |
| Course 1 | c1 |
| Course 2 | c2 |
And the following "tags" exist: # behat_hooks::i_look_for_exceptions()
| name | isstandard |
| Neverusedtag | 1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | c1 | editingteacher |
| teacher2 | c1 | teacher |
| teacher1 | c2 | editingteacher |
| teacher2 | c2 | teacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Tags | Mathematics |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Set course tags using the course edit form # C:\Apache24\htdocs\integration\course\tests\behat\coursetags.feature:34
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And "Course tags" "link" should not exist in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
Then I should see "Mathematics" in the ".form-autocomplete-selection" "css_element" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Tags | Algebra |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I click on "Dashboard" "link" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I follow "Course 2" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Tags | Mathematics, Geometry |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "user1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Tags" node in "Site pages" # behat_hooks::i_look_for_exceptions()
And I follow "Mathematics" # behat_hooks::i_look_for_exceptions()
Then I should see "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Course 2" # behat_hooks::i_look_for_exceptions()
And I follow "Tags" # behat_hooks::i_look_for_exceptions()
And I follow "Algebra" # behat_hooks::i_look_for_exceptions()
And I should see "Course 1" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 2" # behat_hooks::i_look_for_exceptions()
And I follow "Tags" # behat_hooks::i_look_for_exceptions()
And I follow "Geometry" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Course 2" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: User can set course tags using separate form # C:\Apache24\htdocs\integration\course\tests\behat\coursetags.feature:66
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I set the following system permissions of "Non-editing teacher" role: # behat_hooks::i_look_for_exceptions()
| moodle/course:tag | Allow |
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "teacher2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And "Edit settings" "link" should not exist in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I click on "Course tags" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
Then I should see "Mathematics" in the ".form-autocomplete-selection" "css_element" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Tags | Algebra |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I click on "Dashboard" "link" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I follow "Course 2" # behat_hooks::i_look_for_exceptions()
And I click on "Course tags" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Tags | Mathematics, Geometry |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "user1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Tags" node in "Site pages" # behat_hooks::i_look_for_exceptions()
And I follow "Mathematics" # behat_hooks::i_look_for_exceptions()
Then I should see "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Course 2" # behat_hooks::i_look_for_exceptions()
And I follow "Tags" # behat_hooks::i_look_for_exceptions()
And I follow "Algebra" # behat_hooks::i_look_for_exceptions()
And I should see "Course 1" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 2" # behat_hooks::i_look_for_exceptions()
And I follow "Tags" # behat_hooks::i_look_for_exceptions()
And I follow "Geometry" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Course 2" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@tool @tool_uploadcourse @_file_upload
Feature: An admin can create courses using a CSV file
In order to create courses using a CSV file
As an admin
I need to be able to upload a CSV file and navigate through the import process
Background: # C:\Apache24\htdocs\integration\admin\tool\uploadcourse\tests\behat\create.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| First course | C1 | 0 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "Upload courses" node in "Site administration > Courses" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Creation of unexisting courses # C:\Apache24\htdocs\integration\admin\tool\uploadcourse\tests\behat\create.feature:15
Given I upload "admin/tool/uploadcourse/tests/fixtures/courses.csv" file to "File" filemanager # behat_hooks::i_look_for_exceptions()
And I click on "Preview" "button" # behat_hooks::i_look_for_exceptions()
When I click on "Upload courses" "button" # behat_hooks::i_look_for_exceptions()
Then I should see "The course exists and update is not allowed" # behat_hooks::i_look_for_exceptions()
And I should see "Course created" # behat_hooks::i_look_for_exceptions()
And I should see "Courses total: 3" # behat_hooks::i_look_for_exceptions()
And I should see "Courses created: 2" # behat_hooks::i_look_for_exceptions()
And I should see "Courses errors: 1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I should see "Course 2" # behat_hooks::i_look_for_exceptions()
And I should see "Course 3" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Creation of existing courses # C:\Apache24\htdocs\integration\admin\tool\uploadcourse\tests\behat\create.feature:29
Given I upload "admin/tool/uploadcourse/tests/fixtures/courses.csv" file to "File" filemanager # behat_hooks::i_look_for_exceptions()
And I set the field "Upload mode" to "Create all, increment shortname if needed" # behat_hooks::i_look_for_exceptions()
And I click on "Preview" "button" # behat_hooks::i_look_for_exceptions()
When I click on "Upload courses" "button" # behat_hooks::i_look_for_exceptions()
Then I should see "Course created" # behat_hooks::i_look_for_exceptions()
And I should see "Course shortname incremented C1 -> C2" # behat_hooks::i_look_for_exceptions()
And I should see "Course shortname incremented C2 -> C3" # behat_hooks::i_look_for_exceptions()
And I should see "Course shortname incremented C3 -> C4" # behat_hooks::i_look_for_exceptions()
And I should see "Courses total: 3" # behat_hooks::i_look_for_exceptions()
And I should see "Courses created: 3" # behat_hooks::i_look_for_exceptions()
And I should see "Courses errors: 0" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I should see "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Course 2" # behat_hooks::i_look_for_exceptions()
And I should see "Course 3" # behat_hooks::i_look_for_exceptions()
@mod @mod_book
Feature: In a book, create chapters and sub chapters
In order to create chapters and subchapters
As a teacher
I need to add chapters and subchapters to a book.
Background: # C:\Apache24\htdocs\integration\mod\book\tests\behat\create_chapters.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Book" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Test book |
| Description | A book about dreams! |
Scenario: Create chapters and sub chapters and navigate between them # C:\Apache24\htdocs\integration\mod\book\tests\behat\create_chapters.feature:24
Given I follow "Test book" # behat_hooks::i_look_for_exceptions()
And I should see "Add new chapter" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Chapter title | Dummy first chapter |
| Content | Dream is the start of a journey |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "1. Dummy first chapter" in the "Table of contents" "block" # behat_hooks::i_look_for_exceptions()
And I click on "Add new chapter" "link" in the "Table of contents" "block" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Chapter title | Dummy second chapter |
| Content | The path is the second part |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "2. Dummy second chapter" in the "Table of contents" "block" # behat_hooks::i_look_for_exceptions()
And I click on "Add new chapter" "link" in the "Table of contents" "block" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Chapter title | Dummy first subchapter |
| Content | The path is the second part |
| Subchapter | true |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "1.1. Dummy first subchapter" in the "Table of contents" "block" # behat_hooks::i_look_for_exceptions()
And I should see "1. Dummy first chapter" in the ".book_content" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "1.1. Dummy first subchapter" in the ".book_content" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Next" "link" # behat_hooks::i_look_for_exceptions()
And I should see "2. Dummy second chapter" in the ".book_content" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "2. Dummy second chapter" in the "strong" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Next" in the ".book_content" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Exit book" "link" # behat_hooks::i_look_for_exceptions()
And I should see "Test book" in the "Topic 1" "section" # behat_hooks::i_look_for_exceptions()
And I follow "Test book" # behat_hooks::i_look_for_exceptions()
And I should not see "Previous" in the ".book_content" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "1. Dummy first chapter" in the "strong" "css_element" # behat_hooks::i_look_for_exceptions()
When I click on "Next" "link" # behat_hooks::i_look_for_exceptions()
Then I should see "1.1. Dummy first subchapter" in the ".book_content" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "1.1. Dummy first subchapter" in the "strong" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Previous" "link" # behat_hooks::i_look_for_exceptions()
And I should see "1. Dummy first chapter" in the ".book_content" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "1. Dummy first chapter" in the "strong" "css_element" # behat_hooks::i_look_for_exceptions()
Scenario: Change editing mode for an individual chapter # C:\Apache24\htdocs\integration\mod\book\tests\behat\create_chapters.feature:63
Given I follow "Test book" # behat_hooks::i_look_for_exceptions()
And I should see "Add new chapter" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Chapter title | Dummy first chapter |
| Content | Dream is the start of a journey |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "1. Dummy first chapter" in the "Table of contents" "block" # behat_hooks::i_look_for_exceptions()
And "Edit chapter \"1. Dummy first chapter\"" "link" should exist in the "Table of contents" "block" # behat_hooks::i_look_for_exceptions()
And "Delete chapter \"1. Dummy first chapter\"" "link" should exist in the "Table of contents" "block" # behat_hooks::i_look_for_exceptions()
And "Hide chapter \"1. Dummy first chapter\"" "link" should exist in the "Table of contents" "block" # behat_hooks::i_look_for_exceptions()
And "Add new chapter" "link" should exist in the "Table of contents" "block" # behat_hooks::i_look_for_exceptions()
When I click on "Turn editing off" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
Then "Edit chapter \"1. Dummy first chapter\"" "link" should not exist in the "Table of contents" "block" # behat_hooks::i_look_for_exceptions()
And "Delete chapter \"1. Dummy first chapter\"" "link" should not exist in the "Table of contents" "block" # behat_hooks::i_look_for_exceptions()
And "Hide chapter \"1. Dummy first chapter\"" "link" should not exist in the "Table of contents" "block" # behat_hooks::i_look_for_exceptions()
And "Add new chapter" "link" should not exist in the "Table of contents" "block" # behat_hooks::i_look_for_exceptions()
@core @core_course
Feature: Test we can both create and delete a course.
As a Moodle admin
I need to test I can create a course
I need to test I can delete a course
Scenario: Create a course # C:\Apache24\htdocs\integration\course\tests\behat\create_delete_course.feature:7
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category 0 | idnumber |
| Cat 1 | 0 | CAT1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on category "Cat 1" in the management interface # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#category-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "No courses in this category" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Create new course" "link" in the ".course-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Course full name | Test course: create a course |
| Course short name | TCCAC |
| Course ID number | TC3401 |
| Course summary | This course has been created by automated tests. |
And I press "Save and return" # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on category "Cat 1" in the management interface # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#category-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Test course: create a course" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
Scenario: Delete a course via its management listing # C:\Apache24\htdocs\integration\course\tests\behat\create_delete_course.feature:35
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category 0 | idnumber |
| Cat 1 | 0 | CAT1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| category | fullname | shortname | idnumber |
| CAT1 | Test course: create a course | TCCAC | TC3401 |
| CAT1 | Test course 2: create another course | TC2CAC | TC3402 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on category "Cat 1" in the management interface # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#category-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Test course: create a course" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Test course 2: create another course" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "delete" action for "Test course: create a course" in management course listing # behat_hooks::i_look_for_exceptions()
And I should see "Delete TCCAC" # behat_hooks::i_look_for_exceptions()
And I should see "Test course: create a course (TCCAC)" # behat_hooks::i_look_for_exceptions()
And I press "Delete" # behat_hooks::i_look_for_exceptions()
And I should see "Deleting TCCAC" # behat_hooks::i_look_for_exceptions()
And I should see "TCCAC has been completely deleted" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#category-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Test course 2: create another course" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
Scenario: Delete a course via its management details page # C:\Apache24\htdocs\integration\course\tests\behat\create_delete_course.feature:67
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category 0 | idnumber |
| Cat 1 | 0 | CAT1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| category | fullname | shortname | idnumber |
| CAT1 | Test course: create a course | TCCAC | TC3401 |
| CAT1 | Test course 2: create another course | TC2CAC | TC3402 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I click on category "Cat 1" in the management interface # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#category-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Test course: create a course" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Test course 2: create another course" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on course "Test course: create a course" in the management interface # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page with a course selected # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#category-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Test course: create a course" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Test course 2: create another course" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Test course: create a course" in the "#course-detail" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Delete" "link" in the ".course-detail-listing-actions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Delete TCCAC" # behat_hooks::i_look_for_exceptions()
And I should see "Test course: create a course (TCCAC)" # behat_hooks::i_look_for_exceptions()
And I press "Delete" # behat_hooks::i_look_for_exceptions()
And I should see "Deleting TCCAC" # behat_hooks::i_look_for_exceptions()
And I should see "TCCAC has been completely deleted" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
And I should see "Cat 1" in the "#category-listing" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Test course 2: create another course" in the "#course-listing" "css_element" # behat_hooks::i_look_for_exceptions()
@core @core_filepicker
Feature: Create folders in the file manager
In order to create a directory structure in a file area
As a user
I need to create folders and subfolders in a file area
@javascript @_bug_phantomjs
Scenario: Create folders and subfolders # C:\Apache24\htdocs\integration\repository\tests\behat\create_folders.feature:8
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Folder" to section "0" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Folder resource |
| Description | The description |
And I create "Folder 1" folder in "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I open "Folder 1" folder from "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I create "SubFolder 1" folder in "Files" filemanager # behat_hooks::i_look_for_exceptions()
When I open "Files" folder from "Files" filemanager # behat_hooks::i_look_for_exceptions()
Then I should see "Folder 1" # behat_hooks::i_look_for_exceptions()
And I open "Folder 1" folder from "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I should see "SubFolder 1" # behat_hooks::i_look_for_exceptions()
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
@core @core_group
Feature: Organize students into groups
In order to organize course activities in groups
As a teacher
I need to group students
@javascript
Scenario: Assign students to groups # C:\Apache24\htdocs\integration\group\tests\behat\create_groups.feature:8
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student0 | Student | 0 | student0@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
| student3 | Student | 3 | student3@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student0 | C1 | student |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I expand "Users" node # behat_hooks::i_look_for_exceptions()
And I follow "Groups" # behat_hooks::i_look_for_exceptions()
And I press "Create group" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Group name | Group 1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Create group" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Group name | Group 2 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
When I add "Student 0 (student0@example.com)" user to "Group 1" group members # behat_hooks::i_look_for_exceptions()
And I add "Student 1 (student1@example.com)" user to "Group 1" group members # behat_hooks::i_look_for_exceptions()
And I add "Student 2 (student2@example.com)" user to "Group 2" group members # behat_hooks::i_look_for_exceptions()
And I add "Student 3 (student3@example.com)" user to "Group 2" group members # behat_hooks::i_look_for_exceptions()
Then I set the field "groups" to "Group 1 (2)" # behat_hooks::i_look_for_exceptions()
And the "members" select box should contain "Student 0" # behat_hooks::i_look_for_exceptions()
And the "members" select box should contain "Student 1" # behat_hooks::i_look_for_exceptions()
And the "members" select box should not contain "Student 2" # behat_hooks::i_look_for_exceptions()
And I set the field "groups" to "Group 2 (2)" # behat_hooks::i_look_for_exceptions()
And the "members" select box should contain "Student 2" # behat_hooks::i_look_for_exceptions()
And the "members" select box should contain "Student 3" # behat_hooks::i_look_for_exceptions()
And the "members" select box should not contain "Student 0" # behat_hooks::i_look_for_exceptions()
And I follow "Participants" # behat_hooks::i_look_for_exceptions()
And I set the field "Separate groups" to "Group 1" # behat_hooks::i_look_for_exceptions()
And I should see "Student 0" # behat_hooks::i_look_for_exceptions()
And I should see "Student 1" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 2" # behat_hooks::i_look_for_exceptions()
And I set the field "Separate groups" to "Group 2" # behat_hooks::i_look_for_exceptions()
And I should see "Student 2" # behat_hooks::i_look_for_exceptions()
And I should see "Student 3" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 0" # behat_hooks::i_look_for_exceptions()
Scenario: Create groups and groupings without the 'moodle/course:changeidnumber' capability # C:\Apache24\htdocs\integration\group\tests\behat\create_groups.feature:60
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I set the following system permissions of "Teacher" role: # behat_hooks::i_look_for_exceptions()
| moodle/course:changeidnumber | Prevent |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I expand "Users" node # behat_hooks::i_look_for_exceptions()
And I follow "Groups" # behat_hooks::i_look_for_exceptions()
When I press "Create group" # behat_hooks::i_look_for_exceptions()
Then the "idnumber" "field" should be readonly # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Group name | The greatest group that never existed |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "The greatest group that never existed" # behat_hooks::i_look_for_exceptions()
And I follow "Groupings" # behat_hooks::i_look_for_exceptions()
And I press "Create grouping" # behat_hooks::i_look_for_exceptions()
And the "idnumber" "field" should be readonly # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Grouping name | Not the greatest grouping, but it's ok! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "Not the greatest grouping, but it's ok!" # behat_hooks::i_look_for_exceptions()
Scenario: Create groups with enrolment key # C:\Apache24\htdocs\integration\group\tests\behat\create_groups.feature:92
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
| Course 2 | C2 | 0 | 1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I expand "Users" node # behat_hooks::i_look_for_exceptions()
And I follow "Groups" # behat_hooks::i_look_for_exceptions()
When I press "Create group" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Group name | Group A |
| Enrolment key | badpasswd |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "Passwords must have at least 1 digit(s)" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Group name | Group A |
| Enrolment key | Abcdef-1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Create group" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Group name | Group B |
| Enrolment key | Abcdef-1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "This enrolment key is already used for another group." # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Enrolment key | Abcdef-2 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And the "groups" select box should contain "Group B (0)" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 2" # behat_hooks::i_look_for_exceptions()
And I expand "Users" node # behat_hooks::i_look_for_exceptions()
And I follow "Groups" # behat_hooks::i_look_for_exceptions()
And I press "Create group" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Group name | Group A |
| Enrolment key | Abcdef-1 |
And I should not see "This enrolment key is already used for another group." # behat_hooks::i_look_for_exceptions()
@core @core_filepicker @repository @repository_user @_file_upload
Feature: Create shortcuts
In order to automatically synchronize copies of the file with the source
As a teacher
I need to be able to pick file as a shortcut
@javascript @_bug_phantomjs
Scenario: Upload a file as a copy and as a shortcut in filemanager # C:\Apache24\htdocs\integration\repository\tests\behat\create_shortcut.feature:8
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Terry | Teacher | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Manage private files" # behat_hooks::i_look_for_exceptions()
And I upload "lib/tests/fixtures/empty.txt" file to "Files" filemanager # behat_hooks::i_look_for_exceptions()
Then I should see "empty.txt" in the "div.fp-content" "css_element" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Folder" to section "1" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Test folder |
| Description | Test folder description |
And I add "empty.txt" file from "Private files" to "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I should see "1" elements in "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I should see "empty.txt" in the ".fp-content .fp-file" "css_element" # behat_hooks::i_look_for_exceptions()
And ".fp-content .fp-file.fp-isreference" "css_element" should not exist # behat_hooks::i_look_for_exceptions()
And I add "empty.txt" file from "Private files" to "Files" filemanager as: # behat_hooks::i_look_for_exceptions()
| Save as | empty_ref.txt |
| Create an alias/shortcut to the file | 1 |
And I should see "2" elements in "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I should see "empty_ref.txt" in the ".fp-content .fp-file.fp-isreference" "css_element" # behat_hooks::i_look_for_exceptions()
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I should see "empty.txt" # behat_hooks::i_look_for_exceptions()
And I should see "empty_ref.txt" # behat_hooks::i_look_for_exceptions()
And I press "Edit" # behat_hooks::i_look_for_exceptions()
And I should see "2" elements in "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I should see "empty_ref.txt" in the ".fp-content .fp-file.fp-isreference" "css_element" # behat_hooks::i_look_for_exceptions()
And I add and overwrite "empty.txt" file from "Private files" to "Files" filemanager as: # behat_hooks::i_look_for_exceptions()
| Save as | empty_ref.txt |
And I should see "2" elements in "Files" filemanager # behat_hooks::i_look_for_exceptions()
And ".fp-content .fp-file.fp-isreference" "css_element" should not exist # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "empty.txt" # behat_hooks::i_look_for_exceptions()
And I should see "empty_ref.txt" # behat_hooks::i_look_for_exceptions()
And I press "Edit" # behat_hooks::i_look_for_exceptions()
And I should see "2" elements in "Files" filemanager # behat_hooks::i_look_for_exceptions()
And ".fp-content .fp-file.fp-isreference" "css_element" should not exist # behat_hooks::i_look_for_exceptions()
And I add and overwrite "empty.txt" file from "Private files" to "Files" filemanager as: # behat_hooks::i_look_for_exceptions()
| Save as | empty_ref.txt |
| Create an alias/shortcut to the file | 1 |
And I should see "2" elements in "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I should see "empty_ref.txt" in the ".fp-content .fp-file.fp-isreference" "css_element" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "empty.txt" # behat_hooks::i_look_for_exceptions()
And I should see "empty_ref.txt" # behat_hooks::i_look_for_exceptions()
And I press "Edit" # behat_hooks::i_look_for_exceptions()
And I should see "2" elements in "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I should see "empty_ref.txt" in the ".fp-content .fp-file.fp-isreference" "css_element" # behat_hooks::i_look_for_exceptions()
@tool @tool_usertours
Feature: Add a new user tour
In order to help users learn of new features
As an administrator
I need to create a user tour
@javascript
Scenario: Add a new tour # C:\Apache24\htdocs\integration\admin\tool\usertours\tests\behat\create_tour.feature:8
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I add a new user tour with: # behat_hooks::i_look_for_exceptions()
| Name | First tour |
| Description | My first tour |
| Apply to URL match | /my/% |
| Tour is enabled | 1 |
And I add steps to the "First tour" tour: # behat_hooks::i_look_for_exceptions()
| targettype | Title | Content |
| Display in middle of page | Welcome | Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful |
And I add steps to the "First tour" tour: # behat_hooks::i_look_for_exceptions()
| targettype | targetvalue_block | Title | Content |
| Block | Course overview | Course overview | This area shows you what's happening in some of your courses |
| Block | Calendar | Calendar | This is the Calendar. All of your assignments and due dates can be found here |
And I add steps to the "First tour" tour: # behat_hooks::i_look_for_exceptions()
| targettype | targetvalue_selector | Title | Content |
| Selector | .usermenu | User menu | This is your personal user menu. You'll find your personal preferences and your user profile here. |
When I click on "Dashboard" "link" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
Then I should see "Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful" # behat_hooks::i_look_for_exceptions()
And I press "Next" # behat_hooks::i_look_for_exceptions()
And I should see "This area shows you what's happening in some of your courses" # behat_hooks::i_look_for_exceptions()
And I should not see "This is the Calendar. All of your assignments and due dates can be found here" # behat_hooks::i_look_for_exceptions()
And I press "Next" # behat_hooks::i_look_for_exceptions()
And I should see "This is the Calendar. All of your assignments and due dates can be found here" # behat_hooks::i_look_for_exceptions()
And I should not see "This area shows you what's happening in some of your courses" # behat_hooks::i_look_for_exceptions()
And I press "Prev" # behat_hooks::i_look_for_exceptions()
And I should not see "This is the Calendar. All of your assignments and due dates can be found here" # behat_hooks::i_look_for_exceptions()
And I should see "This area shows you what's happening in some of your courses" # behat_hooks::i_look_for_exceptions()
And I press "End tour" # behat_hooks::i_look_for_exceptions()
And I should not see "This area shows you what's happening in some of your courses" # behat_hooks::i_look_for_exceptions()
And I click on "Dashboard" "link" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful" # behat_hooks::i_look_for_exceptions()
And I should not see "This area shows you what's happening in some of your courses" # behat_hooks::i_look_for_exceptions()
And I follow "Reset user tour on this page" # behat_hooks::i_look_for_exceptions()
And I should see "Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: A hidden tour should not be visible # C:\Apache24\htdocs\integration\admin\tool\usertours\tests\behat\create_tour.feature:48
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I add a new user tour with: # behat_hooks::i_look_for_exceptions()
| Name | First tour |
| Description | My first tour |
| Apply to URL match | /my/% |
| Tour is enabled | 0 |
And I add steps to the "First tour" tour: # behat_hooks::i_look_for_exceptions()
| targettype | Title | Content |
| Display in middle of page | Welcome | Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful |
When I click on "Dashboard" "link" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
Then I should not see "Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Tour visibility can be toggled # C:\Apache24\htdocs\integration\admin\tool\usertours\tests\behat\create_tour.feature:65
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I add a new user tour with: # behat_hooks::i_look_for_exceptions()
| Name | First tour |
| Description | My first tour |
| Apply to URL match | /my/% |
| Tour is enabled | 0 |
And I add steps to the "First tour" tour: # behat_hooks::i_look_for_exceptions()
| targettype | Title | Content |
| Display in middle of page | Welcome | Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful |
And I open the User tour settings page # behat_hooks::i_look_for_exceptions()
When I click on "Enable" "link" in the "My first tour" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "Dashboard" "link" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
Then I should see "Welcome to your personal learning space. We'd like to give you a quick tour to show you some of the areas you may find helpful" # behat_hooks::i_look_for_exceptions()
@editor @editor_atto @atto
Feature: Atto editor with customised toolbar
In order to develop plugins that use Atto for specialised purposes
As a developer
I need to be able to configure Atto toolbar per-instance to include different plugins
Background: # C:\Apache24\htdocs\integration\lib\editor\atto\tests\behat\customtoolbar.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber |
| label | L1 | FixtureLink | C1 | label1 |
When I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "FixtureLink" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Confirm that both editors have different toolbars but still function # C:\Apache24\htdocs\integration\lib\editor\atto\tests\behat\customtoolbar.feature:21
Then ".atto_link_button" "css_element" should exist in the ".normaldiv" "css_element" # behat_hooks::i_look_for_exceptions()
And ".atto_link_button" "css_element" should not exist in the ".specialdiv" "css_element" # behat_hooks::i_look_for_exceptions()
And ".atto_bold_button_bold" "css_element" should exist in the ".normaldiv" "css_element" # behat_hooks::i_look_for_exceptions()
And ".atto_italic_button_italic" "css_element" should exist in the ".normaldiv" "css_element" # behat_hooks::i_look_for_exceptions()
And ".atto_bold_button_bold" "css_element" should exist in the ".specialdiv" "css_element" # behat_hooks::i_look_for_exceptions()
And ".atto_italic_button_italic" "css_element" should exist in the ".specialdiv" "css_element" # behat_hooks::i_look_for_exceptions()
@tool @tool_behat
Feature: Set up contextual data for tests
In order to write tests quickly
As a developer
I need to fill the database with fixtures
Scenario: Add a bunch of users # C:\Apache24\htdocs\integration\admin\tool\behat\tests\behat\data_generators.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | password | firstname | lastname |
| testuser | testuser | | |
| testuser2 | testuser2 | TestFirstname | TestLastname |
And I log in as "testuser" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "testuser2" # behat_hooks::i_look_for_exceptions()
Then I should see "TestFirstname" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Add a bunch of courses and categories # C:\Apache24\htdocs\integration\admin\tool\behat\tests\behat\data_generators.feature:18
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
| Cat 2 | CAT1 | CAT2 |
| Cat 3 | CAT1 | CAT3 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | COURSE1 | CAT3 |
| Course 2 | COURSE2 | CAT3 |
| Course 3 | COURSE3 | 0 |
When I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
Then I should see "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Course 2" # behat_hooks::i_look_for_exceptions()
And I should see "Course 3" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I follow "Cat 1" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 2" # behat_hooks::i_look_for_exceptions()
And I should see "Cat 3" # behat_hooks::i_look_for_exceptions()
And I follow "Cat 3" # behat_hooks::i_look_for_exceptions()
And I should see "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Course 2" # behat_hooks::i_look_for_exceptions()
And I follow "Cat 2" # behat_hooks::i_look_for_exceptions()
And I should see "No courses in this category" # behat_hooks::i_look_for_exceptions()
And I follow "Miscellaneous" # behat_hooks::i_look_for_exceptions()
And I should see "Course 3" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Add a bunch of groups and groupings # C:\Apache24\htdocs\integration\admin\tool\behat\tests\behat\data_generators.feature:47
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname |
| Course 1 | C1 |
And the following "groups" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| Group 1 | C1 | G1 |
| Group 2 | C1 | G2 |
And the following "groupings" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| Grouping 1 | C1 | GG1 |
| Grouping 2 | C1 | GG2 |
When I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I expand "Users" node # behat_hooks::i_look_for_exceptions()
And I follow "Groups" # behat_hooks::i_look_for_exceptions()
Then I should see "Group 1" # behat_hooks::i_look_for_exceptions()
And I should see "Group 2" # behat_hooks::i_look_for_exceptions()
And I follow "Groupings" # behat_hooks::i_look_for_exceptions()
And I should see "Grouping 1" # behat_hooks::i_look_for_exceptions()
And I should see "Grouping 2" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Role overrides # C:\Apache24\htdocs\integration\admin\tool\behat\tests\behat\data_generators.feature:71
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname |
| Course 1 | C1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| student1 | C1 | student |
| teacher1 | C1 | editingteacher |
And the following "permission overrides" exist: # behat_hooks::i_look_for_exceptions()
| capability | permission | role | contextlevel | reference |
| mod/forum:editanypost | Allow | student | Course | C1 |
| mod/forum:replynews | Prevent | editingteacher | Course | C1 |
When I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I expand "Users" node # behat_hooks::i_look_for_exceptions()
And I follow "Permissions" # behat_hooks::i_look_for_exceptions()
And I set the field "Advanced role override" to "Student (1)" # behat_hooks::i_look_for_exceptions()
Then "mod/forum:editanypost" capability has "Allow" permission # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I set the field "Advanced role override" to "Teacher (1)" # behat_hooks::i_look_for_exceptions()
And "mod/forum:replynews" capability has "Prevent" permission # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
Scenario: Add course enrolments # C:\Apache24\htdocs\integration\admin\tool\behat\tests\behat\data_generators.feature:102
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| student1 | C1 | student |
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then I should see "Topic 1" # behat_hooks::i_look_for_exceptions()
Scenario: Add role assigns # C:\Apache24\htdocs\integration\admin\tool\behat\tests\behat\data_generators.feature:116
Given the following "roles" exist: # behat_hooks::i_look_for_exceptions()
| name | shortname | description | archetype |
| Custom editing teacher | custom1 | My custom role 1 | editingteacher |
| Custom student | custom2 | | |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| user1 | User | 1 | user1@example.com |
| user2 | User | 2 | user2@example.com |
| user3 | User | 3 | user3@example.com |
| user4 | User | 4 | user4@example.com |
| user5 | User | 5 | user5@example.com |
And the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | CAT1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| user4 | C1 | custom1 |
And the following "role assigns" exist: # behat_hooks::i_look_for_exceptions()
| user | role | contextlevel | reference |
| user1 | manager | System | |
| user2 | editingteacher | Category | CAT1 |
| user3 | editingteacher | Course | C1 |
| user5 | custom2 | System | |
When I log in as "user1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
Then I should see "Front page settings" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "user2" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Turn editing on" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "user3" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Turn editing on" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "user4" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Turn editing on" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "user5" # behat_hooks::i_look_for_exceptions()
And I should see "You are logged in as" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "You can not enrol yourself in this course." # behat_hooks::i_look_for_exceptions()
Scenario: Add modules # C:\Apache24\htdocs\integration\admin\tool\behat\tests\behat\data_generators.feature:168
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname |
| Course 1 | C1 |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber |
| assign | Test assignment name | Test assignment description | C1 | assign1 |
| assignment | Test assignment22 name | Test assignment22 description | C1 | assignment1 |
| book | Test book name | Test book description | C1 | book1 |
| chat | Test chat name | Test chat description | C1 | chat1 |
| choice | Test choice name | Test choice description | C1 | choice1 |
| data | Test database name | Test database description | C1 | data1 |
| feedback | Test feedback name | Test feedback description | C1 | feedback1 |
| folder | Test folder name | Test folder description | C1 | folder1 |
| forum | Test forum name | Test forum description | C1 | forum1 |
| glossary | Test glossary name | Test glossary description | C1 | glossary1 |
| imscp | Test imscp name | Test imscp description | C1 | imscp1 |
| label | Test label name | Test label description | C1 | label1 |
| lesson | Test lesson name | Test lesson description | C1 | lesson1 |
| lti | Test lti name | Test lti description | C1 | lti1 |
| page | Test page name | Test page description | C1 | page1 |
| quiz | Test quiz name | Test quiz description | C1 | quiz1 |
| resource | Test resource name | Test resource description | C1 | resource1 |
| scorm | Test scorm name | Test scorm description | C1 | scorm1 |
| survey | Test survey name | Test survey description | C1 | survey1 |
| url | Test url name | Test url description | C1 | url1 |
| wiki | Test wiki name | Test wiki description | C1 | wiki1 |
| workshop | Test workshop name | Test workshop description | C1 | workshop1 |
And the following "scales" exist: # behat_hooks::i_look_for_exceptions()
| name | scale |
| Test Scale 1 | Disappointing, Good, Very good, Excellent |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | grade |
| assign | Test assignment name with scale | Test assignment description | C1 | assign1 | Test Scale 1 |
When I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then I should see "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I should see "Test book name" # behat_hooks::i_look_for_exceptions()
And I should see "Test chat name" # behat_hooks::i_look_for_exceptions()
And I should see "Test choice name" # behat_hooks::i_look_for_exceptions()
And I should see "Test database name" # behat_hooks::i_look_for_exceptions()
And I should see "Test folder name" # behat_hooks::i_look_for_exceptions()
And I should see "Test forum name" # behat_hooks::i_look_for_exceptions()
And I should see "Test glossary name" # behat_hooks::i_look_for_exceptions()
And I should see "Test imscp name" # behat_hooks::i_look_for_exceptions()
And I should see "Test label description" # behat_hooks::i_look_for_exceptions()
And I should see "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "Test lti name" # behat_hooks::i_look_for_exceptions()
And I should see "Test page name" # behat_hooks::i_look_for_exceptions()
And I should see "Test quiz name" # behat_hooks::i_look_for_exceptions()
And I should see "Test resource name" # behat_hooks::i_look_for_exceptions()
And I should see "Test scorm name" # behat_hooks::i_look_for_exceptions()
And I should see "Test survey name" # behat_hooks::i_look_for_exceptions()
And I should see "Test url name" # behat_hooks::i_look_for_exceptions()
And I should see "Test wiki name" # behat_hooks::i_look_for_exceptions()
And I should see "Test workshop name" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I should see "Test assignment description" # behat_hooks::i_look_for_exceptions()
And I follow "C1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name with scale" # behat_hooks::i_look_for_exceptions()
And I follow "Edit settings" # behat_hooks::i_look_for_exceptions()
And the field "Type" matches value "Scale" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Add relations between users and groups # C:\Apache24\htdocs\integration\admin\tool\behat\tests\behat\data_generators.feature:238
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname |
| Course 1 | C1 |
And the following "groups" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| Group 1 | C1 | G1 |
| Group 2 | C1 | G2 |
And the following "groupings" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| Grouping 1 | C1 | GG1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| student1 | C1 | student |
| student2 | C1 | student |
And the following "group members" exist: # behat_hooks::i_look_for_exceptions()
| user | group |
| student1 | G1 |
| student2 | G2 |
And the following "grouping groups" exist: # behat_hooks::i_look_for_exceptions()
| grouping | group |
| GG1 | G1 |
When I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I expand "Users" node # behat_hooks::i_look_for_exceptions()
And I follow "Groups" # behat_hooks::i_look_for_exceptions()
Then the "groups" select box should contain "Group 1 (1)" # behat_hooks::i_look_for_exceptions()
And the "groups" select box should contain "Group 2 (1)" # behat_hooks::i_look_for_exceptions()
And I set the field "groups" to "Group 1 (1)" # behat_hooks::i_look_for_exceptions()
And the "members" select box should contain "Student 1" # behat_hooks::i_look_for_exceptions()
And I set the field "groups" to "Group 2 (1)" # behat_hooks::i_look_for_exceptions()
And the "members" select box should contain "Student 2" # behat_hooks::i_look_for_exceptions()
Scenario: Add cohorts and cohort members with data generator # C:\Apache24\htdocs\integration\admin\tool\behat\tests\behat\data_generators.feature:276
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the following "cohorts" exist: # behat_hooks::i_look_for_exceptions()
| name | idnumber |
| System cohort A | CHSA |
And the following "cohorts" exist: # behat_hooks::i_look_for_exceptions()
| name | idnumber | contextlevel | reference |
| System cohort B | CHSB | System | |
| Cohort in category | CHC | Category | CAT1 |
| Empty cohort | CHE | Category | CAT1 |
And the following "cohort members" exist: # behat_hooks::i_look_for_exceptions()
| user | cohort |
| student1 | CHSA |
| student2 | CHSB |
| student1 | CHSB |
| student1 | CHC |
When I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "Cohorts" node in "Site administration > Users > Accounts" # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "cohorts" table: # behat_hooks::i_look_for_exceptions()
| Name | Cohort size |
| System cohort A | 1 |
| System cohort B | 2 |
And I should not see "Cohort in category" # behat_hooks::i_look_for_exceptions()
And I follow "Courses" # behat_hooks::i_look_for_exceptions()
And I follow "Cat 1" # behat_hooks::i_look_for_exceptions()
And I follow "Cohorts" # behat_hooks::i_look_for_exceptions()
And I should not see "System cohort" # behat_hooks::i_look_for_exceptions()
And the following should exist in the "cohorts" table: # behat_hooks::i_look_for_exceptions()
| Name | Cohort size |
| Cohort in category | 1 |
| Empty cohort | 0 |
Scenario: Add grade categories with data generator # C:\Apache24\htdocs\integration\admin\tool\behat\tests\behat\data_generators.feature:314
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname |
| Course 1 | C1 |
And the following "grade categories" exist: # behat_hooks::i_look_for_exceptions()
| fullname | course |
| Grade category 1 | C1 |
And the following "grade categories" exist: # behat_hooks::i_look_for_exceptions()
| fullname | course | gradecategory |
| Grade sub category 2 | C1 | Grade category 1 |
When I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Courses" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
Then I should see "Grade category 1" # behat_hooks::i_look_for_exceptions()
And I should see "Grade sub category 2" # behat_hooks::i_look_for_exceptions()
Scenario: Add a bunch of grade items # C:\Apache24\htdocs\integration\admin\tool\behat\tests\behat\data_generators.feature:332
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname |
| Course 1 | C1 |
And the following "grade categories" exist: # behat_hooks::i_look_for_exceptions()
| fullname | course |
| Grade category 1 | C1 |
And the following "grade categories" exist: # behat_hooks::i_look_for_exceptions()
| fullname | course | gradecategory |
| Grade sub category 2 | C1 | Grade category 1 |
And the following "grade items" exist: # behat_hooks::i_look_for_exceptions()
| itemname | course |
| Test Grade Item 1 | C1 |
And the following "grade items" exist: # behat_hooks::i_look_for_exceptions()
| itemname | course | gradecategory |
| Test Grade Item 2 | C1 | Grade category 1 |
| Test Grade Item 3 | C1 | Grade sub category 2 |
When I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
Then I should see "Test Grade Item 1" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Test Grade Item 1" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I should see "Course 1" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I should see "Grade category 1" # behat_hooks::i_look_for_exceptions()
And I should see "Test Grade Item 2" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Test Grade Item 2" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I should see "Grade category 1" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I should see "Grade sub category 2" # behat_hooks::i_look_for_exceptions()
And I should see "Test Grade Item 3" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Test Grade Item 3" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I should see "Grade sub category 2" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
Scenario: Add a bunch of scales # C:\Apache24\htdocs\integration\admin\tool\behat\tests\behat\data_generators.feature:371
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname |
| Course 1 | C1 |
And the following "scales" exist: # behat_hooks::i_look_for_exceptions()
| name | scale |
| Test Scale 1 | Disappointing, Good, Very good, Excellent |
When I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "Scales" in the course gradebook # behat_hooks::i_look_for_exceptions()
Then I should see "Test Scale 1" # behat_hooks::i_look_for_exceptions()
And I should see "Disappointing, Good, Very good, Excellent" # behat_hooks::i_look_for_exceptions()
Scenario: Add a bunch of outcomes # C:\Apache24\htdocs\integration\admin\tool\behat\tests\behat\data_generators.feature:385
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname |
| Course 1 | C1 |
And the following "scales" exist: # behat_hooks::i_look_for_exceptions()
| name | scale |
| Test Scale 1 | Disappointing, Good, Very good, Excellent |
And the following "grade outcomes" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | scale |
| Grade outcome 1 | OT1 | Test Scale 1 |
And the following "grade outcomes" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | course | scale |
| Grade outcome 2 | OT2 | C1 | Test Scale 1 |
And the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| enableoutcomes | 1 |
When I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Outcomes" # behat_hooks::i_look_for_exceptions()
Then I should see "Grade outcome 1" in the "#addoutcomes" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Grade outcome 2" in the "#removeoutcomes" "css_element" # behat_hooks::i_look_for_exceptions()
And I follow "Edit outcomes" # behat_hooks::i_look_for_exceptions()
And the following should exist in the "generaltable" table: # behat_hooks::i_look_for_exceptions()
| Full name | Short name | Scale |
| Grade outcome 2 | OT2 | Test Scale 1 |
Scenario: Add a bunch of outcome grade items # C:\Apache24\htdocs\integration\admin\tool\behat\tests\behat\data_generators.feature:411
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname |
| Course 1 | C1 |
And the following "scales" exist: # behat_hooks::i_look_for_exceptions()
| name | scale |
| Test Scale 1 | Disappointing, Good, Very good, Excellent |
And the following "grade outcomes" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | course | scale |
| Grade outcome 1 | OT1 | C1 | Test Scale 1 |
And the following "grade categories" exist: # behat_hooks::i_look_for_exceptions()
| fullname | course |
| Grade category 1 | C1 |
And the following "grade items" exist: # behat_hooks::i_look_for_exceptions()
| itemname | course | outcome | gradecategory |
| Test Outcome Grade Item 1 | C1 | OT1 | Grade category 1 |
And the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| enableoutcomes | 1 |
When I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
Then I should see "Test Outcome Grade Item 1" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Test Outcome Grade Item 1" # behat_hooks::i_look_for_exceptions()
And the field "Outcome" matches value "Grade outcome 1" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I should see "Grade category 1" in the "Grade category" "form_row" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
Scenario: Add a block # C:\Apache24\htdocs\integration\admin\tool\behat\tests\behat\data_generators.feature:440
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname |
| Course 1 | C1 |
And the following "blocks" exist: # behat_hooks::i_look_for_exceptions()
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
| online_users | Course | C1 | course-view-* | site-pre |
When I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then I should see "Online users" # behat_hooks::i_look_for_exceptions()
@mod @mod_lesson
Feature: A teacher can set available from and deadline dates to access a lesson
In order to schedule lesson activities
As a teacher
I need to set available from and deadline dates
Background: # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\date_availability.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
Scenario: Forbidding lesson accesses until a specified date # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\date_availability.feature:23
Given I add a "Lesson" to section "1" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I set the field "id_available_enabled" to "1" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Test lesson |
| Description | Test lesson description |
| available[day] | 1 |
| available[month] | January |
| available[year] | 2020 |
| available[hour] | 08 |
| available[minute] | 00 |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson" # behat_hooks::i_look_for_exceptions()
And I follow "Add a content page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | First page name |
| Page contents | First page contents |
| Description | The first one |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
When I follow "Test lesson" # behat_hooks::i_look_for_exceptions()
Then I should see "This lesson will be open on Wednesday, 1 January 2020, 8:00" # behat_hooks::i_look_for_exceptions()
And I should not see "First page contents" # behat_hooks::i_look_for_exceptions()
Scenario: Forbidding lesson accesses until a specified date # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\date_availability.feature:50
Given I add a "Lesson" to section "1" # behat_hooks::i_look_for_exceptions()
And I set the field "id_deadline_enabled" to "1" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Test lesson |
| Description | Test lesson description |
| deadline[day] | 1 |
| deadline[month] | January |
| deadline[year] | 2000 |
| deadline[hour] | 08 |
| deadline[minute] | 00 |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson" # behat_hooks::i_look_for_exceptions()
And I follow "Add a content page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | First page name |
| Page contents | First page contents |
| Description | The first one |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
When I follow "Test lesson" # behat_hooks::i_look_for_exceptions()
Then I should see "This lesson closed on Saturday, 1 January 2000, 8:00" # behat_hooks::i_look_for_exceptions()
And I should not see "First page contents" # behat_hooks::i_look_for_exceptions()
@tool @tool_behat
Feature: Transform date time string arguments
In order to write tests with relative date and time
As a user
I need to apply some transformations to the steps arguments
Scenario: Set date in table and check date with specific format # C:\Apache24\htdocs\integration\admin\tool\behat\tests\behat\datetime_strings.feature:7
Given I am on site homepage # behat_hooks::i_look_for_exceptions()
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname |
| teacher1 | Teacher | 1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | course | idnumber | name | intro | duedate |
| assign | C1 | assign1 | Test assignment name | Test assignment description | ##yesterday## |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I should see "##yesterday##l, j F Y##" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@block @block_activity_results
Feature: The activity results block can have administrator set defaults
In order to be customize the activity results block
As an admin
I need can assign some site wide defaults
Background: # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\defaultsettings.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
| student1 | Student | 1 | student1@example.com | S1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
Scenario: Assign some site-wide defaults to the block. # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\defaultsettings.feature:20
Given the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| config_showbest | 0 | block_activity_results |
| config_showworst | 0 | block_activity_results |
| config_gradeformat | 2 | block_activity_results |
| config_nameformat | 2 | block_activity_results |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And the following fields match these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 0 |
| id_config_showworst | 0 |
| id_config_gradeformat | Fractions |
| id_config_nameformat | Display only ID numbers |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "This block's configuration currently does not allow it to show any results." in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Assign some site-wide defaults to the block and lock them. # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\defaultsettings.feature:44
Given the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| config_showbest | 0 | block_activity_results |
| config_showbest_locked | 1 | block_activity_results |
| config_showworst | 0 | block_activity_results |
| config_showworst_locked | 1 | block_activity_results |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And the following fields match these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 0 |
| id_config_showworst | 0 |
And the "id_config_showbest" "field" should be readonly # behat_hooks::i_look_for_exceptions()
And the "id_config_showworst" "field" should be readonly # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "This block's configuration currently does not allow it to show any results." in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
@core @message @javascript
Feature: Delete all messages
In order to communicate with fellow users
As a user
I need to be able to delete all messages
Scenario: Delete all messages # C:\Apache24\htdocs\integration\message\tests\behat\delete_all_messages.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| user1 | User | 1 | user1@example.com |
| user2 | User | 2 | user2@example.com |
And I log in as "user2" # behat_hooks::i_look_for_exceptions()
And I send "User 2 to User 1 message 1" message to "User 1" user # behat_hooks::i_look_for_exceptions()
And I send "User 2 to User 1 message 2" message in the message area # behat_hooks::i_look_for_exceptions()
And I send "User 2 to User 1 message 3" message in the message area # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "user1" # behat_hooks::i_look_for_exceptions()
And I follow "Messages" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "start-delete-messages" "message_area_action" # behat_hooks::i_look_for_exceptions()
And I click on "Delete all" "button" # behat_hooks::i_look_for_exceptions()
And I click on "Yes" "button" # behat_hooks::i_look_for_exceptions()
Then I should not see "User 2" in the "conversations" "message_area_region_content" # behat_hooks::i_look_for_exceptions()
And I reload the page # behat_hooks::i_look_for_exceptions()
And I should not see "User 2" in the "conversations" "message_area_region_content" # behat_hooks::i_look_for_exceptions()
@core @core_blog
Feature: Delete a blog entry
In order to manage my blog entries
As a user
I need to be able to delete entries I no longer wish to appear
Background: # C:\Apache24\htdocs\integration\blog\tests\behat\delete.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| testuser | Test | User | moodle@example.com |
And I log in as "testuser" # behat_hooks::i_look_for_exceptions()
And I expand "Site pages" node # behat_hooks::i_look_for_exceptions()
And I follow "Site blogs" # behat_hooks::i_look_for_exceptions()
And I follow "Add a new entry" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | Blog post one |
| Blog entry body | User 1 blog post content |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Add a new entry" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Entry title | Blog post two |
| Blog entry body | User 1 blog post content |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I expand "Site pages" node # behat_hooks::i_look_for_exceptions()
And I follow "Site blogs" # behat_hooks::i_look_for_exceptions()
Scenario: Delete blog post results in post deleted # C:\Apache24\htdocs\integration\blog\tests\behat\delete.feature:28
Given I follow "Blog post one" # behat_hooks::i_look_for_exceptions()
And I follow "Delete" # behat_hooks::i_look_for_exceptions()
And I should see "Delete the blog entry 'Blog post one'?" # behat_hooks::i_look_for_exceptions()
When I press "Continue" # behat_hooks::i_look_for_exceptions()
Then I should not see "Blog post one" # behat_hooks::i_look_for_exceptions()
And I should see "Blog post two" # behat_hooks::i_look_for_exceptions()
Scenario: Delete confirmation screen works and allows cancel # C:\Apache24\htdocs\integration\blog\tests\behat\delete.feature:36
Given I follow "Blog post one" # behat_hooks::i_look_for_exceptions()
When I follow "Delete" # behat_hooks::i_look_for_exceptions()
Then I should see "Delete the blog entry 'Blog post one'?" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I should see "Blog post one" # behat_hooks::i_look_for_exceptions()
And I should see "Blog post two" # behat_hooks::i_look_for_exceptions()
@block @block_comments
Feature: Delete comment block messages
In order to refine comment block's contents
As a teacher
In need to delete comments from courses
@javascript
Scenario: Delete comments with Javascript enabled # C:\Apache24\htdocs\integration\blocks\comments\tests\behat\delete_comment.feature:8
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | First | teacher1@example.com |
| student1 | Student | First | student1@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Comments" block # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I add "Comment from student1" comment to comments block # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I add "Comment from teacher1" comment to comments block # behat_hooks::i_look_for_exceptions()
When I delete "Comment from student1" comment from comments block # behat_hooks::i_look_for_exceptions()
Then I should not see "Comment from student1" # behat_hooks::i_look_for_exceptions()
And I delete "Comment from teacher1" comment from comments block # behat_hooks::i_look_for_exceptions()
And I should not see "Comment from teacher1" # behat_hooks::i_look_for_exceptions()
@core @core_filepicker @_file_upload
Feature: Delete files and folders from the file manager
In order to clean the file manager contents
As a user
I need to delete files from file areas
@javascript @_bug_phantomjs
Scenario: Delete a file and a folder # C:\Apache24\htdocs\integration\repository\tests\behat\delete_files.feature:8
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I follow "Manage private files" # behat_hooks::i_look_for_exceptions()
And I upload "lib/tests/fixtures/empty.txt" file to "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I create "Delete me" folder in "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Manage private files" # behat_hooks::i_look_for_exceptions()
When I delete "empty.txt" from "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should not see "empty.txt" # behat_hooks::i_look_for_exceptions()
And I follow "Manage private files" # behat_hooks::i_look_for_exceptions()
And I delete "Delete me" from "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should not see "Delete me" # behat_hooks::i_look_for_exceptions()
@core @core_group
Feature: Automatic deletion of groups and groupings
In order to check the expected results occur when deleting groups and groupings in different scenarios
As a teacher
I need to create groups and groupings under different scenarios and check that the expected result occurs when attempting to delete them.
Background: # C:\Apache24\htdocs\integration\group\tests\behat\delete_groups.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I expand "Users" node # behat_hooks::i_look_for_exceptions()
And I follow "Groups" # behat_hooks::i_look_for_exceptions()
And I press "Create group" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Group name | Group (without ID) |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Create group" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Group name | Group (with ID) |
| Group ID number | An ID |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Groupings" # behat_hooks::i_look_for_exceptions()
And I press "Create grouping" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Grouping name | Grouping (without ID) |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Create grouping" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Grouping name | Grouping (with ID) |
| Grouping ID number | An ID |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Groups" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Delete groups and groupings with and without ID numbers # C:\Apache24\htdocs\integration\group\tests\behat\delete_groups.feature:43
Given I set the field "groups" to "Group (without ID) (0)" # behat_hooks::i_look_for_exceptions()
And I press "Delete selected group" # behat_hooks::i_look_for_exceptions()
And I press "Yes" # behat_hooks::i_look_for_exceptions()
Then the "groups" select box should not contain "Group (without ID) (0)" # behat_hooks::i_look_for_exceptions()
And I set the field "groups" to "Group (with ID) (0)" # behat_hooks::i_look_for_exceptions()
And I press "Delete selected group" # behat_hooks::i_look_for_exceptions()
And I press "Yes" # behat_hooks::i_look_for_exceptions()
And the "groups" select box should not contain "Group (with ID) (0)" # behat_hooks::i_look_for_exceptions()
And I follow "Groupings" # behat_hooks::i_look_for_exceptions()
And I click on "Delete" "link" in the "Grouping (without ID)" "table_row" # behat_hooks::i_look_for_exceptions()
And I press "Yes" # behat_hooks::i_look_for_exceptions()
And I should not see "Grouping (without ID)" # behat_hooks::i_look_for_exceptions()
And I click on "Delete" "link" in the "Grouping (with ID)" "table_row" # behat_hooks::i_look_for_exceptions()
And I press "Yes" # behat_hooks::i_look_for_exceptions()
And I should not see "Grouping (with ID)" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Delete groups and groupings with and without ID numbers without the 'moodle/course:changeidnumber' capability # C:\Apache24\htdocs\integration\group\tests\behat\delete_groups.feature:61
Given I log out # behat_hooks::i_look_for_exceptions()
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I set the following system permissions of "Teacher" role: # behat_hooks::i_look_for_exceptions()
| moodle/course:changeidnumber | Prevent |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I expand "Users" node # behat_hooks::i_look_for_exceptions()
And I follow "Groups" # behat_hooks::i_look_for_exceptions()
When I set the field "groups" to "Group (with ID) (0)" # behat_hooks::i_look_for_exceptions()
Then the "Delete selected group" "button" should be disabled # behat_hooks::i_look_for_exceptions()
And I set the field "groups" to "Group (without ID) (0)" # behat_hooks::i_look_for_exceptions()
And I press "Delete selected group" # behat_hooks::i_look_for_exceptions()
And I press "Yes" # behat_hooks::i_look_for_exceptions()
And I should not see "Group (without ID)" # behat_hooks::i_look_for_exceptions()
And I follow "Groupings" # behat_hooks::i_look_for_exceptions()
And "Delete" "link" should not exist in the "Grouping (with ID)" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "Delete" "link" in the "Grouping (without ID)" "table_row" # behat_hooks::i_look_for_exceptions()
And I press "Yes" # behat_hooks::i_look_for_exceptions()
And I should not see "Grouping (without ID)" # behat_hooks::i_look_for_exceptions()
@core @message @javascript
Feature: Delete messages
In order to communicate with fellow users
As a user
I need to be able to delete messages
Scenario: Delete messages # C:\Apache24\htdocs\integration\message\tests\behat\delete_messages.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| user1 | User | 1 | user1@example.com |
| user2 | User | 2 | user2@example.com |
And I log in as "user2" # behat_hooks::i_look_for_exceptions()
And I send "User 2 to User 1 message 1" message to "User 1" user # behat_hooks::i_look_for_exceptions()
And I send "User 2 to User 1 message 2" message in the message area # behat_hooks::i_look_for_exceptions()
And I send "User 2 to User 1 message 3" message in the message area # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "user1" # behat_hooks::i_look_for_exceptions()
And I follow "Messages" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "start-delete-messages" "message_area_action" # behat_hooks::i_look_for_exceptions()
And I click on "User 2 to User 1 message 1" "text" in the "messages" "message_area_region" # behat_hooks::i_look_for_exceptions()
And I click on "User 2 to User 1 message 2" "text" in the "messages" "message_area_region" # behat_hooks::i_look_for_exceptions()
And I click on "Delete selected messages" "button" # behat_hooks::i_look_for_exceptions()
Then I should see "User 2 to User 1 message 3" in the "messages" "message_area_region" # behat_hooks::i_look_for_exceptions()
And I should not see "User 2 to User 1 message 2" in the "messages" "message_area_region" # behat_hooks::i_look_for_exceptions()
And I should not see "User 2 to User 1 message 1" in the "messages" "message_area_region" # behat_hooks::i_look_for_exceptions()
And I reload the page # behat_hooks::i_look_for_exceptions()
And I should see "User 2 to User 1 message 3" in the "messages" "message_area_region" # behat_hooks::i_look_for_exceptions()
And I should not see "User 2 to User 1 message 2" in the "messages" "message_area_region" # behat_hooks::i_look_for_exceptions()
And I should not see "User 2 to User 1 message 1" in the "messages" "message_area_region" # behat_hooks::i_look_for_exceptions()
@core @core_question
Feature: A teacher can delete questions in the question bank
In order to remove unused questions from the question bank
As a teacher
I need to delete questions
Background: # C:\Apache24\htdocs\integration\question\tests\behat\delete_questions.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | weeks |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | essay | Test question to be deleted | Write about whatever you want |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Questions" node in "Course administration > Question bank" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: A question not used anywhere can really be deleted # C:\Apache24\htdocs\integration\question\tests\behat\delete_questions.feature:28
When I click on "Delete" "link" in the "Test question to be deleted" "table_row" # behat_hooks::i_look_for_exceptions()
And I press "Delete" # behat_hooks::i_look_for_exceptions()
And I click on "Also show old questions" "checkbox" # behat_hooks::i_look_for_exceptions()
Then I should not see "Test question to be deleted" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Deleting a question can be cancelled # C:\Apache24\htdocs\integration\question\tests\behat\delete_questions.feature:35
When I click on "Delete" "link" in the "Test question to be deleted" "table_row" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
Then I should see "Test question to be deleted" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Delete a question used in a quiz # C:\Apache24\htdocs\integration\question\tests\behat\delete_questions.feature:41
Given I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Quiz" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Test quiz |
And I add a "True/False" question to the "Test quiz" quiz with: # behat_hooks::i_look_for_exceptions()
| Question name | Test used question to be deleted |
| Question text | Write about whatever you want |
And I navigate to "Questions" node in "Course administration > Question bank" # behat_hooks::i_look_for_exceptions()
When I click on "Delete" "link" in the "Test used question to be deleted" "table_row" # behat_hooks::i_look_for_exceptions()
And I press "Delete" # behat_hooks::i_look_for_exceptions()
Then I should not see "Test used question to be deleted" # behat_hooks::i_look_for_exceptions()
And I click on "Also show old questions" "checkbox" # behat_hooks::i_look_for_exceptions()
And I should see "Test used question to be deleted" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test quiz" # behat_hooks::i_look_for_exceptions()
And I click on "Preview quiz now" "button" # behat_hooks::i_look_for_exceptions()
And I should see "Write about whatever you want" # behat_hooks::i_look_for_exceptions()
@mod @mod_workshop
Feature: Workshop submission removal
In order to get rid of accidentally submitted or otherwise inappropriate contents
As a student and as a teacher
I need to be able to delete my submission, or any submission respectively
Background: # C:\Apache24\htdocs\integration\mod\workshop\tests\behat\delete_submission.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Sam1 | Student1 | student1@example.com |
| student2 | Sam2 | Student2 | student2@example.com |
| student3 | Sam3 | Student3 | student3@example.com |
| teacher1 | Terry1 | Teacher1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname |
| Course1 | c1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| student1 | c1 | student |
| student2 | c1 | student |
| student3 | c1 | student |
| teacher1 | c1 | editingteacher |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber |
| workshop | TestWorkshop | Test workshop description | c1 | workshop1 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course1" # behat_hooks::i_look_for_exceptions()
And I edit assessment form in workshop "TestWorkshop" as:" # behat_hooks::i_look_for_exceptions()
| id_description__idx_0_editor | Aspect1 |
| id_description__idx_1_editor | Aspect2 |
| id_description__idx_2_editor | |
And I change phase in workshop "TestWorkshop" to "Submission phase" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course1" # behat_hooks::i_look_for_exceptions()
And I follow "TestWorkshop" # behat_hooks::i_look_for_exceptions()
And I add a submission in workshop "TestWorkshop" as:" # behat_hooks::i_look_for_exceptions()
| Title | Submission1 |
| Submission content | Some content |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course1" # behat_hooks::i_look_for_exceptions()
And I add a submission in workshop "TestWorkshop" as:" # behat_hooks::i_look_for_exceptions()
| Title | Submission2 |
| Submission content | Some content |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course1" # behat_hooks::i_look_for_exceptions()
And I follow "TestWorkshop" # behat_hooks::i_look_for_exceptions()
And I allocate submissions in workshop "TestWorkshop" as:" # behat_hooks::i_look_for_exceptions()
| Participant | Reviewer |
| Sam2 Student2 | Sam3 Student3 |
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Students can delete their submissions as long as the submissions are editable and not allocated for assessments # C:\Apache24\htdocs\integration\mod\workshop\tests\behat\delete_submission.feature:59
Given I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course1" # behat_hooks::i_look_for_exceptions()
And I follow "TestWorkshop" # behat_hooks::i_look_for_exceptions()
When I follow "My submission" # behat_hooks::i_look_for_exceptions()
Then I should see "Submission1" # behat_hooks::i_look_for_exceptions()
And "Delete submission" "button" should exist # behat_hooks::i_look_for_exceptions()
And I click on "Delete submission" "button" # behat_hooks::i_look_for_exceptions()
And I should see "Are you sure you want to delete the following submission?" # behat_hooks::i_look_for_exceptions()
And I should see "Submission1" # behat_hooks::i_look_for_exceptions()
And I click on "Continue" "button" # behat_hooks::i_look_for_exceptions()
And I should see "You have not submitted your work yet" # behat_hooks::i_look_for_exceptions()
Scenario: Students cannot delete their submissions if the submissions are not editable # C:\Apache24\htdocs\integration\mod\workshop\tests\behat\delete_submission.feature:72
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course1" # behat_hooks::i_look_for_exceptions()
And I follow "TestWorkshop" # behat_hooks::i_look_for_exceptions()
And I change phase in workshop "TestWorkshop" to "Closed" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course1" # behat_hooks::i_look_for_exceptions()
And I follow "TestWorkshop" # behat_hooks::i_look_for_exceptions()
When I follow "My submission" # behat_hooks::i_look_for_exceptions()
Then I should see "Submission1" # behat_hooks::i_look_for_exceptions()
And "Delete submission" "button" should not exist # behat_hooks::i_look_for_exceptions()
Scenario: Students cannot delete their submissions if the submissions are allocated for assessments # C:\Apache24\htdocs\integration\mod\workshop\tests\behat\delete_submission.feature:85
Given I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course1" # behat_hooks::i_look_for_exceptions()
And I follow "TestWorkshop" # behat_hooks::i_look_for_exceptions()
When I follow "My submission" # behat_hooks::i_look_for_exceptions()
Then I should see "Submission2" # behat_hooks::i_look_for_exceptions()
And "Delete submission" "button" should not exist # behat_hooks::i_look_for_exceptions()
Scenario: Teachers can delete submissions even if the submissions are allocated for assessments. # C:\Apache24\htdocs\integration\mod\workshop\tests\behat\delete_submission.feature:93
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course1" # behat_hooks::i_look_for_exceptions()
And I follow "TestWorkshop" # behat_hooks::i_look_for_exceptions()
And "Submission1" "link" should exist # behat_hooks::i_look_for_exceptions()
And "Submission2" "link" should exist # behat_hooks::i_look_for_exceptions()
When I follow "Submission2" # behat_hooks::i_look_for_exceptions()
Then "Delete submission" "button" should exist # behat_hooks::i_look_for_exceptions()
And I click on "Delete submission" "button" # behat_hooks::i_look_for_exceptions()
And I should see "Are you sure you want to delete the following submission?" # behat_hooks::i_look_for_exceptions()
And I should see "Note this will also delete 1 assessments associated with this submission, which may affect the reviewers' grades." # behat_hooks::i_look_for_exceptions()
And I click on "Continue" "button" # behat_hooks::i_look_for_exceptions()
And "Submission1" "link" should exist # behat_hooks::i_look_for_exceptions()
And "Submission2" "link" should not exist # behat_hooks::i_look_for_exceptions()
@core @core_tag
Feature: Manager is able to delete tags
In order to use tags
As a manager
I need to be able to delete them
Background: # C:\Apache24\htdocs\integration\tag\tests\behat\delete_tag.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | interests |
| manager1 | Manager | 1 | manager1@example.com | |
| user1 | User | 1 | user1@example.com | Cat,Dog,Turtle |
And the following "system role assigns" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| manager1 | Acceptance test site | manager |
And the following "tags" exist: # behat_hooks::i_look_for_exceptions()
| name | isstandard |
| Neverusedtag | 1 |
Scenario: Deleting a tag with javascript disabled # C:\Apache24\htdocs\integration\tag\tests\behat\delete_tag.feature:19
When I log in as "manager1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Manage tags" node in "Site administration > Appearance" # behat_hooks::i_look_for_exceptions()
And I follow "Default collection" # behat_hooks::i_look_for_exceptions()
And I click on "Delete" "link" in the "Dog" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Tag(s) deleted" # behat_hooks::i_look_for_exceptions()
Then I should not see "Dog" # behat_hooks::i_look_for_exceptions()
And I navigate to "Participants" node in "Site pages" # behat_hooks::i_look_for_exceptions()
And I follow "User 1" # behat_hooks::i_look_for_exceptions()
And I should see "Cat" # behat_hooks::i_look_for_exceptions()
And I should not see "Dog" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Deleting multiple tags with javascript disabled # C:\Apache24\htdocs\integration\tag\tests\behat\delete_tag.feature:32
When I log in as "manager1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Manage tags" node in "Site administration > Appearance" # behat_hooks::i_look_for_exceptions()
And I follow "Default collection" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Select tag Dog | 1 |
| Select tag Neverusedtag | 1 |
And I press "Delete selected" # behat_hooks::i_look_for_exceptions()
Then I should see "Tag(s) deleted" # behat_hooks::i_look_for_exceptions()
And I should not see "Dog" # behat_hooks::i_look_for_exceptions()
And I should not see "Neverusedtag" # behat_hooks::i_look_for_exceptions()
And I navigate to "Participants" node in "Site pages" # behat_hooks::i_look_for_exceptions()
And I follow "User 1" # behat_hooks::i_look_for_exceptions()
And I should see "Cat" # behat_hooks::i_look_for_exceptions()
And I should not see "Dog" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Deleting a tag with javascript enabled # C:\Apache24\htdocs\integration\tag\tests\behat\delete_tag.feature:50
When I log in as "manager1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Manage tags" node in "Site administration > Appearance" # behat_hooks::i_look_for_exceptions()
And I follow "Default collection" # behat_hooks::i_look_for_exceptions()
And I click on "Delete" "link" in the "Turtle" "table_row" # behat_hooks::i_look_for_exceptions()
Then I should see "Are you sure you want to delete this tag?" # behat_hooks::i_look_for_exceptions()
And I press "No" # behat_hooks::i_look_for_exceptions()
And I should not see "Tag(s) deleted" # behat_hooks::i_look_for_exceptions()
And I should see "Turtle" # behat_hooks::i_look_for_exceptions()
And I click on "Delete" "link" in the "Dog" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Are you sure you want to delete this tag?" # behat_hooks::i_look_for_exceptions()
And I press "Yes" # behat_hooks::i_look_for_exceptions()
And I should see "Tag(s) deleted" # behat_hooks::i_look_for_exceptions()
And I should not see "Dog" # behat_hooks::i_look_for_exceptions()
And I follow "Default collection" # behat_hooks::i_look_for_exceptions()
And I should not see "Dog" # behat_hooks::i_look_for_exceptions()
And I navigate to "Participants" node in "Site pages" # behat_hooks::i_look_for_exceptions()
And I follow "User 1" # behat_hooks::i_look_for_exceptions()
And I should see "Cat" # behat_hooks::i_look_for_exceptions()
And I should not see "Dog" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Deleting multiple tags with javascript enabled # C:\Apache24\htdocs\integration\tag\tests\behat\delete_tag.feature:73
When I log in as "manager1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Manage tags" node in "Site administration > Appearance" # behat_hooks::i_look_for_exceptions()
And I follow "Default collection" # behat_hooks::i_look_for_exceptions()
And I press "Delete selected" # behat_hooks::i_look_for_exceptions()
And I should not see "Are you sure" # behat_hooks::i_look_for_exceptions()
And I should not see "Tag(s) deleted" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Select tag Cat | 1 |
And I press "Delete selected" # behat_hooks::i_look_for_exceptions()
And I should see "Are you sure you want to delete selected tags?" # behat_hooks::i_look_for_exceptions()
And I press "No" # behat_hooks::i_look_for_exceptions()
And I should not see "Tag(s) deleted" # behat_hooks::i_look_for_exceptions()
And I should see "Cat" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Select tag Cat | 0 |
| Select tag Dog | 1 |
| Select tag Neverusedtag | 1 |
And I press "Delete selected" # behat_hooks::i_look_for_exceptions()
And I should see "Are you sure you want to delete selected tags?" # behat_hooks::i_look_for_exceptions()
And I press "Yes" # behat_hooks::i_look_for_exceptions()
And I should see "Tag(s) deleted" # behat_hooks::i_look_for_exceptions()
And I should not see "Dog" # behat_hooks::i_look_for_exceptions()
And I should not see "Neverusedtag" # behat_hooks::i_look_for_exceptions()
And I follow "Default collection" # behat_hooks::i_look_for_exceptions()
And I should not see "Dog" # behat_hooks::i_look_for_exceptions()
And I should not see "Neverusedtag" # behat_hooks::i_look_for_exceptions()
And I navigate to "Participants" node in "Site pages" # behat_hooks::i_look_for_exceptions()
And I follow "User 1" # behat_hooks::i_look_for_exceptions()
And I should see "Cat" # behat_hooks::i_look_for_exceptions()
And I should not see "Dog" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@core @core_user
Feature: Deleting users
In order to manage a Moodle site
As an admin
I need to be able to delete users
Background: # C:\Apache24\htdocs\integration\user\tests\behat\delete_users.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| user1 | User | One | one@example.com |
| user2 | User | Two | two@example.com |
| user3 | User | Three | three@example.com |
| user4 | User | Four | four@example.com |
@javascript
Scenario: Deleting one user at a time # C:\Apache24\htdocs\integration\user\tests\behat\delete_users.feature:16
When I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "Bulk user actions" node in "Site administration > Users > Accounts" # behat_hooks::i_look_for_exceptions()
And the "Available" select box should contain "User Four" # behat_hooks::i_look_for_exceptions()
And I set the field "Available" to "User Four" # behat_hooks::i_look_for_exceptions()
And I press "Add to selection" # behat_hooks::i_look_for_exceptions()
And I set the field "id_action" to "Delete" # behat_hooks::i_look_for_exceptions()
And I press "Go" # behat_hooks::i_look_for_exceptions()
And I should see "Are you absolutely sure you want to completely delete the user User Four, including their enrolments, activity and other user data?" # behat_hooks::i_look_for_exceptions()
And I press "Yes" # behat_hooks::i_look_for_exceptions()
And I should see "Changes saved" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
Then the "Available" select box should not contain "User Four" # behat_hooks::i_look_for_exceptions()
And the "Available" select box should contain "User One" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Deleting more than one user at a time # C:\Apache24\htdocs\integration\user\tests\behat\delete_users.feature:32
When I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "Bulk user actions" node in "Site administration > Users > Accounts" # behat_hooks::i_look_for_exceptions()
And I set the field "Available" to "User Four" # behat_hooks::i_look_for_exceptions()
And I press "Add to selection" # behat_hooks::i_look_for_exceptions()
And I set the field "Available" to "User Three" # behat_hooks::i_look_for_exceptions()
And I press "Add to selection" # behat_hooks::i_look_for_exceptions()
And I set the field "id_action" to "Delete" # behat_hooks::i_look_for_exceptions()
And I press "Go" # behat_hooks::i_look_for_exceptions()
And I should see "Are you absolutely sure you want to completely delete the user User Four, User Three, including their enrolments, activity and other user data?" # behat_hooks::i_look_for_exceptions()
And I press "Yes" # behat_hooks::i_look_for_exceptions()
And I should see "Changes saved" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
Then the "Available" select box should not contain "User Four" # behat_hooks::i_look_for_exceptions()
And the "Available" select box should not contain "User Three" # behat_hooks::i_look_for_exceptions()
And the "Available" select box should contain "User One" # behat_hooks::i_look_for_exceptions()
@javascript @core_message
Scenario: Deleting users who have unread messages sent or received # C:\Apache24\htdocs\integration\user\tests\behat\delete_users.feature:50
When I log in as "user1" # behat_hooks::i_look_for_exceptions()
And I send "Message 1 from user1 to user2" message to "User Two" user # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "user3" # behat_hooks::i_look_for_exceptions()
And I send "Message 2 from user3 to user4" message to "User Four" user # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "Bulk user actions" node in "Site administration > Users > Accounts" # behat_hooks::i_look_for_exceptions()
And I set the field "Available" to "User One" # behat_hooks::i_look_for_exceptions()
And I press "Add to selection" # behat_hooks::i_look_for_exceptions()
And I set the field "Available" to "User Four" # behat_hooks::i_look_for_exceptions()
And I press "Add to selection" # behat_hooks::i_look_for_exceptions()
And I set the field "id_action" to "Delete" # behat_hooks::i_look_for_exceptions()
And I press "Go" # behat_hooks::i_look_for_exceptions()
And I press "Yes" # behat_hooks::i_look_for_exceptions()
Then I should see "Changes saved" # behat_hooks::i_look_for_exceptions()
And I navigate to "Bulk user actions" node in "Site administration > Users > Accounts" # behat_hooks::i_look_for_exceptions()
And I set the field "Available" to "User Two" # behat_hooks::i_look_for_exceptions()
And I press "Add to selection" # behat_hooks::i_look_for_exceptions()
And I set the field "Available" to "User Three" # behat_hooks::i_look_for_exceptions()
And I press "Add to selection" # behat_hooks::i_look_for_exceptions()
And I set the field "id_action" to "Delete" # behat_hooks::i_look_for_exceptions()
And I press "Go" # behat_hooks::i_look_for_exceptions()
And I press "Yes" # behat_hooks::i_look_for_exceptions()
And I should see "Changes saved" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And the "Available" select box should not contain "User Four" # behat_hooks::i_look_for_exceptions()
And the "Available" select box should not contain "User Three" # behat_hooks::i_look_for_exceptions()
And the "Available" select box should not contain "User One" # behat_hooks::i_look_for_exceptions()
And the "Available" select box should not contain "User Two" # behat_hooks::i_look_for_exceptions()
@tool @tool_monitor
Feature: Enable/disable managment of the event monitor
In order to manage event monitoring
As an admin
I need to enable/disable it
Scenario: Tool is disabled by default. # C:\Apache24\htdocs\integration\admin\tool\monitor\tests\behat\disabled.feature:7
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
When I navigate to "Event monitoring rules" node in "Site administration > Reports" # behat_hooks::i_look_for_exceptions()
Then I should see "Event monitoring is currently disabled" # behat_hooks::i_look_for_exceptions()
And I should see "Enable" # behat_hooks::i_look_for_exceptions()
And I should not see "Add a new rule" # behat_hooks::i_look_for_exceptions()
And I click on "Enable" "link" # behat_hooks::i_look_for_exceptions()
And I should see "Event monitoring is currently enabled" # behat_hooks::i_look_for_exceptions()
And I should see "Disable" # behat_hooks::i_look_for_exceptions()
And I should see "Add a new rule" # behat_hooks::i_look_for_exceptions()
And I click on "Disable" "link" # behat_hooks::i_look_for_exceptions()
And I should see "Event monitoring is currently disabled" # behat_hooks::i_look_for_exceptions()
And I should not see "Add a new rule" # behat_hooks::i_look_for_exceptions()
@mod @mod_forum
Feature: Students can choose from 4 discussion display options and their choice is remembered
In order to read forum posts in a suitable view
As a user
I need to select which display method I want to use
Background: # C:\Apache24\htdocs\integration\mod\forum\tests\behat\discussion_display.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| student1 | C1 | student |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name |
| Description | Test forum description |
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Discussion 1 |
| Message | Discussion contents 1, first message |
And I reply "Discussion 1" post from "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Reply 1 to discussion 1 |
| Message | Discussion contents 1, second message |
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Discussion 2 |
| Message | Discussion contents 2, first message |
And I reply "Discussion 2" post from "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Reply 1 to discussion 2 |
| Message | Discussion contents 2, second message |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Scenario: Display replies flat, with oldest first # C:\Apache24\htdocs\integration\mod\forum\tests\behat\discussion_display.feature:40
Given I reply "Discussion 1" post from "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Reply 2 to discussion 1 |
| Message | Discussion contents 1, third message |
When I select "Display replies flat, with oldest first" from the "mode" singleselect # behat_hooks::i_look_for_exceptions()
Then I should see "Discussion contents 1, first message" in the "div.firstpost.starter" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Discussion contents 1, second message" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' forumpost ') and not(contains(@class, 'starter'))]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I reply "Discussion 2" post from "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Reply 2 to discussion 2 |
| Message | Discussion contents 2, third message |
And the field "Display mode" matches value "Display replies flat, with oldest first" # behat_hooks::i_look_for_exceptions()
And I should see "Discussion contents 2, first message" in the "div.firstpost.starter" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Discussion contents 2, second message" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' forumpost ') and not(contains(@class, 'starter'))]" "xpath_element" # behat_hooks::i_look_for_exceptions()
Scenario: Display replies flat, with newest first # C:\Apache24\htdocs\integration\mod\forum\tests\behat\discussion_display.feature:54
Given I reply "Discussion 1" post from "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Reply 2 to discussion 1 |
| Message | Discussion contents 1, third message |
When I select "Display replies flat, with newest first" from the "mode" singleselect # behat_hooks::i_look_for_exceptions()
Then I should see "Discussion contents 1, first message" in the "div.firstpost.starter" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Discussion contents 1, third message" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' forumpost ') and not(contains(@class, 'starter'))]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I reply "Discussion 2" post from "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Reply 2 to discussion 2 |
| Message | Discussion contents 2, third message |
And the field "Display mode" matches value "Display replies flat, with newest first" # behat_hooks::i_look_for_exceptions()
And I should see "Discussion contents 2, first message" in the "div.firstpost.starter" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Discussion contents 2, third message" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' forumpost ') and not(contains(@class, 'starter'))]" "xpath_element" # behat_hooks::i_look_for_exceptions()
Scenario: Display replies in threaded form # C:\Apache24\htdocs\integration\mod\forum\tests\behat\discussion_display.feature:68
Given I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
And I follow "Discussion 1" # behat_hooks::i_look_for_exceptions()
When I select "Display replies in threaded form" from the "mode" singleselect # behat_hooks::i_look_for_exceptions()
Then I should see "Discussion contents 1, first message" # behat_hooks::i_look_for_exceptions()
And I should see "Reply 1 to discussion 1" in the "span.forumthread" "css_element" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
And I follow "Discussion 2" # behat_hooks::i_look_for_exceptions()
And the field "Display mode" matches value "Display replies in threaded form" # behat_hooks::i_look_for_exceptions()
And I should see "Discussion contents 2, first message" # behat_hooks::i_look_for_exceptions()
And I should see "Reply 1 to discussion 2" in the "span.forumthread" "css_element" # behat_hooks::i_look_for_exceptions()
Scenario: Display replies in nested form # C:\Apache24\htdocs\integration\mod\forum\tests\behat\discussion_display.feature:80
Given I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
And I follow "Discussion 1" # behat_hooks::i_look_for_exceptions()
When I select "Display replies in nested form" from the "mode" singleselect # behat_hooks::i_look_for_exceptions()
Then I should see "Discussion contents 1, first message" in the "div.firstpost.starter" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Discussion contents 1, second message" in the "div.indent div.forumpost" "css_element" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
And I follow "Discussion 2" # behat_hooks::i_look_for_exceptions()
And the field "Display mode" matches value "Display replies in nested form" # behat_hooks::i_look_for_exceptions()
And I should see "Discussion contents 2, first message" in the "div.firstpost.starter" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Discussion contents 2, second message" in the "div.indent div.forumpost" "css_element" # behat_hooks::i_look_for_exceptions()
@mod @mod_forum
Feature: A user can navigate to previous and next discussions
In order to get go the previous discussion
As a user
I need to click on the previous discussion link
Background: # C:\Apache24\htdocs\integration\mod\forum\tests\behat\discussion_navigation.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And the following "groups" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| Group 1 | C1 | G1 |
| Group 2 | C1 | G2 |
And the following "group members" exist: # behat_hooks::i_look_for_exceptions()
| user | group |
| teacher1 | G1 |
| teacher1 | G2 |
| student1 | G1 |
| student2 | G2 |
Scenario: A user can navigate between discussions # C:\Apache24\htdocs\integration\mod\forum\tests\behat\discussion_navigation.feature:32
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | groupmode |
| forum | Test forum name | Test forum name | C1 | forum | 0 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Discussion 1 |
| Message | Test post message |
And I wait "1" seconds # behat_hooks::i_look_for_exceptions()
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Discussion 2 |
| Message | Test post message |
And I wait "1" seconds # behat_hooks::i_look_for_exceptions()
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Discussion 3 |
| Message | Test post message |
And I wait "1" seconds # behat_hooks::i_look_for_exceptions()
When I follow "Discussion 3" # behat_hooks::i_look_for_exceptions()
Then I should not see "Discussion 1" # behat_hooks::i_look_for_exceptions()
And I should see "Discussion 2" # behat_hooks::i_look_for_exceptions()
And I follow "Discussion 2" # behat_hooks::i_look_for_exceptions()
And I should see "Discussion 1" # behat_hooks::i_look_for_exceptions()
And I should see "Discussion 3" # behat_hooks::i_look_for_exceptions()
And I follow "Discussion 1" # behat_hooks::i_look_for_exceptions()
And I should see "Discussion 2" # behat_hooks::i_look_for_exceptions()
And I should not see "Discussion 3" # behat_hooks::i_look_for_exceptions()
And I follow "Reply" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Message | Answer to discussion |
And I press "Post to forum" # behat_hooks::i_look_for_exceptions()
And I should not see "Discussion 2" # behat_hooks::i_look_for_exceptions()
And I should see "Discussion 3" # behat_hooks::i_look_for_exceptions()
And I follow "Discussion 3" # behat_hooks::i_look_for_exceptions()
And I should see "Discussion 1" # behat_hooks::i_look_for_exceptions()
And I should see "Discussion 2" # behat_hooks::i_look_for_exceptions()
And I follow "Discussion 2" # behat_hooks::i_look_for_exceptions()
And I should not see "Discussion 1" # behat_hooks::i_look_for_exceptions()
And I should see "Discussion 3" # behat_hooks::i_look_for_exceptions()
Scenario: A user can navigate between discussions with visible groups # C:\Apache24\htdocs\integration\mod\forum\tests\behat\discussion_navigation.feature:73
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | groupmode |
| forum | Test forum name | Test forum name | C1 | forum | 2 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Discussion 1 Group 0 |
| Message | Test post message |
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Discussion 2 Group 0 |
| Message | Test post message |
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Discussion 1 Group 1 |
| Message | Test post message |
| Group | Group 1 |
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Discussion 2 Group 1 |
| Message | Test post message |
| Group | Group 1 |
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Discussion 1 Group 2 |
| Message | Test post message |
| Group | Group 2 |
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Discussion 2 Group 2 |
| Message | Test post message |
| Group | Group 2 |
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
And I select "All participants" from the "Visible groups" singleselect # behat_hooks::i_look_for_exceptions()
And I follow "Discussion 1 Group 0" # behat_hooks::i_look_for_exceptions()
Then I should see "Discussion 2 Group 0" # behat_hooks::i_look_for_exceptions()
And I should not see "Group 1" # behat_hooks::i_look_for_exceptions()
And I should not see "Group 2" # behat_hooks::i_look_for_exceptions()
And I follow "Discussion 2 Group 0" # behat_hooks::i_look_for_exceptions()
And I should see "Discussion 1 Group 0" # behat_hooks::i_look_for_exceptions()
And I should see "Discussion 1 Group 1" # behat_hooks::i_look_for_exceptions()
And I follow "Discussion 1 Group 1" # behat_hooks::i_look_for_exceptions()
And I should see "Discussion 2 Group 0" # behat_hooks::i_look_for_exceptions()
And I should see "Discussion 2 Group 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
And I follow "Discussion 1 Group 2" # behat_hooks::i_look_for_exceptions()
And I should see "Discussion 2 Group 1" # behat_hooks::i_look_for_exceptions()
And I should see "Discussion 2 Group 2" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
And I select "Group 1" from the "Visible groups" singleselect # behat_hooks::i_look_for_exceptions()
And I follow "Discussion 1 Group 1" # behat_hooks::i_look_for_exceptions()
Then I should see "Discussion 2 Group 0" # behat_hooks::i_look_for_exceptions()
And I should see "Discussion 2 Group 1" # behat_hooks::i_look_for_exceptions()
And I follow "Discussion 2 Group 1" # behat_hooks::i_look_for_exceptions()
And I should see "Discussion 1 Group 1" # behat_hooks::i_look_for_exceptions()
And I should not see "Group 2" # behat_hooks::i_look_for_exceptions()
Scenario: A user can navigate between discussions with separate groups # C:\Apache24\htdocs\integration\mod\forum\tests\behat\discussion_navigation.feature:130
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | groupmode |
| forum | Test forum name | Test forum name | C1 | forum | 1 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Discussion 1 Group 0 |
| Message | Test post message |
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Discussion 2 Group 0 |
| Message | Test post message |
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Discussion 1 Group 1 |
| Message | Test post message |
| Group | Group 1 |
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Discussion 2 Group 1 |
| Message | Test post message |
| Group | Group 1 |
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Discussion 1 Group 2 |
| Message | Test post message |
| Group | Group 2 |
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Discussion 2 Group 2 |
| Message | Test post message |
| Group | Group 2 |
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
And I follow "Discussion 1 Group 1" # behat_hooks::i_look_for_exceptions()
Then I should see "Discussion 2 Group 0" # behat_hooks::i_look_for_exceptions()
And I should see "Discussion 2 Group 1" # behat_hooks::i_look_for_exceptions()
And I follow "Discussion 2 Group 1" # behat_hooks::i_look_for_exceptions()
And I should see "Discussion 1 Group 1" # behat_hooks::i_look_for_exceptions()
And I should not see "Group 2" # behat_hooks::i_look_for_exceptions()
@mod @mod_forum
Feature: A user can control their own subscription preferences for a discussion
In order to receive notifications for things I am interested in
As a user
I need to choose my discussion subscriptions
Background: # C:\Apache24\htdocs\integration\mod\forum\tests\behat\discussion_subscriptions.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Student | One | student.one@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| student1 | C1 | student |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
Scenario: An optional forum can have discussions subscribed to # C:\Apache24\htdocs\integration\mod\forum\tests\behat\discussion_subscriptions.feature:22
Given I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name |
| Forum type | Standard forum for general use |
| Description | Test forum description |
| Subscription mode | Optional subscription |
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Test post subject one |
| Message | Test post message one |
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Test post subject two |
| Message | Test post message two |
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
Then I should see "Subscribe to this forum" # behat_hooks::i_look_for_exceptions()
And "You are not subscribed to this discussion. Click to subscribe." "link" should exist in the "Test post subject one" "table_row" # behat_hooks::i_look_for_exceptions()
And "You are not subscribed to this discussion. Click to subscribe." "link" should exist in the "Test post subject two" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "You are not subscribed to this discussion. Click to subscribe." "link" in the "Test post subject one" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Student One will be notified of new posts in 'Test post subject one' of 'Test forum name'" # behat_hooks::i_look_for_exceptions()
And I should see "Subscribe to this forum" # behat_hooks::i_look_for_exceptions()
And "You are subscribed to this discussion. Click to unsubscribe." "link" should exist in the "Test post subject one" "table_row" # behat_hooks::i_look_for_exceptions()
And "You are not subscribed to this discussion. Click to subscribe." "link" should exist in the "Test post subject two" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "You are subscribed to this discussion. Click to unsubscribe." "link" in the "Test post subject one" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Student One will NOT be notified of new posts in 'Test post subject one' of 'Test forum name'" # behat_hooks::i_look_for_exceptions()
And I should see "Subscribe to this forum" # behat_hooks::i_look_for_exceptions()
And "You are not subscribed to this discussion. Click to subscribe." "link" should exist in the "Test post subject one" "table_row" # behat_hooks::i_look_for_exceptions()
And "You are not subscribed to this discussion. Click to subscribe." "link" should exist in the "Test post subject two" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "You are not subscribed to this discussion. Click to subscribe." "link" in the "Test post subject one" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Student One will be notified of new posts in 'Test post subject one' of 'Test forum name'" # behat_hooks::i_look_for_exceptions()
And I should see "Subscribe to this forum" # behat_hooks::i_look_for_exceptions()
And "You are subscribed to this discussion. Click to unsubscribe." "link" should exist in the "Test post subject one" "table_row" # behat_hooks::i_look_for_exceptions()
And "You are not subscribed to this discussion. Click to subscribe." "link" should exist in the "Test post subject two" "table_row" # behat_hooks::i_look_for_exceptions()
And I follow "Subscribe to this forum" # behat_hooks::i_look_for_exceptions()
And I should see "Student One will be notified of new posts in 'Test forum name'" # behat_hooks::i_look_for_exceptions()
And I should see "Unsubscribe from this forum" # behat_hooks::i_look_for_exceptions()
And "You are subscribed to this discussion. Click to unsubscribe." "link" should exist in the "Test post subject one" "table_row" # behat_hooks::i_look_for_exceptions()
And "You are subscribed to this discussion. Click to unsubscribe." "link" should exist in the "Test post subject two" "table_row" # behat_hooks::i_look_for_exceptions()
And I follow "Unsubscribe from this forum" # behat_hooks::i_look_for_exceptions()
And I should see "Student One will NOT be notified of new posts in 'Test forum name'" # behat_hooks::i_look_for_exceptions()
And I should see "Subscribe to this forum" # behat_hooks::i_look_for_exceptions()
And "You are not subscribed to this discussion. Click to subscribe." "link" should exist in the "Test post subject one" "table_row" # behat_hooks::i_look_for_exceptions()
And "You are not subscribed to this discussion. Click to subscribe." "link" should exist in the "Test post subject two" "table_row" # behat_hooks::i_look_for_exceptions()
Scenario: An automatic subscription forum can have discussions unsubscribed from # C:\Apache24\htdocs\integration\mod\forum\tests\behat\discussion_subscriptions.feature:67
Given I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name |
| Forum type | Standard forum for general use |
| Description | Test forum description |
| Subscription mode | Auto subscription |
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Test post subject one |
| Message | Test post message one |
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Test post subject two |
| Message | Test post message two |
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
Then I should see "Unsubscribe from this forum" # behat_hooks::i_look_for_exceptions()
And "You are subscribed to this discussion. Click to unsubscribe." "link" should exist in the "Test post subject one" "table_row" # behat_hooks::i_look_for_exceptions()
And "You are subscribed to this discussion. Click to unsubscribe." "link" should exist in the "Test post subject two" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "You are subscribed to this discussion. Click to unsubscribe." "link" in the "Test post subject one" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Student One will NOT be notified of new posts in 'Test post subject one' of 'Test forum name'" # behat_hooks::i_look_for_exceptions()
And I should see "Unsubscribe from this forum" # behat_hooks::i_look_for_exceptions()
And "You are not subscribed to this discussion. Click to subscribe." "link" should exist in the "Test post subject one" "table_row" # behat_hooks::i_look_for_exceptions()
And "You are subscribed to this discussion. Click to unsubscribe." "link" should exist in the "Test post subject two" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "You are not subscribed to this discussion. Click to subscribe." "link" in the "Test post subject one" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Student One will be notified of new posts in 'Test post subject one' of 'Test forum name'" # behat_hooks::i_look_for_exceptions()
And I should see "Unsubscribe from this forum" # behat_hooks::i_look_for_exceptions()
And "You are subscribed to this discussion. Click to unsubscribe." "link" should exist in the "Test post subject one" "table_row" # behat_hooks::i_look_for_exceptions()
And "You are subscribed to this discussion. Click to unsubscribe." "link" should exist in the "Test post subject two" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "You are subscribed to this discussion. Click to unsubscribe." "link" in the "Test post subject one" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Student One will NOT be notified of new posts in 'Test post subject one' of 'Test forum name'" # behat_hooks::i_look_for_exceptions()
And I should see "Unsubscribe from this forum" # behat_hooks::i_look_for_exceptions()
And "You are not subscribed to this discussion. Click to subscribe." "link" should exist in the "Test post subject one" "table_row" # behat_hooks::i_look_for_exceptions()
And "You are subscribed to this discussion. Click to unsubscribe." "link" should exist in the "Test post subject two" "table_row" # behat_hooks::i_look_for_exceptions()
And I follow "Unsubscribe from this forum" # behat_hooks::i_look_for_exceptions()
And I should see "Student One will NOT be notified of new posts in 'Test forum name'" # behat_hooks::i_look_for_exceptions()
And I should see "Subscribe to this forum" # behat_hooks::i_look_for_exceptions()
And "You are not subscribed to this discussion. Click to subscribe." "link" should exist in the "Test post subject one" "table_row" # behat_hooks::i_look_for_exceptions()
And "You are not subscribed to this discussion. Click to subscribe." "link" should exist in the "Test post subject two" "table_row" # behat_hooks::i_look_for_exceptions()
And I follow "Subscribe to this forum" # behat_hooks::i_look_for_exceptions()
And I should see "Student One will be notified of new posts in 'Test forum name'" # behat_hooks::i_look_for_exceptions()
And I should see "Unsubscribe from this forum" # behat_hooks::i_look_for_exceptions()
And "You are subscribed to this discussion. Click to unsubscribe." "link" should exist in the "Test post subject one" "table_row" # behat_hooks::i_look_for_exceptions()
And "You are subscribed to this discussion. Click to unsubscribe." "link" should exist in the "Test post subject two" "table_row" # behat_hooks::i_look_for_exceptions()
Scenario: A user does not lose their preferences when a forum is switch from optional to automatic # C:\Apache24\htdocs\integration\mod\forum\tests\behat\discussion_subscriptions.feature:112
Given I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name |
| Forum type | Standard forum for general use |
| Description | Test forum description |
| Subscription mode | Optional subscription |
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Test post subject one |
| Message | Test post message one |
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Test post subject two |
| Message | Test post message two |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
And I should see "Subscribe to this forum" # behat_hooks::i_look_for_exceptions()
And "You are not subscribed to this discussion. Click to subscribe." "link" should exist in the "Test post subject one" "table_row" # behat_hooks::i_look_for_exceptions()
And "You are not subscribed to this discussion. Click to subscribe." "link" should exist in the "Test post subject two" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "You are not subscribed to this discussion. Click to subscribe." "link" in the "Test post subject one" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Student One will be notified of new posts in 'Test post subject one' of 'Test forum name'" # behat_hooks::i_look_for_exceptions()
And I should see "Subscribe to this forum" # behat_hooks::i_look_for_exceptions()
And "You are subscribed to this discussion. Click to unsubscribe." "link" should exist in the "Test post subject one" "table_row" # behat_hooks::i_look_for_exceptions()
And "You are not subscribed to this discussion. Click to subscribe." "link" should exist in the "Test post subject two" "table_row" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Subscription mode | Auto subscription |
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
And I should see "Unsubscribe from this forum" # behat_hooks::i_look_for_exceptions()
And "You are subscribed to this discussion. Click to unsubscribe." "link" should exist in the "Test post subject one" "table_row" # behat_hooks::i_look_for_exceptions()
And "You are subscribed to this discussion. Click to unsubscribe." "link" should exist in the "Test post subject two" "table_row" # behat_hooks::i_look_for_exceptions()
When I follow "Unsubscribe from this forum" # behat_hooks::i_look_for_exceptions()
Then I should see "Student One will NOT be notified of new posts in 'Test forum name'" # behat_hooks::i_look_for_exceptions()
And I should see "Subscribe to this forum" # behat_hooks::i_look_for_exceptions()
And "You are subscribed to this discussion. Click to unsubscribe." "link" should exist in the "Test post subject one" "table_row" # behat_hooks::i_look_for_exceptions()
And "You are not subscribed to this discussion. Click to subscribe." "link" should exist in the "Test post subject two" "table_row" # behat_hooks::i_look_for_exceptions()
Scenario: A user does not lose their preferences when a forum is switch from optional to automatic # C:\Apache24\htdocs\integration\mod\forum\tests\behat\discussion_subscriptions.feature:158
Given I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name |
| Forum type | Standard forum for general use |
| Description | Test forum description |
| Subscription mode | Optional subscription |
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Test post subject one |
| Message | Test post message one |
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Test post subject two |
| Message | Test post message two |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
And I should see "Subscribe to this forum" # behat_hooks::i_look_for_exceptions()
And "You are not subscribed to this discussion. Click to subscribe." "link" should exist in the "Test post subject one" "table_row" # behat_hooks::i_look_for_exceptions()
And "You are not subscribed to this discussion. Click to subscribe." "link" should exist in the "Test post subject two" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "You are not subscribed to this discussion. Click to subscribe." "link" in the "Test post subject one" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Student One will be notified of new posts in 'Test post subject one' of 'Test forum name'" # behat_hooks::i_look_for_exceptions()
And I should see "Subscribe to this forum" # behat_hooks::i_look_for_exceptions()
And "You are subscribed to this discussion. Click to unsubscribe." "link" should exist in the "Test post subject one" "table_row" # behat_hooks::i_look_for_exceptions()
And "You are not subscribed to this discussion. Click to subscribe." "link" should exist in the "Test post subject two" "table_row" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Subscription mode | Auto subscription |
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
And I should see "Unsubscribe from this forum" # behat_hooks::i_look_for_exceptions()
And "You are subscribed to this discussion. Click to unsubscribe." "link" should exist in the "Test post subject one" "table_row" # behat_hooks::i_look_for_exceptions()
And "You are subscribed to this discussion. Click to unsubscribe." "link" should exist in the "Test post subject two" "table_row" # behat_hooks::i_look_for_exceptions()
When I follow "Unsubscribe from this forum" # behat_hooks::i_look_for_exceptions()
And I should see "Student One will NOT be notified of new posts in 'Test forum name'" # behat_hooks::i_look_for_exceptions()
Then I should see "Subscribe to this forum" # behat_hooks::i_look_for_exceptions()
And "You are subscribed to this discussion. Click to unsubscribe." "link" should exist in the "Test post subject one" "table_row" # behat_hooks::i_look_for_exceptions()
And "You are not subscribed to this discussion. Click to subscribe." "link" should exist in the "Test post subject two" "table_row" # behat_hooks::i_look_for_exceptions()
Scenario: An optional forum prompts a user to subscribe to a discussion when posting unless they have already chosen not to subscribe # C:\Apache24\htdocs\integration\mod\forum\tests\behat\discussion_subscriptions.feature:204
Given I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name |
| Forum type | Standard forum for general use |
| Description | Test forum description |
| Subscription mode | Optional subscription |
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Test post subject one |
| Message | Test post message one |
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Test post subject two |
| Message | Test post message two |
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
And I should see "Subscribe to this forum" # behat_hooks::i_look_for_exceptions()
And I reply "Test post subject one" post from "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Reply 1 to discussion 1 |
| Message | Discussion contents 1, second message |
| Discussion subscription | 1 |
And I reply "Test post subject two" post from "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Reply 1 to discussion 1 |
| Message | Discussion contents 1, second message |
| Discussion subscription | 0 |
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
Then "You are subscribed to this discussion. Click to unsubscribe." "link" should exist in the "Test post subject one" "table_row" # behat_hooks::i_look_for_exceptions()
And "You are not subscribed to this discussion. Click to subscribe." "link" should exist in the "Test post subject two" "table_row" # behat_hooks::i_look_for_exceptions()
And I follow "Test post subject one" # behat_hooks::i_look_for_exceptions()
And I follow "Reply" # behat_hooks::i_look_for_exceptions()
And the field "Discussion subscription" matches value "Send me notifications of new posts in this discussion" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
And I follow "Test post subject two" # behat_hooks::i_look_for_exceptions()
And I follow "Reply" # behat_hooks::i_look_for_exceptions()
And the field "Discussion subscription" matches value "I don't want to be notified of new posts in this discussion" # behat_hooks::i_look_for_exceptions()
Scenario: An automatic forum prompts a user to subscribe to a discussion when posting unless they have already chosen not to subscribe # C:\Apache24\htdocs\integration\mod\forum\tests\behat\discussion_subscriptions.feature:240
Given I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name |
| Forum type | Standard forum for general use |
| Description | Test forum description |
| Subscription mode | Auto subscription |
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Test post subject one |
| Message | Test post message one |
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Test post subject two |
| Message | Test post message two |
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
And I should see "Unsubscribe from this forum" # behat_hooks::i_look_for_exceptions()
And I reply "Test post subject one" post from "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Reply 1 to discussion 1 |
| Message | Discussion contents 1, second message |
| Discussion subscription | 1 |
And I reply "Test post subject two" post from "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Reply 1 to discussion 1 |
| Message | Discussion contents 1, second message |
| Discussion subscription | 0 |
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
Then "You are subscribed to this discussion. Click to unsubscribe." "link" should exist in the "Test post subject one" "table_row" # behat_hooks::i_look_for_exceptions()
And "You are not subscribed to this discussion. Click to subscribe." "link" should exist in the "Test post subject two" "table_row" # behat_hooks::i_look_for_exceptions()
And I follow "Test post subject one" # behat_hooks::i_look_for_exceptions()
And I follow "Reply" # behat_hooks::i_look_for_exceptions()
And the field "Discussion subscription" matches value "Send me notifications of new posts in this discussion" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
And I follow "Test post subject two" # behat_hooks::i_look_for_exceptions()
And I follow "Reply" # behat_hooks::i_look_for_exceptions()
And the field "Discussion subscription" matches value "I don't want to be notified of new posts in this discussion" # behat_hooks::i_look_for_exceptions()
Scenario: A guest should not be able to subscribe to a discussion # C:\Apache24\htdocs\integration\mod\forum\tests\behat\discussion_subscriptions.feature:276
Given I am on site homepage # behat_hooks::i_look_for_exceptions()
And I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name |
| Forum type | Standard forum for general use |
| Description | Test forum description |
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Test post subject one |
| Message | Test post message one |
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "guest" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
Then "You are not subscribed to this discussion. Click to subscribe." "link" should not exist in the "Test post subject one" "table_row" # behat_hooks::i_look_for_exceptions()
And "You are subscribed to this discussion. Click to unsubscribe." "link" should not exist in the "Test post subject one" "table_row" # behat_hooks::i_look_for_exceptions()
And I follow "Test post subject one" # behat_hooks::i_look_for_exceptions()
And "You are not subscribed to this discussion. Click to subscribe." "link" should not exist # behat_hooks::i_look_for_exceptions()
And "You are subscribed to this discussion. Click to unsubscribe." "link" should not exist # behat_hooks::i_look_for_exceptions()
Scenario: A user who is not logged in should not be able to subscribe to a discussion # C:\Apache24\htdocs\integration\mod\forum\tests\behat\discussion_subscriptions.feature:294
Given I am on site homepage # behat_hooks::i_look_for_exceptions()
And I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name |
| Forum type | Standard forum for general use |
| Description | Test forum description |
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Test post subject one |
| Message | Test post message one |
And I log out # behat_hooks::i_look_for_exceptions()
When I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
Then "You are not subscribed to this discussion. Click to subscribe." "link" should not exist in the "Test post subject one" "table_row" # behat_hooks::i_look_for_exceptions()
And "You are subscribed to this discussion. Click to unsubscribe." "link" should not exist in the "Test post subject one" "table_row" # behat_hooks::i_look_for_exceptions()
And I follow "Test post subject one" # behat_hooks::i_look_for_exceptions()
And "You are not subscribed to this discussion. Click to subscribe." "link" should not exist # behat_hooks::i_look_for_exceptions()
And "You are subscribed to this discussion. Click to unsubscribe." "link" should not exist # behat_hooks::i_look_for_exceptions()
Scenario: A user can toggle their subscription preferences when viewing a discussion # C:\Apache24\htdocs\integration\mod\forum\tests\behat\discussion_subscriptions.feature:311
Given I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name |
| Forum type | Standard forum for general use |
| Description | Test forum description |
| Subscription mode | Optional subscription |
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Test post subject one |
| Message | Test post message one |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
When I follow "Test post subject one" # behat_hooks::i_look_for_exceptions()
Then I should see "Subscribe to this forum" # behat_hooks::i_look_for_exceptions()
And I should see "Subscribe to this discussion" # behat_hooks::i_look_for_exceptions()
And I follow "Subscribe to this forum" # behat_hooks::i_look_for_exceptions()
And I should see "Student One will be notified of new posts in 'Test forum name'" # behat_hooks::i_look_for_exceptions()
And I follow "Test post subject one" # behat_hooks::i_look_for_exceptions()
And I should see "Unsubscribe from this forum" # behat_hooks::i_look_for_exceptions()
And I should see "Unsubscribe from this discussion" # behat_hooks::i_look_for_exceptions()
And I follow "Unsubscribe from this discussion" # behat_hooks::i_look_for_exceptions()
And I should see "Student One will NOT be notified of new posts in 'Test post subject one' of 'Test forum name'" # behat_hooks::i_look_for_exceptions()
And I follow "Test post subject one" # behat_hooks::i_look_for_exceptions()
And I should see "Unsubscribe from this forum" # behat_hooks::i_look_for_exceptions()
And I should see "Subscribe to this discussion" # behat_hooks::i_look_for_exceptions()
And I follow "Unsubscribe from this forum" # behat_hooks::i_look_for_exceptions()
And I should see "Student One will NOT be notified of new posts in 'Test forum name'" # behat_hooks::i_look_for_exceptions()
And I follow "Test post subject one" # behat_hooks::i_look_for_exceptions()
And I should see "Subscribe to this forum" # behat_hooks::i_look_for_exceptions()
And I should see "Subscribe to this discussion" # behat_hooks::i_look_for_exceptions()
And I follow "Subscribe to this discussion" # behat_hooks::i_look_for_exceptions()
And I should see "Student One will be notified of new posts in 'Test post subject one' of 'Test forum name'" # behat_hooks::i_look_for_exceptions()
And I should see "Subscribe to this forum" # behat_hooks::i_look_for_exceptions()
And I should see "Unsubscribe from this discussion" # behat_hooks::i_look_for_exceptions()
And I follow "Subscribe to this forum" # behat_hooks::i_look_for_exceptions()
And I should see "Student One will be notified of new posts in 'Test forum name'" # behat_hooks::i_look_for_exceptions()
And I follow "Test post subject one" # behat_hooks::i_look_for_exceptions()
And I should see "Unsubscribe from this forum" # behat_hooks::i_look_for_exceptions()
And I should see "Unsubscribe from this discussion" # behat_hooks::i_look_for_exceptions()
And I follow "Unsubscribe from this forum" # behat_hooks::i_look_for_exceptions()
And I should see "Student One will NOT be notified of new posts in 'Test forum name'" # behat_hooks::i_look_for_exceptions()
And I follow "Test post subject one" # behat_hooks::i_look_for_exceptions()
And I should see "Subscribe to this forum" # behat_hooks::i_look_for_exceptions()
And I should see "Subscribe to this discussion" # behat_hooks::i_look_for_exceptions()
@core @core_availability
Feature: display_availability
In order to know which activities are available
As a user
I need to see appropriate availability restrictions for activities and sections
Background: # C:\Apache24\htdocs\integration\availability\tests\behat\display_availability.feature:25
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username |
| teacher1 |
| student1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
@javascript
Scenario: Activity availability display # C:\Apache24\htdocs\integration\availability\tests\behat\display_availability.feature:39
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
When I add a "Page" to section "1" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Page 1 |
| Description | Test |
| Page content | Test |
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I press "Add restriction..." # behat_hooks::i_look_for_exceptions()
And I click on "Date" "button" in the "Add restriction..." "dialogue" # behat_hooks::i_look_for_exceptions()
And I set the field "direction" to "until" # behat_hooks::i_look_for_exceptions()
And I set the field "x[year]" to "2013" # behat_hooks::i_look_for_exceptions()
And I set the field "x[month]" to "March" # behat_hooks::i_look_for_exceptions()
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
And I add a "Page" to section "2" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Page 2 |
| Description | Test |
| Page content | Test |
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I press "Add restriction..." # behat_hooks::i_look_for_exceptions()
And I click on "Date" "button" in the "Add restriction..." "dialogue" # behat_hooks::i_look_for_exceptions()
And I set the field "direction" to "until" # behat_hooks::i_look_for_exceptions()
And I set the field "x[year]" to "2013" # behat_hooks::i_look_for_exceptions()
And I set the field "x[month]" to "March" # behat_hooks::i_look_for_exceptions()
And I click on ".availability-item .availability-eye img" "css_element" # behat_hooks::i_look_for_exceptions()
And I press "Add restriction..." # behat_hooks::i_look_for_exceptions()
And I click on "User profile" "button" in the "Add restriction..." "dialogue" # behat_hooks::i_look_for_exceptions()
And I set the field "User profile field" to "Email address" # behat_hooks::i_look_for_exceptions()
And I set the field "Value to compare against" to "email@example.com" # behat_hooks::i_look_for_exceptions()
And I set the field "Method of comparison" to "is equal to" # behat_hooks::i_look_for_exceptions()
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
And I add a "Page" to section "3" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Page 3 |
| Description | Test |
| Page content | Test |
Then I should see "Available until" in the "#section-1 .availabilityinfo" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "2013" in the "#section-1 .availabilityinfo" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "2013" in the "#section-1 .availabilityinfo" "css_element" # behat_hooks::i_look_for_exceptions()
And "li" "css_element" should not exist in the "#section-1 .availabilityinfo" "css_element" # behat_hooks::i_look_for_exceptions()
And "li" "css_element" should exist in the "#section-2 .availabilityinfo" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Not available unless:" in the "#section-2 .availabilityinfo" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "It is before" in the "#section-2 .availabilityinfo" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "hidden otherwise" in the "#section-2 .availabilityinfo" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Email address" in the "#section-2 .availabilityinfo" "css_element" # behat_hooks::i_look_for_exceptions()
And "#section-3 .availabilityinfo" "css_element" should not exist # behat_hooks::i_look_for_exceptions()
Given I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then I should see "Page 1" in the "#section-1 .dimmed_text" "css_element" # behat_hooks::i_look_for_exceptions()
And ".activityinstance a" "css_element" should not exist in the "Topic 1" "section" # behat_hooks::i_look_for_exceptions()
And I should see "Available until" in the "Topic 1" "section" # behat_hooks::i_look_for_exceptions()
And I should not see "Page 2" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I should see "Page 3" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And ".activityinstance a" "css_element" should exist in the "Topic 3" "section" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Section availability display # C:\Apache24\htdocs\integration\availability\tests\behat\display_availability.feature:123
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
When I edit the section "1" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I press "Add restriction..." # behat_hooks::i_look_for_exceptions()
And I click on "Date" "button" in the "Add restriction..." "dialogue" # behat_hooks::i_look_for_exceptions()
And I set the field "direction" to "until" # behat_hooks::i_look_for_exceptions()
And I set the field "x[year]" to "2013" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
When I edit the section "2" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I press "Add restriction..." # behat_hooks::i_look_for_exceptions()
And I click on "Date" "button" in the "Add restriction..." "dialogue" # behat_hooks::i_look_for_exceptions()
And I set the field "direction" to "until" # behat_hooks::i_look_for_exceptions()
And I set the field "x[year]" to "2013" # behat_hooks::i_look_for_exceptions()
And I click on ".availability-item .availability-eye img" "css_element" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I add a "Page" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Page 1 |
| Description | Test |
| Page content | Test |
And I add a "Page" to section "2" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Page 2 |
| Description | Test |
| Page content | Test |
And I add a "Page" to section "3" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Page 3 |
| Description | Test |
| Page content | Test |
Then I should see "Available until" in the "#section-1 .availabilityinfo" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Available until" in the "#section-2 .availabilityinfo" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "hidden otherwise" in the "#section-2 .availabilityinfo" "css_element" # behat_hooks::i_look_for_exceptions()
Given I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then I should not see "Page 1" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I should not see "Page 2" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I should see "Page 3" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I should see "Topic 1" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I should see "Available until" in the "#section-1 .availabilityinfo" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Topic 2" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
@mod @mod_assign
Feature: Check that the assignment grade can not be input in a wrong format.
In order to ensure that the grade is entered in the right format
As a teacher
I need to grade a student and ensure that the grade should be correctly entered
@javascript
Scenario: Error in the decimal separator , # C:\Apache24\htdocs\integration\mod\assign\tests\behat\display_error_message_onbadformat.feature:8
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student10@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "groups" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| Group 1 | C1 | G1 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment name |
| Description | Test assignment description |
| Use marking workflow | Yes |
When I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
Then I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I click on "Grade" "link" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the field "Grade out of 100" to "50,,6" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "The grade provided could not be understood: 50,,6" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Error in the decimal separator . # C:\Apache24\htdocs\integration\mod\assign\tests\behat\display_error_message_onbadformat.feature:38
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student10@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "groups" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| Group 1 | C1 | G1 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment name |
| Description | Test assignment description |
| Use marking workflow | Yes |
When I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
Then I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I click on "Grade" "link" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the field "Grade out of 100" to "50..6" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "The grade provided could not be understood: 50..6" # behat_hooks::i_look_for_exceptions()
@mod @mod_assign
Feature: Check that the assignment grade can be updated correctly
In order to ensure that the grade is shown correctly in the grading table
As a teacher
I need to grade a student and ensure the grade is shown correctly
@javascript
Scenario: Update the grade for an assignment # C:\Apache24\htdocs\integration\mod\assign\tests\behat\display_grade.feature:8
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student10@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "groups" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| Group 1 | C1 | G1 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment name |
| Description | Test assignment description |
| Use marking workflow | Yes |
When I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
Then I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I click on "Grade" "link" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the field "Grade out of 100" to "50" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Ok" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And "Student 1" row "Grade" column of "generaltable" table should contain "50.00" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Update the grade for a team assignment # C:\Apache24\htdocs\integration\mod\assign\tests\behat\display_grade.feature:42
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student10@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "groups" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| Group 1 | C1 | G1 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment name |
| Description | Test assignment description |
| Use marking workflow | Yes |
| Students submit in groups | Yes |
| Group mode | No groups |
When I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
Then I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I click on "Grade" "link" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the field "Grade out of 100" to "50" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Ok" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And "Student 1" row "Grade" column of "generaltable" table should contain "50.00" # behat_hooks::i_look_for_exceptions()
@block @block_news_items
Feature: Latest announcements block displays the course latest news
In order to be aware of the course announcements
As a user
I need to see the latest announcements block in the main course page
@javascript
Scenario: Latest course announcements are displayed and can be configured # C:\Apache24\htdocs\integration\blocks\news_items\tests\behat\display_news.feature:8
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I create a course with: # behat_hooks::i_look_for_exceptions()
| Course full name | Course 1 |
| Course short name | C1 |
| News items to show | 5 |
And I enrol "Teacher 1" user as "Teacher" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Latest announcements" block # behat_hooks::i_look_for_exceptions()
And I turn editing mode off # behat_hooks::i_look_for_exceptions()
When I add a new topic to "Announcements" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Discussion One |
| Message | Not important |
And I add a new topic to "Announcements" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Discussion Two |
| Message | Not important |
And I add a new topic to "Announcements" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Discussion Three |
| Message | Not important |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then I should see "Discussion One" in the "Latest announcements" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Discussion Two" in the "Latest announcements" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Discussion Three" in the "Latest announcements" "block" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| News items to show | 2 |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I should not see "Discussion One" in the "Latest announcements" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Discussion Two" in the "Latest announcements" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Discussion Three" in the "Latest announcements" "block" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| News items to show | 0 |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And "Latest announcements" "block" should not exist # behat_hooks::i_look_for_exceptions()
@mod @mod_resource @_file_upload
Feature: Teacher can specify different display options for the resource
In order to provide more information about a file
As a teacher
I need to be able to show size, type and modified date
Background: # C:\Apache24\htdocs\integration\mod\resource\tests\behat\display_resource.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Specifying no additional display options for a file resource # C:\Apache24\htdocs\integration\mod\resource\tests\behat\display_resource.feature:24
When I add a "File" to section "1" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Myfile |
| Show size | 0 |
| Show type | 0 |
| Show upload/modified date | 0 |
And I upload "mod/resource/tests/fixtures/samplefile.txt" file to "Select files" filemanager # behat_hooks::i_look_for_exceptions()
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
Then ".resourcedetails" "css_element" should not exist # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And ".activity.resource .resourcelinkdetails" "css_element" should not exist # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario Outline: Specifying different display options for a file resource # C:\Apache24\htdocs\integration\mod\resource\tests\behat\display_resource.feature:39
When I add a "File" to section "1" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Myfile |
| Display | Open |
| Show size | |
| Show type | |
| Show upload/modified date | |
And I upload "mod/resource/tests/fixtures/samplefile.txt" file to "Select files" filemanager # behat_hooks::i_look_for_exceptions()
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
Then I see "6 bytes" in the ".resourcedetails" "css_element" # behat_hooks::i_look_for_exceptions()
And I see "Text file" in the ".resourcedetails" "css_element" # behat_hooks::i_look_for_exceptions()
And I see "Uploaded" in the ".resourcedetails" "css_element" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I see "6 bytes" in the ".activity.resource .resourcelinkdetails" "css_element" # behat_hooks::i_look_for_exceptions()
And I see "Text file" in the ".activity.resource .resourcelinkdetails" "css_element" # behat_hooks::i_look_for_exceptions()
And I see "Uploaded" in the ".activity.resource .resourcelinkdetails" "css_element" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Examples:
| showsize | showtype | showdate | seesize | seetype | seedate |
| 1 | 0 | 0 | should | should not | should not |
| 0 | 1 | 0 | should not | should | should not |
| 0 | 0 | 1 | should not | should not | should |
| 1 | 1 | 0 | should | should | should not |
| 1 | 0 | 1 | should | should not | should |
| 0 | 1 | 1 | should not | should | should |
| 1 | 1 | 1 | should | should | should |
@core @core_admin
Feature: Display extended course names
In order to display more info about the courses
As an admin
I need to display courses short names along with courses full names
Background: # C:\Apache24\htdocs\integration\admin\tests\behat\display_short_names.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course fullname | C_shortname | 0 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
Scenario: Courses list without extended course names (default value) # C:\Apache24\htdocs\integration\admin\tests\behat\display_short_names.feature:14
Then I should see "Course fullname" # behat_hooks::i_look_for_exceptions()
And I should not see "C_shortname Course fullname" # behat_hooks::i_look_for_exceptions()
Scenario: Courses list with extended course names # C:\Apache24\htdocs\integration\admin\tests\behat\display_short_names.feature:18
Given I expand "Site administration" node # behat_hooks::i_look_for_exceptions()
And I click on "Courses" "link" in the "//div[@id='settingsnav']/descendant::li[contains(concat(' ', normalize-space(@class), ' '), ' type_setting ')][contains(., 'Appearance')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I set the field "Display extended course names" to "1" # behat_hooks::i_look_for_exceptions()
When I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
Then I should see "C_shortname Course fullname" # behat_hooks::i_look_for_exceptions()
@core @core_backup
Feature: Duplicate activities
In order to set up my course contents quickly
As a teacher
I need to duplicate activities inside the same course
Scenario: Duplicate an activity # C:\Apache24\htdocs\integration\backup\util\ui\tests\behat\duplicate_activities.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Database" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Test database name |
| Description | Test database description |
And I duplicate "Test database name" activity # behat_hooks::i_look_for_exceptions()
And I wait until section "1" is available # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Test database name" activity # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Original database name |
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Test database name" activity # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Duplicated database name |
| Description | Duplicated database description |
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
Then I should see "Original database name" in the "Topic 1" "section" # behat_hooks::i_look_for_exceptions()
And I should see "Duplicated database name" in the "Topic 1" "section" # behat_hooks::i_look_for_exceptions()
And "Original database name" "link" should appear before "Duplicated database name" "link" # behat_hooks::i_look_for_exceptions()
@mod @mod_lesson
Feature: In a lesson activity, a teacher can duplicate a lesson page
In order to duplicate a lesson page
As a teacher
I need to add content to a lesson
Background: # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\duplicate_lesson_page.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Manage private files" # behat_hooks::i_look_for_exceptions()
And I upload "mod/lesson/tests/fixtures/moodle_logo.jpg" file to "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I click on "Save changes" "button" # behat_hooks::i_look_for_exceptions()
When I am on homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Lesson" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Test lesson name |
| Description | Test lesson description |
@javascript
Scenario: Duplicate content page with an image. # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\duplicate_lesson_page.feature:31
Given I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I follow "Add a content page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | First page name |
| Page contents | First page contents |
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | Previous page |
| id_jumpto_1 | Previous page |
And I select the text in the "id_contents_editor" Atto editor # behat_hooks::i_look_for_exceptions()
And I click on "Image" "button" in the "[data-fieldtype=editor]" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Browse repositories..." "button" # behat_hooks::i_look_for_exceptions()
And I click on "Private files" "link" in the ".fp-repo-area" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "moodle_logo.jpg" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Select this file" "button" # behat_hooks::i_look_for_exceptions()
And I set the field "Describe this image for someone who cannot see it" to "It's the logo" # behat_hooks::i_look_for_exceptions()
And I click on "Save image" "button" # behat_hooks::i_look_for_exceptions()
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I follow "Duplicate page: First page name" # behat_hooks::i_look_for_exceptions()
And I should see "Inserted page: First page name" # behat_hooks::i_look_for_exceptions()
And I follow "Update page: First page name" # behat_hooks::i_look_for_exceptions()
And I set the field "Page title" to "Introduction page" # behat_hooks::i_look_for_exceptions()
And I press "Save page" # behat_hooks::i_look_for_exceptions()
When I follow "Update page: First page name" # behat_hooks::i_look_for_exceptions()
And I should see "First page name" # behat_hooks::i_look_for_exceptions()
Then "//*[contains(@id, 'id_contents_editor')]//img[contains(@src, 'moodle_logo.jpg')]" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Duplicate question page with image in answer. # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\duplicate_lesson_page.feature:61
Given I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I follow "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True false with an image in the answer |
| Page contents | Select the picture |
| id_answer_editor_0 | To be replaced |
| id_response_editor_0 | Correct answer |
| id_jumpto_0 | End of lesson |
| id_score_0 | 1 |
| id_answer_editor_1 | 1 |
| id_response_editor_1 | Incorrect answer |
| id_jumpto_1 | This page |
| id_score_1 | 0 |
And I select the text in the "id_answer_editor_0" Atto editor # behat_hooks::i_look_for_exceptions()
And I click on "Image" "button" in the "//*[@id='id_answer_editor_0']/ancestor::*[@data-fieldtype='editor']" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I click on "Browse repositories..." "button" # behat_hooks::i_look_for_exceptions()
And I click on "Private files" "link" in the ".fp-repo-area" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "moodle_logo.jpg" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Select this file" "button" # behat_hooks::i_look_for_exceptions()
And I set the field "Describe this image for someone who cannot see it" to "It's the logo" # behat_hooks::i_look_for_exceptions()
And I click on "Save image" "button" # behat_hooks::i_look_for_exceptions()
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I follow "Duplicate page: True false with an image in the answer" # behat_hooks::i_look_for_exceptions()
And I should see "Inserted page: True false with an image in the answer" # behat_hooks::i_look_for_exceptions()
And I follow "Update page: True false with an image in the answer" # behat_hooks::i_look_for_exceptions()
And I set the field "Page title" to "First true false" # behat_hooks::i_look_for_exceptions()
And I press "Save page" # behat_hooks::i_look_for_exceptions()
When I follow "Update page: True false with an image in the answer" # behat_hooks::i_look_for_exceptions()
And I should see "True false with an image in the answer" # behat_hooks::i_look_for_exceptions()
And I should see "Select the picture" # behat_hooks::i_look_for_exceptions()
Then "//*[contains(@id, 'id_answer_editor_0')]//img[contains(@src, 'moodle_logo.jpg')]" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Duplicate question page with image in feedback. # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\duplicate_lesson_page.feature:98
Given I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I follow "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True false with an image in the feedback |
| Page contents | Select the picture |
| id_answer_editor_0 | To be replaced |
| id_response_editor_0 | Correct answer |
| id_jumpto_0 | End of lesson |
| id_score_0 | 1 |
| id_answer_editor_1 | 1 |
| id_response_editor_1 | Incorrect answer |
| id_jumpto_1 | This page |
| id_score_1 | 0 |
And I select the text in the "id_response_editor_0" Atto editor # behat_hooks::i_look_for_exceptions()
And I click on "Image" "button" in the "//*[@id='id_response_editor_0']/ancestor::*[@data-fieldtype='editor']" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I click on "Browse repositories..." "button" # behat_hooks::i_look_for_exceptions()
And I click on "Private files" "link" in the ".fp-repo-area" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "moodle_logo.jpg" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Select this file" "button" # behat_hooks::i_look_for_exceptions()
And I set the field "Describe this image for someone who cannot see it" to "It's the logo" # behat_hooks::i_look_for_exceptions()
And I click on "Save image" "button" # behat_hooks::i_look_for_exceptions()
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I follow "Duplicate page: True false with an image in the feedback" # behat_hooks::i_look_for_exceptions()
And I should see "Inserted page: True false with an image in the feedback" # behat_hooks::i_look_for_exceptions()
And I follow "Update page: True false with an image in the feedback" # behat_hooks::i_look_for_exceptions()
And I set the field "Page title" to "First true false" # behat_hooks::i_look_for_exceptions()
And I press "Save page" # behat_hooks::i_look_for_exceptions()
When I follow "Update page: True false with an image in the feedback" # behat_hooks::i_look_for_exceptions()
And I should see "True false with an image in the feedback" # behat_hooks::i_look_for_exceptions()
And I should see "Select the picture" # behat_hooks::i_look_for_exceptions()
Then "//*[contains(@id, 'id_response_editor_0')]//img[contains(@src, 'moodle_logo.jpg')]" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
@block @block_main_menu
Feature: Edit activities in main menu block
In order to use main menu block
As an admin
I need to add and edit activities there
@javascript
Scenario: Edit name of acitivity in-place in site main menu block # C:\Apache24\htdocs\integration\blocks\site_main_menu\tests\behat\edit_activities.feature:8
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I navigate to "Turn editing on" node in "Front page settings" # behat_hooks::i_look_for_exceptions()
And I add the "Main menu" block # behat_hooks::i_look_for_exceptions()
When I add a "Forum" to section "0" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | My forum name |
And I click on "Edit title" "link" in the "//*[contains(@class,'block_site_main_menu')]//li[contains(.,'My forum name')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I set the field "New name for activity My forum name" to "New forum name" # behat_hooks::i_look_for_exceptions()
And I press key "13" in the field "New name for activity My forum name" # behat_hooks::i_look_for_exceptions()
Then I should not see "My forum name" # behat_hooks::i_look_for_exceptions()
And I should see "New forum name" # behat_hooks::i_look_for_exceptions()
And I follow "New forum name" # behat_hooks::i_look_for_exceptions()
And I should not see "My forum name" # behat_hooks::i_look_for_exceptions()
And I should see "New forum name" # behat_hooks::i_look_for_exceptions()
@block @block_social_activities
Feature: Edit activities in social activities block
In order to use social activities block
As a teacher
I need to add and edit activities there
@javascript
Scenario: Edit name of acitivity in-place in social activities block # C:\Apache24\htdocs\integration\blocks\social_activities\tests\behat\edit_activities.feature:8
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | social |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname |
| user1 | User | One |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| user1 | C1 | editingteacher |
Given I log in as "user1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I set the field "Add an activity to section 'section 0'" to "Forum" # behat_hooks::i_look_for_exceptions()
And I set the field "Forum name" to "My forum name" # behat_hooks::i_look_for_exceptions()
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
And I click on "Edit title" "link" in the "//*[contains(@class,'block_social_activities')]//li[contains(.,'My forum name')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I set the field "New name for activity My forum name" to "New forum name" # behat_hooks::i_look_for_exceptions()
And I press key "13" in the field "New name for activity My forum name" # behat_hooks::i_look_for_exceptions()
Then I should not see "My forum name" in the "Social activities" "block" # behat_hooks::i_look_for_exceptions()
And I should see "New forum name" # behat_hooks::i_look_for_exceptions()
And I follow "New forum name" # behat_hooks::i_look_for_exceptions()
And I should not see "My forum name" # behat_hooks::i_look_for_exceptions()
And I should see "New forum name" # behat_hooks::i_look_for_exceptions()
@core @core_availability
Feature: edit_availability
In order to control which students can see activities
As a teacher
I need to set up availability options for activities and sections
Background: # C:\Apache24\htdocs\integration\availability\tests\behat\edit_availability.feature:18
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username |
| teacher1 |
| student1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
Scenario: Confirm the 'enable availability' option is working # C:\Apache24\htdocs\integration\availability\tests\behat\edit_availability.feature:31
Given the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| enableavailability | 0 |
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Page" to section "1" # behat_hooks::i_look_for_exceptions()
Then "Restrict access" "fieldset" should not exist # behat_hooks::i_look_for_exceptions()
Given I follow "C1" # behat_hooks::i_look_for_exceptions()
When I edit the section "1" # behat_hooks::i_look_for_exceptions()
Then "Restrict access" "fieldset" should not exist # behat_hooks::i_look_for_exceptions()
And the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| enableavailability | 1 |
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I add a "Page" to section "1" # behat_hooks::i_look_for_exceptions()
Then "Restrict access" "fieldset" should exist # behat_hooks::i_look_for_exceptions()
Given I follow "C1" # behat_hooks::i_look_for_exceptions()
When I edit the section "1" # behat_hooks::i_look_for_exceptions()
Then "Restrict access" "fieldset" should exist # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Edit availability using settings in activity form # C:\Apache24\htdocs\integration\availability\tests\behat\edit_availability.feature:58
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Page" to section "1" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
Then I should see "None" in the "Restrict access" "fieldset" # behat_hooks::i_look_for_exceptions()
When I click on "Add restriction..." "button" # behat_hooks::i_look_for_exceptions()
Then "Add restriction..." "dialogue" should be visible # behat_hooks::i_look_for_exceptions()
When I click on "Date" "button" in the "Add restriction..." "dialogue" # behat_hooks::i_look_for_exceptions()
Then "Add restriction..." "dialogue" should not exist # behat_hooks::i_look_for_exceptions()
And I should not see "None" in the "Restrict access" "fieldset" # behat_hooks::i_look_for_exceptions()
And "Restriction type" "select" should be visible # behat_hooks::i_look_for_exceptions()
And I should see "Date" in the "Restrict access" "fieldset" # behat_hooks::i_look_for_exceptions()
And ".availability-item .availability-eye img" "css_element" should be visible # behat_hooks::i_look_for_exceptions()
And ".availability-item .availability-delete img" "css_element" should be visible # behat_hooks::i_look_for_exceptions()
And the "alt" attribute of ".availability-item .availability-eye img" "css_element" should contain "Displayed greyed-out" # behat_hooks::i_look_for_exceptions()
When I click on ".availability-item .availability-eye img" "css_element" # behat_hooks::i_look_for_exceptions()
Then the "alt" attribute of ".availability-item .availability-eye img" "css_element" should contain "Hidden entirely" # behat_hooks::i_look_for_exceptions()
When I click on ".availability-item .availability-eye img" "css_element" # behat_hooks::i_look_for_exceptions()
Then the "alt" attribute of ".availability-item .availability-eye img" "css_element" should contain "Displayed greyed-out" # behat_hooks::i_look_for_exceptions()
When I click on ".availability-item .availability-delete img" "css_element" # behat_hooks::i_look_for_exceptions()
Then I should not see "Date" in the "Restrict access" "fieldset" # behat_hooks::i_look_for_exceptions()
When I click on "Add restriction..." "button" # behat_hooks::i_look_for_exceptions()
And I click on "Restriction set" "button" in the "Add restriction..." "dialogue" # behat_hooks::i_look_for_exceptions()
Then ".availability-children .availability-list" "css_element" should be visible # behat_hooks::i_look_for_exceptions()
And I should see "None" in the ".availability-children .availability-list" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Please set" in the ".availability-children .availability-list" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Add restriction" in the ".availability-children .availability-list" "css_element" # behat_hooks::i_look_for_exceptions()
When I click on "Add restriction..." "button" in the ".availability-children .availability-list" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Date" "button" in the "Add restriction..." "dialogue" # behat_hooks::i_look_for_exceptions()
Then I should not see "None" in the ".availability-children .availability-list" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Please set" in the ".availability-children .availability-list" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Date" in the ".availability-children .availability-list" "css_element" # behat_hooks::i_look_for_exceptions()
When I click on ".availability-item .availability-delete img" "css_element" in the ".availability-item" "css_element" # behat_hooks::i_look_for_exceptions()
Then I should not see "Date" in the ".availability-children .availability-list" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "None" in the ".availability-children .availability-list" "css_element" # behat_hooks::i_look_for_exceptions()
When I click on ".availability-none .availability-delete img" "css_element" # behat_hooks::i_look_for_exceptions()
Then ".availability-children .availability-list" "css_element" should not exist # behat_hooks::i_look_for_exceptions()
When I click on "Add restriction..." "button" # behat_hooks::i_look_for_exceptions()
And I click on "Date" "button" in the "Add restriction..." "dialogue" # behat_hooks::i_look_for_exceptions()
And I click on "Add restriction..." "button" # behat_hooks::i_look_for_exceptions()
And I click on "Date" "button" in the "Add restriction..." "dialogue" # behat_hooks::i_look_for_exceptions()
Then I should see "and" in the "Restrict access" "fieldset" # behat_hooks::i_look_for_exceptions()
And "Required restrictions" "select" should be visible # behat_hooks::i_look_for_exceptions()
When I set the field "Required restrictions" to "any" # behat_hooks::i_look_for_exceptions()
Then I should not see "and" in the "Restrict access" "fieldset" # behat_hooks::i_look_for_exceptions()
And I should see "or" in the "Restrict access" "fieldset" # behat_hooks::i_look_for_exceptions()
When I click on ".availability-item .availability-delete img" "css_element" # behat_hooks::i_look_for_exceptions()
Then I should not see "or" in the "Restrict access" "fieldset" # behat_hooks::i_look_for_exceptions()
When I click on "Add restriction..." "button" # behat_hooks::i_look_for_exceptions()
And I click on "Restriction set" "button" in the "Add restriction..." "dialogue" # behat_hooks::i_look_for_exceptions()
And I click on "Add restriction..." "button" in the ".availability-children .availability-list" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Date" "button" in the "Add restriction..." "dialogue" # behat_hooks::i_look_for_exceptions()
And I click on "Add restriction..." "button" in the ".availability-children .availability-list" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Date" "button" in the "Add restriction..." "dialogue" # behat_hooks::i_look_for_exceptions()
Then I should see "and" in the ".availability-children .availability-list .availability-connector" "css_element" # behat_hooks::i_look_for_exceptions()
When I set the field "Required restrictions" to "all" # behat_hooks::i_look_for_exceptions()
Then I should not see "or" in the "Restrict access" "fieldset" # behat_hooks::i_look_for_exceptions()
When I set the field "Required restrictions" to "any" # behat_hooks::i_look_for_exceptions()
Then I should see "or" in the "Restrict access" "fieldset" # behat_hooks::i_look_for_exceptions()
And I should not see "or" in the ".availability-children .availability-list .availability-connector" "css_element" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Edit availability using settings in section form # C:\Apache24\htdocs\integration\availability\tests\behat\edit_availability.feature:149
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
When I edit the section "1" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
Then I should see "None" in the "Restrict access" "fieldset" # behat_hooks::i_look_for_exceptions()
When I click on "Add restriction..." "button" # behat_hooks::i_look_for_exceptions()
When I click on "Date" "button" in the "Add restriction..." "dialogue" # behat_hooks::i_look_for_exceptions()
And I should not see "None" in the "Restrict access" "fieldset" # behat_hooks::i_look_for_exceptions()
And "Restriction type" "select" should be visible # behat_hooks::i_look_for_exceptions()
And I should see "Date" in the "Restrict access" "fieldset" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: 'Add group/grouping access restriction' button unavailable # C:\Apache24\htdocs\integration\availability\tests\behat\edit_availability.feature:169
Given the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| enableavailability | 0 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Forum" to section "1" # behat_hooks::i_look_for_exceptions()
When I expand all fieldsets # behat_hooks::i_look_for_exceptions()
Then "Add group/grouping access restriction" "button" should not exist # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Use the 'Add group/grouping access restriction' button # C:\Apache24\htdocs\integration\availability\tests\behat\edit_availability.feature:182
Given the following "groupings" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| GX1 | C1 | GXI1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Forum" to section "1" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Forum name | MyForum |
| Description | x |
When I expand all fieldsets # behat_hooks::i_look_for_exceptions()
Then the "Add group/grouping access restriction" "button" should be disabled # behat_hooks::i_look_for_exceptions()
And I set the field "Group mode" to "Separate groups" # behat_hooks::i_look_for_exceptions()
And the "Add group/grouping access restriction" "button" should be enabled # behat_hooks::i_look_for_exceptions()
And I should see "None" in the "Restrict access" "fieldset" # behat_hooks::i_look_for_exceptions()
And I press "Add group/grouping access restriction" # behat_hooks::i_look_for_exceptions()
And I should see "Group" in the "Restrict access" "fieldset" # behat_hooks::i_look_for_exceptions()
And the "Add group/grouping access restriction" "button" should be disabled # behat_hooks::i_look_for_exceptions()
And I click on "Delete" "link" in the "Restrict access" "fieldset" # behat_hooks::i_look_for_exceptions()
And the "Add group/grouping access restriction" "button" should be enabled # behat_hooks::i_look_for_exceptions()
And I set the field "Grouping" to "GX1" # behat_hooks::i_look_for_exceptions()
And I press "Add group/grouping access restriction" # behat_hooks::i_look_for_exceptions()
And I should see "Grouping" in the "Restrict access" "fieldset" # behat_hooks::i_look_for_exceptions()
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Forum administration" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And the "Add group/grouping access restriction" "button" should be disabled # behat_hooks::i_look_for_exceptions()
And I should see "Grouping" in the "Restrict access" "fieldset" # behat_hooks::i_look_for_exceptions()
And I click on "Delete" "link" in the "Restrict access" "fieldset" # behat_hooks::i_look_for_exceptions()
And the "Add group/grouping access restriction" "button" should be enabled # behat_hooks::i_look_for_exceptions()
@editor @editor_tinymce @javascript
Feature: Add or remove items from the TinyMCE editor toolbar
In order to customize the TinyMCE editor appearance
As an admin
I need to add and remove items from the toolbar
Background: # C:\Apache24\htdocs\integration\lib\editor\tinymce\tests\behat\edit_available_icons.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I follow "Preferences" in the user menu # behat_hooks::i_look_for_exceptions()
And I follow "Editor preferences" # behat_hooks::i_look_for_exceptions()
And I set the field "Text editor" to "TinyMCE HTML editor" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Home" # behat_hooks::i_look_for_exceptions()
Scenario: Remove icons # C:\Apache24\htdocs\integration\lib\editor\tinymce\tests\behat\edit_available_icons.feature:18
When the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| customtoolbar | fontselect,fontsizeselect,formatselect,|,undo,redo,|,search,replace,|,fullscreen | editor_tinymce |
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Database" to section "1" # behat_hooks::i_look_for_exceptions()
Then "#id_introeditor_tbl .mce_bold" "css_element" should not exist # behat_hooks::i_look_for_exceptions()
And "#id_introeditor_tbl .mce_fullscreen" "css_element" should exist # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
Scenario: Add icons # C:\Apache24\htdocs\integration\lib\editor\tinymce\tests\behat\edit_available_icons.feature:29
When the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| customtoolbar | fontselect,fontsizeselect,formatselect,|,undo,redo,|,search,replace,|,fullscreen,anchor | editor_tinymce |
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Database" to section "1" # behat_hooks::i_look_for_exceptions()
Then "#id_introeditor_tbl .mce_bold" "css_element" should not exist # behat_hooks::i_look_for_exceptions()
And "#id_introeditor_tbl .mce_anchor" "css_element" should exist # behat_hooks::i_look_for_exceptions()
And the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| customtoolbar | fontselect,fontsizeselect,formatselect,|,undo,redo,|,search,replace,|,fullscreen | editor_tinymce |
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I add a "Database" to section "1" # behat_hooks::i_look_for_exceptions()
And "#id_introeditor_tbl .mce_anchor" "css_element" should not exist # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
Scenario: Default icons # C:\Apache24\htdocs\integration\lib\editor\tinymce\tests\behat\edit_available_icons.feature:46
And I am on site homepage # behat_hooks::i_look_for_exceptions()
Given I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
When I add a "Database" to section "1" # behat_hooks::i_look_for_exceptions()
And I wait until "#id_introeditor_tbl" "css_element" exists # behat_hooks::i_look_for_exceptions()
Then "#id_introeditor_tbl .mce_bold" "css_element" should exist # behat_hooks::i_look_for_exceptions()
And "#id_introeditor_tbl .mce_anchor" "css_element" should not exist # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
@qtype @qtype_ddimageortext
Feature: Test editing a drag and drop onto image questions
As a teacher
In order to be able to update my drag and drop onto image questions
I need to edit them
Background: # C:\Apache24\htdocs\integration\question\type\ddimageortext\tests\behat\edit.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | template |
| Test questions | ddimageortext | Drag onto image | xsection |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Question bank" node in "Course administration" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Edit a drag and drop onto image question # C:\Apache24\htdocs\integration\question\type\ddimageortext\tests\behat\edit.feature:28
When I click on "Edit" "link" in the "Drag onto image" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Question name | Edited question name |
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Edited question name" # behat_hooks::i_look_for_exceptions()
@qtype @qtype_ddmarker
Feature: Test editing a drag and drop markers questions
As a teacher
In order to be able to update my drag and drop markers questions
I need to edit them
Background: # C:\Apache24\htdocs\integration\question\type\ddmarker\tests\behat\edit.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | template |
| Test questions | ddmarker | Drag markers | mkmap |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Question bank" node in "Course administration" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Edit a drag and drop markers question # C:\Apache24\htdocs\integration\question\type\ddmarker\tests\behat\edit.feature:28
When I click on "Edit" "link" in the "Drag markers" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Question name | Edited question name |
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Edited question name" # behat_hooks::i_look_for_exceptions()
@qtype @qtype_ddwtos
Feature: Test editing a drag and drop into text questions
As a teacher
In order to be able to update my drag and drop into text questions
I need to edit them
Background: # C:\Apache24\htdocs\integration\question\type\ddwtos\tests\behat\edit.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | template |
| Test questions | ddwtos | Drag to text | fox |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Question bank" node in "Course administration" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Edit a drag and drop into text question # C:\Apache24\htdocs\integration\question\type\ddwtos\tests\behat\edit.feature:28
When I click on "Edit" "link" in the "Drag to text" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Question name | Edited question name |
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Edited question name" # behat_hooks::i_look_for_exceptions()
@qtype @qtype_description
Feature: Test editing a Description question
As a teacher
In order to be able to update my Description question
I need to edit them
Background: # C:\Apache24\htdocs\integration\question\type\description\tests\behat\edit.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | template |
| Test questions | description | description-001 | info |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Question bank" node in "Course administration" # behat_hooks::i_look_for_exceptions()
Scenario: Edit a Description question # C:\Apache24\htdocs\integration\question\type\description\tests\behat\edit.feature:27
When I click on "Edit" "link" in the "description-001" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Question name | |
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "You must supply a value here." # behat_hooks::i_look_for_exceptions()
When I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Question name | Edited description-001 name |
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Edited description-001 name" # behat_hooks::i_look_for_exceptions()
@qtype @qtype_essay
Feature: Test editing an Essay question
As a teacher
In order to be able to update my Essay question
I need to edit them
Background: # C:\Apache24\htdocs\integration\question\type\essay\tests\behat\edit.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | template |
| Test questions | essay | essay-001 | editor |
| Test questions | essay | essay-002 | editorfilepicker |
| Test questions | essay | essay-003 | plain |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Question bank" node in "Course administration" # behat_hooks::i_look_for_exceptions()
Scenario: Edit an Essay question # C:\Apache24\htdocs\integration\question\type\essay\tests\behat\edit.feature:29
When I click on "Edit" "link" in the "essay-001" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Question name | |
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "You must supply a value here." # behat_hooks::i_look_for_exceptions()
When I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Question name | Edited essay-001 name |
| Response format | No inline text |
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "When \"no inline text\" is selected, or responses are optional, you must allow at least one attachment." # behat_hooks::i_look_for_exceptions()
When I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Response format | Plain text |
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Edited essay-001 name" # behat_hooks::i_look_for_exceptions()
@qtype @qtype_match
Feature: Test editing a Matching question
As a teacher
In order to be able to update my Matching question
I need to edit them
Background: # C:\Apache24\htdocs\integration\question\type\match\tests\behat\edit.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | template |
| Test questions | match | Matching for editing | foursubq |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Question bank" node in "Course administration" # behat_hooks::i_look_for_exceptions()
@javascript @_switch_window
Scenario: Edit a Matching question # C:\Apache24\htdocs\integration\question\type\match\tests\behat\edit.feature:28
When I click on "Edit" "link" in the "Matching for editing" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Question name | |
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "You must supply a value here." # behat_hooks::i_look_for_exceptions()
When I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Question name | Edited Matching name |
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Edited Matching name" # behat_hooks::i_look_for_exceptions()
When I click on "Edit" "link" in the "Edited Matching name" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Shuffle | 0 |
| Question 2 | dog |
| Question 4 | fly |
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Edited Matching name" # behat_hooks::i_look_for_exceptions()
When I click on "Preview" "link" in the "Edited Matching name" "table_row" # behat_hooks::i_look_for_exceptions()
And I switch to "questionpreview" window # behat_hooks::i_look_for_exceptions()
Then I should see "frog" # behat_hooks::i_look_for_exceptions()
And I should see "dog" # behat_hooks::i_look_for_exceptions()
And I should see "newt" # behat_hooks::i_look_for_exceptions()
And I should see "fly" # behat_hooks::i_look_for_exceptions()
@qtype @qtype_multichoice
Feature: Test editing a Multiple choice question
As a teacher
In order to be able to update my Multiple choice question
I need to edit them
Background: # C:\Apache24\htdocs\integration\question\type\multichoice\tests\behat\edit.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | template |
| Test questions | multichoice | Multiple choice for editing | two_of_four |
| Test questions | multichoice | Single choice for editing | one_of_four |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Question bank" node in "Course administration" # behat_hooks::i_look_for_exceptions()
Scenario: Edit a Multiple choice question with multiple response (checkboxes) # C:\Apache24\htdocs\integration\question\type\multichoice\tests\behat\edit.feature:28
When I click on "Edit" "link" in the "Multiple choice for editing" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Question name | |
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "You must supply a value here." # behat_hooks::i_look_for_exceptions()
When I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Question name | Edited Multiple choice name |
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Edited Multiple choice name" # behat_hooks::i_look_for_exceptions()
Scenario: Edit a Multiple choice question with single response (radio buttons) # C:\Apache24\htdocs\integration\question\type\multichoice\tests\behat\edit.feature:39
When I click on "Edit" "link" in the "Single choice for editing" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Question name | Edited Single choice name |
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Edited Single choice name" # behat_hooks::i_look_for_exceptions()
@qtype @qtype_shortanswer
Feature: Test editing a Short answer question
As a teacher
In order to be able to update my Short answer question
I need to edit them
Background: # C:\Apache24\htdocs\integration\question\type\shortanswer\tests\behat\edit.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | template |
| Test questions | shortanswer | shortanswer-001 for editing | frogtoad |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Question bank" node in "Course administration" # behat_hooks::i_look_for_exceptions()
@javascript @_switch_window
Scenario: Edit a Short answer question # C:\Apache24\htdocs\integration\question\type\shortanswer\tests\behat\edit.feature:28
When I click on "Edit" "link" in the "shortanswer-001 for editing" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Question name | |
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "You must supply a value here." # behat_hooks::i_look_for_exceptions()
When I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Question name | Edited shortanswer-001 name |
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Edited shortanswer-001 name" # behat_hooks::i_look_for_exceptions()
When I click on "Edit" "link" in the "Edited shortanswer-001 name" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_answer_1 | newt |
| id_fraction_1 | 70% |
| id_feedback_1 | Newt is an OK good answer. |
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Edited shortanswer-001 name" # behat_hooks::i_look_for_exceptions()
When I click on "Preview" "link" in the "Edited shortanswer-001 name" "table_row" # behat_hooks::i_look_for_exceptions()
And I switch to "questionpreview" window # behat_hooks::i_look_for_exceptions()
Then I should see "Name an amphibian:" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| behaviour | immediatefeedback |
And I press "Start again with these options" # behat_hooks::i_look_for_exceptions()
And I set the field with xpath "//div[@class='qtext']//input[contains(@id, '1_answer')]" to "newt" # behat_hooks::i_look_for_exceptions()
And I press "Check" # behat_hooks::i_look_for_exceptions()
Then I should see "Newt is an OK good answer." # behat_hooks::i_look_for_exceptions()
And I should see "Generalfeedback: frog or toad would have been OK." # behat_hooks::i_look_for_exceptions()
And I should see "The correct answer is: frog" # behat_hooks::i_look_for_exceptions()
@qtype @qtype_truefalse
Feature: Test editing a True/False question
As a teacher
In order to be able to update my True/False question
I need to edit them
Background: # C:\Apache24\htdocs\integration\question\type\truefalse\tests\behat\edit.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | template |
| Test questions | truefalse | true-false-001 | true |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Question bank" node in "Course administration" # behat_hooks::i_look_for_exceptions()
Scenario: Edit a True/False question # C:\Apache24\htdocs\integration\question\type\truefalse\tests\behat\edit.feature:27
When I click on "Edit" "link" in the "true-false-001" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Question name | |
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "You must supply a value here." # behat_hooks::i_look_for_exceptions()
When I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Question name | Edited true-false-001 name |
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Edited true-false-001 name" # behat_hooks::i_look_for_exceptions()
@format @format_topics
Feature: Sections can be edited and deleted in topics format
In order to rearrange my course contents
As a teacher
I need to edit and Delete topics
Background: # C:\Apache24\htdocs\integration\course\format\topics\tests\behat\edit_delete_sections.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format | coursedisplay | numsections |
| Course 1 | C1 | topics | 0 | 5 |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | section |
| assign | Test assignment name | Test assignment description | C1 | assign1 | 0 |
| book | Test book name | Test book description | C1 | book1 | 1 |
| chat | Test chat name | Test chat description | C1 | chat1 | 4 |
| choice | Test choice name | Test choice description | C1 | choice1 | 5 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
Scenario: View the default name of the general section in topics format # C:\Apache24\htdocs\integration\course\format\topics\tests\behat\edit_delete_sections.feature:27
When I click on "Edit section" "link" in the "li#section-0" "css_element" # behat_hooks::i_look_for_exceptions()
Then I should see "Use default section name [General]" # behat_hooks::i_look_for_exceptions()
Scenario: Edit the default name of the general section in topics format # C:\Apache24\htdocs\integration\course\format\topics\tests\behat\edit_delete_sections.feature:31
When I click on "Edit section" "link" in the "li#section-0" "css_element" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Use default section name | 0 |
| name | This is the general section |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "This is the general section" in the "li#section-0" "css_element" # behat_hooks::i_look_for_exceptions()
Scenario: View the default name of the second section in topics format # C:\Apache24\htdocs\integration\course\format\topics\tests\behat\edit_delete_sections.feature:39
When I click on "Edit topic" "link" in the "li#section-2" "css_element" # behat_hooks::i_look_for_exceptions()
Then I should see "Use default section name [Topic 2]" # behat_hooks::i_look_for_exceptions()
Scenario: Edit section summary in topics format # C:\Apache24\htdocs\integration\course\format\topics\tests\behat\edit_delete_sections.feature:43
When I edit the section "2" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Summary | Welcome to section 2 |
Then I should see "Welcome to section 2" in the "li#section-2" "css_element" # behat_hooks::i_look_for_exceptions()
Scenario: Edit section default name in topics format # C:\Apache24\htdocs\integration\course\format\topics\tests\behat\edit_delete_sections.feature:48
When I edit the section "2" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Use default section name | 0 |
| name | This is the second topic |
Then I should see "This is the second topic" in the "li#section-2" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Topic 2" in the "li#section-2" "css_element" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Inline edit section name in topics format # C:\Apache24\htdocs\integration\course\format\topics\tests\behat\edit_delete_sections.feature:56
When I click on "Edit topic name" "link" in the "li#section-1" "css_element" # behat_hooks::i_look_for_exceptions()
And I set the field "New name for topic Topic 1" to "Midterm evaluation" # behat_hooks::i_look_for_exceptions()
And I press key "13" in the field "New name for topic Topic 1" # behat_hooks::i_look_for_exceptions()
Then I should not see "Topic 1" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And "New name for topic" "field" should not exist # behat_hooks::i_look_for_exceptions()
And I should see "Midterm evaluation" in the "li#section-1" "css_element" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should not see "Topic 1" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I should see "Midterm evaluation" in the "li#section-1" "css_element" # behat_hooks::i_look_for_exceptions()
Scenario: Deleting the last section in topics format # C:\Apache24\htdocs\integration\course\format\topics\tests\behat\edit_delete_sections.feature:67
When I delete section "5" # behat_hooks::i_look_for_exceptions()
Then I should see "Are you absolutely sure you want to completely delete \"Topic 5\" and all the activities it contains?" # behat_hooks::i_look_for_exceptions()
And I press "Delete" # behat_hooks::i_look_for_exceptions()
And I should not see "Topic 5" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And the field "Number of sections" matches value "4" # behat_hooks::i_look_for_exceptions()
Scenario: Deleting the middle section in topics format # C:\Apache24\htdocs\integration\course\format\topics\tests\behat\edit_delete_sections.feature:76
When I delete section "4" # behat_hooks::i_look_for_exceptions()
And I press "Delete" # behat_hooks::i_look_for_exceptions()
Then I should not see "Topic 5" # behat_hooks::i_look_for_exceptions()
And I should not see "Test chat name" # behat_hooks::i_look_for_exceptions()
And I should see "Test choice name" in the "li#section-4" "css_element" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And the field "Number of sections" matches value "4" # behat_hooks::i_look_for_exceptions()
Scenario: Deleting the orphaned section in topics format # C:\Apache24\htdocs\integration\course\format\topics\tests\behat\edit_delete_sections.feature:86
When I follow "Reduce the number of sections" # behat_hooks::i_look_for_exceptions()
Then I should see "Orphaned activities (section 5)" in the "li#section-5" "css_element" # behat_hooks::i_look_for_exceptions()
And I delete section "5" # behat_hooks::i_look_for_exceptions()
And I press "Delete" # behat_hooks::i_look_for_exceptions()
And I should not see "Topic 5" # behat_hooks::i_look_for_exceptions()
And I should not see "Orphaned activities" # behat_hooks::i_look_for_exceptions()
And "li#section-5" "css_element" should not exist # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And the field "Number of sections" matches value "4" # behat_hooks::i_look_for_exceptions()
Scenario: Deleting a section when orphaned section is present in topics format # C:\Apache24\htdocs\integration\course\format\topics\tests\behat\edit_delete_sections.feature:98
When I follow "Reduce the number of sections" # behat_hooks::i_look_for_exceptions()
Then I should see "Orphaned activities (section 5)" in the "li#section-5" "css_element" # behat_hooks::i_look_for_exceptions()
And "li#section-5.orphaned" "css_element" should exist # behat_hooks::i_look_for_exceptions()
And "li#section-4.orphaned" "css_element" should not exist # behat_hooks::i_look_for_exceptions()
And I delete section "1" # behat_hooks::i_look_for_exceptions()
And I press "Delete" # behat_hooks::i_look_for_exceptions()
And I should not see "Test book name" # behat_hooks::i_look_for_exceptions()
And I should see "Orphaned activities (section 4)" in the "li#section-4" "css_element" # behat_hooks::i_look_for_exceptions()
And "li#section-5" "css_element" should not exist # behat_hooks::i_look_for_exceptions()
And "li#section-4.orphaned" "css_element" should exist # behat_hooks::i_look_for_exceptions()
And "li#section-3.orphaned" "css_element" should not exist # behat_hooks::i_look_for_exceptions()
@format @format_weeks
Feature: Sections can be edited and deleted in weeks format
In order to rearrange my course contents
As a teacher
I need to edit and Delete weeks
Background: # C:\Apache24\htdocs\integration\course\format\weeks\tests\behat\edit_delete_sections.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format | coursedisplay | numsections | startdate |
| Course 1 | C1 | weeks | 0 | 5 | 957139200 |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | section |
| assign | Test assignment name | Test assignment description | C1 | assign1 | 0 |
| book | Test book name | Test book description | C1 | book1 | 1 |
| chat | Test chat name | Test chat description | C1 | chat1 | 4 |
| choice | Test choice name | Test choice description | C1 | choice1 | 5 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
Scenario: View the default name of the general section in weeks format # C:\Apache24\htdocs\integration\course\format\weeks\tests\behat\edit_delete_sections.feature:27
When I click on "Edit section" "link" in the "li#section-0" "css_element" # behat_hooks::i_look_for_exceptions()
Then I should see "Use default section name [General]" # behat_hooks::i_look_for_exceptions()
Scenario: Edit the default name of the general section in weeks format # C:\Apache24\htdocs\integration\course\format\weeks\tests\behat\edit_delete_sections.feature:31
When I click on "Edit section" "link" in the "li#section-0" "css_element" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Use default section name | 0 |
| name | This is the general section |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "This is the general section" in the "li#section-0" "css_element" # behat_hooks::i_look_for_exceptions()
Scenario: View the default name of the second section in weeks format # C:\Apache24\htdocs\integration\course\format\weeks\tests\behat\edit_delete_sections.feature:39
When I click on "Edit week" "link" in the "li#section-2" "css_element" # behat_hooks::i_look_for_exceptions()
Then I should see "Use default section name [8 May - 14 May]" # behat_hooks::i_look_for_exceptions()
Scenario: Edit section summary in weeks format # C:\Apache24\htdocs\integration\course\format\weeks\tests\behat\edit_delete_sections.feature:43
When I click on "Edit week" "link" in the "li#section-2" "css_element" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Summary | Welcome to section 2 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Welcome to section 2" in the "li#section-2" "css_element" # behat_hooks::i_look_for_exceptions()
Scenario: Edit section default name in weeks format # C:\Apache24\htdocs\integration\course\format\weeks\tests\behat\edit_delete_sections.feature:50
Given I should see "8 May - 14 May" in the "li#section-2" "css_element" # behat_hooks::i_look_for_exceptions()
When I click on "Edit week" "link" in the "li#section-2" "css_element" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Use default section name | 0 |
| name | This is the second week |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "This is the second week" in the "li#section-2" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "8 May - 14 May" in the "li#section-2" "css_element" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Inline edit section name in weeks format # C:\Apache24\htdocs\integration\course\format\weeks\tests\behat\edit_delete_sections.feature:61
When I click on "Edit week name" "link" in the "li#section-1" "css_element" # behat_hooks::i_look_for_exceptions()
And I set the field "New name for week 1 May - 7 May" to "Midterm evaluation" # behat_hooks::i_look_for_exceptions()
And I press key "13" in the field "New name for week 1 May - 7 May" # behat_hooks::i_look_for_exceptions()
Then I should not see "1 May - 7 May" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And "New name for week" "field" should not exist # behat_hooks::i_look_for_exceptions()
And I should see "Midterm evaluation" in the "li#section-1" "css_element" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should not see "1 May - 7 May" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I should see "Midterm evaluation" in the "li#section-1" "css_element" # behat_hooks::i_look_for_exceptions()
Scenario: Deleting the last section in weeks format # C:\Apache24\htdocs\integration\course\format\weeks\tests\behat\edit_delete_sections.feature:72
Given I should see "29 May - 4 June" in the "li#section-5" "css_element" # behat_hooks::i_look_for_exceptions()
When I delete section "5" # behat_hooks::i_look_for_exceptions()
Then I should see "Are you absolutely sure you want to completely delete \"29 May - 4 June\" and all the activities it contains?" # behat_hooks::i_look_for_exceptions()
And I press "Delete" # behat_hooks::i_look_for_exceptions()
And I should not see "29 May - 4 June" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And the field "Number of sections" matches value "4" # behat_hooks::i_look_for_exceptions()
Scenario: Deleting the middle section in weeks format # C:\Apache24\htdocs\integration\course\format\weeks\tests\behat\edit_delete_sections.feature:82
Given I should see "29 May - 4 June" in the "li#section-5" "css_element" # behat_hooks::i_look_for_exceptions()
When I delete section "4" # behat_hooks::i_look_for_exceptions()
And I press "Delete" # behat_hooks::i_look_for_exceptions()
Then I should not see "29 May - 4 June" # behat_hooks::i_look_for_exceptions()
And I should not see "Test chat name" # behat_hooks::i_look_for_exceptions()
And I should see "Test choice name" in the "li#section-4" "css_element" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And the field "Number of sections" matches value "4" # behat_hooks::i_look_for_exceptions()
Scenario: Deleting the orphaned section in weeks format # C:\Apache24\htdocs\integration\course\format\weeks\tests\behat\edit_delete_sections.feature:93
When I follow "Reduce the number of sections" # behat_hooks::i_look_for_exceptions()
Then I should see "Orphaned activities (section 5)" in the "li#section-5" "css_element" # behat_hooks::i_look_for_exceptions()
And I delete section "5" # behat_hooks::i_look_for_exceptions()
And I press "Delete" # behat_hooks::i_look_for_exceptions()
And I should not see "29 May - 4 June" # behat_hooks::i_look_for_exceptions()
And I should not see "Orphaned activities" # behat_hooks::i_look_for_exceptions()
And "li#section-5" "css_element" should not exist # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And the field "Number of sections" matches value "4" # behat_hooks::i_look_for_exceptions()
Scenario: Deleting a section when orphaned section is present in weeks format # C:\Apache24\htdocs\integration\course\format\weeks\tests\behat\edit_delete_sections.feature:105
When I follow "Reduce the number of sections" # behat_hooks::i_look_for_exceptions()
Then I should see "Orphaned activities (section 5)" in the "li#section-5" "css_element" # behat_hooks::i_look_for_exceptions()
And "li#section-5.orphaned" "css_element" should exist # behat_hooks::i_look_for_exceptions()
And "li#section-4.orphaned" "css_element" should not exist # behat_hooks::i_look_for_exceptions()
And I delete section "1" # behat_hooks::i_look_for_exceptions()
And I press "Delete" # behat_hooks::i_look_for_exceptions()
And I should not see "Test book name" # behat_hooks::i_look_for_exceptions()
And I should see "Orphaned activities (section 4)" in the "li#section-4" "css_element" # behat_hooks::i_look_for_exceptions()
And "li#section-5" "css_element" should not exist # behat_hooks::i_look_for_exceptions()
And "li#section-4.orphaned" "css_element" should exist # behat_hooks::i_look_for_exceptions()
And "li#section-3.orphaned" "css_element" should not exist # behat_hooks::i_look_for_exceptions()
@gradingform @gradingform_guide
Feature: Marking guides can be created and edited
In order to use and refine marking guide to grade students
As a teacher
I need to edit previously used marking guides
Background: # C:\Apache24\htdocs\integration\grade\grading\form\guide\tests\behat\edit_guide.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment 1 name |
| Description | Test assignment description |
| Grading method | Marking guide |
When I go to "Test assignment 1 name" advanced grading definition page # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Assignment 1 marking guide |
| Description | Marking guide test description |
And I define the following marking guide: # behat_hooks::i_look_for_exceptions()
| Criterion name | Description for students | Description for markers | Maximum score |
| Guide criterion A | Guide A description for students | Guide A description for markers | 30 |
| Guide criterion B | Guide B description for students | Guide B description for markers | 30 |
| Guide criterion C | Guide C description for students | Guide C description for markers | 40 |
And I define the following frequently used comments: # behat_hooks::i_look_for_exceptions()
| Comment 1 |
| Comment 2 |
| Comment 3 |
| Comment 4 |
And I press "Save marking guide and make it ready" # behat_hooks::i_look_for_exceptions()
Then I should see "Ready for use" # behat_hooks::i_look_for_exceptions()
And I should see "Guide criterion A" # behat_hooks::i_look_for_exceptions()
And I should see "Guide criterion B" # behat_hooks::i_look_for_exceptions()
And I should see "Guide criterion C" # behat_hooks::i_look_for_exceptions()
And I should see "Comment 1" # behat_hooks::i_look_for_exceptions()
And I should see "Comment 2" # behat_hooks::i_look_for_exceptions()
And I should see "Comment 3" # behat_hooks::i_look_for_exceptions()
And I should see "Comment 4" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Deleting criterion and comment # C:\Apache24\htdocs\integration\grade\grading\form\guide\tests\behat\edit_guide.feature:52
When I go to "Test assignment 1 name" advanced grading definition page # behat_hooks::i_look_for_exceptions()
And I click on "Delete criterion" "button" in the "Guide criterion B" "table_row" # behat_hooks::i_look_for_exceptions()
And I press "Yes" # behat_hooks::i_look_for_exceptions()
And I press "Save" # behat_hooks::i_look_for_exceptions()
Then I should see "Guide criterion A" # behat_hooks::i_look_for_exceptions()
And I should see "Guide criterion C" # behat_hooks::i_look_for_exceptions()
And I should see "WARNING: Your marking guide has a maximum grade of 70 points" # behat_hooks::i_look_for_exceptions()
But I should not see "Guide criterion B" # behat_hooks::i_look_for_exceptions()
When I go to "Test assignment 1 name" advanced grading definition page # behat_hooks::i_look_for_exceptions()
And I click on "Delete comment" "button" in the "Comment 3" "table_row" # behat_hooks::i_look_for_exceptions()
And I press "Yes" # behat_hooks::i_look_for_exceptions()
And I press "Save" # behat_hooks::i_look_for_exceptions()
Then I should see "Comment 1" # behat_hooks::i_look_for_exceptions()
And I should see "Comment 2" # behat_hooks::i_look_for_exceptions()
And I should see "Comment 4" # behat_hooks::i_look_for_exceptions()
But I should not see "Comment 3" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Grading and viewing graded marking guide # C:\Apache24\htdocs\integration\grade\grading\form\guide\tests\behat\edit_guide.feature:73
When I go to "Student 1" "Test assignment 1 name" activity advanced grading page # behat_hooks::i_look_for_exceptions()
And I grade by filling the marking guide with: # behat_hooks::i_look_for_exceptions()
| Guide criterion A | 25 | Very good |
| Guide criterion B | 20 | |
| Guide criterion C | 35 | Nice! |
And I click on "Insert frequently used comment" "button" in the "Guide criterion B" "table_row" # behat_hooks::i_look_for_exceptions()
And I wait "1" seconds # behat_hooks::i_look_for_exceptions()
And I press "Comment 4" # behat_hooks::i_look_for_exceptions()
And I wait "1" seconds # behat_hooks::i_look_for_exceptions()
Then the field "Guide criterion B criterion remark" matches value "Comment 4" # behat_hooks::i_look_for_exceptions()
When I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Ok" # behat_hooks::i_look_for_exceptions()
And I follow "Edit settings" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment 1 name" # behat_hooks::i_look_for_exceptions()
And I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
Then I should see "80" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment 1 name" # behat_hooks::i_look_for_exceptions()
And I should see "80" in the ".feedback" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Marking guide test description" in the ".feedback" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Very good" # behat_hooks::i_look_for_exceptions()
And I should see "Comment 4" # behat_hooks::i_look_for_exceptions()
And I should see "Nice!" # behat_hooks::i_look_for_exceptions()
Scenario: I can use marking guides to grade and edit them later updating students grades with Javascript disabled # C:\Apache24\htdocs\integration\grade\grading\form\guide\tests\behat\edit_guide.feature:104
@mod @mod_book
Feature: In a book, change the navigation options
In order to change the way a book's chapters can be traversed
As a teacher
I need to change navigation options on a book
Background: # C:\Apache24\htdocs\integration\mod\book\tests\behat\edit_navigation_options.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
Scenario: Change navigation options # C:\Apache24\htdocs\integration\mod\book\tests\behat\edit_navigation_options.feature:21
Given I add a "Book" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Test book |
| Description | A book about lorem ipsum |
| Style of navigation | TOC Only |
And I follow "Test book" # behat_hooks::i_look_for_exceptions()
And I should see "Add new chapter" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Chapter title | Test chapter 1 |
| Content | Lorem ipsum dolor sit amet |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "Test book" # behat_hooks::i_look_for_exceptions()
And I should see "1. Test chapter 1" # behat_hooks::i_look_for_exceptions()
And I click on "Add new chapter" "link" in the "Table of contents" "block" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Chapter title | Test chapter 2 |
| Content | consectetur adipiscing elit |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "Test book" # behat_hooks::i_look_for_exceptions()
And I should see "2. Test chapter 2" # behat_hooks::i_look_for_exceptions()
And I click on "1. Test chapter 1" "link" in the "Table of contents" "block" # behat_hooks::i_look_for_exceptions()
And "Next" "link" should not exist # behat_hooks::i_look_for_exceptions()
And I click on "2. Test chapter 2" "link" in the "Table of contents" "block" # behat_hooks::i_look_for_exceptions()
And "Previous" "link" should not exist # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I set the field "Style of navigation" to "Images" # behat_hooks::i_look_for_exceptions()
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And "//a/child::img[contains(@src, 'nav_next')]" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
And I click on "2. Test chapter 2" "link" in the "Table of contents" "block" # behat_hooks::i_look_for_exceptions()
And "//a/child::img[contains(@src, 'nav_prev')]" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
When I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I set the field "Style of navigation" to "Text" # behat_hooks::i_look_for_exceptions()
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
Then "Next" "link" should exist # behat_hooks::i_look_for_exceptions()
And I click on "2. Test chapter 2" "link" in the "Table of contents" "block" # behat_hooks::i_look_for_exceptions()
And "Previous" "link" should exist # behat_hooks::i_look_for_exceptions()
@tool @tool_behat
Feature: Edit capabilities
In order to extend and restrict moodle features
As an admin or a teacher
I need to allow/deny the existing capabilities at different levels
Background: # C:\Apache24\htdocs\integration\admin\tool\behat\tests\behat\edit_permissions.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
Scenario: Default system capabilities modification # C:\Apache24\htdocs\integration\admin\tool\behat\tests\behat\edit_permissions.feature:18
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I set the following system permissions of "Teacher" role: # behat_hooks::i_look_for_exceptions()
| capability | permission |
| block/mnet_hosts:myaddinstance | Allow |
| moodle/community:add | Inherit |
| moodle/grade:managesharedforms | Prevent |
| moodle/course:request | Prohibit |
When I follow "Edit Teacher role" # behat_hooks::i_look_for_exceptions()
Then "block/mnet_hosts:myaddinstance" capability has "Allow" permission # behat_hooks::i_look_for_exceptions()
And "moodle/community:add" capability has "Not set" permission # behat_hooks::i_look_for_exceptions()
And "moodle/grade:managesharedforms" capability has "Prevent" permission # behat_hooks::i_look_for_exceptions()
And "moodle/course:request" capability has "Prohibit" permission # behat_hooks::i_look_for_exceptions()
Scenario: Course capabilities overrides # C:\Apache24\htdocs\integration\admin\tool\behat\tests\behat\edit_permissions.feature:32
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I expand "Users" node # behat_hooks::i_look_for_exceptions()
And I follow "Permissions" # behat_hooks::i_look_for_exceptions()
And I override the system permissions of "Student" role with: # behat_hooks::i_look_for_exceptions()
| mod/forum:deleteanypost | Prohibit |
| mod/forum:editanypost | Prevent |
| mod/forum:addquestion | Allow |
When I set the field "Advanced role override" to "Student (3)" # behat_hooks::i_look_for_exceptions()
And I press "Go" # behat_hooks::i_look_for_exceptions()
Then "mod/forum:deleteanypost" capability has "Prohibit" permission # behat_hooks::i_look_for_exceptions()
And "mod/forum:editanypost" capability has "Prevent" permission # behat_hooks::i_look_for_exceptions()
And "mod/forum:addquestion" capability has "Allow" permission # behat_hooks::i_look_for_exceptions()
Scenario: Module capabilities overrides # C:\Apache24\htdocs\integration\admin\tool\behat\tests\behat\edit_permissions.feature:47
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | I'm the name |
| Description | I'm the introduction |
And I follow "I'm the name" # behat_hooks::i_look_for_exceptions()
And I navigate to "Permissions" node in "Forum administration" # behat_hooks::i_look_for_exceptions()
And I override the system permissions of "Student" role with: # behat_hooks::i_look_for_exceptions()
| mod/forum:deleteanypost | Prohibit |
| mod/forum:editanypost | Prevent |
| mod/forum:addquestion | Allow |
When I set the field "Advanced role override" to "Student (3)" # behat_hooks::i_look_for_exceptions()
And I click on "Go" "button" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
Then "mod/forum:deleteanypost" capability has "Prohibit" permission # behat_hooks::i_look_for_exceptions()
And "mod/forum:editanypost" capability has "Prevent" permission # behat_hooks::i_look_for_exceptions()
And "mod/forum:addquestion" capability has "Allow" permission # behat_hooks::i_look_for_exceptions()
@mod @mod_forum
Feature: Students can edit or delete their forum posts within a set time limit
In order to refine forum posts
As a user
I need to edit or delete my forum posts within a certain period of time after posting
Background: # C:\Apache24\htdocs\integration\mod\forum\tests\behat\edit_post_student.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| student1 | C1 | student |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber |
| forum | Test forum name | Test forum description | C1 | forum |
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Forum post subject |
| Message | This is the body |
Scenario: Edit forum post # C:\Apache24\htdocs\integration\mod\forum\tests\behat\edit_post_student.feature:26
Given I follow "Forum post subject" # behat_hooks::i_look_for_exceptions()
And I follow "Edit" # behat_hooks::i_look_for_exceptions()
When I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Subject | Edited post subject |
| Message | Edited post body |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I wait to be redirected # behat_hooks::i_look_for_exceptions()
Then I should see "Edited post subject" # behat_hooks::i_look_for_exceptions()
And I should see "Edited post body" # behat_hooks::i_look_for_exceptions()
Scenario: Delete forum post # C:\Apache24\htdocs\integration\mod\forum\tests\behat\edit_post_student.feature:37
Given I follow "Forum post subject" # behat_hooks::i_look_for_exceptions()
When I follow "Delete" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
Then I should not see "Forum post subject" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Time limit expires # C:\Apache24\htdocs\integration\mod\forum\tests\behat\edit_post_student.feature:44
Given I log out # behat_hooks::i_look_for_exceptions()
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I expand "Site administration" node # behat_hooks::i_look_for_exceptions()
And I expand "Security" node # behat_hooks::i_look_for_exceptions()
And I follow "Site policies" # behat_hooks::i_look_for_exceptions()
And I set the field "Maximum time to edit posts" to "1 minutes" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Recent activity" block # behat_hooks::i_look_for_exceptions()
And I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name |
| Forum type | Standard forum for general use |
| Description | Test forum description |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
When I wait "61" seconds # behat_hooks::i_look_for_exceptions()
And I follow "Forum post subject" # behat_hooks::i_look_for_exceptions()
Then I should not see "Edit" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I should not see "Delete" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
@mod @mod_forum
Feature: Teachers can edit or delete any forum post
In order to refine the forum contents
As a teacher
I need to edit or delete any user's forum posts
Background: # C:\Apache24\htdocs\integration\mod\forum\tests\behat\edit_post_teacher.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name |
| Description | Test forum description |
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Teacher post subject |
| Message | Teacher post message |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I reply "Teacher post subject" post from "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Student post subject |
| Message | Student post message |
Scenario: A teacher can delete another user's posts # C:\Apache24\htdocs\integration\mod\forum\tests\behat\edit_post_teacher.feature:35
Given I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
When I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
And I follow "Teacher post subject" # behat_hooks::i_look_for_exceptions()
And I click on "Delete" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' forumpost ')][contains(., 'Student post subject')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
Then I should not see "Student post subject" # behat_hooks::i_look_for_exceptions()
And I should not see "Student post message" # behat_hooks::i_look_for_exceptions()
Scenario: A teacher can edit another user's posts # C:\Apache24\htdocs\integration\mod\forum\tests\behat\edit_post_teacher.feature:46
Given I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
When I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
And I follow "Teacher post subject" # behat_hooks::i_look_for_exceptions()
And I click on "Edit" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' forumpost ')][contains(., 'Student post subject')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Subject | Edited student subject |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I wait to be redirected # behat_hooks::i_look_for_exceptions()
Then I should see "Edited student subject" # behat_hooks::i_look_for_exceptions()
And I should see "Edited by Teacher 1 - original submission" # behat_hooks::i_look_for_exceptions()
Scenario: A student can't edit or delete another user's posts # C:\Apache24\htdocs\integration\mod\forum\tests\behat\edit_post_teacher.feature:60
When I follow "Teacher post subject" # behat_hooks::i_look_for_exceptions()
Then I should not see "Edit" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' forumpost ')][contains(., 'Teacher post subject')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Delete" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' forumpost ')][contains(., 'Teacher post subject')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
@mod @mod_assign
Feature: In an assignment, teachers can edit feedback for a students previous submission attempt
In order to correct feedback for a previous submission attempt
As a teacher
I need to be able to edit the feedback for a students previous submission attempt.
@javascript
Scenario: Edit feedback for a students previous attempt. # C:\Apache24\htdocs\integration\mod\assign\tests\behat\edit_previous_feedback.feature:8
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment name |
| Description | Submit your online text |
| assignsubmission_onlinetext_enabled | 1 |
| assignfeedback_comments_enabled | 1 |
| Attempts reopened | Manually |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I press "Add submission" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Online text | I'm the student first submission |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I click on "Grade" "link" in the "Student 2" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Grade | 49 |
| Feedback comments | I'm the teacher first feedback |
| Allow another attempt | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I click on "Ok" "button" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I should see "I'm the teacher first feedback" in the "Feedback comments" "table_row" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I click on "Grade" "link" in the "Student 2" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "View a different attempt" "link" # behat_hooks::i_look_for_exceptions()
And I click on "//div[contains(concat(' ', normalize-space(@class), ' '), ' confirmation-dialogue ')]//input[@value='0']" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I click on "View" "button" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Grade | 50 |
| Feedback comments | I'm the teacher second feedback |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I click on "Ok" "button" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Then I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I should see "I'm the teacher second feedback" in the "Feedback comments" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "50.00" # behat_hooks::i_look_for_exceptions()
And I click on ".mod-assign-history-link" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "I'm the teacher second feedback" in the "Feedback comments" "table_row" # behat_hooks::i_look_for_exceptions()
@core @core_question
Feature: A teacher can edit questions in the question bank
In order to improve my questions
As a teacher
I need to be able to edit questions
Background: # C:\Apache24\htdocs\integration\question\tests\behat\edit_questions.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | weeks |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | essay | Test question to be edited | Write about whatever you want |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Questions" node in "Course administration > Question bank" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Edit a previously created question # C:\Apache24\htdocs\integration\question\tests\behat\edit_questions.feature:28
When I click on "Edit" "link" in the "Test question to be edited" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Question name | Edited question name |
| Question text | Write a lot about what you want |
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Edited question name" # behat_hooks::i_look_for_exceptions()
And I should not see "Test question to be edited" # behat_hooks::i_look_for_exceptions()
And "Edited question name" row "Created by" column of "categoryquestions" table should contain "Admin User" # behat_hooks::i_look_for_exceptions()
And "Edited question name" row "Last modified by" column of "categoryquestions" table should contain "Teacher 1" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Editing a question can be cancelled # C:\Apache24\htdocs\integration\question\tests\behat\edit_questions.feature:40
When I click on "Edit" "link" in the "Test question to be edited" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the field "Question name" to "Edited question name" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
Then I should see "Test question to be edited" # behat_hooks::i_look_for_exceptions()
And "Test question to be edited" row "Created by" column of "categoryquestions" table should contain "Admin User" # behat_hooks::i_look_for_exceptions()
And "Test question to be edited" row "Last modified by" column of "categoryquestions" table should contain "Admin User" # behat_hooks::i_look_for_exceptions()
@gradingform @gradingform_rubric
Feature: Rubrics can be created and edited
In order to use and refine rubrics to grade students
As a teacher
I need to edit previously used rubrics
@javascript
Scenario: I can use rubrics to grade and edit them later updating students grades # C:\Apache24\htdocs\integration\grade\grading\form\rubric\tests\behat\edit_rubric.feature:8
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment 1 name |
| Description | Test assignment description |
| Grading method | Rubric |
When I go to "Test assignment 1 name" advanced grading definition page # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Assignment 1 rubric |
| Description | Rubric test description |
And I define the following rubric: # behat_hooks::i_look_for_exceptions()
| TMP Criterion 1 | TMP Level 11 | 11 | TMP Level 12 | 12 |
| TMP Criterion 2 | TMP Level 21 | 21 | TMP Level 22 | 22 |
| TMP Criterion 3 | TMP Level 31 | 31 | TMP Level 32 | 32 |
| TMP Criterion 4 | TMP Level 41 | 41 | TMP Level 42 | 42 |
And I define the following rubric: # behat_hooks::i_look_for_exceptions()
| Criterion 1 | Level 11 | 1 | Level 12 | 20 | Level 13 | 40 | Level 14 | 50 |
| Criterion 2 | Level 21 | 10 | Level 22 | 20 | Level 23 | 30 | | |
| Criterion 3 | Level 31 | 5 | Level 32 | 20 | | | | |
And I press "Save as draft" # behat_hooks::i_look_for_exceptions()
And I go to "Test assignment 1 name" advanced grading definition page # behat_hooks::i_look_for_exceptions()
And I click on "Move down" "button" in the "Criterion 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I press "Save rubric and make it ready" # behat_hooks::i_look_for_exceptions()
Then I should see "Ready for use" # behat_hooks::i_look_for_exceptions()
And I go to "Student 1" "Test assignment 1 name" activity advanced grading page # behat_hooks::i_look_for_exceptions()
And I grade by filling the rubric with: # behat_hooks::i_look_for_exceptions()
| Criterion 1 | 50 | Very good |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "Please choose something for each criterion" # behat_hooks::i_look_for_exceptions()
And I grade by filling the rubric with: # behat_hooks::i_look_for_exceptions()
| Criterion 1 | 50 | Very good |
| Criterion 2 | 10 | Mmmm, you can do it better |
| Criterion 3 | 5 | Not good |
And I complete the advanced grading form with these values: # behat_hooks::i_look_for_exceptions()
| Feedback comments | In general... work harder... |
And I should see "65" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I go to "Student 1" "Test assignment 1 name" activity advanced grading page # behat_hooks::i_look_for_exceptions()
And I grade by filling the rubric with: # behat_hooks::i_look_for_exceptions()
| Criterion 1 | 20 | Bad, I changed my mind |
| Criterion 2 | 10 | Mmmm, you can do it better |
| Criterion 3 | 5 | Not good |
And I save the advanced grading form # behat_hooks::i_look_for_exceptions()
And I should see "35" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment 1 name" # behat_hooks::i_look_for_exceptions()
And I should see "35" in the ".feedback" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Rubric test description" in the ".feedback" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "In general... work harder..." # behat_hooks::i_look_for_exceptions()
And the level with "10" points is selected for the rubric criterion "Criterion 2" # behat_hooks::i_look_for_exceptions()
And the level with "20" points is selected for the rubric criterion "Criterion 1" # behat_hooks::i_look_for_exceptions()
And the level with "5" points is selected for the rubric criterion "Criterion 3" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "Test assignment 1 name" advanced grading definition page # behat_hooks::i_look_for_exceptions()
And "Save as draft" "button" should not exist # behat_hooks::i_look_for_exceptions()
And I click on "Move up" "button" in the "Criterion 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I replace "Level 11" rubric level with "Level 11 edited" in "Criterion 1" criterion # behat_hooks::i_look_for_exceptions()
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "You are about to save changes to a rubric that has already been used for grading." # behat_hooks::i_look_for_exceptions()
And I set the field "menurubricregrade" to "Do not mark for regrade" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment 1 name" # behat_hooks::i_look_for_exceptions()
And I should see "35" in the ".feedback" "css_element" # behat_hooks::i_look_for_exceptions()
And the level with "20" points is selected for the rubric criterion "Criterion 1" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "Test assignment 1 name" advanced grading definition page # behat_hooks::i_look_for_exceptions()
And I click on "Move down" "button" in the "Criterion 2" "table_row" # behat_hooks::i_look_for_exceptions()
And I replace "1" rubric level with "60" in "Criterion 1" criterion # behat_hooks::i_look_for_exceptions()
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "You are about to save significant changes to a rubric that has already been used for grading. The gradebook value will be unchanged, but the rubric will be hidden from students until their item is regraded." # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment 1 name" # behat_hooks::i_look_for_exceptions()
And I should see "35" in the ".feedback" "css_element" # behat_hooks::i_look_for_exceptions()
And the level with "20" points is not selected for the rubric criterion "Criterion 1" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment 1 name" # behat_hooks::i_look_for_exceptions()
And I go to "Student 1" "Test assignment 1 name" activity advanced grading page # behat_hooks::i_look_for_exceptions()
And I should see "The rubric definition was changed after this student had been graded. The student can not see this rubric until you check the rubric and update the grade." # behat_hooks::i_look_for_exceptions()
And I save the advanced grading form # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment 1 name" # behat_hooks::i_look_for_exceptions()
And I should see "31.82" in the ".feedback" "css_element" # behat_hooks::i_look_for_exceptions()
And the level with "20" points is not selected for the rubric criterion "Criterion 1" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "Test assignment 1 name" advanced grading definition page # behat_hooks::i_look_for_exceptions()
And I set the field "Allow users to preview rubric used in the module (otherwise rubric will only become visible after grading)" to "" # behat_hooks::i_look_for_exceptions()
And I set the field "Display rubric description during evaluation" to "" # behat_hooks::i_look_for_exceptions()
And I set the field "Display rubric description to those being graded" to "" # behat_hooks::i_look_for_exceptions()
And I set the field "Display points for each level during evaluation" to "" # behat_hooks::i_look_for_exceptions()
And I set the field "Display points for each level to those being graded" to "" # behat_hooks::i_look_for_exceptions()
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I set the field "menurubricregrade" to "Do not mark for regrade" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment 1 name" # behat_hooks::i_look_for_exceptions()
And I should not see "Criterion 1" in the ".submissionstatustable" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Criterion 2" in the ".submissionstatustable" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Criterion 3" in the ".submissionstatustable" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Rubric test description" in the ".feedback" "css_element" # behat_hooks::i_look_for_exceptions()
@core @core_course
Feature: Edit course settings
In order to set the course according to my teaching needs
As a teacher
I need to edit the course settings
@javascript
Scenario: Edit course settings # C:\Apache24\htdocs\integration\course\tests\behat\edit_settings.feature:8
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | summary | format |
| Course 1 | C1 | Course summary
| topics |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
When I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Course full name | Edited course fullname |
| Course short name | Edited course shortname |
| Course summary | Edited course summary |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I follow "Edited course fullname" # behat_hooks::i_look_for_exceptions()
Then I should not see "Course 1" # behat_hooks::i_look_for_exceptions()
And I should not see "C1" # behat_hooks::i_look_for_exceptions()
And I should see "Edited course fullname" # behat_hooks::i_look_for_exceptions()
And I should see "Edited course shortname" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And the field "Course full name" matches value "Edited course fullname" # behat_hooks::i_look_for_exceptions()
And the field "Course short name" matches value "Edited course shortname" # behat_hooks::i_look_for_exceptions()
And the field "Course summary" matches value "Edited course summary" # behat_hooks::i_look_for_exceptions()
And I am on homepage # behat_hooks::i_look_for_exceptions()
And I should see "Edited course fullname" # behat_hooks::i_look_for_exceptions()
Scenario: Edit course settings and return to the management interface # C:\Apache24\htdocs\integration\course\tests\behat\edit_settings.feature:38
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Cat 1 | 0 | CAT1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| category | fullname | shortname | idnumber |
| CAT1 | Course 1 | Course 1 | C1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I go to the courses management page # behat_hooks::i_look_for_exceptions()
And I should see the "Categories" management page # behat_hooks::i_look_for_exceptions()
And I click on category "Cat 1" in the management interface # behat_hooks::i_look_for_exceptions()
And I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
When I click on "edit" action for "Course 1" in management course listing # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Course full name | Edited course fullname |
| Course short name | Edited course shortname |
| Course summary | Edited course summary |
And I press "Save and return" # behat_hooks::i_look_for_exceptions()
Then I should see the "Course categories and courses" management page # behat_hooks::i_look_for_exceptions()
@mod @mod_assign @javascript
Feature: In an assignment, the administrator can edit students' submissions
In order to edit a student's submissions
As an administrator
I need to grade multiple students on one page
Scenario: Editing a student's submission # C:\Apache24\htdocs\integration\mod\assign\tests\behat\edit_student_submission.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| student1 | C1 | student |
When I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment name |
| Description | Submit your online text |
| assignsubmission_onlinetext_enabled | 1 |
| groupmode | No groups |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I press "Add submission" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Online text | I'm the student1 submission |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I click on "Edit" "link" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I choose "Edit submission" in the open action menu # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Online text | Have you seen the movie Chef? |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
Then I should see "Have you seen the movie Chef?" # behat_hooks::i_look_for_exceptions()
And I click on "Edit" "link" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I choose "Edit submission" in the open action menu # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Online text | I have seen the movie chef. |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
Then I should see "I have seen the movie chef." # behat_hooks::i_look_for_exceptions()
@core @core_tag
Feature: Users can edit tags to add description or rename
In order to use tags
As a manager
I need to be able to edit tags
Background: # C:\Apache24\htdocs\integration\tag\tests\behat\edit_tag.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | interests |
| manager1 | Manager | 1 | manager1@example.com | |
| user1 | User | 1 | user1@example.com | Cat,Dog,Turtle |
| editor1 | Editor | 1 | editor1@example.com | |
Given the following "roles" exist: # behat_hooks::i_look_for_exceptions()
| name | shortname |
| Tag editor | tageditor |
And the following "system role assigns" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| manager1 | Acceptance test site | manager |
| editor1 | Acceptance test site | tageditor |
And the following "tags" exist: # behat_hooks::i_look_for_exceptions()
| name | isstandard |
| Neverusedtag | 1 |
@javascript
Scenario: User with tag editing capability can change tag description # C:\Apache24\htdocs\integration\tag\tests\behat\edit_tag.feature:25
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I set the following system permissions of "Tag editor" role: # behat_hooks::i_look_for_exceptions()
| capability | permission |
| moodle/tag:edit | Allow |
| moodle/site:viewparticipants | Allow |
| moodle/user:viewdetails | Allow |
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "editor1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Participants" node in "Site pages" # behat_hooks::i_look_for_exceptions()
And I follow "User 1" # behat_hooks::i_look_for_exceptions()
And I follow "Cat" # behat_hooks::i_look_for_exceptions()
And I follow "Edit this tag" # behat_hooks::i_look_for_exceptions()
And I should not see "Tag name" # behat_hooks::i_look_for_exceptions()
And I should not see "Standard" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Description | Description of tag 1 |
| Related tags | Dog, Turtle,Fish |
And I press "Update" # behat_hooks::i_look_for_exceptions()
Then "Cat" "text" should exist in the ".breadcrumb-nav" "css_element" # behat_hooks::i_look_for_exceptions()
And "Description of tag 1" "text" should exist in the ".tag-description" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Related tags:" in the ".tag_list" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Dog" in the ".tag_list" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Turtle" in the ".tag_list" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Fish" in the ".tag_list" "css_element" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Manager can change tag description, related tags and rename the tag from tag view page # C:\Apache24\htdocs\integration\tag\tests\behat\edit_tag.feature:53
When I log in as "manager1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Participants" node in "Site pages" # behat_hooks::i_look_for_exceptions()
And I follow "User 1" # behat_hooks::i_look_for_exceptions()
And I follow "Cat" # behat_hooks::i_look_for_exceptions()
And I follow "Edit this tag" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Tag name | Kitten |
| Description | Description of tag 1 |
| Related tags | Dog, Turtle,Fish |
| Standard | 0 |
And I press "Update" # behat_hooks::i_look_for_exceptions()
Then "Kitten" "text" should exist in the ".breadcrumb-nav" "css_element" # behat_hooks::i_look_for_exceptions()
And "Description of tag 1" "text" should exist in the ".tag-description" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Related tags:" in the ".tag_list" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Dog" in the ".tag_list" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Turtle" in the ".tag_list" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Fish" in the ".tag_list" "css_element" # behat_hooks::i_look_for_exceptions()
And I follow "Edit this tag" # behat_hooks::i_look_for_exceptions()
And I click on "× Dog" "text" # behat_hooks::i_look_for_exceptions()
And I press "Update" # behat_hooks::i_look_for_exceptions()
Then "Kitten" "text" should exist in the ".breadcrumb-nav" "css_element" # behat_hooks::i_look_for_exceptions()
And "Description of tag 1" "text" should exist in the ".tag-description" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Related tags:" in the ".tag_list" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Turtle" in the ".tag_list" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Fish" in the ".tag_list" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Dog" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Renaming the tag from tag view page # C:\Apache24\htdocs\integration\tag\tests\behat\edit_tag.feature:82
When I log in as "manager1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Participants" node in "Site pages" # behat_hooks::i_look_for_exceptions()
And I follow "User 1" # behat_hooks::i_look_for_exceptions()
And I follow "Cat" # behat_hooks::i_look_for_exceptions()
And I follow "Edit this tag" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Tag name | DOG |
And I press "Update" # behat_hooks::i_look_for_exceptions()
And I should see "Tag names already being used" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Tag name | Kitten |
And I press "Update" # behat_hooks::i_look_for_exceptions()
Then "Kitten" "text" should exist in the ".breadcrumb-nav" "css_element" # behat_hooks::i_look_for_exceptions()
And I follow "Edit this tag" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Tag name | KITTEN |
And I press "Update" # behat_hooks::i_look_for_exceptions()
And "KITTEN" "text" should exist in the ".breadcrumb-nav" "css_element" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Manager can change tag description and rename the tag from tag manage page # C:\Apache24\htdocs\integration\tag\tests\behat\edit_tag.feature:104
When I log in as "manager1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Manage tags" node in "Site administration > Appearance" # behat_hooks::i_look_for_exceptions()
And I follow "Default collection" # behat_hooks::i_look_for_exceptions()
And I click on "Edit this tag" "link" in the "Cat" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Tag name | Kitten |
| Description | Description of tag 1 |
| Related tags | Dog, Turtle,Fish |
| Standard | 0 |
And I press "Update" # behat_hooks::i_look_for_exceptions()
Then "Default collection" "link" should exist in the ".breadcrumb-nav" "css_element" # behat_hooks::i_look_for_exceptions()
And I follow "Kitten" # behat_hooks::i_look_for_exceptions()
And "Description of tag 1" "text" should exist in the ".tag-description" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Related tags:" in the ".tag_list" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Dog" in the ".tag_list" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Turtle" in the ".tag_list" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Fish" in the ".tag_list" "css_element" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Renaming the tag in edit tag form from tag manage page # C:\Apache24\htdocs\integration\tag\tests\behat\edit_tag.feature:124
When I log in as "manager1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Manage tags" node in "Site administration > Appearance" # behat_hooks::i_look_for_exceptions()
And I follow "Default collection" # behat_hooks::i_look_for_exceptions()
And I click on "Edit this tag" "link" in the "Cat" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Tag name | DOG |
And I press "Update" # behat_hooks::i_look_for_exceptions()
And I should see "Tag names already being used" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Tag name | Kitten |
And I press "Update" # behat_hooks::i_look_for_exceptions()
Then "Default collection" "text" should exist in the ".breadcrumb-nav" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Edit this tag" "link" in the "Kitten" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Tag name | KITTEN |
And I press "Update" # behat_hooks::i_look_for_exceptions()
And "Default collection" "text" should exist in the ".breadcrumb-nav" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "KITTEN" # behat_hooks::i_look_for_exceptions()
And I should not see "Kitten" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Renaming the tag using quick edit field on tag manage page # C:\Apache24\htdocs\integration\tag\tests\behat\edit_tag.feature:147
When I log in as "manager1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Manage tags" node in "Site administration > Appearance" # behat_hooks::i_look_for_exceptions()
And I follow "Default collection" # behat_hooks::i_look_for_exceptions()
And I click on "Edit tag name" "link" in the "Cat" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the field "New name for tag Cat" to "Kitten" # behat_hooks::i_look_for_exceptions()
And I press key "13" in the field "New name for tag Cat" # behat_hooks::i_look_for_exceptions()
Then I should not see "Cat" # behat_hooks::i_look_for_exceptions()
And "New name for tag" "field" should not exist # behat_hooks::i_look_for_exceptions()
And I wait until "Kitten" "link" exists # behat_hooks::i_look_for_exceptions()
And I follow "Default collection" # behat_hooks::i_look_for_exceptions()
And I should see "Kitten" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat" # behat_hooks::i_look_for_exceptions()
And I click on "Edit tag name" "link" in the "Turtle" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the field "New name for tag Turtle" to "DOG" # behat_hooks::i_look_for_exceptions()
And I press key "13" in the field "New name for tag Turtle" # behat_hooks::i_look_for_exceptions()
And I should see "The tag name is already in use. Do you want to combine these tags?" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And "New name for tag" "field" should not exist # behat_hooks::i_look_for_exceptions()
And I should see "Turtle" # behat_hooks::i_look_for_exceptions()
And I should see "Dog" # behat_hooks::i_look_for_exceptions()
And I should not see "DOG" # behat_hooks::i_look_for_exceptions()
And I follow "Default collection" # behat_hooks::i_look_for_exceptions()
And I should see "Turtle" # behat_hooks::i_look_for_exceptions()
And I should see "Dog" # behat_hooks::i_look_for_exceptions()
And I should not see "DOG" # behat_hooks::i_look_for_exceptions()
And I click on "Edit tag name" "link" in the "Dog" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the field "New name for tag Dog" to "Penguin" # behat_hooks::i_look_for_exceptions()
And I press key "27" in the field "New name for tag Dog" # behat_hooks::i_look_for_exceptions()
And "New name for tag" "field" should not exist # behat_hooks::i_look_for_exceptions()
And I should see "Turtle" # behat_hooks::i_look_for_exceptions()
And I should not see "Penguin" # behat_hooks::i_look_for_exceptions()
And I follow "Default collection" # behat_hooks::i_look_for_exceptions()
And I should see "Turtle" # behat_hooks::i_look_for_exceptions()
And I should not see "Penguin" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Combining tags when renaming # C:\Apache24\htdocs\integration\tag\tests\behat\edit_tag.feature:188
When I log in as "manager1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Manage tags" node in "Site administration > Appearance" # behat_hooks::i_look_for_exceptions()
And I follow "Default collection" # behat_hooks::i_look_for_exceptions()
And I click on "Edit tag name" "link" in the "Turtle" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the field "New name for tag Turtle" to "DOG" # behat_hooks::i_look_for_exceptions()
And I press key "13" in the field "New name for tag Turtle" # behat_hooks::i_look_for_exceptions()
And I should see "The tag name is already in use. Do you want to combine these tags?" # behat_hooks::i_look_for_exceptions()
And I press "Yes" # behat_hooks::i_look_for_exceptions()
Then I should not see "Turtle" # behat_hooks::i_look_for_exceptions()
And I should not see "DOG" # behat_hooks::i_look_for_exceptions()
And I should see "Dog" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Combining multiple tags # C:\Apache24\htdocs\integration\tag\tests\behat\edit_tag.feature:203
When I log in as "manager1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Manage tags" node in "Site administration > Appearance" # behat_hooks::i_look_for_exceptions()
And I follow "Default collection" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Select tag Dog | 1 |
| Select tag Neverusedtag | 1 |
| Select tag Turtle | 1 |
And I press "Combine selected" # behat_hooks::i_look_for_exceptions()
And I should see "Select the tag that will be used after combining" # behat_hooks::i_look_for_exceptions()
And I click on "//form[@id='combinetags_form']//input[@type='radio'][3]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
Then I should see "Tags are combined" # behat_hooks::i_look_for_exceptions()
And I should not see "Dog" # behat_hooks::i_look_for_exceptions()
And I should not see "Neverusedtag" # behat_hooks::i_look_for_exceptions()
And I should see "Turtle" # behat_hooks::i_look_for_exceptions()
And "Remove from standard tags" "link" should exist in the "Turtle" "table_row" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Filtering tags # C:\Apache24\htdocs\integration\tag\tests\behat\edit_tag.feature:223
When I log in as "manager1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Manage tags" node in "Site administration > Appearance" # behat_hooks::i_look_for_exceptions()
And I follow "Default collection" # behat_hooks::i_look_for_exceptions()
And I should not see "Reset filter" # behat_hooks::i_look_for_exceptions()
And I set the field "Search" to "t" # behat_hooks::i_look_for_exceptions()
And I press "Search" # behat_hooks::i_look_for_exceptions()
Then the field "Search" matches value "t" # behat_hooks::i_look_for_exceptions()
And I should not see "Dog" # behat_hooks::i_look_for_exceptions()
And I should see "Cat" # behat_hooks::i_look_for_exceptions()
And I should see "Turtle" # behat_hooks::i_look_for_exceptions()
And I follow "Reset filter" # behat_hooks::i_look_for_exceptions()
And I should see "Dog" # behat_hooks::i_look_for_exceptions()
And I should see "Cat" # behat_hooks::i_look_for_exceptions()
And I should see "Turtle" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@mod @mod_wiki @core_tag @javascript
Feature: Edited wiki pages handle tags correctly
In order to get wiki pages properly labelled
As a user
I need to introduce the tags while editing
Background: # C:\Apache24\htdocs\integration\mod\wiki\tests\behat\edit_tags.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Wiki" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Wiki name | Test wiki name |
| Description | Test wiki description |
| First page name | First page |
| Wiki mode | Collaborative wiki |
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Wiki page edition of custom tags works as expected # C:\Apache24\htdocs\integration\mod\wiki\tests\behat\edit_tags.feature:29
Given I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test wiki name" # behat_hooks::i_look_for_exceptions()
And I press "Create page" # behat_hooks::i_look_for_exceptions()
When I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| HTML format | Student page contents to be tagged |
| Tags | Example, Page, Cool |
And I press "Save" # behat_hooks::i_look_for_exceptions()
Then I should see "Example" in the ".wiki-tags" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Page" in the ".wiki-tags" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Cool" in the ".wiki-tags" "css_element" # behat_hooks::i_look_for_exceptions()
And I follow "Edit" # behat_hooks::i_look_for_exceptions()
Then I should see "Example" in the ".form-autocomplete-selection" "css_element" # behat_hooks::i_look_for_exceptions()
Then I should see "Page" in the ".form-autocomplete-selection" "css_element" # behat_hooks::i_look_for_exceptions()
Then I should see "Cool" in the ".form-autocomplete-selection" "css_element" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Wiki page edition of standard tags works as expected # C:\Apache24\htdocs\integration\mod\wiki\tests\behat\edit_tags.feature:48
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I expand "Site administration" node # behat_hooks::i_look_for_exceptions()
And I expand "Appearance" node # behat_hooks::i_look_for_exceptions()
And I follow "Manage tags" # behat_hooks::i_look_for_exceptions()
And I follow "Default collection" # behat_hooks::i_look_for_exceptions()
And I follow "Add standard tags" # behat_hooks::i_look_for_exceptions()
And I set the field "Enter comma-separated list of new tags" to "OT1, OT2, OT3" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test wiki name" # behat_hooks::i_look_for_exceptions()
And I press "Create page" # behat_hooks::i_look_for_exceptions()
And I click on ".form-autocomplete-downarrow" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "OT1" in the ".form-autocomplete-suggestions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "OT2" in the ".form-autocomplete-suggestions" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "OT3" in the ".form-autocomplete-suggestions" "css_element" # behat_hooks::i_look_for_exceptions()
When I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| HTML format | Student page contents to be tagged |
| Tags | OT1, OT3 |
And I press "Save" # behat_hooks::i_look_for_exceptions()
Then I should see "OT1" in the ".wiki-tags" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "OT3" in the ".wiki-tags" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "OT2" in the ".wiki-tags" "css_element" # behat_hooks::i_look_for_exceptions()
And I follow "Edit" # behat_hooks::i_look_for_exceptions()
And I should see "OT1" in the ".form-autocomplete-selection" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "OT3" in the ".form-autocomplete-selection" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "OT2" in the ".form-autocomplete-selection" "css_element" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
@mod @mod_quiz
Feature: Edit quiz page - adding things
In order to build the quiz I want my students to attempt
As a teacher
I need to be able to add questions to the quiz.
Background: # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_add.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber |
| quiz | Quiz 1 | Quiz 1 for testing the Add menu | C1 | quiz1 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit quiz" node in "Quiz administration" # behat_hooks::i_look_for_exceptions()
Then I should see "Editing quiz: Quiz 1" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Add some new question to the quiz using '+ a new question' options of the 'Add' menu. # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_add.feature:27
And I open the "last" add to quiz menu # behat_hooks::i_look_for_exceptions()
And I follow "a new question" # behat_hooks::i_look_for_exceptions()
And I set the field "item_qtype_essay" to "1" # behat_hooks::i_look_for_exceptions()
And I press "submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Adding an Essay question" # behat_hooks::i_look_for_exceptions()
And I set the field "Question name" to "Essay 01 new" # behat_hooks::i_look_for_exceptions()
And I set the field "Question text" to "Please write 200 words about Essay 01" # behat_hooks::i_look_for_exceptions()
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Editing quiz: Quiz 1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 01 new" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I open the "Page 1" add to quiz menu # behat_hooks::i_look_for_exceptions()
And I follow "a new question" # behat_hooks::i_look_for_exceptions()
And I set the field "item_qtype_essay" to "1" # behat_hooks::i_look_for_exceptions()
And I press "submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Adding an Essay question" # behat_hooks::i_look_for_exceptions()
And I set the field "Question name" to "Essay 02 new" # behat_hooks::i_look_for_exceptions()
And I set the field "Question text" to "Please write 200 words about Essay 02" # behat_hooks::i_look_for_exceptions()
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Editing quiz: Quiz 1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 01 new" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 02 new" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I open the "Page 1" add to quiz menu # behat_hooks::i_look_for_exceptions()
And I follow "a new question" # behat_hooks::i_look_for_exceptions()
And I set the field "item_qtype_essay" to "1" # behat_hooks::i_look_for_exceptions()
And I press "submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Adding an Essay question" # behat_hooks::i_look_for_exceptions()
And I set the field "Question name" to "Essay 03 new" # behat_hooks::i_look_for_exceptions()
And I set the field "Question text" to "Please write 300 words about Essay 03" # behat_hooks::i_look_for_exceptions()
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Editing quiz: Quiz 1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 01 new" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 02 new" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 03 new" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I open the "Page 1" add to quiz menu # behat_hooks::i_look_for_exceptions()
And I follow "a new question" # behat_hooks::i_look_for_exceptions()
And I set the field "item_qtype_essay" to "1" # behat_hooks::i_look_for_exceptions()
And I press "submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Adding an Essay question" # behat_hooks::i_look_for_exceptions()
And I set the field "Question name" to "Essay 04 new" # behat_hooks::i_look_for_exceptions()
And I set the field "Question text" to "Please write 300 words about Essay 04" # behat_hooks::i_look_for_exceptions()
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Editing quiz: Quiz 1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 01 new" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 02 new" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 03 new" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 04 new" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should not see "Page 2" # behat_hooks::i_look_for_exceptions()
When I press "Repaginate" # behat_hooks::i_look_for_exceptions()
Then I should see "Repaginate with" # behat_hooks::i_look_for_exceptions()
And I set the field "menuquestionsperpage" to "2" # behat_hooks::i_look_for_exceptions()
When I press "Go" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 01 new" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 02 new" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 03 new" on quiz page "2" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 04 new" on quiz page "2" # behat_hooks::i_look_for_exceptions()
When I open the "Page 2" add to quiz menu # behat_hooks::i_look_for_exceptions()
And I choose "a new question" in the open action menu # behat_hooks::i_look_for_exceptions()
And I set the field "item_qtype_essay" to "1" # behat_hooks::i_look_for_exceptions()
And I press "submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Adding an Essay question" # behat_hooks::i_look_for_exceptions()
When I set the field "Question name" to "Essay for page 2" # behat_hooks::i_look_for_exceptions()
And I set the field "Question text" to "Please write 200 words about Essay for page 2" # behat_hooks::i_look_for_exceptions()
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Editing quiz: Quiz 1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 01 new" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 02 new" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 03 new" on quiz page "2" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 04 new" on quiz page "2" # behat_hooks::i_look_for_exceptions()
And I should see "Essay for page 2" on quiz page "2" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Add questions from question bank to the quiz. In order to be able to # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_add.feature:106
add questions from question bank to the quiz, first we create some new questions
in various categories and add them to the question bank.
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Categories" node in "Course administration > Question bank" # behat_hooks::i_look_for_exceptions()
Then I should see "Add category" # behat_hooks::i_look_for_exceptions()
Then I set the field "Parent category" to "Default for C1" # behat_hooks::i_look_for_exceptions()
And I set the field "Name" to "Subcat 1" # behat_hooks::i_look_for_exceptions()
And I set the field "Category info" to "This is sub category 1" # behat_hooks::i_look_for_exceptions()
Then I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
And I should see "Subcat 1" # behat_hooks::i_look_for_exceptions()
Then I set the field "Parent category" to "Default for C1" # behat_hooks::i_look_for_exceptions()
And I set the field "Name" to "Subcat 2" # behat_hooks::i_look_for_exceptions()
And I set the field "Category info" to "This is sub category 2" # behat_hooks::i_look_for_exceptions()
Then I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
And I should see "Subcat 2" # behat_hooks::i_look_for_exceptions()
And I navigate to "Questions" node in "Course administration > Question bank" # behat_hooks::i_look_for_exceptions()
Then I should see "Question bank" # behat_hooks::i_look_for_exceptions()
And I should see "Select a category" # behat_hooks::i_look_for_exceptions()
When I press "Create a new question ..." # behat_hooks::i_look_for_exceptions()
And I set the field "item_qtype_essay" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Add" # behat_hooks::i_look_for_exceptions()
Then I should see "Adding an Essay question" # behat_hooks::i_look_for_exceptions()
And I set the field "Question name" to "Essay 01" # behat_hooks::i_look_for_exceptions()
And I set the field "Question text" to "Please write 100 words about Essay 01" # behat_hooks::i_look_for_exceptions()
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Question bank" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 01" # behat_hooks::i_look_for_exceptions()
And I should see "Select a category" # behat_hooks::i_look_for_exceptions()
And I set the field "Select a category:" to "Subcat 1" # behat_hooks::i_look_for_exceptions()
When I press "Create a new question ..." # behat_hooks::i_look_for_exceptions()
And I set the field "item_qtype_essay" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Add" # behat_hooks::i_look_for_exceptions()
Then I should see "Adding an Essay question" # behat_hooks::i_look_for_exceptions()
And I set the field "Question name" to "Essay 02" # behat_hooks::i_look_for_exceptions()
And I set the field "Question text" to "Please write 200 words about Essay 02" # behat_hooks::i_look_for_exceptions()
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Question bank" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 02" # behat_hooks::i_look_for_exceptions()
And I set the field "Select a category" to "Default for C1" # behat_hooks::i_look_for_exceptions()
And I wait until the page is ready # behat_hooks::i_look_for_exceptions()
When I press "Create a new question ..." # behat_hooks::i_look_for_exceptions()
And I set the field "item_qtype_essay" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Add" # behat_hooks::i_look_for_exceptions()
Then I should see "Adding an Essay question" # behat_hooks::i_look_for_exceptions()
And I set the field "Question name" to "Essay 03" # behat_hooks::i_look_for_exceptions()
And I set the field "Question text" to "Please write 300 words about Essay 03" # behat_hooks::i_look_for_exceptions()
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Question bank" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 03" # behat_hooks::i_look_for_exceptions()
When I press "Create a new question ..." # behat_hooks::i_look_for_exceptions()
And I set the field "item_qtype_truefalse" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Add" # behat_hooks::i_look_for_exceptions()
Then I should see "Adding a True/False question" # behat_hooks::i_look_for_exceptions()
And I set the field "Question name" to "TF 01" # behat_hooks::i_look_for_exceptions()
And I set the field "Question text" to "The correct answer is true" # behat_hooks::i_look_for_exceptions()
And I set the field "Correct answer" to "True" # behat_hooks::i_look_for_exceptions()
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Question bank" # behat_hooks::i_look_for_exceptions()
And I should see "TF 01" # behat_hooks::i_look_for_exceptions()
When I press "Create a new question ..." # behat_hooks::i_look_for_exceptions()
And I set the field "item_qtype_truefalse" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Add" # behat_hooks::i_look_for_exceptions()
Then I should see "Adding a True/False question" # behat_hooks::i_look_for_exceptions()
And I set the field "Question name" to "TF 02" # behat_hooks::i_look_for_exceptions()
And I set the field "Question text" to "The correct answer is false" # behat_hooks::i_look_for_exceptions()
And I set the field "Correct answer" to "False" # behat_hooks::i_look_for_exceptions()
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Question bank" # behat_hooks::i_look_for_exceptions()
And I should see "TF 02" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I click on "Edit quiz" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I open the "last" add to quiz menu # behat_hooks::i_look_for_exceptions()
And I follow "from question bank" # behat_hooks::i_look_for_exceptions()
And I click on "Add to quiz" "link" in the "Essay 03" "table_row" # behat_hooks::i_look_for_exceptions()
Then I should see "Editing quiz: Quiz 1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 03" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I open the "Page 1" add to quiz menu # behat_hooks::i_look_for_exceptions()
And I follow "from question bank" # behat_hooks::i_look_for_exceptions()
And I click on "Add to quiz" "link" in the "Essay 01" "table_row" # behat_hooks::i_look_for_exceptions()
Then I should see "Editing quiz: Quiz 1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 03" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 01" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I open the "Page 1" add to quiz menu # behat_hooks::i_look_for_exceptions()
And I follow "from question bank" # behat_hooks::i_look_for_exceptions()
And I should see "Select a category" # behat_hooks::i_look_for_exceptions()
And I set the field "Select a category" to "Subcat 1" # behat_hooks::i_look_for_exceptions()
And I click on "Add to quiz" "link" in the "Essay 02" "table_row" # behat_hooks::i_look_for_exceptions()
Then I should see "Editing quiz: Quiz 1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 03" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 01" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 02" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I open the "Page 1" add to quiz menu # behat_hooks::i_look_for_exceptions()
And I follow "a random question" # behat_hooks::i_look_for_exceptions()
And I press "Add random question" # behat_hooks::i_look_for_exceptions()
Then I should see "Editing quiz: Quiz 1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 03" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 01" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 02" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Random" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should not see "Page 2" # behat_hooks::i_look_for_exceptions()
When I press "Repaginate" # behat_hooks::i_look_for_exceptions()
Then I should see "Repaginate with" # behat_hooks::i_look_for_exceptions()
And I set the field "menuquestionsperpage" to "1" # behat_hooks::i_look_for_exceptions()
When I press "Go" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 03" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 01" on quiz page "2" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 02" on quiz page "3" # behat_hooks::i_look_for_exceptions()
And I should see "Random" on quiz page "4" # behat_hooks::i_look_for_exceptions()
And I open the "Page 4" add to quiz menu # behat_hooks::i_look_for_exceptions()
And I choose "a new question" in the open action menu # behat_hooks::i_look_for_exceptions()
And I set the field "item_qtype_essay" to "1" # behat_hooks::i_look_for_exceptions()
And I press "submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Adding an Essay question" # behat_hooks::i_look_for_exceptions()
And I set the field "Question name" to "Essay for page 4" # behat_hooks::i_look_for_exceptions()
And I set the field "Question text" to "Please write 200 words about Essay for page 4" # behat_hooks::i_look_for_exceptions()
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Editing quiz: Quiz 1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 03" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 01" on quiz page "2" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 02" on quiz page "3" # behat_hooks::i_look_for_exceptions()
And I should see "Random" on quiz page "4" # behat_hooks::i_look_for_exceptions()
And I should see "Essay for page 4" on quiz page "4" # behat_hooks::i_look_for_exceptions()
@mod @mod_quiz
Feature: Edit quiz page - drag-and-drop
In order to change the layout of a quiz I built
As a teacher
I need to be able to drag and drop questions to reorder them.
Background: # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_move_by_click.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | Question A | This is question 01 |
| Test questions | truefalse | Question B | This is question 02 |
| Test questions | truefalse | Question C | This is question 03 |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | course | idnumber |
| quiz | Quiz 1 | C1 | quiz1 |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page |
| Question A | 1 |
| Question B | 1 |
| Question C | 2 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I click on "Edit quiz" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Re-order questions by clicking on the move icon. # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_move_by_click.feature:39
Then I should see "Question A" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Question B" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Question C" on quiz page "2" # behat_hooks::i_look_for_exceptions()
When I move "Question A" to "After Question 2" in the quiz by clicking the move icon # behat_hooks::i_look_for_exceptions()
Then I should see "Question B" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Question A" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Question B" before "Question A" on the edit quiz page # behat_hooks::i_look_for_exceptions()
And I should see "Question C" on quiz page "2" # behat_hooks::i_look_for_exceptions()
When I move "Question A" to "After Page 2" in the quiz by clicking the move icon # behat_hooks::i_look_for_exceptions()
Then I should see "Question B" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Question A" on quiz page "2" # behat_hooks::i_look_for_exceptions()
And I should see "Question C" on quiz page "2" # behat_hooks::i_look_for_exceptions()
And I should see "Question A" before "Question C" on the edit quiz page # behat_hooks::i_look_for_exceptions()
When I move "Question B" to "After Question 2" in the quiz by clicking the move icon # behat_hooks::i_look_for_exceptions()
Then I should see "Question A" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Question B" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Question C" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Question A" before "Question B" on the edit quiz page # behat_hooks::i_look_for_exceptions()
And I should see "Question B" before "Question C" on the edit quiz page # behat_hooks::i_look_for_exceptions()
When I move "Question B" to "After Page 1" in the quiz by clicking the move icon # behat_hooks::i_look_for_exceptions()
Then I should see "Question B" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Question A" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Question C" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Question B" before "Question A" on the edit quiz page # behat_hooks::i_look_for_exceptions()
And I should see "Question A" before "Question C" on the edit quiz page # behat_hooks::i_look_for_exceptions()
When I click on the "Add" page break icon after question "Question A" # behat_hooks::i_look_for_exceptions()
When I open the "Page 2" add to quiz menu # behat_hooks::i_look_for_exceptions()
And I choose "a new question" in the open action menu # behat_hooks::i_look_for_exceptions()
And I set the field "item_qtype_description" to "1" # behat_hooks::i_look_for_exceptions()
And I press "submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Adding a description" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Question name | Question D |
| Question text | Useful info |
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Question B" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Question A" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Question C" on quiz page "2" # behat_hooks::i_look_for_exceptions()
And I should see "Question D" on quiz page "2" # behat_hooks::i_look_for_exceptions()
And I should see "Question B" before "Question A" on the edit quiz page # behat_hooks::i_look_for_exceptions()
And I should see "Question C" before "Question D" on the edit quiz page # behat_hooks::i_look_for_exceptions()
And "Question B" should have number "1" on the edit quiz page # behat_hooks::i_look_for_exceptions()
And "Question A" should have number "2" on the edit quiz page # behat_hooks::i_look_for_exceptions()
And "Question C" should have number "3" on the edit quiz page # behat_hooks::i_look_for_exceptions()
And "Question D" should have number "i" on the edit quiz page # behat_hooks::i_look_for_exceptions()
When I move "Question D" to "After Question 2" in the quiz by clicking the move icon # behat_hooks::i_look_for_exceptions()
Then I should see "Question B" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Question D" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Question A" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Question C" on quiz page "2" # behat_hooks::i_look_for_exceptions()
And I should see "Question B" before "Question A" on the edit quiz page # behat_hooks::i_look_for_exceptions()
And I should see "Question A" before "Question D" on the edit quiz page # behat_hooks::i_look_for_exceptions()
And "Question B" should have number "1" on the edit quiz page # behat_hooks::i_look_for_exceptions()
And "Question D" should have number "i" on the edit quiz page # behat_hooks::i_look_for_exceptions()
And "Question A" should have number "2" on the edit quiz page # behat_hooks::i_look_for_exceptions()
And "Question C" should have number "3" on the edit quiz page # behat_hooks::i_look_for_exceptions()
@mod @mod_quiz
Feature: Edit quiz page - remove questions
In order to change the layout of a quiz I built
As a teacher
I need to be able to delete questions.
Background: # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_remove_question.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | course | idnumber |
| quiz | Quiz 1 | C1 | quiz1 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Delete questions by clicking on the delete icon. # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_remove_question.feature:28
Given the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | Question A | This is question 01 |
| Test questions | truefalse | Question B | This is question 02 |
| Test questions | truefalse | Question C | This is question 03 |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page |
| Question A | 1 |
| Question B | 1 |
| Question C | 2 |
And I click on "Edit quiz" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
Then I should see "Question A" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Question B" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Question C" on quiz page "2" # behat_hooks::i_look_for_exceptions()
And I should see "Total of marks: 3.00" # behat_hooks::i_look_for_exceptions()
And I should see "Questions: 3" # behat_hooks::i_look_for_exceptions()
And I should see "This quiz is open" # behat_hooks::i_look_for_exceptions()
When I delete "Question C" in the quiz by clicking the delete icon # behat_hooks::i_look_for_exceptions()
Then I should see "Question A" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Question B" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should not see "Question C" on quiz page "2" # behat_hooks::i_look_for_exceptions()
And I should see "Total of marks: 2.00" # behat_hooks::i_look_for_exceptions()
And I should see "Questions: 2" # behat_hooks::i_look_for_exceptions()
When I click on the "Add" page break icon after question "Question A" # behat_hooks::i_look_for_exceptions()
Then I should see "Question B" on quiz page "2" # behat_hooks::i_look_for_exceptions()
And the "Remove" page break icon after question "Question A" should exist # behat_hooks::i_look_for_exceptions()
And I delete "Question A" in the quiz by clicking the delete icon # behat_hooks::i_look_for_exceptions()
Then I should see "Question B" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should not see "Page 2" # behat_hooks::i_look_for_exceptions()
And I should not see "Question A" on quiz page "2" # behat_hooks::i_look_for_exceptions()
And the "Remove" page break icon after question "Question B" should not exist # behat_hooks::i_look_for_exceptions()
And I should see "Total of marks: 1.00" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Cannot delete the last question in a section. # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_remove_question.feature:69
Given the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | Question A | This is question 01 |
| Test questions | truefalse | Question B | This is question 02 |
| Test questions | truefalse | Question C | This is question 03 |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page |
| Question A | 1 |
| Question B | 1 |
| Question C | 2 |
And quiz "Quiz 1" contains the following sections: # behat_hooks::i_look_for_exceptions()
| heading | firstslot | shuffle |
| Heading 1 | 1 | 1 |
| Heading 2 | 2 | 1 |
When I click on "Edit quiz" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
Then "Delete" "link" in the "Question A" "list_item" should not be visible # behat_hooks::i_look_for_exceptions()
Then "Delete" "link" in the "Question B" "list_item" should be visible # behat_hooks::i_look_for_exceptions()
Then "Delete" "link" in the "Question C" "list_item" should be visible # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Can delete the last question in a quiz. # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_remove_question.feature:90
Given the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | Question A | This is question 01 |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page |
| Question A | 1 |
When I click on "Edit quiz" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I delete "Question A" in the quiz by clicking the delete icon # behat_hooks::i_look_for_exceptions()
Then I should see "Questions: 0" # behat_hooks::i_look_for_exceptions()
@mod @mod_quiz
Feature: Edit quiz page - pagination
In order to build a quiz laid out in pages the way I want
As a teacher
I need to be able to add and remove pages, and repaginate.
Background: # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_repaginate.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 |
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I click on "Edit quiz" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Repaginate questions with N question(s) per page as well as clicking # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_repaginate.feature:27
on "add page break" or "Remove page break" icons to repaginate in any desired format.
Then I should see "Editing quiz: Quiz 1" # behat_hooks::i_look_for_exceptions()
And I click on "Add" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I follow "a new question" # behat_hooks::i_look_for_exceptions()
And I set the field "item_qtype_essay" to "1" # behat_hooks::i_look_for_exceptions()
And I press "submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Adding an Essay question" # behat_hooks::i_look_for_exceptions()
And I set the field "Question name" to "Essay 01 new" # behat_hooks::i_look_for_exceptions()
And I set the field "Question text" to "Please write 100 words about Essay 01" # behat_hooks::i_look_for_exceptions()
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Editing quiz: Quiz 1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 01 new" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I click on "Add" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I follow "a new question" # behat_hooks::i_look_for_exceptions()
And I set the field "item_qtype_essay" to "1" # behat_hooks::i_look_for_exceptions()
And I press "submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Adding an Essay question" # behat_hooks::i_look_for_exceptions()
And I set the field "Question name" to "Essay 02 new" # behat_hooks::i_look_for_exceptions()
And I set the field "Question text" to "Please write 200 words about Essay 02" # behat_hooks::i_look_for_exceptions()
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Editing quiz: Quiz 1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 01 new" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 02 new" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should not see "Page 2" # behat_hooks::i_look_for_exceptions()
When I click on the "Add" page break icon after question "Essay 01 new" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 01 new" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 02 new" on quiz page "2" # behat_hooks::i_look_for_exceptions()
When I click on the "Remove" page break icon after question "Essay 01 new" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 01 new" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 02 new" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should not see "Page 2" # behat_hooks::i_look_for_exceptions()
And I click on "Add" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I follow "a new question" # behat_hooks::i_look_for_exceptions()
And I set the field "item_qtype_essay" to "1" # behat_hooks::i_look_for_exceptions()
And I press "submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Adding an Essay question" # behat_hooks::i_look_for_exceptions()
And I set the field "Question name" to "Essay 03 new" # behat_hooks::i_look_for_exceptions()
And I set the field "Question text" to "Please write 200 words about Essay 03" # behat_hooks::i_look_for_exceptions()
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Editing quiz: Quiz 1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 01 new" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 02 new" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 03 new" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should not see "Page 2" # behat_hooks::i_look_for_exceptions()
And I should not see "Page 3" # behat_hooks::i_look_for_exceptions()
When I click on the "Add" page break icon after question "Essay 02 new" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 01 new" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 02 new" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 03 new" on quiz page "2" # behat_hooks::i_look_for_exceptions()
And I should not see "Page 3" # behat_hooks::i_look_for_exceptions()
When I click on the "Add" page break icon after question "Essay 01 new" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 01 new" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 02 new" on quiz page "2" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 03 new" on quiz page "3" # behat_hooks::i_look_for_exceptions()
When I click on the "Remove" page break icon after question "Essay 02 new" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 01 new" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 02 new" on quiz page "2" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 03 new" on quiz page "2" # behat_hooks::i_look_for_exceptions()
And I should not see "Page 3" # behat_hooks::i_look_for_exceptions()
When I click on the "Remove" page break icon after question "Essay 01 new" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 01 new" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 02 new" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 03 new" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should not see "Page 2" # behat_hooks::i_look_for_exceptions()
And I should not see "Page 3" # behat_hooks::i_look_for_exceptions()
When I press "Repaginate" # behat_hooks::i_look_for_exceptions()
And I set the field "menuquestionsperpage" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Go" # behat_hooks::i_look_for_exceptions()
Then I should see "Essay 01 new" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 02 new" on quiz page "2" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 03 new" on quiz page "3" # behat_hooks::i_look_for_exceptions()
When I open the "Page 3" add to quiz menu # behat_hooks::i_look_for_exceptions()
And I choose "a new question" in the open action menu # behat_hooks::i_look_for_exceptions()
And I set the field "item_qtype_essay" to "1" # behat_hooks::i_look_for_exceptions()
And I press "submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Adding an Essay question" # behat_hooks::i_look_for_exceptions()
When I set the field "Question name" to "Essay 04 new" # behat_hooks::i_look_for_exceptions()
And I set the field "Question text" to "Please write 300 words about Essay 04" # behat_hooks::i_look_for_exceptions()
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Editing quiz: Quiz 1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 01 new" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 02 new" on quiz page "2" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 03 new" on quiz page "3" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 04 new" on quiz page "3" # behat_hooks::i_look_for_exceptions()
When I click on the "Add" page break icon after question "Essay 03 new" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 01 new" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 02 new" on quiz page "2" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 03 new" on quiz page "3" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 04 new" on quiz page "4" # behat_hooks::i_look_for_exceptions()
When I press "Repaginate" # behat_hooks::i_look_for_exceptions()
And I set the field "menuquestionsperpage" to "2" # behat_hooks::i_look_for_exceptions()
And I press "Go" # behat_hooks::i_look_for_exceptions()
Then I should see "Essay 01 new" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 02 new" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 03 new" on quiz page "2" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 04 new" on quiz page "2" # behat_hooks::i_look_for_exceptions()
When I press "Repaginate" # behat_hooks::i_look_for_exceptions()
And I set the field "menuquestionsperpage" to "Unlimited" # behat_hooks::i_look_for_exceptions()
And I press "Go" # behat_hooks::i_look_for_exceptions()
Then I should see "Essay 01 new" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 02 new" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 03 new" on quiz page "1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay 04 new" on quiz page "1" # behat_hooks::i_look_for_exceptions()
@mod @mod_quiz
Feature: Edit quizzes where some questions require the previous one to have been completed
In order to create quizzes where later questions can only be seen after earlier ones are answered
As a teacher
I need to be able to configure this on the Edit quiz page
Background: # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_require_previous.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: The first question cannot depend on the previous (whatever is in the DB) # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_require_previous.feature:23
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | preferredbehaviour |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | immediatefeedback |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | TF1 | First question |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page | requireprevious |
| TF1 | 1 | 1 |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I click on "Edit quiz" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
Then "be attempted" "link" should not be visible # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: If the second question depends on the first, that is shown # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_require_previous.feature:40
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | preferredbehaviour |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | immediatefeedback |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | TF1 | First question |
| Test questions | truefalse | TF2 | Second question |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page | requireprevious |
| TF1 | 1 | 0 |
| TF2 | 1 | 1 |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I click on "Edit quiz" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
Then "This question cannot be attempted until the previous question has been completed." "link" should be visible # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: A question can depend on a random question # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_require_previous.feature:58
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | preferredbehaviour |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | immediatefeedback |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | TF1 | First question |
| Test questions | random | Random (Test questions) | 0 |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page | requireprevious |
| Random (Test questions) | 1 | 0 |
| TF1 | 1 | 1 |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I click on "Edit quiz" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
Then "This question cannot be attempted until the previous question has been completed." "link" should be visible # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: The second question can be set to depend on the first # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_require_previous.feature:76
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | preferredbehaviour |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | immediatefeedback |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | TF1 | First question |
| Test questions | truefalse | TF2 | Second question |
| Test questions | truefalse | TF3 | Third question |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page | requireprevious |
| TF1 | 1 | 0 |
| TF2 | 1 | 0 |
| TF3 | 1 | 0 |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I click on "Edit quiz" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
When I follow "No restriction on when question 2 can be attempted • Click to change" # behat_hooks::i_look_for_exceptions()
Then "Question 2 cannot be attempted until the previous question 1 has been completed • Click to change" "link" should be visible # behat_hooks::i_look_for_exceptions()
And "No restriction on when question 3 can be attempted • Click to change" "link" should be visible # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: A question that did depend on the previous can be un-linked # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_require_previous.feature:98
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | preferredbehaviour |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | immediatefeedback |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | TF1 | First question |
| Test questions | truefalse | TF2 | Second question |
| Test questions | truefalse | TF3 | Third question |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page | requireprevious |
| TF1 | 1 | 0 |
| TF2 | 1 | 1 |
| TF3 | 1 | 1 |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I click on "Edit quiz" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
When I follow "Question 3 cannot be attempted until the previous question 2 has been completed • Click to change" # behat_hooks::i_look_for_exceptions()
Then "Question 2 cannot be attempted until the previous question 1 has been completed • Click to change" "link" should be visible # behat_hooks::i_look_for_exceptions()
And "No restriction on when question 3 can be attempted • Click to change" "link" should be visible # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Question dependency cannot apply to deferred feedback quizzes so UI is hidden # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_require_previous.feature:120
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | preferredbehaviour |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | deferredfeedback |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | TF1 | First question |
| Test questions | truefalse | TF2 | Second question |
| Test questions | random | Random (Test questions) | 0 |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page | requireprevious |
| Random (Test questions) | 1 | 0 |
| TF1 | 1 | 1 |
| TF2 | 1 | 1 |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I click on "Edit quiz" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
Then "be attempted" "link" in the "TF1" "list_item" should not be visible # behat_hooks::i_look_for_exceptions()
Then "be attempted" "link" in the "TF2" "list_item" should not be visible # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Question dependency cannot apply to questions in a shuffled section so UI is hidden # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_require_previous.feature:141
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | preferredbehaviour | questionsperpage |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | immediatefeedback | 2 |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | TF1 | First question |
| Test questions | truefalse | TF2 | Second question |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page | requireprevious |
| TF1 | 1 | 1 |
| TF2 | 1 | 1 |
And quiz "Quiz 1" contains the following sections: # behat_hooks::i_look_for_exceptions()
| heading | firstslot | shuffle |
| Section 1 | 1 | 1 |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I click on "Edit quiz" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
Then "be attempted" "link" in the "TF2" "list_item" should not be visible # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Question dependency cannot apply to the first questions in section when the previous section is shuffled # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_require_previous.feature:162
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | preferredbehaviour | questionsperpage |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | immediatefeedback | 2 |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | TF1 | First question |
| Test questions | truefalse | TF2 | Second question |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page | requireprevious |
| TF1 | 1 | 1 |
| TF2 | 1 | 1 |
And quiz "Quiz 1" contains the following sections: # behat_hooks::i_look_for_exceptions()
| heading | firstslot | shuffle |
| Section 1 | 1 | 1 |
| Section 2 | 2 | 0 |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I click on "Edit quiz" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
Then "be attempted" "link" in the "TF2" "list_item" should not be visible # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Question dependency cannot apply to quizzes with sequential navigation so UI is hidden # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_require_previous.feature:184
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | preferredbehaviour | navmethod |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | immediatefeedback | sequential |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | TF1 | First question |
| Test questions | truefalse | TF2 | Second question |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page | requireprevious |
| TF1 | 1 | 1 |
| TF2 | 1 | 1 |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I click on "Edit quiz" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
Then "be attempted" "link" in the "TF2" "list_item" should not be visible # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: A question can never depend on an essay # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_require_previous.feature:202
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | preferredbehaviour |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | immediatefeedback |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | essay | Story | First question |
| Test questions | truefalse | TF1 | First question |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page | requireprevious |
| Story | 1 | 0 |
| TF1 | 1 | 0 |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I click on "Edit quiz" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
Then "be attempted" "link" in the "TF1" "list_item" should not be visible # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: A question can never depend on a description # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_require_previous.feature:220
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | preferredbehaviour |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | immediatefeedback |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | description | Info | Read me |
| Test questions | truefalse | TF1 | First question |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page | requireprevious |
| Info | 1 | 0 |
| TF1 | 1 | 0 |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I click on "Edit quiz" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
Then "be attempted" "link" in the "TF1" "list_item" should not be visible # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: When questions are reordered, the dependency icons are updated correctly # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_require_previous.feature:238
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | preferredbehaviour |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | immediatefeedback |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | TF1 | First question |
| Test questions | truefalse | TF2 | Second question |
| Test questions | truefalse | TF3 | Third question |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page | requireprevious |
| TF1 | 1 | 0 |
| TF2 | 1 | 1 |
| TF3 | 1 | 1 |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I click on "Edit quiz" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
When I move "Question 1" to "After Question 3" in the quiz by clicking the move icon # behat_hooks::i_look_for_exceptions()
Then "Question 2 cannot be attempted until the previous question 1 has been completed • Click to change" "link" should be visible # behat_hooks::i_look_for_exceptions()
And "No restriction on when question 3 can be attempted • Click to change" "link" should be visible # behat_hooks::i_look_for_exceptions()
And "be attempted" "link" in the "TF2" "list_item" should not be visible # behat_hooks::i_look_for_exceptions()
@mod @mod_quiz
Feature: Edit quiz page - section headings
In order to build a quiz laid out in sections the way I want
As a teacher
I need to be able to add, edit and remove section headings as well as shuffle
questions within a section.
Background: # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_section_headings.feature:8
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: We have a quiz with one default section # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_section_headings.feature:24
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | TF1 | This is question 01 |
| Test questions | truefalse | TF2 | This is question 02 |
| Test questions | truefalse | TF3 | This is question 03 |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page |
| TF1 | 1 |
| TF2 | 2 |
| TF3 | 3 |
When I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I click on "Edit quiz" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
Then I should see "Shuffle" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Modify the default section headings # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_section_headings.feature:44
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 |
When I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I click on "Edit quiz" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I change quiz section heading "" to "This is section one" # behat_hooks::i_look_for_exceptions()
Then I should see "This is section one" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Modify section headings # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_section_headings.feature:55
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | TF1 | This is question 01 |
| Test questions | truefalse | TF2 | This is question 02 |
| Test questions | truefalse | TF3 | This is question 03 |
| Test questions | truefalse | TF4 | This is question 04 |
| Test questions | truefalse | TF5 | This is question 05 |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page |
| TF1 | 1 |
| TF2 | 2 |
| TF3 | 3 |
| TF4 | 3 |
And quiz "Quiz 1" contains the following sections: # behat_hooks::i_look_for_exceptions()
| heading | firstslot | shuffle |
| | 1 | 0 |
| Heading 2 | 2 | 0 |
| Heading 3 | 3 | 1 |
When I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I click on "Edit quiz" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I change quiz section heading "" to "This is section one" # behat_hooks::i_look_for_exceptions()
And I change quiz section heading "Heading 2" to "This is section two" # behat_hooks::i_look_for_exceptions()
Then I should see "This is section one" # behat_hooks::i_look_for_exceptions()
And I should see "This is section two" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Set section headings to blanks # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_section_headings.feature:86
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | TF1 | This is question 01 |
| Test questions | truefalse | TF2 | This is question 02 |
| Test questions | truefalse | TF3 | This is question 03 |
| Test questions | truefalse | TF4 | This is question 04 |
| Test questions | truefalse | TF5 | This is question 05 |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page |
| TF1 | 1 |
| TF2 | 2 |
| TF3 | 3 |
| TF4 | 3 |
And quiz "Quiz 1" contains the following sections: # behat_hooks::i_look_for_exceptions()
| heading | firstslot | shuffle |
| Heading 1 | 1 | 0 |
| Heading 2 | 2 | 0 |
| Heading 3 | 3 | 1 |
When I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I click on "Edit quiz" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
When I change quiz section heading "Heading 1" to "" # behat_hooks::i_look_for_exceptions()
Then I should not see "Heading 1" # behat_hooks::i_look_for_exceptions()
And I should see "Heading 2" # behat_hooks::i_look_for_exceptions()
And I should see "Heading 3" # behat_hooks::i_look_for_exceptions()
And I change quiz section heading "Heading 2" to "" # behat_hooks::i_look_for_exceptions()
And I should not see "Heading 1" # behat_hooks::i_look_for_exceptions()
And I should not see "Heading 2" # behat_hooks::i_look_for_exceptions()
And I should see "Heading 3" # behat_hooks::i_look_for_exceptions()
And I change quiz section heading "Heading 3" to "" # behat_hooks::i_look_for_exceptions()
And I should not see "Heading 1" # behat_hooks::i_look_for_exceptions()
And I should not see "Heading 2" # behat_hooks::i_look_for_exceptions()
And I should not see "Heading 3" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Remove a section # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_section_headings.feature:127
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | TF1 | This is question 01 |
| Test questions | truefalse | TF2 | This is question 02 |
| Test questions | truefalse | TF3 | This is question 03 |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page |
| TF1 | 1 |
| TF2 | 2 |
| TF3 | 3 |
And quiz "Quiz 1" contains the following sections: # behat_hooks::i_look_for_exceptions()
| heading | firstslot | shuffle |
| Heading 1 | 1 | 0 |
| Heading 2 | 2 | 0 |
| Heading 3 | 3 | 1 |
When I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I click on "Edit quiz" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I follow "Remove heading 'Heading 2'" # behat_hooks::i_look_for_exceptions()
And I should see "Are you sure you want to remove the 'Heading 2' section heading?" # behat_hooks::i_look_for_exceptions()
And I click on "Yes" "button" in the "Confirm" "dialogue" # behat_hooks::i_look_for_exceptions()
And I wait until the page is ready # behat_hooks::i_look_for_exceptions()
Then I should see "Heading 1" # behat_hooks::i_look_for_exceptions()
And I should not see "Heading 2" # behat_hooks::i_look_for_exceptions()
And I should see "Heading 3" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: The edit-icon tool-tips are updated when a section is edited # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_section_headings.feature:158
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | TF1 | This is question 01 |
| Test questions | truefalse | TF2 | This is question 02 |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page |
| TF1 | 1 |
| TF2 | 2 |
And quiz "Quiz 1" contains the following sections: # behat_hooks::i_look_for_exceptions()
| heading | firstslot | shuffle |
| Heading 1 | 1 | 0 |
| Heading 2 | 2 | 0 |
When I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I click on "Edit quiz" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I change quiz section heading "Heading 2" to "Edited heading" # behat_hooks::i_look_for_exceptions()
Then I should see "Edited heading" # behat_hooks::i_look_for_exceptions()
And "Edit heading 'Edited heading'" "link" should be visible # behat_hooks::i_look_for_exceptions()
And "Remove heading 'Edited heading'" "link" should be visible # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Moving a question up from section 3 to the first section. # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_section_headings.feature:183
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | TF1 | This is question 01 |
| Test questions | truefalse | TF2 | This is question 02 |
| Test questions | truefalse | TF3 | This is question 03 |
| Test questions | truefalse | TF4 | This is question 04 |
| Test questions | truefalse | TF5 | This is question 05 |
| Test questions | truefalse | TF6 | This is question 06 |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page |
| TF1 | 1 |
| TF2 | 2 |
| TF3 | 3 |
| TF4 | 4 |
| TF5 | 5 |
| TF6 | 6 |
And quiz "Quiz 1" contains the following sections: # behat_hooks::i_look_for_exceptions()
| heading | firstslot | shuffle |
| Heading 1 | 1 | 0 |
| Heading 2 | 3 | 0 |
| Heading 3 | 5 | 1 |
When I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I click on "Edit quiz" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I move "TF5" to "After Question 2" in the quiz by clicking the move icon # behat_hooks::i_look_for_exceptions()
Then I should see "TF5" on quiz page "2" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: moving a question down from the first section to the second section. # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_section_headings.feature:215
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | TF1 | This is question 01 |
| Test questions | truefalse | TF2 | This is question 02 |
| Test questions | truefalse | TF3 | This is question 03 |
| Test questions | truefalse | TF4 | This is question 04 |
| Test questions | truefalse | TF5 | This is question 05 |
| Test questions | truefalse | TF6 | This is question 06 |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page |
| TF1 | 1 |
| TF2 | 2 |
| TF3 | 3 |
| TF4 | 4 |
| TF5 | 5 |
| TF6 | 6 |
And quiz "Quiz 1" contains the following sections: # behat_hooks::i_look_for_exceptions()
| heading | firstslot | shuffle |
| Heading 1 | 1 | 0 |
| Heading 2 | 3 | 0 |
| Heading 3 | 5 | 1 |
When I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I click on "Edit quiz" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I move "TF1" to "After Question 3" in the quiz by clicking the move icon # behat_hooks::i_look_for_exceptions()
Then I should see "TF1" on quiz page "2" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: I should not see a delete icon for the first section in the quiz. # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_section_headings.feature:247
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | TF1 | This is question 01 |
| Test questions | truefalse | TF2 | This is question 02 |
| Test questions | truefalse | TF3 | This is question 03 |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page |
| TF1 | 1 |
| TF2 | 2 |
| TF3 | 3 |
And quiz "Quiz 1" contains the following sections: # behat_hooks::i_look_for_exceptions()
| heading | firstslot | shuffle |
| Heading 1 | 1 | 0 |
| Heading 2 | 2 | 0 |
| Heading 3 | 3 | 1 |
When I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I click on "Edit quiz" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
Then "Remove heading 'Heading 1'" "link" should not exist # behat_hooks::i_look_for_exceptions()
And "Remove heading 'Heading 2'" "link" should exist # behat_hooks::i_look_for_exceptions()
And "Remove heading 'Heading 3'" "link" should exist # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Turn shuffling on for a section # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_section_headings.feature:274
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | TF1 | This is question 01 |
| Test questions | truefalse | TF2 | This is question 02 |
| Test questions | truefalse | TF3 | This is question 03 |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page |
| TF1 | 1 |
| TF2 | 2 |
| TF3 | 3 |
And quiz "Quiz 1" contains the following sections: # behat_hooks::i_look_for_exceptions()
| heading | firstslot | shuffle |
| Heading 1 | 1 | 0 |
| Heading 2 | 2 | 0 |
| Heading 3 | 3 | 0 |
When I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I click on "Edit quiz" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I click on shuffle for section "Heading 1" on the quiz edit page # behat_hooks::i_look_for_exceptions()
And I click on shuffle for section "Heading 2" on the quiz edit page # behat_hooks::i_look_for_exceptions()
Then shuffle for section "Heading 1" should be "On" on the quiz edit page # behat_hooks::i_look_for_exceptions()
And shuffle for section "Heading 2" should be "On" on the quiz edit page # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Turn shuffling off for a section # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_section_headings.feature:302
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | TF1 | This is question 01 |
| Test questions | truefalse | TF2 | This is question 02 |
| Test questions | truefalse | TF3 | This is question 03 |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page |
| TF1 | 1 |
| TF2 | 2 |
| TF3 | 3 |
And quiz "Quiz 1" contains the following sections: # behat_hooks::i_look_for_exceptions()
| heading | firstslot | shuffle |
| Heading 1 | 1 | 1 |
| Heading 2 | 2 | 1 |
| Heading 3 | 3 | 1 |
When I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I click on "Edit quiz" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I click on shuffle for section "Heading 1" on the quiz edit page # behat_hooks::i_look_for_exceptions()
And I click on shuffle for section "Heading 2" on the quiz edit page # behat_hooks::i_look_for_exceptions()
Then shuffle for section "Heading 1" should be "Off" on the quiz edit page # behat_hooks::i_look_for_exceptions()
And shuffle for section "Heading 2" should be "Off" on the quiz edit page # behat_hooks::i_look_for_exceptions()
And I reload the page # behat_hooks::i_look_for_exceptions()
And shuffle for section "Heading 1" should be "Off" on the quiz edit page # behat_hooks::i_look_for_exceptions()
And shuffle for section "Heading 2" should be "Off" on the quiz edit page # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Add section heading option only appears for pages that are not the first in their section. # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_section_headings.feature:333
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | TF1 | This is question 01 |
| Test questions | truefalse | TF2 | This is question 02 |
| Test questions | truefalse | TF3 | This is question 03 |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page |
| TF1 | 1 |
| TF2 | 1 |
| TF3 | 2 |
When I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I click on "Edit quiz" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I click on the "Add" page break icon after question "TF1" # behat_hooks::i_look_for_exceptions()
And I click on "Add" "link" in the "Page 1" "list_item" # behat_hooks::i_look_for_exceptions()
Then "a new section heading" "link" in the "Page 1" "list_item" should not be visible # behat_hooks::i_look_for_exceptions()
And I click on ".numberofquestions" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Add" "link" in the "Page 2" "list_item" # behat_hooks::i_look_for_exceptions()
And "a new section heading" "link" in the "Page 2" "list_item" should be visible # behat_hooks::i_look_for_exceptions()
And I click on ".numberofquestions" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Add" "link" in the "Page 3" "list_item" # behat_hooks::i_look_for_exceptions()
And "a new section heading" "link" in the "Page 3" "list_item" should be visible # behat_hooks::i_look_for_exceptions()
And I click on ".numberofquestions" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Add" "link" in the ".last-add-menu" "css_element" # behat_hooks::i_look_for_exceptions()
And "a new section heading" "link" in the ".last-add-menu" "css_element" should not be visible # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Verify sections are added in the right place afte ajax changes # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_section_headings.feature:365
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext |
| Test questions | truefalse | TF1 | This is question 01 |
| Test questions | truefalse | TF2 | This is question 02 |
| Test questions | truefalse | TF3 | This is question 03 |
| Test questions | truefalse | TF4 | This is question 04 |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page |
| TF1 | 1 |
| TF2 | 2 |
| TF3 | 3 |
| TF4 | 4 |
When I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I click on "Edit quiz" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I click on the "Remove" page break icon after question "TF1" # behat_hooks::i_look_for_exceptions()
And I open the "Page 2" add to quiz menu # behat_hooks::i_look_for_exceptions()
And I choose "a new section heading" in the open action menu # behat_hooks::i_look_for_exceptions()
Then "TF3" "list_item" should exist in the "Section heading ..." "list_item" # behat_hooks::i_look_for_exceptions()
@mod @mod_quiz
Feature: In order to create a quiz that awards marks the way I want
As a teacher
I must be able to set the marks I want on the Edit quiz page.
Background: # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_set_marks_no_attempts.feature:6
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | course | idnumber | grade | decimalpoints | questiondecimalpoints |
| quiz | Quiz 1 | C1 | quiz1 | 20 | 2 | -1 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I add a "True/False" question to the "Quiz 1" quiz with: # behat_hooks::i_look_for_exceptions()
| Question name | First question |
| Question text | Answer me |
| Default mark | 2.0 |
And I add a "True/False" question to the "Quiz 1" quiz with: # behat_hooks::i_look_for_exceptions()
| Question name | Second question |
| Question text | Answer again |
| Default mark | 3.0 |
@javascript
Scenario: Set the max mark for a question. # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_set_marks_no_attempts.feature:31
When I set the max mark for question "First question" to "7.0" # behat_hooks::i_look_for_exceptions()
Then I should see "7.00" # behat_hooks::i_look_for_exceptions()
And I should see "3.00" # behat_hooks::i_look_for_exceptions()
And I should see "Total of marks: 10.00" # behat_hooks::i_look_for_exceptions()
When I follow "Edit maximum mark" # behat_hooks::i_look_for_exceptions()
And I wait until "li input[name=maxmark]" "css_element" exists # behat_hooks::i_look_for_exceptions()
And I take focus off "li input[name=maxmark]" "css_element" # behat_hooks::i_look_for_exceptions()
Then I should see "7.00" # behat_hooks::i_look_for_exceptions()
And I should see "3.00" # behat_hooks::i_look_for_exceptions()
And I should see "Total of marks: 10.00" # behat_hooks::i_look_for_exceptions()
And "li input[name=maxmark]" "css_element" should not exist # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Set the overall Maximum grade. # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_set_marks_no_attempts.feature:46
When I set the field "maxgrade" to "10.0" # behat_hooks::i_look_for_exceptions()
And I press "savechanges" # behat_hooks::i_look_for_exceptions()
Then the field "maxgrade" matches value "10.00" # behat_hooks::i_look_for_exceptions()
And I should see "2.00" # behat_hooks::i_look_for_exceptions()
And I should see "3.00" # behat_hooks::i_look_for_exceptions()
And I should see "Total of marks: 5.00" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Verify the number of decimal places shown is what the quiz settings say it should be. # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_set_marks_no_attempts.feature:55
Then "//input[@name = 'maxgrade' and @value = '20.00']" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
And I should see "2.00" # behat_hooks::i_look_for_exceptions()
And I should see "3.00" # behat_hooks::i_look_for_exceptions()
And I should see "Total of marks: 5.00" # behat_hooks::i_look_for_exceptions()
And I should not see "2.000" # behat_hooks::i_look_for_exceptions()
And I should not see "3.000" # behat_hooks::i_look_for_exceptions()
And I should not see "Total of marks: 5.000" # behat_hooks::i_look_for_exceptions()
When I follow "Edit settings" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Decimal places in grades | 3 |
| Decimal places in question grades | 5 |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I click on "Edit quiz" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
Then "//input[@name = 'maxgrade' and @value = '20.000']" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
And I should see "2.00000" # behat_hooks::i_look_for_exceptions()
And I should see "3.00000" # behat_hooks::i_look_for_exceptions()
And I should see "Total of marks: 5.000" # behat_hooks::i_look_for_exceptions()
And I should not see "2.000000" # behat_hooks::i_look_for_exceptions()
And I should not see "3.000000" # behat_hooks::i_look_for_exceptions()
And I should not see "Total of marks: 5.0000" # behat_hooks::i_look_for_exceptions()
@mod @mod_quiz
Feature: In order to create a quiz that awards marks the way I want
As a teacher
I must be able to set the marks I want on the Edit quiz page (even after the quiz has been attempted).
Background: # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_set_marks_with_attempts.feature:6
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@example.com |
| student1 | S1 | Student1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | course | idnumber | grade | decimalpoints | questiondecimalpoints |
| quiz | Quiz 1 | C1 | quiz1 | 20 | 2 | -1 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I add a "True/False" question to the "Quiz 1" quiz with: # behat_hooks::i_look_for_exceptions()
| Question name | First question |
| Question text | Answer me |
| Default mark | 2.0 |
And I add a "True/False" question to the "Quiz 1" quiz with: # behat_hooks::i_look_for_exceptions()
| Question name | Second question |
| Question text | Answer again |
| Default mark | 3.0 |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I press "Attempt quiz now" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit quiz" node in "Quiz administration" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Set the max mark for a question. # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_set_marks_with_attempts.feature:43
When I set the max mark for question "First question" to "7.0" # behat_hooks::i_look_for_exceptions()
Then I should see "7.00" # behat_hooks::i_look_for_exceptions()
And I should see "3.00" # behat_hooks::i_look_for_exceptions()
And I should see "Total of marks: 10.00" # behat_hooks::i_look_for_exceptions()
When I follow "Edit maximum mark" # behat_hooks::i_look_for_exceptions()
And I wait until "li input[name=maxmark]" "css_element" exists # behat_hooks::i_look_for_exceptions()
And I take focus off "li input[name=maxmark]" "css_element" # behat_hooks::i_look_for_exceptions()
Then I should see "7.00" # behat_hooks::i_look_for_exceptions()
And I should see "3.00" # behat_hooks::i_look_for_exceptions()
And I should see "Total of marks: 10.00" # behat_hooks::i_look_for_exceptions()
And "li input[name=maxmark]" "css_element" should not exist # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Set the overall Maximum grade. # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_set_marks_with_attempts.feature:58
When I set the field "maxgrade" to "10.0" # behat_hooks::i_look_for_exceptions()
And I press "savechanges" # behat_hooks::i_look_for_exceptions()
Then the field "maxgrade" matches value "10.00" # behat_hooks::i_look_for_exceptions()
And I should see "2.00" # behat_hooks::i_look_for_exceptions()
And I should see "3.00" # behat_hooks::i_look_for_exceptions()
And I should see "Total of marks: 5.00" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Verify the number of decimal places shown is what the quiz settings say it should be. # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\editing_set_marks_with_attempts.feature:67
Then "//input[@name = 'maxgrade' and @value = '20.00']" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
And I should see "2.00" # behat_hooks::i_look_for_exceptions()
And I should see "3.00" # behat_hooks::i_look_for_exceptions()
And I should see "Total of marks: 5.00" # behat_hooks::i_look_for_exceptions()
And I should not see "2.000" # behat_hooks::i_look_for_exceptions()
And I should not see "3.000" # behat_hooks::i_look_for_exceptions()
And I should not see "Total of marks: 5.000" # behat_hooks::i_look_for_exceptions()
When I follow "Edit settings" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Decimal places in grades | 3 |
| Decimal places in question grades | 5 |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I click on "Edit quiz" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
Then "//input[@name = 'maxgrade' and @value = '20.000']" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
And I should see "2.00000" # behat_hooks::i_look_for_exceptions()
And I should see "3.00000" # behat_hooks::i_look_for_exceptions()
And I should see "Total of marks: 5.000" # behat_hooks::i_look_for_exceptions()
And I should not see "2.000000" # behat_hooks::i_look_for_exceptions()
And I should not see "3.000000" # behat_hooks::i_look_for_exceptions()
And I should not see "Total of marks: 5.0000" # behat_hooks::i_look_for_exceptions()
@core @core_user
Feature: Enable/disable password field based on authentication selected.
In order edit a user password properly
As an admin
I need to be able to notice if the change in password is allowed by athuentication plugin or not
@javascript
Scenario: Verify the password field is enabled/disabled based on authentication selected, in user edit advanced page. # C:\Apache24\htdocs\integration\user\tests\behat\edituserpassword.feature:8
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I click on "Dashboard" "link" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
When I navigate to "Add a new user" node in "Site administration > Users > Accounts" # behat_hooks::i_look_for_exceptions()
Then the "New password" "field" should be enabled # behat_hooks::i_look_for_exceptions()
And I set the field "auth" to "Web services authentication" # behat_hooks::i_look_for_exceptions()
And the "New password" "field" should be disabled # behat_hooks::i_look_for_exceptions()
And I set the field "auth" to "Email-based self-registration" # behat_hooks::i_look_for_exceptions()
And the "New password" "field" should be enabled # behat_hooks::i_look_for_exceptions()
And I press "Create user" # behat_hooks::i_look_for_exceptions()
@mod @mod_workshop @javascript @_file_upload
Feature: Teachers can embed images into instructions and conclusion fields
In order to display images as a part of instructions or conclusions in the workshop
As a teacher
I need to be able to embed images into the fields and they should display correctly
Scenario: Embedding the image into the instructions and conclusions fields # C:\Apache24\htdocs\integration\mod\workshop\tests\behat\embedded_images.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | One | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname |
| Course 1 | C1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Manage private files" # behat_hooks::i_look_for_exceptions()
And I upload "mod/workshop/tests/fixtures/moodlelogo.png" file to "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I click on "Save changes" "button" # behat_hooks::i_look_for_exceptions()
And I am on homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
When I add a "Workshop" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Workshop name | Workshop with embedded images |
And I follow "Workshop with embedded images" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Workshop administration" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I set the field "Instructions for submission" to "Image test
" # behat_hooks::i_look_for_exceptions()
And I select the text in the "Instructions for submission" Atto editor # behat_hooks::i_look_for_exceptions()
And I click on "Image" "button" in the "//*[@data-fieldtype='editor']/*[descendant::*[@id='id_instructauthorseditor']]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I click on "Browse repositories..." "button" # behat_hooks::i_look_for_exceptions()
And I click on "Private files" "link" in the ".fp-repo-area" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "moodlelogo.png" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Select this file" "button" # behat_hooks::i_look_for_exceptions()
And I set the field "Describe this image for someone who cannot see it" to "How to submit" # behat_hooks::i_look_for_exceptions()
And I click on "Save image" "button" # behat_hooks::i_look_for_exceptions()
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Workshop administration" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I set the field "Instructions for assessment" to "Image test
" # behat_hooks::i_look_for_exceptions()
And I select the text in the "Instructions for assessment" Atto editor # behat_hooks::i_look_for_exceptions()
And I click on "Image" "button" in the "//*[@data-fieldtype='editor']/*[descendant::*[@id='id_instructreviewerseditor']]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I click on "Browse repositories..." "button" # behat_hooks::i_look_for_exceptions()
And I click on "Private files" "link" in the ".fp-repo-area" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "moodlelogo.png" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Select this file" "button" # behat_hooks::i_look_for_exceptions()
And I set the field "Describe this image for someone who cannot see it" to "How to assess" # behat_hooks::i_look_for_exceptions()
And I click on "Save image" "button" # behat_hooks::i_look_for_exceptions()
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Workshop administration" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I set the field "Conclusion" to "Image test
" # behat_hooks::i_look_for_exceptions()
And I select the text in the "Conclusion" Atto editor # behat_hooks::i_look_for_exceptions()
And I click on "Image" "button" in the "//*[@data-fieldtype='editor']/*[descendant::*[@id='id_conclusioneditor']]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I click on "Browse repositories..." "button" # behat_hooks::i_look_for_exceptions()
And I click on "Private files" "link" in the ".fp-repo-area" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "moodlelogo.png" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Select this file" "button" # behat_hooks::i_look_for_exceptions()
And I set the field "Describe this image for someone who cannot see it" to "Well done" # behat_hooks::i_look_for_exceptions()
And I click on "Save image" "button" # behat_hooks::i_look_for_exceptions()
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I change phase in workshop "Workshop with embedded images" to "Submission phase" # behat_hooks::i_look_for_exceptions()
Then "//*[contains(@class, 'instructions')]//img[contains(@src, 'pluginfile.php') and contains(@src, '/mod_workshop/instructauthors/moodlelogo.png') and @alt='How to submit']" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
And I change phase in workshop "Workshop with embedded images" to "Assessment phase" # behat_hooks::i_look_for_exceptions()
And "//*[contains(@class, 'instructions')]//img[contains(@src, 'pluginfile.php') and contains(@src, '/mod_workshop/instructreviewers/moodlelogo.png') and @alt='How to assess']" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
And I change phase in workshop "Workshop with embedded images" to "Closed" # behat_hooks::i_look_for_exceptions()
And "//*[contains(@class, 'conclusion')]//img[contains(@src, 'pluginfile.php') and contains(@src, '/mod_workshop/conclusion/moodlelogo.png') and @alt='Well done']" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
@core @core_completion
Feature: Allow students to manually mark an activity as complete
In order to let students decide when an activity is completed
As a teacher
I need to allow students to mark activities as completed
@javascript
Scenario: Mark an activity as completed # C:\Apache24\htdocs\integration\completion\tests\behat\enable_manual_complete_mark.feature:8
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | Frist | teacher1@example.com |
| student1 | Student | First | student1@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Enable completion tracking | Yes |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
When I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name |
| Description | Test forum description |
Then "Student First" user has not completed "Test forum name" activity # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I press "Mark as complete: Test forum name" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I expand "Reports" node # behat_hooks::i_look_for_exceptions()
And I follow "Activity completion" # behat_hooks::i_look_for_exceptions()
And "Student First" user has completed "Test forum name" activity # behat_hooks::i_look_for_exceptions()
@core @core_admin
Feature: Enable multiple accounts to have the same email address
In order to have multiple accounts registerd on the system with the same email address
As an admin
I need to enable multiple accounts to be registered with the same email address and verify it is applied
Background: # C:\Apache24\htdocs\integration\admin\tests\behat\enable_multiple_accounts_use_same_email.feature:7
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
Scenario: Enable registration of multiple accounts with the same email address # C:\Apache24\htdocs\integration\admin\tests\behat\enable_multiple_accounts_use_same_email.feature:10
Given the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| allowaccountssameemail | 1 |
When I navigate to "Add a new user" node in "Site administration>Users>Accounts" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Username | testmultiemailuser1 |
| Choose an authentication method | Manual accounts |
| New password | test@User1 |
| First name | Test |
| Surname | Multi1 |
| Email address | testmultiemailuser@example.com |
And I press "Create user" # behat_hooks::i_look_for_exceptions()
And I should see "Test Multi1" # behat_hooks::i_look_for_exceptions()
And I press "Add a new user" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Username | testmultiemailuser2 |
| Choose an authentication method | Manual accounts |
| New password | test@User2 |
| First name | Test |
| Surname | Multi2 |
| Email address | testmultiemailuser@example.com |
And I press "Create user" # behat_hooks::i_look_for_exceptions()
Then I should see "Test Multi2" # behat_hooks::i_look_for_exceptions()
And I should not see "This email address is already registered" # behat_hooks::i_look_for_exceptions()
Scenario: Disable registration of multiple accounts with the same email address # C:\Apache24\htdocs\integration\admin\tests\behat\enable_multiple_accounts_use_same_email.feature:35
Given the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| allowaccountssameemail | 0 |
When I navigate to "Add a new user" node in "Site administration>Users>Accounts" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Username | testmultiemailuser1 |
| Choose an authentication method | Manual accounts |
| New password | test@User1 |
| First name | Test |
| Surname | Multi1 |
| Email address | testmultiemailuser@example.com |
And I press "Create user" # behat_hooks::i_look_for_exceptions()
And I should see "Test Multi1" # behat_hooks::i_look_for_exceptions()
And I press "Add a new user" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Username | testmultiemailuser2 |
| Choose an authentication method | Manual accounts |
| New password | test@User2 |
| First name | Test |
| Surname | Multi2 |
| Email address | testmultiemailuser@example.com |
And I press "Create user" # behat_hooks::i_look_for_exceptions()
Then I should see "This email address is already registered" # behat_hooks::i_look_for_exceptions()
@enrol @enrol_meta @javascript
Feature: Enrolments are synchronised with meta courses
In order to simplify enrolments in parent courses
As a teacher
I need to be able to set up meta enrolments
Background: # C:\Apache24\htdocs\integration\enrol\meta\tests\behat\enrol_meta.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@asd.com |
| student2 | Student | 2 | student2@asd.com |
| student3 | Student | 3 | student3@asd.com |
| student4 | Student | 4 | student4@asd.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname |
| Course 1 | C1C1 |
| Course 2 | C2C2 |
| Course 3 | C3C3 |
And the following "groups" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| Groupcourse 1 | C3C3 | G1 |
| Groupcourse 2 | C3C3 | G2 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| student1 | C1C1 | student |
| student2 | C1C1 | student |
| student3 | C1C1 | student |
| student4 | C1C1 | student |
| student1 | C2C2 | student |
| student2 | C2C2 | student |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "Manage enrol plugins" node in "Site administration > Plugins > Enrolments" # behat_hooks::i_look_for_exceptions()
And I click on "Enable" "link" in the "Course meta link" "table_row" # behat_hooks::i_look_for_exceptions()
And I am on homepage # behat_hooks::i_look_for_exceptions()
And I follow "Courses" # behat_hooks::i_look_for_exceptions()
Scenario: Add meta enrolment instance without groups # C:\Apache24\htdocs\integration\enrol\meta\tests\behat\enrol_meta.feature:37
When I follow "Course 3" # behat_hooks::i_look_for_exceptions()
And I add "Course meta link" enrolment method with: # behat_hooks::i_look_for_exceptions()
| Link course | C1C1 |
And I navigate to "Enrolled users" node in "Course administration > Users" # behat_hooks::i_look_for_exceptions()
Then I should see "Student 1" # behat_hooks::i_look_for_exceptions()
And I should see "Student 4" # behat_hooks::i_look_for_exceptions()
And I should not see "Groupcourse" in the "table.userenrolment" "css_element" # behat_hooks::i_look_for_exceptions()
Scenario: Add meta enrolment instance with groups # C:\Apache24\htdocs\integration\enrol\meta\tests\behat\enrol_meta.feature:46
When I follow "Course 3" # behat_hooks::i_look_for_exceptions()
And I add "Course meta link" enrolment method with: # behat_hooks::i_look_for_exceptions()
| Link course | C1C1 |
| Add to group | Groupcourse 1 |
And I follow "Course 3" # behat_hooks::i_look_for_exceptions()
And I add "Course meta link" enrolment method with: # behat_hooks::i_look_for_exceptions()
| Link course | C2C2 |
| Add to group | Groupcourse 2 |
And I navigate to "Enrolled users" node in "Course administration > Users" # behat_hooks::i_look_for_exceptions()
Then I should see "Groupcourse 1" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Groupcourse 1" in the "Student 2" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Groupcourse 1" in the "Student 3" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Groupcourse 1" in the "Student 4" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Groupcourse 2" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Groupcourse 2" in the "Student 2" "table_row" # behat_hooks::i_look_for_exceptions()
And I should not see "Groupcourse 2" in the "Student 3" "table_row" # behat_hooks::i_look_for_exceptions()
And I should not see "Groupcourse 2" in the "Student 4" "table_row" # behat_hooks::i_look_for_exceptions()
Scenario: Add meta enrolment instance with auto-created groups # C:\Apache24\htdocs\integration\enrol\meta\tests\behat\enrol_meta.feature:65
When I follow "Course 3" # behat_hooks::i_look_for_exceptions()
And I add "Course meta link" enrolment method with: # behat_hooks::i_look_for_exceptions()
| Link course | C1C1 |
| Add to group | Create new group |
And I navigate to "Enrolled users" node in "Course administration > Users" # behat_hooks::i_look_for_exceptions()
Then I should see "Course 1 course" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Course 1 course" in the "Student 2" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Course 1 course" in the "Student 3" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Course 1 course" in the "Student 4" "table_row" # behat_hooks::i_look_for_exceptions()
And I navigate to "Groups" node in "Course administration > Users" # behat_hooks::i_look_for_exceptions()
And the "Groups" select box should contain "Course 1 course (4)" # behat_hooks::i_look_for_exceptions()
Scenario: Backup and restore of meta enrolment instance # C:\Apache24\htdocs\integration\enrol\meta\tests\behat\enrol_meta.feature:78
When I follow "Course 3" # behat_hooks::i_look_for_exceptions()
And I add "Course meta link" enrolment method with: # behat_hooks::i_look_for_exceptions()
| Link course | C1C1 |
| Add to group | Groupcourse 1 |
And I follow "Course 3" # behat_hooks::i_look_for_exceptions()
And I add "Course meta link" enrolment method with: # behat_hooks::i_look_for_exceptions()
| Link course | C2C2 |
When I backup "Course 3" course using this options: # behat_hooks::i_look_for_exceptions()
| Confirmation | Filename | test_backup.mbz |
And I click on "Restore" "link" in the "test_backup.mbz" "table_row" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I set the field "targetid" to "1" # behat_hooks::i_look_for_exceptions()
And I click on "Continue" "button" in the ".bcs-new-course" "css_element" # behat_hooks::i_look_for_exceptions()
And I press "Next" # behat_hooks::i_look_for_exceptions()
And I set the field "Course name" to "Course 4" # behat_hooks::i_look_for_exceptions()
And I press "Next" # behat_hooks::i_look_for_exceptions()
And I press "Perform restore" # behat_hooks::i_look_for_exceptions()
And I trigger cron # behat_hooks::i_look_for_exceptions()
And I am on homepage # behat_hooks::i_look_for_exceptions()
And I follow "Courses" # behat_hooks::i_look_for_exceptions()
And I follow "Course 4" # behat_hooks::i_look_for_exceptions()
And I navigate to "Enrolment methods" node in "Course administration > Users" # behat_hooks::i_look_for_exceptions()
Then I should see "Course meta link (Course 1)" # behat_hooks::i_look_for_exceptions()
And I should see "Course meta link (Course 2)" # behat_hooks::i_look_for_exceptions()
And I navigate to "Enrolled users" node in "Course administration > Users" # behat_hooks::i_look_for_exceptions()
And I should see "Groupcourse 1" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Groupcourse 1" in the "Student 2" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Groupcourse 1" in the "Student 3" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Groupcourse 1" in the "Student 4" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Course 2" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 2" in the "Student 3" "table_row" # behat_hooks::i_look_for_exceptions()
@enrol
Feature: User can be enrolled into a course
In order to let them participate in course activities
As an admin
I must be able to enrol users
Background: # C:\Apache24\htdocs\integration\enrol\tests\behat\enrol_user.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Studie | One | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname |
| Course 001 | C001 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I follow "Courses" # behat_hooks::i_look_for_exceptions()
And I follow "Course 001" # behat_hooks::i_look_for_exceptions()
Scenario: User can be enrolled without javascript # C:\Apache24\htdocs\integration\enrol\tests\behat\enrol_user.feature:18
When I enrol "Studie One" user as "Student" # behat_hooks::i_look_for_exceptions()
And I navigate to "Enrolled users" node in "Course administration > Users" # behat_hooks::i_look_for_exceptions()
Then I should see "Studie One" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: User can be enrolled with javascript enrol element # C:\Apache24\htdocs\integration\enrol\tests\behat\enrol_user.feature:24
When I enrol "Studie One" user as "Student" # behat_hooks::i_look_for_exceptions()
And I navigate to "Enrolled users" node in "Course administration > Users" # behat_hooks::i_look_for_exceptions()
Then I should see "Studie One" # behat_hooks::i_look_for_exceptions()
@mod @mod_glossary
Feature: A teacher can set whether glossary entries are always editable or not
In order to ensure students think before adding new entries
As a teacher
I need to prevent entries to be always editable
@javascript
Scenario: Glossary entries are not always editable # C:\Apache24\htdocs\integration\mod\glossary\tests\behat\entries_always_editable.feature:8
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| maxeditingtime | 60 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Glossary" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Test glossary name |
| Description | Test glossary description |
| Always allow editing | No |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test glossary name" # behat_hooks::i_look_for_exceptions()
When I add a glossary entry with the following data: # behat_hooks::i_look_for_exceptions()
| Concept | Test concept name |
| Definition | Test concept description |
Then "Delete: Test concept name" "link" should exist # behat_hooks::i_look_for_exceptions()
And "Edit: Test concept name" "link" should exist # behat_hooks::i_look_for_exceptions()
And I wait "65" seconds # behat_hooks::i_look_for_exceptions()
And I reload the page # behat_hooks::i_look_for_exceptions()
Then "Delete: Test concept name" "link" should not exist # behat_hooks::i_look_for_exceptions()
And "Edit: Test concept name" "link" should not exist # behat_hooks::i_look_for_exceptions()
@mod @mod_glossary
Feature: A teacher can choose whether glossary entries require approval
In order to check entries before they are displayed
As a user
I need to enable entries requiring approval
Scenario: Approve and undo approve glossary entries # C:\Apache24\htdocs\integration\mod\glossary\tests\behat\entries_require_approval.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
Given I add a "Glossary" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Test glossary name |
| Description | Test glossary entries require approval |
| Approved by default | No |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test glossary name" # behat_hooks::i_look_for_exceptions()
When I add a glossary entry with the following data: # behat_hooks::i_look_for_exceptions()
| Concept | Just a test concept |
| Definition | Concept definition |
| Keyword(s) | Black |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test glossary name" # behat_hooks::i_look_for_exceptions()
Then I should see "No entries found in this section" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test glossary name" # behat_hooks::i_look_for_exceptions()
And I follow "Waiting approval" # behat_hooks::i_look_for_exceptions()
Then I should see "(this entry is currently hidden)" # behat_hooks::i_look_for_exceptions()
And I follow "Approve" # behat_hooks::i_look_for_exceptions()
And I follow "Test glossary name" # behat_hooks::i_look_for_exceptions()
Then I should see "Concept definition" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test glossary name" # behat_hooks::i_look_for_exceptions()
Then I should see "Concept definition" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test glossary name" # behat_hooks::i_look_for_exceptions()
And I follow "Undo approval" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test glossary name" # behat_hooks::i_look_for_exceptions()
Then I should see "No entries found in this section" # behat_hooks::i_look_for_exceptions()
@editor @editor_atto @atto @atto_equation @_bug_phantomjs
Feature: Atto equation editor
To teach maths to students, I need to write equations
@javascript
Scenario: Create an equation # C:\Apache24\htdocs\integration\lib\editor\atto\plugins\equation\tests\behat\equation.feature:6
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
When I follow "Profile" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I set the field "Description" to "Equation test
" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I set the field "Picture description" to "Test" # behat_hooks::i_look_for_exceptions()
And I select the text in the "Description" Atto editor # behat_hooks::i_look_for_exceptions()
And I click on "Show more buttons" "button" # behat_hooks::i_look_for_exceptions()
And I click on "Equation editor" "button" # behat_hooks::i_look_for_exceptions()
And I set the field "Edit equation using" to " = 1 \div 0" # behat_hooks::i_look_for_exceptions()
And I click on "\infty" "button" # behat_hooks::i_look_for_exceptions()
And I click on "Save equation" "button" # behat_hooks::i_look_for_exceptions()
And I click on "Update profile" "button" # behat_hooks::i_look_for_exceptions()
And I follow "Profile" in the user menu # behat_hooks::i_look_for_exceptions()
Then "\infty" "text" should exist # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Edit an equation # C:\Apache24\htdocs\integration\lib\editor\atto\plugins\equation\tests\behat\equation.feature:25
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
When I follow "Profile" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I set the field "Description" to "\( \pi \)
" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I set the field "Picture description" to "Test" # behat_hooks::i_look_for_exceptions()
And I select the text in the "Description" Atto editor # behat_hooks::i_look_for_exceptions()
And I click on "Show more buttons" "button" # behat_hooks::i_look_for_exceptions()
And I click on "Equation editor" "button" # behat_hooks::i_look_for_exceptions()
Then the field "Edit equation using" matches value " \pi " # behat_hooks::i_look_for_exceptions()
And I click on "Save equation" "button" # behat_hooks::i_look_for_exceptions()
And the field "Description" matches value "\( \pi \)
" # behat_hooks::i_look_for_exceptions()
@mod @mod_workshop @_file_upload
Feature: Provide example submission
In order to let students practise the assessment process in the workshop
As a teacher
I need to be able to define example submission and its referential assessment
@javascript
Scenario: Add example submission with attachments to a workshop # C:\Apache24\htdocs\integration\mod\workshop\tests\behat\example_submission.feature:8
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Terry1 | Teacher1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname |
| Course1 | c1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | c1 | editingteacher |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | useexamples |
| workshop | TestWorkshop | Test workshop description | c1 | workshop1 | 1 |
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course1" # behat_hooks::i_look_for_exceptions()
And I edit assessment form in workshop "TestWorkshop" as:" # behat_hooks::i_look_for_exceptions()
| id_description__idx_0_editor | Aspect1 |
| id_description__idx_1_editor | Aspect2 |
| id_description__idx_2_editor | |
And I press "Add example submission" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Title | First example submission |
| Submission content | Just an example but hey, it works! |
| Attachment | lib/tests/fixtures/empty.txt |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "First example submission" # behat_hooks::i_look_for_exceptions()
And I should see "Just an example but hey, it works!" # behat_hooks::i_look_for_exceptions()
And "empty.txt" "link" should exist # behat_hooks::i_look_for_exceptions()
@block @block_navigation
Feature: Expand the courses nodes within the navigation block
In order to navigate the site
As an anonymous user, a guest, a student, and an admin
I need to expand the courses node in the navigation block and check the display of courses and categories.
Background: # C:\Apache24\htdocs\integration\blocks\navigation\tests\behat\expand_courses_node.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber | visible |
| cat1 | 0 | cat1 | 1 |
| cat2 | 0 | cat2 | 1 |
| cat21 | cat2 | cat21 | 1 |
| cat211 | cat21 | cat211 | 1 |
| cat3 | 0 | cat3 | 0 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | visible |
| Course 1 | c1 | cat1 | 1 |
| Course 2 | c2 | cat2 | 1 |
| Course 3 | c3 | cat21 | 1 |
| Course 4 | c4 | cat211 | 1 |
| Course 5 | c5 | cat211 | 0 |
| Course 6 | c6 | cat211 | 0 |
| Course 7 | c7 | cat3 | 1 |
| Course 8 | c8 | cat3 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | c1 | teacher |
| teacher1 | c3 | teacher |
| teacher1 | c5 | teacher |
| student1 | c1 | student |
| student1 | c2 | student |
| student1 | c4 | student |
And the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| navshowallcourses | 1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 2" # behat_hooks::i_look_for_exceptions()
And I navigate to "Enrolment methods" node in "Course administration > Users" # behat_hooks::i_look_for_exceptions()
And I click on "Edit" "link" in the "Guest access" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Allow guest access | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: As an anonymous user I expand the courses node to see courses. # C:\Apache24\htdocs\integration\blocks\navigation\tests\behat\expand_courses_node.feature:50
When I should see "You are not logged in." in the ".logininfo" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Home" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Courses" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I expand "Courses" node # behat_hooks::i_look_for_exceptions()
And I should see "cat1" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should see "cat2" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "cat3" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I expand "cat1" node # behat_hooks::i_look_for_exceptions()
And I expand "cat2" node # behat_hooks::i_look_for_exceptions()
And I should see "cat21" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I expand "cat21" node # behat_hooks::i_look_for_exceptions()
And I should see "cat211" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I expand "cat211" node # behat_hooks::i_look_for_exceptions()
Then I should see "c1" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should see "c2" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should see "c3" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should see "c4" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "c5" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "c6" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And navigation node "c1" should not be expandable # behat_hooks::i_look_for_exceptions()
And navigation node "c2" should not be expandable # behat_hooks::i_look_for_exceptions()
And navigation node "c3" should not be expandable # behat_hooks::i_look_for_exceptions()
And navigation node "c4" should not be expandable # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: As the admin user I expand the courses and category nodes to see courses. # C:\Apache24\htdocs\integration\blocks\navigation\tests\behat\expand_courses_node.feature:76
When I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I should see "Site home" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Courses" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I expand "Courses" node # behat_hooks::i_look_for_exceptions()
And I should see "cat1" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should see "cat2" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should see "cat3" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I expand "cat1" node # behat_hooks::i_look_for_exceptions()
And I expand "cat2" node # behat_hooks::i_look_for_exceptions()
And I expand "cat3" node # behat_hooks::i_look_for_exceptions()
And I should see "cat21" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I expand "cat21" node # behat_hooks::i_look_for_exceptions()
And I should see "cat211" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I expand "cat211" node # behat_hooks::i_look_for_exceptions()
Then I should see "c1" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should see "c2" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should see "c3" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should see "c4" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should see "c5" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should see "c6" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should see "c7" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should see "c8" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And navigation node "c1" should be expandable # behat_hooks::i_look_for_exceptions()
And navigation node "c2" should be expandable # behat_hooks::i_look_for_exceptions()
And navigation node "c3" should be expandable # behat_hooks::i_look_for_exceptions()
And navigation node "c4" should be expandable # behat_hooks::i_look_for_exceptions()
And navigation node "c5" should be expandable # behat_hooks::i_look_for_exceptions()
And navigation node "c6" should be expandable # behat_hooks::i_look_for_exceptions()
And navigation node "c7" should be expandable # behat_hooks::i_look_for_exceptions()
And navigation node "c8" should be expandable # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: As teacher1 I expand the courses and category nodes to see courses. # C:\Apache24\htdocs\integration\blocks\navigation\tests\behat\expand_courses_node.feature:110
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I should see "Site home" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Courses" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I expand "Courses" node # behat_hooks::i_look_for_exceptions()
And I should see "cat1" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should see "cat2" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "cat3" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I expand "cat1" node # behat_hooks::i_look_for_exceptions()
And I expand "cat2" node # behat_hooks::i_look_for_exceptions()
And I should see "cat21" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I expand "cat21" node # behat_hooks::i_look_for_exceptions()
And I should see "cat211" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I expand "cat211" node # behat_hooks::i_look_for_exceptions()
Then I should see "c1" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should see "c2" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should see "c3" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should see "c4" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should see "c5" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "c6" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "c7" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "c8" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And navigation node "c1" should be expandable # behat_hooks::i_look_for_exceptions()
And navigation node "c2" should be expandable # behat_hooks::i_look_for_exceptions()
And navigation node "c3" should be expandable # behat_hooks::i_look_for_exceptions()
And navigation node "c4" should not be expandable # behat_hooks::i_look_for_exceptions()
And navigation node "c5" should be expandable # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: As student1 I expand the courses and category nodes to see courses. # C:\Apache24\htdocs\integration\blocks\navigation\tests\behat\expand_courses_node.feature:140
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I should see "Site home" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Courses" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I expand "Courses" node # behat_hooks::i_look_for_exceptions()
And I should see "cat1" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should see "cat2" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "cat3" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I expand "cat1" node # behat_hooks::i_look_for_exceptions()
And I expand "cat2" node # behat_hooks::i_look_for_exceptions()
And I should see "cat21" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I expand "cat21" node # behat_hooks::i_look_for_exceptions()
And I should see "cat211" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I expand "cat211" node # behat_hooks::i_look_for_exceptions()
Then I should see "c1" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should see "c2" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should see "c3" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should see "c4" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "c5" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "c6" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "c7" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "c8" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And navigation node "c1" should be expandable # behat_hooks::i_look_for_exceptions()
And navigation node "c2" should be expandable # behat_hooks::i_look_for_exceptions()
And navigation node "c3" should not be expandable # behat_hooks::i_look_for_exceptions()
And navigation node "c4" should be expandable # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: As guest I expand the courses and category nodes to see courses. # C:\Apache24\htdocs\integration\blocks\navigation\tests\behat\expand_courses_node.feature:169
When I log in as "guest" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I should see "Home" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Courses" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I expand "Courses" node # behat_hooks::i_look_for_exceptions()
And I should see "cat1" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should see "cat2" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "cat3" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I expand "cat1" node # behat_hooks::i_look_for_exceptions()
And I expand "cat2" node # behat_hooks::i_look_for_exceptions()
And I should see "cat21" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I expand "cat21" node # behat_hooks::i_look_for_exceptions()
And I should see "cat211" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I expand "cat211" node # behat_hooks::i_look_for_exceptions()
Then I should see "c1" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should see "c2" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should see "c3" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should see "c4" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "c5" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "c6" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "c7" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "c8" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And navigation node "c1" should not be expandable # behat_hooks::i_look_for_exceptions()
And navigation node "c2" should be expandable # behat_hooks::i_look_for_exceptions()
And navigation node "c3" should not be expandable # behat_hooks::i_look_for_exceptions()
And navigation node "c4" should not be expandable # behat_hooks::i_look_for_exceptions()
@core @core_calendar @core_calendar_export
Feature: Export calendar events
In order to be able to use my calendar events outside of Moodle
As a user
I need to export calendar events in iCalendar format
Background: # C:\Apache24\htdocs\integration\calendar\tests\behat\export.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| student1 | C1 | student |
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
Scenario: Viewing calendar export options # C:\Apache24\htdocs\integration\calendar\tests\behat\export.feature:19
Given I follow "This month" # behat_hooks::i_look_for_exceptions()
When I click on "Export calendar" "button" # behat_hooks::i_look_for_exceptions()
Then I should see "All events" # behat_hooks::i_look_for_exceptions()
And I should see "Events related to courses" # behat_hooks::i_look_for_exceptions()
And I should see "Events related to groups" # behat_hooks::i_look_for_exceptions()
And I should see "My personal events" # behat_hooks::i_look_for_exceptions()
Scenario: Generating calendar URL for all events # C:\Apache24\htdocs\integration\calendar\tests\behat\export.feature:27
Given I follow "This month" # behat_hooks::i_look_for_exceptions()
And I click on "Export calendar" "button" # behat_hooks::i_look_for_exceptions()
And I set the field "All events" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Recent and next 60 days" to "1" # behat_hooks::i_look_for_exceptions()
When I click on "Get calendar URL" "button" # behat_hooks::i_look_for_exceptions()
Then I should see "&preset_what=all&" # behat_hooks::i_look_for_exceptions()
Scenario: Generating calendar URL for course events # C:\Apache24\htdocs\integration\calendar\tests\behat\export.feature:35
Given I follow "This month" # behat_hooks::i_look_for_exceptions()
And I click on "Export calendar" "button" # behat_hooks::i_look_for_exceptions()
And I set the field "Events related to courses" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Recent and next 60 days" to "1" # behat_hooks::i_look_for_exceptions()
When I click on "Get calendar URL" "button" # behat_hooks::i_look_for_exceptions()
Then I should see "&preset_what=courses&" # behat_hooks::i_look_for_exceptions()
Scenario: Generating calendar URL for group events # C:\Apache24\htdocs\integration\calendar\tests\behat\export.feature:43
Given I follow "This month" # behat_hooks::i_look_for_exceptions()
And I click on "Export calendar" "button" # behat_hooks::i_look_for_exceptions()
And I set the field "Events related to groups" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Recent and next 60 days" to "1" # behat_hooks::i_look_for_exceptions()
When I click on "Get calendar URL" "button" # behat_hooks::i_look_for_exceptions()
Then I should see "&preset_what=groups&" # behat_hooks::i_look_for_exceptions()
Scenario: Generating calendar URL for user events # C:\Apache24\htdocs\integration\calendar\tests\behat\export.feature:51
Given I follow "This month" # behat_hooks::i_look_for_exceptions()
And I click on "Export calendar" "button" # behat_hooks::i_look_for_exceptions()
And I set the field "My personal events" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Recent and next 60 days" to "1" # behat_hooks::i_look_for_exceptions()
When I click on "Get calendar URL" "button" # behat_hooks::i_look_for_exceptions()
Then I should see "&preset_what=user&" # behat_hooks::i_look_for_exceptions()
@qtype @qtype_ddimageortext
Feature: Test exporting drag and drop onto image questions
As a teacher
In order to be able to reuse my drag and drop onto image questions
I need to export them
Background: # C:\Apache24\htdocs\integration\question\type\ddimageortext\tests\behat\export.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | template |
| Test questions | ddimageortext | Drag onto image | xsection |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Export a drag and drop onto image question # C:\Apache24\htdocs\integration\question\type\ddimageortext\tests\behat\export.feature:27
When I navigate to "Export" node in "Course administration > Question bank" # behat_hooks::i_look_for_exceptions()
And I set the field "id_format_xml" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Export questions to file" # behat_hooks::i_look_for_exceptions()
And following "click here" should download between "18500" and "19000" bytes # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@qtype @qtype_ddmarker
Feature: Test exporting drag and drop markers questions
As a teacher
In order to be able to reuse my drag and drop markers questions
I need to export them
Background: # C:\Apache24\htdocs\integration\question\type\ddmarker\tests\behat\export.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | template |
| Test questions | ddmarker | Drag markers | mkmap |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Export a drag and drop markers question # C:\Apache24\htdocs\integration\question\type\ddmarker\tests\behat\export.feature:27
When I navigate to "Export" node in "Course administration > Question bank" # behat_hooks::i_look_for_exceptions()
And I set the field "id_format_xml" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Export questions to file" # behat_hooks::i_look_for_exceptions()
And following "click here" should download between "233600" and "233800" bytes # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@qtype @qtype_ddwtos
Feature: Test exporting drag and drop into text questions
As a teacher
In order to be able to reuse my drag and drop into text questions
I need to export them
Background: # C:\Apache24\htdocs\integration\question\type\ddwtos\tests\behat\export.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | template |
| Test questions | ddwtos | Drag to text | fox |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Export a drag and drop into text question # C:\Apache24\htdocs\integration\question\type\ddwtos\tests\behat\export.feature:27
When I navigate to "Export" node in "Course administration > Question bank" # behat_hooks::i_look_for_exceptions()
And I set the field "id_format_xml" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Export questions to file" # behat_hooks::i_look_for_exceptions()
And following "click here" should download between "1450" and "1550" bytes # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@qtype @qtype_description
Feature: Test exporting Description questions
As a teacher
In order to be able to reuse my Description questions
I need to export them
Background: # C:\Apache24\htdocs\integration\question\type\description\tests\behat\export.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | template |
| Test questions | description | description-001 | info |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Scenario: Export a Description question # C:\Apache24\htdocs\integration\question\type\description\tests\behat\export.feature:26
When I navigate to "Export" node in "Course administration > Question bank" # behat_hooks::i_look_for_exceptions()
And I set the field "id_format_xml" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Export questions to file" # behat_hooks::i_look_for_exceptions()
Then following "click here" should download between "650" and "750" bytes # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@qtype @qtype_essay
Feature: Test exporting Essay questions
As a teacher
In order to be able to reuse my Essay questions
I need to export them
Background: # C:\Apache24\htdocs\integration\question\type\essay\tests\behat\export.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | template |
| Test questions | essay | essay-001 | editor |
| Test questions | essay | essay-002 | editorfilepicker |
| Test questions | essay | essay-003 | plain |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Scenario: Export 3 Essay questions # C:\Apache24\htdocs\integration\question\type\essay\tests\behat\export.feature:28
When I navigate to "Export" node in "Course administration > Question bank" # behat_hooks::i_look_for_exceptions()
And I set the field "id_format_xml" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Export questions to file" # behat_hooks::i_look_for_exceptions()
Then following "click here" should download between "2600" and "2700" bytes # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@qtype @qtype_match
Feature: Test exporting Matching questions
As a teacher
In order to be able to reuse my Matching questions
I need to export them
Background: # C:\Apache24\htdocs\integration\question\type\match\tests\behat\export.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | template |
| Test questions | match | matching-001 | foursubq |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Scenario: Export a Matching question # C:\Apache24\htdocs\integration\question\type\match\tests\behat\export.feature:26
When I navigate to "Export" node in "Course administration > Question bank" # behat_hooks::i_look_for_exceptions()
And I set the field "id_format_xml" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Export questions to file" # behat_hooks::i_look_for_exceptions()
Then following "click here" should download between "1500" and "1600" bytes # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@qtype @qtype_multichoice
Feature: Test exporting Multiple choice questions
As a teacher
In order to be able to reuse my Multiple choice questions
I need to export them
Background: # C:\Apache24\htdocs\integration\question\type\multichoice\tests\behat\export.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | template |
| Test questions | multichoice | Multi-choice-001 | two_of_four |
| Test questions | multichoice | Multi-choice-002 | one_of_four |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Scenario: Export a Multiple choice question # C:\Apache24\htdocs\integration\question\type\multichoice\tests\behat\export.feature:27
When I navigate to "Export" node in "Course administration > Question bank" # behat_hooks::i_look_for_exceptions()
And I set the field "id_format_xml" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Export questions to file" # behat_hooks::i_look_for_exceptions()
Then following "click here" should download between "3700" and "3800" bytes # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@qtype @qtype_shortanswer
Feature: Test exporting Short answer questions
As a teacher
In order to be able to reuse my Short answer questions
I need to export them
Background: # C:\Apache24\htdocs\integration\question\type\shortanswer\tests\behat\export.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | template |
| Test questions | shortanswer | shortanswer-001 | frogtoad |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Scenario: Export a Short answer question # C:\Apache24\htdocs\integration\question\type\shortanswer\tests\behat\export.feature:26
When I navigate to "Export" node in "Course administration > Question bank" # behat_hooks::i_look_for_exceptions()
And I set the field "id_format_xml" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Export questions to file" # behat_hooks::i_look_for_exceptions()
Then following "click here" should download between "1200" and "1300" bytes # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@qtype @qtype_truefalse
Feature: Test exporting True/False questions
As a teacher
In order to be able to reuse my True/false questions
I need to export them
Background: # C:\Apache24\htdocs\integration\question\type\truefalse\tests\behat\export.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | template |
| Test questions | truefalse | true-false-001 | true |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Scenario: Export a True/False question # C:\Apache24\htdocs\integration\question\type\truefalse\tests\behat\export.feature:26
When I navigate to "Export" node in "Course administration > Question bank" # behat_hooks::i_look_for_exceptions()
And I set the field "id_format_xml" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Export questions to file" # behat_hooks::i_look_for_exceptions()
Then following "click here" should download between "950" and "1050" bytes # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@gradeexport @gradeexport_txt
Feature: I need to export grades as text
In order to easily review marks
As a teacher
I need to have a export grades as text
Background: # C:\Apache24\htdocs\integration\grade\export\txt\tests\behat\export.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | course | idnumber | name | intro | assignsubmission_onlinetext_enabled |
| assign | C1 | a1 | Test assignment name | Submit your online text | 1 |
| assign | C1 | a2 | Test assignment name 2 | Submit your online text | 1 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Export grades as text # C:\Apache24\htdocs\integration\grade\export\txt\tests\behat\export.feature:31
When I go to "Export > Plain text file" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I click on "Course total" "checkbox" # behat_hooks::i_look_for_exceptions()
And I set the field "Grade export decimal points" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Download" # behat_hooks::i_look_for_exceptions()
Then I should see "Student,1" # behat_hooks::i_look_for_exceptions()
And I should see "80.0" # behat_hooks::i_look_for_exceptions()
And I should not see "Course total" # behat_hooks::i_look_for_exceptions()
And I should not see "80.00" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Export grades as text using real # C:\Apache24\htdocs\integration\grade\export\txt\tests\behat\export.feature:43
When I go to "Export > Plain text file" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Real | 1 |
And I click on "Course total" "checkbox" # behat_hooks::i_look_for_exceptions()
And I press "Download" # behat_hooks::i_look_for_exceptions()
Then I should see "Student,1" # behat_hooks::i_look_for_exceptions()
And I should see "80.00" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Export grades as text using percentages and letters # C:\Apache24\htdocs\integration\grade\export\txt\tests\behat\export.feature:54
When I go to "Export > Plain text file" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Percentage | 1 |
| Letter | 1 |
And I press "Download" # behat_hooks::i_look_for_exceptions()
Then I should see "Student,1" # behat_hooks::i_look_for_exceptions()
And I should see "80.00 %" # behat_hooks::i_look_for_exceptions()
And I should see "B-" # behat_hooks::i_look_for_exceptions()
And I should not see "40.00 %" # behat_hooks::i_look_for_exceptions()
And I should not see ",F," # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Export grades as text using real, percentages and letters # C:\Apache24\htdocs\integration\grade\export\txt\tests\behat\export.feature:67
When I go to "Export > Plain text file" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Real | 1 |
| Percentage | 1 |
| Letter | 1 |
And I press "Download" # behat_hooks::i_look_for_exceptions()
Then I should see "Student,1" # behat_hooks::i_look_for_exceptions()
And I should see "80.00" # behat_hooks::i_look_for_exceptions()
And I should see "80.00 %" # behat_hooks::i_look_for_exceptions()
And I should see "B-" # behat_hooks::i_look_for_exceptions()
And I should not see "40.00 %" # behat_hooks::i_look_for_exceptions()
And I should not see ",F," # behat_hooks::i_look_for_exceptions()
@gradeexport @gradeexport_xml
Feature: I need to export grades as xml
In order to easily review marks
As a teacher
I need to have a export grades as xml
Background: # C:\Apache24\htdocs\integration\grade\export\xml\tests\behat\export.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | t1 |
| student1 | Student | 1 | student1@example.com | s1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | course | idnumber | name | intro |
| assign | C1 | a1 | Test assignment name | Submit something! |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Export grades as text # C:\Apache24\htdocs\integration\grade\export\xml\tests\behat\export.feature:30
When I go to "Export > XML file" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I set the field "Grade export decimal points" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Download" # behat_hooks::i_look_for_exceptions()
Then I should see "s1" # behat_hooks::i_look_for_exceptions()
And I should see "a1" # behat_hooks::i_look_for_exceptions()
And I should see "80.0" # behat_hooks::i_look_for_exceptions()
And I should not see "80.00" # behat_hooks::i_look_for_exceptions()
@mod @mod_feedback
Feature: Exporting and importing feedbacks
In order to quickly copy feedbacks across courses and sites
As a teacher
I need to be able to export and import feedbacks
Background: # C:\Apache24\htdocs\integration\mod\feedback\tests\behat\export_import.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname |
| teacher | Teacher | 1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname |
| Course 1 | C1 |
| Course 2 | C2 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher | C1 | editingteacher |
| teacher | C1 | editingteacher |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | course | idnumber |
| feedback | Learning experience | C1 | feedback0 |
Scenario: Export sample feedback and compare with the fixture # C:\Apache24\htdocs\integration\mod\feedback\tests\behat\export_import.feature:23
When I log in as "teacher" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Learning experience" # behat_hooks::i_look_for_exceptions()
And I click on "Edit questions" "link" in the "[role=main]" "css_element" # behat_hooks::i_look_for_exceptions()
And I add a "Information" question to the feedback with: # behat_hooks::i_look_for_exceptions()
| Question | this is an information question |
| Label | info |
| Information type | Course |
And I add a "Label" question to the feedback with: # behat_hooks::i_look_for_exceptions()
| Contents | label text |
And I add a "Longer text answer" question to the feedback with: # behat_hooks::i_look_for_exceptions()
| Question | this is a longer text answer |
| Label | longertext |
| Required | 1 |
And I add a "Multiple choice" question to the feedback with: # behat_hooks::i_look_for_exceptions()
| Question | this is a multiple choice 1 |
| Label | multichoice1 |
| Multiple choice type | Multiple choice - single answer |
| Multiple choice values | option a\noption b\noption c |
And I select "Add a page break" from the "Add question" singleselect # behat_hooks::i_look_for_exceptions()
And I add a "Multiple choice" question to the feedback with: # behat_hooks::i_look_for_exceptions()
| Question | this is a multiple choice 2 |
| Label | multichoice2 |
| Multiple choice type | Multiple choice - multiple answers |
| Hide the "Not selected" option | Yes |
| Multiple choice values | option d\noption e\noption f |
| Dependence item | multichoice1 |
| Dependence value | option a |
And I add a "Multiple choice" question to the feedback with: # behat_hooks::i_look_for_exceptions()
| Question | this is a multiple choice 3 |
| Label | multichoice3 |
| Multiple choice type | Multiple choice - single answer allowed (dropdownlist) |
| Multiple choice values | option g\noption h\noption i |
And I add a "Multiple choice (rated)" question to the feedback with: # behat_hooks::i_look_for_exceptions()
| Question | this is a multiple choice rated |
| Label | multichoice4 |
| Multiple choice type | Multiple choice - single answer |
| Multiple choice values | 0/option k\n1/option l\n5/option m |
And I add a "Numeric answer" question to the feedback with: # behat_hooks::i_look_for_exceptions()
| Question | this is a numeric answer |
| Label | numeric |
| Range to | 100 |
And I add a "Short text answer" question to the feedback with: # behat_hooks::i_look_for_exceptions()
| Question | this is a short text answer |
| Label | shorttext |
| Maximum characters accepted | 200 |
And I follow "Templates" # behat_hooks::i_look_for_exceptions()
Then following "Export questions" should export feedback identical to "mod/feedback/tests/fixtures/testexport.xml" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@javascript @_file_upload
Scenario: Import feedback deleting old items # C:\Apache24\htdocs\integration\mod\feedback\tests\behat\export_import.feature:75
When I log in as "teacher" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Learning experience" # behat_hooks::i_look_for_exceptions()
And I click on "Edit questions" "link" in the "[role=main]" "css_element" # behat_hooks::i_look_for_exceptions()
And I add a "Numeric answer" question to the feedback with: # behat_hooks::i_look_for_exceptions()
| Question | Existing question |
| Label | numeric |
| Range to | 100 |
And I follow "Templates" # behat_hooks::i_look_for_exceptions()
And I follow "Import questions" # behat_hooks::i_look_for_exceptions()
And I upload "mod/feedback/tests/fixtures/testexport.xml" file to "File" filemanager # behat_hooks::i_look_for_exceptions()
And I press "Yes" # behat_hooks::i_look_for_exceptions()
And I click on "Edit questions" "link" in the "[role=main]" "css_element" # behat_hooks::i_look_for_exceptions()
Then I should not see "Existing question" # behat_hooks::i_look_for_exceptions()
And I should see "this is an information question" # behat_hooks::i_look_for_exceptions()
And I should see "label text" # behat_hooks::i_look_for_exceptions()
And I should see "this is a longer text answer" # behat_hooks::i_look_for_exceptions()
And I should see "this is a multiple choice 1" # behat_hooks::i_look_for_exceptions()
And I should see "this is a multiple choice 2" # behat_hooks::i_look_for_exceptions()
And I should see "this is a multiple choice 3" # behat_hooks::i_look_for_exceptions()
And I should see "this is a multiple choice rated" # behat_hooks::i_look_for_exceptions()
And I should see "this is a numeric answer" # behat_hooks::i_look_for_exceptions()
And I should see "this is a short text answer" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@javascript @_file_upload
Scenario: Import feedback appending new items # C:\Apache24\htdocs\integration\mod\feedback\tests\behat\export_import.feature:102
When I log in as "teacher" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Learning experience" # behat_hooks::i_look_for_exceptions()
And I click on "Edit questions" "link" in the "[role=main]" "css_element" # behat_hooks::i_look_for_exceptions()
And I add a "Numeric answer" question to the feedback with: # behat_hooks::i_look_for_exceptions()
| Question | Existing question |
| Label | numeric |
| Range to | 100 |
And I follow "Templates" # behat_hooks::i_look_for_exceptions()
And I follow "Import questions" # behat_hooks::i_look_for_exceptions()
And I set the field "Append new items" to "1" # behat_hooks::i_look_for_exceptions()
And I upload "mod/feedback/tests/fixtures/testexport.xml" file to "File" filemanager # behat_hooks::i_look_for_exceptions()
And I press "Yes" # behat_hooks::i_look_for_exceptions()
And I click on "Edit questions" "link" in the "[role=main]" "css_element" # behat_hooks::i_look_for_exceptions()
Then I should see "Existing question" # behat_hooks::i_look_for_exceptions()
And "Existing question" "text" should appear before "this is an information question" "text" # behat_hooks::i_look_for_exceptions()
And I should see "this is an information question" # behat_hooks::i_look_for_exceptions()
And I should see "label text" # behat_hooks::i_look_for_exceptions()
And I should see "this is a longer text answer" # behat_hooks::i_look_for_exceptions()
And I should see "this is a multiple choice 1" # behat_hooks::i_look_for_exceptions()
And I should see "this is a multiple choice 2" # behat_hooks::i_look_for_exceptions()
And I should see "this is a multiple choice 3" # behat_hooks::i_look_for_exceptions()
And I should see "this is a multiple choice rated" # behat_hooks::i_look_for_exceptions()
And I should see "this is a numeric answer" # behat_hooks::i_look_for_exceptions()
And I should see "this is a short text answer" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@mod @mod_workshop
Feature: Exporting workshop submissions and assessments to a portfolio
In order to archive my workshop contribution in a personal storage
As a student or as a teacher
I need to be able to export a workshop submission and its associated assessments
Background: # C:\Apache24\htdocs\integration\mod\workshop\tests\behat\export_submission.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Sam1 | Student1 | student1@example.com |
| student2 | Sam2 | Student2 | student2@example.com |
| teacher1 | Terry1 | Teacher1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname |
| Course1 | c1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| student1 | c1 | student |
| student2 | c1 | student |
| teacher1 | c1 | editingteacher |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber |
| workshop | TestWorkshop | Test workshop description | c1 | workshop1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| enableportfolios | 1 |
And I expand "Site administration" node # behat_hooks::i_look_for_exceptions()
And I expand "Plugins" node # behat_hooks::i_look_for_exceptions()
And I expand "Portfolios" node # behat_hooks::i_look_for_exceptions()
And I follow "Manage portfolios" # behat_hooks::i_look_for_exceptions()
And I set portfolio instance "File download" to "Enabled and visible" # behat_hooks::i_look_for_exceptions()
And I click on "Save" "button" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course1" # behat_hooks::i_look_for_exceptions()
And I edit assessment form in workshop "TestWorkshop" as:" # behat_hooks::i_look_for_exceptions()
| id_description__idx_0_editor | Aspect1 |
| id_description__idx_1_editor | Aspect2 |
And I change phase in workshop "TestWorkshop" to "Submission phase" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course1" # behat_hooks::i_look_for_exceptions()
And I follow "TestWorkshop" # behat_hooks::i_look_for_exceptions()
And I add a submission in workshop "TestWorkshop" as:" # behat_hooks::i_look_for_exceptions()
| Title | Submission1 |
| Submission content | Some content |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course1" # behat_hooks::i_look_for_exceptions()
And I add a submission in workshop "TestWorkshop" as:" # behat_hooks::i_look_for_exceptions()
| Title | Submission2 |
| Submission content | Some content |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course1" # behat_hooks::i_look_for_exceptions()
And I follow "TestWorkshop" # behat_hooks::i_look_for_exceptions()
And I should see "to allocate: 2" # behat_hooks::i_look_for_exceptions()
And I should see "Workshop submissions report" # behat_hooks::i_look_for_exceptions()
And I should see "Submitted (2) / not submitted (0)" # behat_hooks::i_look_for_exceptions()
And I should see "Submission1" in the "Sam1 Student1" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Submission2" in the "Sam2 Student2" "table_row" # behat_hooks::i_look_for_exceptions()
And I allocate submissions in workshop "TestWorkshop" as:" # behat_hooks::i_look_for_exceptions()
| Participant | Reviewer |
| Sam1 Student1 | Sam2 Student2 |
| Sam2 Student2 | Sam1 Student1 |
And I follow "TestWorkshop" # behat_hooks::i_look_for_exceptions()
And I should see "to allocate: 0" # behat_hooks::i_look_for_exceptions()
And I change phase in workshop "TestWorkshop" to "Assessment phase" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Students can export their own submission to a portfolio. # C:\Apache24\htdocs\integration\mod\workshop\tests\behat\export_submission.feature:76
Given I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course1" # behat_hooks::i_look_for_exceptions()
And I follow "TestWorkshop" # behat_hooks::i_look_for_exceptions()
When I follow "My submission" # behat_hooks::i_look_for_exceptions()
Then I should see "Submission1" # behat_hooks::i_look_for_exceptions()
And "Export this page" "button" should exist # behat_hooks::i_look_for_exceptions()
And I click on "Export this page" "button" # behat_hooks::i_look_for_exceptions()
And I should see "Available export formats" # behat_hooks::i_look_for_exceptions()
And I click on "Next" "button" # behat_hooks::i_look_for_exceptions()
And I should see "Summary of your export" # behat_hooks::i_look_for_exceptions()
And I click on "Continue" "button" # behat_hooks::i_look_for_exceptions()
And I should see "Return to where you were" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Students can export submission they have peer-assessed. # C:\Apache24\htdocs\integration\mod\workshop\tests\behat\export_submission.feature:91
Given I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course1" # behat_hooks::i_look_for_exceptions()
And I follow "TestWorkshop" # behat_hooks::i_look_for_exceptions()
And I should see "Submission2" # behat_hooks::i_look_for_exceptions()
And I follow "Submission2" # behat_hooks::i_look_for_exceptions()
And "Export this page" "button" should exist # behat_hooks::i_look_for_exceptions()
When I click on "Export this page" "button" # behat_hooks::i_look_for_exceptions()
Then I should see "Available export formats" # behat_hooks::i_look_for_exceptions()
And I click on "Next" "button" # behat_hooks::i_look_for_exceptions()
And I should see "Summary of your export" # behat_hooks::i_look_for_exceptions()
And I click on "Continue" "button" # behat_hooks::i_look_for_exceptions()
And I should see "Return to where you were" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: If the portfolio API is disabled, the portfolio export button is not displayed. # C:\Apache24\htdocs\integration\mod\workshop\tests\behat\export_submission.feature:106
Given the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| enableportfolios | 0 |
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course1" # behat_hooks::i_look_for_exceptions()
And I follow "TestWorkshop" # behat_hooks::i_look_for_exceptions()
And I follow "My submission" # behat_hooks::i_look_for_exceptions()
Then I should see "Submission1" # behat_hooks::i_look_for_exceptions()
And "Export this page" "button" should not exist # behat_hooks::i_look_for_exceptions()
@mod @mod_assign @assignfeedback @assignfeedback_file @_file_upload
Feature: In an assignment, teacher can submit feedback files during grading
In order to provide a feedback file
As a teacher
I need to submit a feedback file.
Background: # C:\Apache24\htdocs\integration\mod\assign\feedback\file\tests\behat\feedback_file.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And the following "groups" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| G1 | C1 | G1 |
And the following "group members" exist: # behat_hooks::i_look_for_exceptions()
| user | group |
| student1 | G1 |
| student2 | G1 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment name |
| Description | Submit your PDF file |
| Maximum number of uploaded files | 2 |
| Students submit in groups | Yes |
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I follow "Expand all" # behat_hooks::i_look_for_exceptions()
And I set the field "assignfeedback_file_enabled" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I press "Add submission" # behat_hooks::i_look_for_exceptions()
And I upload "mod/assign/feedback/file/tests/fixtures/submission.txt" file to "File submissions" filemanager # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "Submitted for grading" # behat_hooks::i_look_for_exceptions()
And I should see "submission.txt" # behat_hooks::i_look_for_exceptions()
And I should see "Not graded" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I click on "Grade" "link" in the ".submissionlinks" "css_element" # behat_hooks::i_look_for_exceptions()
And I upload "mod/assign/feedback/file/tests/fixtures/feedback.txt" file to "Feedback files" filemanager # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: A teacher can provide a feedback file when grading an assignment. # C:\Apache24\htdocs\integration\mod\assign\feedback\file\tests\behat\feedback_file.feature:59
Given I set the field "applytoall" to "0" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I click on "Ok" "button" # behat_hooks::i_look_for_exceptions()
And I click on "Course 1" "link" in the "[data-region=assignment-info]" "css_element" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I should see "feedback.txt" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
Then I should not see "feedback.txt" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: A teacher can provide a feedback file when grading an assignment and all students in the group will receive the file. # C:\Apache24\htdocs\integration\mod\assign\feedback\file\tests\behat\feedback_file.feature:76
Given I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I click on "Ok" "button" # behat_hooks::i_look_for_exceptions()
And I click on "Course 1" "link" in the "[data-region=assignment-info]" "css_element" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I should see "feedback.txt" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
Then I should see "feedback.txt" # behat_hooks::i_look_for_exceptions()
@mod @mod_assign @_file_upload
Feature: In an assignment, students can upload files for assessment
In order to complete my assignments providing files
As a student
I need to upload files from my file system to be assessed
@javascript
Scenario: Submit a file and update the submission with another file # C:\Apache24\htdocs\integration\mod\assign\tests\behat\file_submission.feature:8
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment name |
| Description | Submit your online text |
| assignsubmission_onlinetext_enabled | 0 |
| assignsubmission_file_enabled | 1 |
| Maximum number of uploaded files | 2 |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
When I press "Add submission" # behat_hooks::i_look_for_exceptions()
And I upload "lib/tests/fixtures/empty.txt" file to "File submissions" filemanager # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Submitted for grading" # behat_hooks::i_look_for_exceptions()
And I should see "Not graded" # behat_hooks::i_look_for_exceptions()
And "empty.txt" "link" should exist # behat_hooks::i_look_for_exceptions()
And I press "Edit submission" # behat_hooks::i_look_for_exceptions()
And I upload "lib/tests/fixtures/upload_users.csv" file to "File submissions" filemanager # behat_hooks::i_look_for_exceptions()
And ".ffilemanager .fm-maxfiles .fp-btn-add" "css_element" should not be visible # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "Submitted for grading" # behat_hooks::i_look_for_exceptions()
And "empty.txt" "link" should exist # behat_hooks::i_look_for_exceptions()
And "upload_users.csv" "link" should exist # behat_hooks::i_look_for_exceptions()
And I press "Edit submission" # behat_hooks::i_look_for_exceptions()
And ".ffilemanager .fm-maxfiles .fp-btn-add" "css_element" should not be visible # behat_hooks::i_look_for_exceptions()
And I delete "empty.txt" from "File submissions" filemanager # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And "empty.txt" "link" should not exist # behat_hooks::i_look_for_exceptions()
And "upload_users.csv" "link" should exist # behat_hooks::i_look_for_exceptions()
@mod @mod_assign
Feature: In an assignment, teachers can filter displayed submissions by assigned marker
In order to manage submissions more easily
As a teacher
I need to view submissions allocated to markers.
@javascript
Scenario: Allocate markers to submissions and filter by marker # C:\Apache24\htdocs\integration\mod\assign\tests\behat\filter_by_marker.feature:8
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
| marker1 | Marker | 1 | marker1@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| marker1 | C1 | teacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment name |
| Description | Submit your online text |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_file_enabled | 0 |
| Use marking workflow | Yes |
| Use marking allocation | Yes |
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I click on "Grade" "link" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the field "allocatedmarker" to "Marker 1" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Ok" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I set the field "markerfilter" to "Marker 1" # behat_hooks::i_look_for_exceptions()
Then I should see "Student 1" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 2" # behat_hooks::i_look_for_exceptions()
And I set the field "markerfilter" to "No marker" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 1" # behat_hooks::i_look_for_exceptions()
And I should see "Student 2" # behat_hooks::i_look_for_exceptions()
And I set the field "markerfilter" to "No filter" # behat_hooks::i_look_for_exceptions()
And I should see "Student 1" # behat_hooks::i_look_for_exceptions()
And I should see "Student 2" # behat_hooks::i_look_for_exceptions()
@core_enrol @core_group
Feature: Enrolled users can be filtered by group
In order to filter the list of enrolled users
As a teacher
I need to visit the enrolled users page and select a group to filter by
Background: # C:\Apache24\htdocs\integration\enrol\tests\behat\filter_enrolled_users.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname |
| Course 1 | C1 |
| Course 2 | C2 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname |
| student1 | Student | 1 |
| student2 | Student | 2 |
| student3 | Student | 3 |
| teacher1 | Teacher | 1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
| student1 | C2 | student |
| student2 | C2 | student |
| student3 | C2 | student |
| teacher1 | C1 | editingteacher |
| teacher1 | C2 | editingteacher |
And the following "groups" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| Group 1 | C1 | G1 |
| Group 2 | C1 | G2 |
| Group 3 | C2 | G3 |
And the following "group members" exist: # behat_hooks::i_look_for_exceptions()
| user | group |
| student2 | G1 |
| student2 | G2 |
| student3 | G2 |
| student1 | G3 |
Scenario Outline: # C:\Apache24\htdocs\integration\enrol\tests\behat\filter_enrolled_users.feature:40
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Enrolled users" node in "Course administration > Users" # behat_hooks::i_look_for_exceptions()
When I set the field "Group" to "" # behat_hooks::i_look_for_exceptions()
And I press "Filter" # behat_hooks::i_look_for_exceptions()
Then I should see "" # behat_hooks::i_look_for_exceptions()
And I should see "" # behat_hooks::i_look_for_exceptions()
And I should see "" # behat_hooks::i_look_for_exceptions()
And I should not see "" # behat_hooks::i_look_for_exceptions()
And I should not see "" # behat_hooks::i_look_for_exceptions()
And I should see "" # behat_hooks::i_look_for_exceptions()
Examples:
| group | expected1 | expected2 | expected3 | expected4 | notexpected1 | notexpected2 |
| All participants | Student 1 | Student 2 | Student 3 | 4 enrolled users | XX-IGNORE-XX | XX-IGNORE-XX |
| No group | Student 1 | | | 2 enrolled users | Student 2 | Student 3 |
| Group 1 | Student 2 | | | 1 enrolled users | Student 1 | Student 3 |
| Group 2 | Student 2 | Student 3 | | 2 enrolled users | Student 1 | XX-IGNORE-XX |
@core @core_user
Feature: Filter users by idnumber
As a system administrator
I need to be able to filter users by their ID number
So that I can quickly find users based on an external key.
Background: # C:\Apache24\htdocs\integration\user\tests\behat\filter_idnumber.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher@example.com | 0000002 |
| student1 | Student1 | 1 | student1@example.com | 0000003 |
| student2 | Student2 | 1 | student2@example.com | 2000000 |
| student3 | Student3 | 1 | student3@example.com | 3000000 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I expand "Site administration" node # behat_hooks::i_look_for_exceptions()
And I expand "Users" node # behat_hooks::i_look_for_exceptions()
And I expand "Users" node # behat_hooks::i_look_for_exceptions()
And I expand "Accounts" node # behat_hooks::i_look_for_exceptions()
When I follow "Browse list of users" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Filtering id numbers - with case "is empty" # C:\Apache24\htdocs\integration\user\tests\behat\filter_idnumber.feature:24
Then I should see "moodle@example.com" in the "users" "table" # behat_hooks::i_look_for_exceptions()
And I should see "Teacher" in the "users" "table" # behat_hooks::i_look_for_exceptions()
And I should see "Student1" in the "users" "table" # behat_hooks::i_look_for_exceptions()
And I should see "Student2" in the "users" "table" # behat_hooks::i_look_for_exceptions()
And I should see "Student3" in the "users" "table" # behat_hooks::i_look_for_exceptions()
And I follow "Show more..." # behat_hooks::i_look_for_exceptions()
And I set the field "id_idnumber_op" to "is empty" # behat_hooks::i_look_for_exceptions()
When I press "Add filter" # behat_hooks::i_look_for_exceptions()
Then I should see "moodle@example.com" in the "users" "table" # behat_hooks::i_look_for_exceptions()
And I should not see "Teacher" in the "users" "table" # behat_hooks::i_look_for_exceptions()
And I should not see "Student1" in the "users" "table" # behat_hooks::i_look_for_exceptions()
And I should not see "Student2" in the "users" "table" # behat_hooks::i_look_for_exceptions()
And I should not see "Student3" in the "users" "table" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario Outline: Filtering id numbers - with all other cases # C:\Apache24\htdocs\integration\user\tests\behat\filter_idnumber.feature:42
Then I should see "moodle@example.com" in the "users" "table" # behat_hooks::i_look_for_exceptions()
And I should see "Teacher" in the "users" "table" # behat_hooks::i_look_for_exceptions()
And I should see "Student1" in the "users" "table" # behat_hooks::i_look_for_exceptions()
And I should see "Student2" in the "users" "table" # behat_hooks::i_look_for_exceptions()
And I should see "Student3" in the "users" "table" # behat_hooks::i_look_for_exceptions()
And I follow "Show more..." # behat_hooks::i_look_for_exceptions()
And I set the field "id_idnumber_op" to "" # behat_hooks::i_look_for_exceptions()
And I set the field "idnumber" to "" # behat_hooks::i_look_for_exceptions()
When I press "Add filter" # behat_hooks::i_look_for_exceptions()
Then I should "moodle@example.com" in the "users" "table" # behat_hooks::i_look_for_exceptions()
And I should "Teacher" in the "users" "table" # behat_hooks::i_look_for_exceptions()
And I should "Student1" in the "users" "table" # behat_hooks::i_look_for_exceptions()
And I should "Student2" in the "users" "table" # behat_hooks::i_look_for_exceptions()
And I should "Student3" in the "users" "table" # behat_hooks::i_look_for_exceptions()
Examples:
| Category | Argument | Admin's Visibility | Teacher's Vis | S1's Vis | S2's Vis | S3's Vis |
| contains | 0 | not see | see | see | see | see |
| doesn't contain | 2 | see | not see | see | not see | see |
| is equal to | 2000000 | not see | not see | not see | see | not see |
| starts with | 0 | not see | see | see | not see | not see |
| ends with | 0 | not see | not see | not see | see | see |
@report @report_log
Feature: In a report, admin can filter log data by action
In order to filter log data by action
As an admin
I need to view the logs and apply a filter
Background: # C:\Apache24\htdocs\integration\report\log\tests\behat\filter_log_actions.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment 1 |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Assignment administration" # behat_hooks::i_look_for_exceptions()
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
And I delete "Test assignment 1" activity # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: View only create actions. # C:\Apache24\htdocs\integration\report\log\tests\behat\filter_log_actions.feature:30
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
When I navigate to "Logs" node in "Site administration > Reports" # behat_hooks::i_look_for_exceptions()
And I set the field "menumodaction" to "Create" # behat_hooks::i_look_for_exceptions()
And I press "Get these logs" # behat_hooks::i_look_for_exceptions()
Then I should see "Course module created" # behat_hooks::i_look_for_exceptions()
And I should not see "Course module updated" # behat_hooks::i_look_for_exceptions()
And I should not see "The status of the submission has been viewed." # behat_hooks::i_look_for_exceptions()
And I should not see "Course module deleted" # behat_hooks::i_look_for_exceptions()
Scenario: View only update actions. # C:\Apache24\htdocs\integration\report\log\tests\behat\filter_log_actions.feature:40
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
When I navigate to "Logs" node in "Site administration > Reports" # behat_hooks::i_look_for_exceptions()
And I set the field "menumodaction" to "Update" # behat_hooks::i_look_for_exceptions()
And I press "Get these logs" # behat_hooks::i_look_for_exceptions()
Then I should see "Course module updated" # behat_hooks::i_look_for_exceptions()
And I should not see "Course module created" # behat_hooks::i_look_for_exceptions()
And I should not see "The status of the submission has been viewed." # behat_hooks::i_look_for_exceptions()
And I should not see "Course module deleted" # behat_hooks::i_look_for_exceptions()
Scenario: View only view actions. # C:\Apache24\htdocs\integration\report\log\tests\behat\filter_log_actions.feature:50
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
When I navigate to "Logs" node in "Site administration > Reports" # behat_hooks::i_look_for_exceptions()
And I set the field "menumodaction" to "View" # behat_hooks::i_look_for_exceptions()
And I press "Get these logs" # behat_hooks::i_look_for_exceptions()
Then I should see "The status of the submission has been viewed." # behat_hooks::i_look_for_exceptions()
And I should not see "Course module created" # behat_hooks::i_look_for_exceptions()
And I should not see "Course module updated" # behat_hooks::i_look_for_exceptions()
And I should not see "Course module deleted" # behat_hooks::i_look_for_exceptions()
Scenario: View only delete actions. # C:\Apache24\htdocs\integration\report\log\tests\behat\filter_log_actions.feature:60
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
When I navigate to "Logs" node in "Site administration > Reports" # behat_hooks::i_look_for_exceptions()
And I set the field "menumodaction" to "Delete" # behat_hooks::i_look_for_exceptions()
And I press "Get these logs" # behat_hooks::i_look_for_exceptions()
Then I should see "Course module deleted" # behat_hooks::i_look_for_exceptions()
And I should not see "Course module created" # behat_hooks::i_look_for_exceptions()
And I should not see "Course module updated" # behat_hooks::i_look_for_exceptions()
And I should not see "The status of the submission has been viewed." # behat_hooks::i_look_for_exceptions()
Scenario: View only changes. # C:\Apache24\htdocs\integration\report\log\tests\behat\filter_log_actions.feature:70
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
When I navigate to "Logs" node in "Site administration > Reports" # behat_hooks::i_look_for_exceptions()
And I set the field "menumodaction" to "All changes" # behat_hooks::i_look_for_exceptions()
And I press "Get these logs" # behat_hooks::i_look_for_exceptions()
Then I should see "Course module deleted" # behat_hooks::i_look_for_exceptions()
And I should see "Course module created" # behat_hooks::i_look_for_exceptions()
And I should see "Course module updated" # behat_hooks::i_look_for_exceptions()
And I should not see "The status of the submission has been viewed." # behat_hooks::i_look_for_exceptions()
Scenario: View all actions. # C:\Apache24\htdocs\integration\report\log\tests\behat\filter_log_actions.feature:80
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
When I navigate to "Logs" node in "Site administration > Reports" # behat_hooks::i_look_for_exceptions()
And I set the field "menumodaction" to "All actions" # behat_hooks::i_look_for_exceptions()
And I press "Get these logs" # behat_hooks::i_look_for_exceptions()
Then I should see "Course module deleted" # behat_hooks::i_look_for_exceptions()
And I should see "Course module created" # behat_hooks::i_look_for_exceptions()
And I should see "Course module updated" # behat_hooks::i_look_for_exceptions()
And I should see "The status of the submission has been viewed." # behat_hooks::i_look_for_exceptions()
@report @report_log
Feature: In a report, admin can filter log data
In order to filter log data
As an admin
I need to log in with different user and go to log and apply filter
Background: # C:\Apache24\htdocs\integration\report\log\tests\behat\filter_log.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| admin | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Filter log report for standard and legacy log reader # C:\Apache24\htdocs\integration\report\log\tests\behat\filter_log.feature:21
Given I navigate to "Manage log stores" node in "Site administration > Plugins > Logging" # behat_hooks::i_look_for_exceptions()
And I click on "Enable" "link" in the "Legacy log" "table_row" # behat_hooks::i_look_for_exceptions()
And the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| loglegacy | 1 | logstore_legacy |
And I follow "Home" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Participants" node in "My courses > C1" # behat_hooks::i_look_for_exceptions()
And I follow "Student 1" # behat_hooks::i_look_for_exceptions()
And I click on "Log in as" "link" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
When I navigate to "Logs" node in "Site administration > Reports" # behat_hooks::i_look_for_exceptions()
And I set the field "id" to "Acceptance test site (Site)" # behat_hooks::i_look_for_exceptions()
And I set the field "user" to "All participants" # behat_hooks::i_look_for_exceptions()
And I set the field "logreader" to "Standard log" # behat_hooks::i_look_for_exceptions()
And I press "Get these logs" # behat_hooks::i_look_for_exceptions()
Then I should see "User logged in as another user" # behat_hooks::i_look_for_exceptions()
And I set the field "logreader" to "Legacy log" # behat_hooks::i_look_for_exceptions()
And I press "Get these logs" # behat_hooks::i_look_for_exceptions()
And I should see "user login" # behat_hooks::i_look_for_exceptions()
And I should not see "Nothing to display" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Filter log report for standard log reader # C:\Apache24\htdocs\integration\report\log\tests\behat\filter_log.feature:46
Given I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Participants" node in "My courses > C1" # behat_hooks::i_look_for_exceptions()
And I follow "Student 1" # behat_hooks::i_look_for_exceptions()
And I click on "Log in as" "link" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
When I navigate to "Logs" node in "Site administration > Reports" # behat_hooks::i_look_for_exceptions()
And I set the field "id" to "Acceptance test site (Site)" # behat_hooks::i_look_for_exceptions()
And I set the field "user" to "All participants" # behat_hooks::i_look_for_exceptions()
And I press "Get these logs" # behat_hooks::i_look_for_exceptions()
Then I should see "User logged in as another user" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Filter log report for legacy log reader # C:\Apache24\htdocs\integration\report\log\tests\behat\filter_log.feature:61
Given I navigate to "Manage log stores" node in "Site administration > Plugins > Logging" # behat_hooks::i_look_for_exceptions()
And I click on "Enable" "link" in the "Legacy log" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "Disable" "link" in the "Standard log" "table_row" # behat_hooks::i_look_for_exceptions()
And the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| loglegacy | 1 | logstore_legacy |
And I follow "Home" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Home" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I expand "Users" node # behat_hooks::i_look_for_exceptions()
And I follow "Enrolled users" # behat_hooks::i_look_for_exceptions()
And I follow "Student 1" # behat_hooks::i_look_for_exceptions()
And I click on "Log in as" "link" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
When I navigate to "Logs" node in "Site administration > Reports" # behat_hooks::i_look_for_exceptions()
And I set the field "id" to "Acceptance test site (Site)" # behat_hooks::i_look_for_exceptions()
And I set the field "user" to "All participants" # behat_hooks::i_look_for_exceptions()
And I press "Get these logs" # behat_hooks::i_look_for_exceptions()
Then I should see "user login" # behat_hooks::i_look_for_exceptions()
@report @report_participation
Feature: In a participation report, admin can filter student actions
In order to filter participation data
As a student
I need to log action and then log in as admin to view participation report
Background: # C:\Apache24\htdocs\integration\report\participation\tests\behat\filter_participation.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Book" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Test book name |
| Description | Test book |
And I follow "Test book name" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Chapter title | Test chapter |
| Content | Test chapter content |
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Filter participation report when only legacy log reader is enabled # C:\Apache24\htdocs\integration\report\participation\tests\behat\filter_participation.feature:32
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "Manage log stores" node in "Site administration > Plugins > Logging" # behat_hooks::i_look_for_exceptions()
And I click on "Disable" "link" in the "Standard log" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "Enable" "link" in the "Legacy log" "table_row" # behat_hooks::i_look_for_exceptions()
And the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| loglegacy | 1 | logstore_legacy |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test book name" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
When I navigate to "Course participation" node in "Course administration > Reports" # behat_hooks::i_look_for_exceptions()
And I set the field "instanceid" to "Test book name" # behat_hooks::i_look_for_exceptions()
And I set the field "roleid" to "Student" # behat_hooks::i_look_for_exceptions()
And I press "Go" # behat_hooks::i_look_for_exceptions()
Then I should see "Yes (1)" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Filter participation report when standard log reader is enabled later # C:\Apache24\htdocs\integration\report\participation\tests\behat\filter_participation.feature:54
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "Manage log stores" node in "Site administration > Plugins > Logging" # behat_hooks::i_look_for_exceptions()
And I click on "Disable" "link" in the "Standard log" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "Enable" "link" in the "Legacy log" "table_row" # behat_hooks::i_look_for_exceptions()
And the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| loglegacy | 1 | logstore_legacy |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test book name" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "Manage log stores" node in "Site administration > Plugins > Logging" # behat_hooks::i_look_for_exceptions()
And I click on "Enable" "link" in the "Standard log" "table_row" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test book name" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
When I navigate to "Course participation" node in "Course administration > Reports" # behat_hooks::i_look_for_exceptions()
And I set the field "instanceid" to "Test book name" # behat_hooks::i_look_for_exceptions()
And I set the field "roleid" to "Student" # behat_hooks::i_look_for_exceptions()
And I press "Go" # behat_hooks::i_look_for_exceptions()
Then I should see "Yes (2)" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Filter participation report when only standard log reader is enabled by default # C:\Apache24\htdocs\integration\report\participation\tests\behat\filter_participation.feature:84
Given I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test book name" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
When I navigate to "Course participation" node in "Course administration > Reports" # behat_hooks::i_look_for_exceptions()
And I set the field "instanceid" to "Test book name" # behat_hooks::i_look_for_exceptions()
And I set the field "roleid" to "Student" # behat_hooks::i_look_for_exceptions()
And I press "Go" # behat_hooks::i_look_for_exceptions()
Then I should see "Yes (1)" # behat_hooks::i_look_for_exceptions()
@core @core_admin
Feature: An administrator can filter user accounts by role, cohort and other profile fields
In order to find the user accounts I am looking for
As an admin
I need to filter the users account list using different filter
Background: # C:\Apache24\htdocs\integration\admin\tests\behat\filter_users.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | auth | confirmed |
| user1 | User | One | one@example.com | manual | 0 |
| user2 | User | Two | two@example.com | ldap | 1 |
| user3 | User | Three | three@example.com | manual | 1 |
| user4 | User | Four | four@example.com | ldap | 0 |
And the following "cohorts" exist: # behat_hooks::i_look_for_exceptions()
| name | idnumber |
| Cohort 1 | CH1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| user1 | C1 | student |
| user2 | C1 | student |
| user3 | C1 | student |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I add "User Two (two@example.com)" user to "CH1" cohort members # behat_hooks::i_look_for_exceptions()
And I add "User Three (three@example.com)" user to "CH1" cohort members # behat_hooks::i_look_for_exceptions()
And I follow "Browse list of users" # behat_hooks::i_look_for_exceptions()
Scenario: Filter user accounts by role and cohort # C:\Apache24\htdocs\integration\admin\tests\behat\filter_users.feature:30
When I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| courserole_rl | Student |
| courserole_ct | any category |
| courserole | C1 |
And I press "Add filter" # behat_hooks::i_look_for_exceptions()
Then I should see "User One" # behat_hooks::i_look_for_exceptions()
And I should see "User Two" # behat_hooks::i_look_for_exceptions()
And I should see "User Three" # behat_hooks::i_look_for_exceptions()
And I should not see "User Four" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| cohort | CH1 |
And I press "Add filter" # behat_hooks::i_look_for_exceptions()
And I should not see "User One" # behat_hooks::i_look_for_exceptions()
And I should see "User Two" # behat_hooks::i_look_for_exceptions()
And I should see "User Three" # behat_hooks::i_look_for_exceptions()
And I should not see "User Four" # behat_hooks::i_look_for_exceptions()
And I press "Remove all filters" # behat_hooks::i_look_for_exceptions()
And I should see "User One" # behat_hooks::i_look_for_exceptions()
And I should see "User Two" # behat_hooks::i_look_for_exceptions()
And I should see "User Three" # behat_hooks::i_look_for_exceptions()
And I should see "User Four" # behat_hooks::i_look_for_exceptions()
Scenario: Filter user accounts by confirm and authentication method # C:\Apache24\htdocs\integration\admin\tests\behat\filter_users.feature:53
When I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Confirmed | No |
And I press "Add filter" # behat_hooks::i_look_for_exceptions()
Then I should see "User One" # behat_hooks::i_look_for_exceptions()
And I should not see "User Two" # behat_hooks::i_look_for_exceptions()
And I should not see "User Three" # behat_hooks::i_look_for_exceptions()
And I should see "User Four" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Authentication | manual |
And I press "Add filter" # behat_hooks::i_look_for_exceptions()
And I should see "User One" # behat_hooks::i_look_for_exceptions()
And I should not see "User Two" # behat_hooks::i_look_for_exceptions()
And I should not see "User Three" # behat_hooks::i_look_for_exceptions()
And I should not see "User Four" # behat_hooks::i_look_for_exceptions()
@core @core_tag
Feature: Users can flag tags and manager can reset flags
In order to use tags
As a user
I need to be able to flag the tag as inappropriate
Background: # C:\Apache24\htdocs\integration\tag\tests\behat\flag_tags.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | interests |
| manager1 | Manager | 1 | manager1@example.com | |
| user1 | User | 1 | user1@example.com | Nicetag, Badtag, Sweartag |
| user2 | User | 2 | user2@example.com | |
| user3 | User | 3 | user3@example.com | |
And the following "system role assigns" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| manager1 | Acceptance test site | manager |
And the following "tags" exist: # behat_hooks::i_look_for_exceptions()
| name | isstandard |
| Neverusedtag | 1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I set the following system permissions of "Authenticated user" role: # behat_hooks::i_look_for_exceptions()
| capability | permission |
| moodle/site:viewparticipants | Allow |
| moodle/user:viewdetails | Allow |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "user2" # behat_hooks::i_look_for_exceptions()
And I navigate to "Participants" node in "Site pages" # behat_hooks::i_look_for_exceptions()
And I follow "User 1" # behat_hooks::i_look_for_exceptions()
And I follow "Badtag" # behat_hooks::i_look_for_exceptions()
And I follow "Flag as inappropriate" # behat_hooks::i_look_for_exceptions()
And I should see "The person responsible will be notified" # behat_hooks::i_look_for_exceptions()
And I navigate to "Participants" node in "Site pages" # behat_hooks::i_look_for_exceptions()
And I follow "User 1" # behat_hooks::i_look_for_exceptions()
And I follow "Sweartag" # behat_hooks::i_look_for_exceptions()
And I follow "Flag as inappropriate" # behat_hooks::i_look_for_exceptions()
And I should see "The person responsible will be notified" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "user3" # behat_hooks::i_look_for_exceptions()
And I navigate to "Participants" node in "Site pages" # behat_hooks::i_look_for_exceptions()
And I follow "User 1" # behat_hooks::i_look_for_exceptions()
And I follow "Sweartag" # behat_hooks::i_look_for_exceptions()
And I follow "Flag as inappropriate" # behat_hooks::i_look_for_exceptions()
And I should see "The person responsible will be notified" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Managing tag flags # C:\Apache24\htdocs\integration\tag\tests\behat\flag_tags.feature:47
When I log in as "manager1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Manage tags" node in "Site administration > Appearance" # behat_hooks::i_look_for_exceptions()
And I follow "Default collection" # behat_hooks::i_look_for_exceptions()
Then "Sweartag" "link" should appear before "Badtag" "link" # behat_hooks::i_look_for_exceptions()
And "Badtag" "link" should appear before "Nicetag" "link" # behat_hooks::i_look_for_exceptions()
And "(2)" "text" should exist in the "//tr[contains(.,'Sweartag')]//td[contains(@class,'col-flag')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And "(1)" "text" should exist in the "//tr[contains(.,'Badtag')]//td[contains(@class,'col-flag')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And "(" "text" should not exist in the "//tr[contains(.,'Nicetag')]//td[contains(@class,'col-flag')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And "(" "text" should not exist in the "//tr[contains(.,'Neverusedtag')]//td[contains(@class,'col-flag')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I click on "Reset flag" "link" in the "Sweartag" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "Reset flag" "link" in the "Badtag" "table_row" # behat_hooks::i_look_for_exceptions()
And I wait until "//tr[contains(.,'Sweartag')]//a[contains(@title,'Flag as inappropriate')]" "xpath_element" exists # behat_hooks::i_look_for_exceptions()
And I click on "Flag as inappropriate" "link" in the "Sweartag" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "Flag as inappropriate" "link" in the "Nicetag" "table_row" # behat_hooks::i_look_for_exceptions()
And "(1)" "text" should exist in the "//tr[contains(.,'Sweartag')]//td[contains(@class,'col-flag')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And "(1)" "text" should exist in the "//tr[contains(.,'Nicetag')]//td[contains(@class,'col-flag')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And "(" "text" should not exist in the "//tr[contains(.,'Badtag')]//td[contains(@class,'col-flag')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And "(" "text" should not exist in the "//tr[contains(.,'Neverusedtag')]//td[contains(@class,'col-flag')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I follow "Default collection" # behat_hooks::i_look_for_exceptions()
And "Nicetag" "link" should appear before "Sweartag" "link" # behat_hooks::i_look_for_exceptions()
And "Sweartag" "link" should appear before "Badtag" "link" # behat_hooks::i_look_for_exceptions()
And "(1)" "text" should exist in the "//tr[contains(.,'Sweartag')]//td[contains(@class,'col-flag')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And "(1)" "text" should exist in the "//tr[contains(.,'Nicetag')]//td[contains(@class,'col-flag')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And "(" "text" should not exist in the "//tr[contains(.,'Badtag')]//td[contains(@class,'col-flag')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And "(" "text" should not exist in the "//tr[contains(.,'Neverusedtag')]//td[contains(@class,'col-flag')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@core @core_course @_cross_browser
Feature: Force group mode in a course
In order to use the same group mode all over the course
As a teacher
I need to force the group mode of all course's activities
Background: # C:\Apache24\htdocs\integration\course\tests\behat\force_group_mode.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Chat" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name of this chat room | Chat room |
| Description | Chat description |
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Forced group mode using separate groups # C:\Apache24\htdocs\integration\course\tests\behat\force_group_mode.feature:26
Given I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Group mode | Separate groups |
| Force group mode | Yes |
When I press "Save and display" # behat_hooks::i_look_for_exceptions()
Then "//a/child::img[contains(@alt, 'Separate groups (forced mode)')]" "xpath_element" should not exist # behat_hooks::i_look_for_exceptions()
And "//img[contains(@alt, 'Separate groups (forced mode)')]" "xpath_element" should not exist # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Forced group mode using visible groups # C:\Apache24\htdocs\integration\course\tests\behat\force_group_mode.feature:35
Given I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Group mode | Visible groups |
| Force group mode | Yes |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
Then "//a/child::img[contains(@alt, 'Visible groups (forced mode)')]" "xpath_element" should not exist # behat_hooks::i_look_for_exceptions()
And "//img[contains(@alt, 'Visible groups (forced mode)')]" "xpath_element" should not exist # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Forced group mode without groups # C:\Apache24\htdocs\integration\course\tests\behat\force_group_mode.feature:44
Given I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Group mode | No groups |
| Force group mode | Yes |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
Then "//a/child::img[contains(@alt, 'No groups (forced mode)')]" "xpath_element" should not exist # behat_hooks::i_look_for_exceptions()
And "//img[contains(@alt, 'No groups (forced mode)')]" "xpath_element" should not exist # behat_hooks::i_look_for_exceptions()
@mod @mod_forum
Feature: As a teacher I need to see an accurate list of subscribed users
In order to see who is subscribed to a forum
As a teacher
I need to view the list of subscribed users
Background: # C:\Apache24\htdocs\integration\mod\forum\tests\behat\forum_subscriptions_availability.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher | Teacher | Teacher | teacher@example.com |
| student1 | Student | 1 | student.1@example.com |
| student2 | Student | 2 | student.2@example.com |
| student3 | Student | 3 | student.3@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
And the following "groups" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| Group 1 | C1 | G1 |
| Group 2 | C1 | G2 |
And the following "group members" exist: # behat_hooks::i_look_for_exceptions()
| user | group |
| student1 | G1 |
| student2 | G2 |
And the following "groupings" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| Grouping 1 | C1 | GG1 |
And the following "grouping groups" exist: # behat_hooks::i_look_for_exceptions()
| grouping | group |
| GG1 | G1 |
And I log in as "teacher" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: A forced forum lists all subscribers # C:\Apache24\htdocs\integration\mod\forum\tests\behat\forum_subscriptions_availability.feature:42
When I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Forced Forum 1 |
| Forum type | Standard forum for general use |
| Description | Test forum description |
| Subscription mode | Forced subscription |
And I follow "Forced Forum 1" # behat_hooks::i_look_for_exceptions()
And I click on "Show/edit current subscribers" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
Then I should see "Student 1" # behat_hooks::i_look_for_exceptions()
And I should see "Teacher Teacher" # behat_hooks::i_look_for_exceptions()
And I should see "Student 2" # behat_hooks::i_look_for_exceptions()
And I should see "Student 3" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I click on "Add restriction..." "button" # behat_hooks::i_look_for_exceptions()
And I click on "Grouping" "button" in the "Add restriction..." "dialogue" # behat_hooks::i_look_for_exceptions()
And I set the field with xpath "//select[@name='id']" to "Grouping 1" # behat_hooks::i_look_for_exceptions()
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I click on "Show/edit current subscribers" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Student 1" # behat_hooks::i_look_for_exceptions()
And I should see "Teacher Teacher" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 2" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 3" # behat_hooks::i_look_for_exceptions()
Scenario: A forced forum does not allow to edit the subscribers # C:\Apache24\htdocs\integration\mod\forum\tests\behat\forum_subscriptions_availability.feature:66
When I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Forced Forum 2 |
| Forum type | Standard forum for general use |
| Description | Test forum description |
| Subscription mode | Forced subscription |
| Visible | Show |
And I follow "Forced Forum 2" # behat_hooks::i_look_for_exceptions()
And I click on "Show/edit current subscribers" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
Then I should see "Teacher Teacher" # behat_hooks::i_look_for_exceptions()
And I should see "Student 1" # behat_hooks::i_look_for_exceptions()
And I should see "Student 2" # behat_hooks::i_look_for_exceptions()
And I should see "Student 3" # behat_hooks::i_look_for_exceptions()
And I should not see "Turn editing on" # behat_hooks::i_look_for_exceptions()
Scenario: A forced and hidden forum lists only teachers # C:\Apache24\htdocs\integration\mod\forum\tests\behat\forum_subscriptions_availability.feature:81
When I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Forced Forum 2 |
| Forum type | Standard forum for general use |
| Description | Test forum description |
| Subscription mode | Forced subscription |
| Visible | Hide |
And I follow "Forced Forum 2" # behat_hooks::i_look_for_exceptions()
And I click on "Show/edit current subscribers" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
Then I should see "Teacher Teacher" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 1" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 2" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 3" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: An automatic forum lists all subscribers # C:\Apache24\htdocs\integration\mod\forum\tests\behat\forum_subscriptions_availability.feature:96
When I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Forced Forum 1 |
| Forum type | Standard forum for general use |
| Description | Test forum description |
| Subscription mode | Auto subscription |
And I follow "Forced Forum 1" # behat_hooks::i_look_for_exceptions()
And I click on "Show/edit current subscribers" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
Then I should see "Student 1" # behat_hooks::i_look_for_exceptions()
And I should see "Teacher Teacher" # behat_hooks::i_look_for_exceptions()
And I should see "Student 2" # behat_hooks::i_look_for_exceptions()
And I should see "Student 3" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I click on "Add restriction..." "button" # behat_hooks::i_look_for_exceptions()
And I click on "Grouping" "button" in the "Add restriction..." "dialogue" # behat_hooks::i_look_for_exceptions()
And I set the field with xpath "//select[@name='id']" to "Grouping 1" # behat_hooks::i_look_for_exceptions()
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I click on "Show/edit current subscribers" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Student 1" # behat_hooks::i_look_for_exceptions()
And I should see "Teacher Teacher" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 2" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 3" # behat_hooks::i_look_for_exceptions()
@mod @mod_forum
Feature: A user can control their own subscription preferences for a forum
In order to receive notifications for things I am interested in
As a user
I need to choose my forum subscriptions
Background: # C:\Apache24\htdocs\integration\mod\forum\tests\behat\forum_subscriptions.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Student | One | student.one@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| student1 | C1 | student |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
Scenario: A disallowed subscription forum cannot be subscribed to # C:\Apache24\htdocs\integration\mod\forum\tests\behat\forum_subscriptions.feature:22
Given I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name |
| Forum type | Standard forum for general use |
| Description | Test forum description |
| Subscription mode | Subscription disabled |
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Test post subject |
| Message | Test post message |
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
Then I should not see "Subscribe to this forum" # behat_hooks::i_look_for_exceptions()
And I should not see "Unsubscribe from this forum" # behat_hooks::i_look_for_exceptions()
And "You are subscribed to this discussion. Click to unsubscribe." "link" should not exist in the "Test post subject" "table_row" # behat_hooks::i_look_for_exceptions()
And "You are not subscribed to this discussion. Click to subscribe." "link" should not exist in the "Test post subject" "table_row" # behat_hooks::i_look_for_exceptions()
Scenario: A forced subscription forum cannot be subscribed to # C:\Apache24\htdocs\integration\mod\forum\tests\behat\forum_subscriptions.feature:40
Given I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name |
| Forum type | Standard forum for general use |
| Description | Test forum description |
| Subscription mode | Forced subscription |
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Test post subject |
| Message | Test post message |
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
Then I should not see "Subscribe to this forum" # behat_hooks::i_look_for_exceptions()
And I should not see "Unsubscribe from this forum" # behat_hooks::i_look_for_exceptions()
And "You are subscribed to this discussion. Click to unsubscribe." "link" should not exist in the "Test post subject" "table_row" # behat_hooks::i_look_for_exceptions()
And "You are not subscribed to this discussion. Click to subscribe." "link" should not exist in the "Test post subject" "table_row" # behat_hooks::i_look_for_exceptions()
Scenario: An optional forum can be subscribed to # C:\Apache24\htdocs\integration\mod\forum\tests\behat\forum_subscriptions.feature:58
Given I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name |
| Forum type | Standard forum for general use |
| Description | Test forum description |
| Subscription mode | Optional subscription |
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Test post subject |
| Message | Test post message |
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
Then I should see "Subscribe to this forum" # behat_hooks::i_look_for_exceptions()
And I should not see "Unsubscribe from this forum" # behat_hooks::i_look_for_exceptions()
And I follow "Subscribe to this forum" # behat_hooks::i_look_for_exceptions()
And I should see "Student One will be notified of new posts in 'Test forum name'" # behat_hooks::i_look_for_exceptions()
And I should see "Unsubscribe from this forum" # behat_hooks::i_look_for_exceptions()
And I should not see "Subscribe to this forum" # behat_hooks::i_look_for_exceptions()
Scenario: An Automatic forum can be unsubscribed from # C:\Apache24\htdocs\integration\mod\forum\tests\behat\forum_subscriptions.feature:78
Given I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name |
| Forum type | Standard forum for general use |
| Description | Test forum description |
| Subscription mode | Auto subscription |
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Test post subject |
| Message | Test post message |
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
Then I should see "Unsubscribe from this forum" # behat_hooks::i_look_for_exceptions()
And I should not see "Subscribe to this forum" # behat_hooks::i_look_for_exceptions()
And I follow "Unsubscribe from this forum" # behat_hooks::i_look_for_exceptions()
And I should see "Student One will NOT be notified of new posts in 'Test forum name'" # behat_hooks::i_look_for_exceptions()
And I should see "Subscribe to this forum" # behat_hooks::i_look_for_exceptions()
And I should not see "Unsubscribe from this forum" # behat_hooks::i_look_for_exceptions()
@mod @mod_forum
Feature: A user can control their default discussion subscription settings
In order to automatically subscribe to discussions
As a user
I can choose my default subscription preference
Background: # C:\Apache24\htdocs\integration\mod\forum\tests\behat\forum_subscriptions_default.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | autosubscribe |
| student1 | Student | One | student.one@example.com | 1 |
| student2 | Student | Two | student.one@example.com | 0 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| student1 | C1 | student |
| student2 | C1 | student |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
Scenario: Creating a new discussion in an optional forum follows user preferences # C:\Apache24\htdocs\integration\mod\forum\tests\behat\forum_subscriptions_default.feature:24
Given I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name |
| Forum type | Standard forum for general use |
| Description | Test forum description |
| Subscription mode | Optional subscription |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
When I press "Add a new discussion topic" # behat_hooks::i_look_for_exceptions()
Then "input[name=discussionsubscribe][checked=checked]" "css_element" should exist # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
And I press "Add a new discussion topic" # behat_hooks::i_look_for_exceptions()
And "input[name=discussionsubscribe]:not([checked=checked])" "css_element" should exist # behat_hooks::i_look_for_exceptions()
Scenario: Replying to an existing discussion in an optional forum follows user preferences # C:\Apache24\htdocs\integration\mod\forum\tests\behat\forum_subscriptions_default.feature:43
Given I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name |
| Forum type | Standard forum for general use |
| Description | Test forum description |
| Subscription mode | Optional subscription |
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Test post subject |
| Message | Test post message |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
And I follow "Test post subject" # behat_hooks::i_look_for_exceptions()
When I follow "Reply" # behat_hooks::i_look_for_exceptions()
Then "input[name=discussionsubscribe][checked=checked]" "css_element" should exist # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
And I follow "Test post subject" # behat_hooks::i_look_for_exceptions()
And I follow "Reply" # behat_hooks::i_look_for_exceptions()
And "input[name=discussionsubscribe]:not([checked=checked])" "css_element" should exist # behat_hooks::i_look_for_exceptions()
Scenario: Creating a new discussion in an automatic forum follows forum subscription # C:\Apache24\htdocs\integration\mod\forum\tests\behat\forum_subscriptions_default.feature:67
Given I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name |
| Forum type | Standard forum for general use |
| Description | Test forum description |
| Subscription mode | Auto subscription |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
When I press "Add a new discussion topic" # behat_hooks::i_look_for_exceptions()
Then "input[name=discussionsubscribe][checked=checked]" "css_element" should exist # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
And I press "Add a new discussion topic" # behat_hooks::i_look_for_exceptions()
And "input[name=discussionsubscribe][checked=checked]" "css_element" should exist # behat_hooks::i_look_for_exceptions()
Scenario: Replying to an existing discussion in an automatic forum follows forum subscription # C:\Apache24\htdocs\integration\mod\forum\tests\behat\forum_subscriptions_default.feature:86
Given I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name |
| Forum type | Standard forum for general use |
| Description | Test forum description |
| Subscription mode | Optional subscription |
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Test post subject |
| Message | Test post message |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
And I follow "Test post subject" # behat_hooks::i_look_for_exceptions()
When I follow "Reply" # behat_hooks::i_look_for_exceptions()
Then "input[name=discussionsubscribe][checked=checked]" "css_element" should exist # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
And I follow "Test post subject" # behat_hooks::i_look_for_exceptions()
And I follow "Reply" # behat_hooks::i_look_for_exceptions()
And "input[name=discussionsubscribe]:not([checked=checked])" "css_element" should exist # behat_hooks::i_look_for_exceptions()
Scenario: Replying to an existing discussion in an automatic forum which has been unsubscribed from follows user preferences # C:\Apache24\htdocs\integration\mod\forum\tests\behat\forum_subscriptions_default.feature:110
Given I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name |
| Forum type | Standard forum for general use |
| Description | Test forum description |
| Subscription mode | Auto subscription |
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Test post subject |
| Message | Test post message |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
And I click on "You are subscribed to this discussion. Click to unsubscribe." "link" in the "Test post subject" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Student One will NOT be notified of new posts in 'Test post subject' of 'Test forum name'" # behat_hooks::i_look_for_exceptions()
And I follow "Test post subject" # behat_hooks::i_look_for_exceptions()
When I follow "Reply" # behat_hooks::i_look_for_exceptions()
And "input[name=discussionsubscribe][checked=checked]" "css_element" should exist # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
And I click on "You are subscribed to this discussion. Click to unsubscribe." "link" in the "Test post subject" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Student Two will NOT be notified of new posts in 'Test post subject' of 'Test forum name'" # behat_hooks::i_look_for_exceptions()
And I follow "Test post subject" # behat_hooks::i_look_for_exceptions()
And I follow "Reply" # behat_hooks::i_look_for_exceptions()
And "input[name=discussionsubscribe]:not([checked=checked])" "css_element" should exist # behat_hooks::i_look_for_exceptions()
@mod @mod_forum
Feature: A teacher can control the subscription to a forum
In order to change individual user's subscriptions
As a course administrator
I can change subscription setting for my users
Background: # C:\Apache24\htdocs\integration\mod\forum\tests\behat\forum_subscriptions_management.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher | Teacher | Tom | teacher@example.com |
| student1 | Student | 1 | student.1@example.com |
| student2 | Student | 2 | student.2@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And I log in as "teacher" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name |
| Forum type | Standard forum for general use |
| Description | Test forum description |
| Subscription mode | Auto subscription |
Scenario: A teacher can change toggle subscription editing on and off # C:\Apache24\htdocs\integration\mod\forum\tests\behat\forum_subscriptions_management.feature:30
Given I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
And I follow "Show/edit current subscribers" # behat_hooks::i_look_for_exceptions()
Then ".userselector" "css_element" should not exist # behat_hooks::i_look_for_exceptions()
And "Turn editing on" "button" should exist # behat_hooks::i_look_for_exceptions()
And I press "Turn editing on" # behat_hooks::i_look_for_exceptions()
And ".userselector" "css_element" should exist # behat_hooks::i_look_for_exceptions()
And "Turn editing off" "button" should exist # behat_hooks::i_look_for_exceptions()
And I press "Turn editing off" # behat_hooks::i_look_for_exceptions()
And ".userselector" "css_element" should not exist # behat_hooks::i_look_for_exceptions()
And "Turn editing on" "button" should exist # behat_hooks::i_look_for_exceptions()
And I press "Turn editing on" # behat_hooks::i_look_for_exceptions()
And ".userselector" "css_element" should exist # behat_hooks::i_look_for_exceptions()
And "Turn editing off" "button" should exist # behat_hooks::i_look_for_exceptions()
And I press "Turn editing off" # behat_hooks::i_look_for_exceptions()
And ".userselector" "css_element" should not exist # behat_hooks::i_look_for_exceptions()
And "Turn editing on" "button" should exist # behat_hooks::i_look_for_exceptions()
@tool @javascript @tool_lp @tool_lp_framework
Feature: Manage competency frameworks
As a competency framework admin
In order to perform CRUD operations on competency framework
I need to create, update and delete competency framework
Background: # C:\Apache24\htdocs\integration\admin\tool\lp\tests\behat\framework_crud.feature:7
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I expand "Site administration" node # behat_hooks::i_look_for_exceptions()
When I expand "Competencies" node # behat_hooks::i_look_for_exceptions()
Then I should see "Competency frameworks" # behat_hooks::i_look_for_exceptions()
Scenario: Create a new framework # C:\Apache24\htdocs\integration\admin\tool\lp\tests\behat\framework_crud.feature:14
Given I follow "Competency frameworks" # behat_hooks::i_look_for_exceptions()
And I should see "List of competency frameworks" # behat_hooks::i_look_for_exceptions()
And I click on "Add new competency framework" "button" # behat_hooks::i_look_for_exceptions()
And I should see "General" # behat_hooks::i_look_for_exceptions()
And I should see "Taxonomies" # behat_hooks::i_look_for_exceptions()
And I set the field "Name" to "Science Year-1" # behat_hooks::i_look_for_exceptions()
And I set the field "ID number" to "Comp-frm-1" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "The scale needs to be configured by selecting default and proficient items." # behat_hooks::i_look_for_exceptions()
And "Configure scales" "button" should be visible # behat_hooks::i_look_for_exceptions()
And I press "Configure scales" # behat_hooks::i_look_for_exceptions()
And I click on "//input[@data-field='tool_lp_scale_default_1']" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I click on "//input[@data-field='tool_lp_scale_proficient_1']" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I click on "//input[@value='Close']" "xpath_element" # behat_hooks::i_look_for_exceptions()
When I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Competency framework created" # behat_hooks::i_look_for_exceptions()
And I should see "Science Year-1" # behat_hooks::i_look_for_exceptions()
Scenario: Read a framework # C:\Apache24\htdocs\integration\admin\tool\lp\tests\behat\framework_crud.feature:33
Given the following lp "frameworks" exist: # behat_hooks::i_look_for_exceptions()
| shortname | idnumber |
| Science Year-2 | sc-y-2 |
And I follow "Competency frameworks" # behat_hooks::i_look_for_exceptions()
And I should see "Science Year-2" # behat_hooks::i_look_for_exceptions()
When I click on "Science Year-2" "link" # behat_hooks::i_look_for_exceptions()
Then I should see "Science Year-2" # behat_hooks::i_look_for_exceptions()
Scenario: Edit a framework # C:\Apache24\htdocs\integration\admin\tool\lp\tests\behat\framework_crud.feature:42
Given the following lp "frameworks" exist: # behat_hooks::i_look_for_exceptions()
| shortname | idnumber |
| Science Year-3 | sc-y-3 |
And I follow "Competency frameworks" # behat_hooks::i_look_for_exceptions()
And I should see "Science Year-3" # behat_hooks::i_look_for_exceptions()
And I click on "Edit" of edit menu in the "Science Year-3" row # behat_hooks::i_look_for_exceptions()
And the field "Name" matches value "Science Year-3 " # behat_hooks::i_look_for_exceptions()
And I set the field "Name" to "Science Year-3 Edited" # behat_hooks::i_look_for_exceptions()
When I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Competency framework updated" # behat_hooks::i_look_for_exceptions()
And I should see "Science Year-3 Edited" # behat_hooks::i_look_for_exceptions()
And I should see "sc-y-3" # behat_hooks::i_look_for_exceptions()
Scenario: Delete a framework # C:\Apache24\htdocs\integration\admin\tool\lp\tests\behat\framework_crud.feature:56
Given the following lp "frameworks" exist: # behat_hooks::i_look_for_exceptions()
| shortname | idnumber |
| Science Year-4 | sc-y-4 |
And I follow "Competency frameworks" # behat_hooks::i_look_for_exceptions()
And I should see "Science Year-4" # behat_hooks::i_look_for_exceptions()
And I should see "sc-y-4" # behat_hooks::i_look_for_exceptions()
And I click on "Delete" of edit menu in the "Science Year-4" row # behat_hooks::i_look_for_exceptions()
And "Confirm" "dialogue" should be visible # behat_hooks::i_look_for_exceptions()
And "Delete" "button" should exist in the "Confirm" "dialogue" # behat_hooks::i_look_for_exceptions()
And "Cancel" "button" should exist in the "Confirm" "dialogue" # behat_hooks::i_look_for_exceptions()
And I click on "Cancel" "button" # behat_hooks::i_look_for_exceptions()
And I click on "Delete" of edit menu in the "Science Year-4" row # behat_hooks::i_look_for_exceptions()
And "Confirm" "dialogue" should be visible # behat_hooks::i_look_for_exceptions()
When I click on "Delete" "button" # behat_hooks::i_look_for_exceptions()
Then I should not see "Science Year-4" # behat_hooks::i_look_for_exceptions()
And I should not see "sc-y-4" # behat_hooks::i_look_for_exceptions()
Scenario: Edit a framework with competencies in user competency # C:\Apache24\htdocs\integration\admin\tool\lp\tests\behat\framework_crud.feature:74
Given the following lp "frameworks" exist: # behat_hooks::i_look_for_exceptions()
| shortname | idnumber |
| Science Year-5 | sc-y-5 |
And the following lp "competencies" exist: # behat_hooks::i_look_for_exceptions()
| shortname | framework |
| Comp1 | sc-y-5 |
| Comp2 | sc-y-5 |
And the following lp "plans" exist: # behat_hooks::i_look_for_exceptions()
| name | user | description |
| Plan Science-5 | admin | Plan description |
And the following lp "plancompetencies" exist: # behat_hooks::i_look_for_exceptions()
| plan | competency |
| Plan Science-5 | Comp1 |
| Plan Science-5 | Comp2 |
And the following lp "usercompetencies" exist: # behat_hooks::i_look_for_exceptions()
| user | competency |
| admin | Comp1 |
| admin | Comp2 |
And I follow "Competency frameworks" # behat_hooks::i_look_for_exceptions()
And I should see "Science Year-5" # behat_hooks::i_look_for_exceptions()
And I click on "Edit" of edit menu in the "Science Year-5" row # behat_hooks::i_look_for_exceptions()
And the field "Name" matches value "Science Year-5 " # behat_hooks::i_look_for_exceptions()
And I set the field "Name" to "Science Year-5 Edited" # behat_hooks::i_look_for_exceptions()
And the "scaleid" "select" should be readonly # behat_hooks::i_look_for_exceptions()
When I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Competency framework updated" # behat_hooks::i_look_for_exceptions()
And I should see "Science Year-5 Edited" # behat_hooks::i_look_for_exceptions()
And I should see "sc-y-5" # behat_hooks::i_look_for_exceptions()
Scenario: Edit a framework with competencies in user competency plan # C:\Apache24\htdocs\integration\admin\tool\lp\tests\behat\framework_crud.feature:104
Given the following lp "frameworks" exist: # behat_hooks::i_look_for_exceptions()
| shortname | idnumber |
| Science Year-6 | sc-y-6 |
And the following lp "competencies" exist: # behat_hooks::i_look_for_exceptions()
| shortname | framework |
| Comp1 | sc-y-6 |
| Comp2 | sc-y-6 |
And the following lp "plans" exist: # behat_hooks::i_look_for_exceptions()
| name | user | description |
| Plan Science-6 | admin | Plan description |
And the following lp "plancompetencies" exist: # behat_hooks::i_look_for_exceptions()
| plan | competency |
| Plan Science-6 | Comp1 |
| Plan Science-6 | Comp2 |
And the following lp "usercompetencyplans" exist: # behat_hooks::i_look_for_exceptions()
| user | competency | plan |
| admin | Comp1 | Plan Science-6 |
| admin | Comp2 | Plan Science-6 |
And I follow "Competency frameworks" # behat_hooks::i_look_for_exceptions()
And I should see "Science Year-6" # behat_hooks::i_look_for_exceptions()
And I click on "Edit" of edit menu in the "Science Year-6" row # behat_hooks::i_look_for_exceptions()
And the field "Name" matches value "Science Year-6 " # behat_hooks::i_look_for_exceptions()
And I set the field "Name" to "Science Year-6 Edited" # behat_hooks::i_look_for_exceptions()
And the "scaleid" "select" should be readonly # behat_hooks::i_look_for_exceptions()
When I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Competency framework updated" # behat_hooks::i_look_for_exceptions()
And I should see "Science Year-6 Edited" # behat_hooks::i_look_for_exceptions()
And I should see "sc-y-6" # behat_hooks::i_look_for_exceptions()
@core @core_course
Feature: Front page displays items in different modes
In order to show a clean and clear list of the site categories and course
As an admin
I need to set different frontpage display modes
Background: # C:\Apache24\htdocs\integration\course\tests\behat\frontpage_display_modes.feature:7
Given the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Category 1 | 0 | CAT1 |
| Category 2 | 0 | CAT2 |
| Category 1 child | CAT1 | CAT11 |
| Category 2 child | CAT2 | CAT21 |
| Category 1 child child | CAT11 | CAT111 |
| Category 3 | 0 | CAT3 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 1 | COURSE1_1 | CAT1 |
| Course 2 1 | COURSE2_1 | CAT2 |
| Course 11 1 | COURSE11_1 | CAT11 |
| Course 2 2 | COURSE2_2 | CAT2 |
| Course 21 1 | COURSE21_1 | CAT21 |
| Course 111 1 | COURSE111_1 | CAT111 |
| Course 111 2 | COURSE111_2 | CAT111 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Displays a list of categories # C:\Apache24\htdocs\integration\course\tests\behat\frontpage_display_modes.feature:28
When I set the following administration settings values: # behat_hooks::i_look_for_exceptions()
| Front page items when logged in | List of categories |
| Maximum category depth | 2 |
And I am on site homepage # behat_hooks::i_look_for_exceptions()
Then I should see "Category 1" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I should see "Category 1 child" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I should not see "Category 1 child child" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I toggle "Category 1" category children visibility in frontpage # behat_hooks::i_look_for_exceptions()
And I should not see "Category 1 child" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I toggle "Category 1" category children visibility in frontpage # behat_hooks::i_look_for_exceptions()
And I should see "Category 1 child" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I toggle "Category 1 child" category children visibility in frontpage # behat_hooks::i_look_for_exceptions()
And I should see "Category 1 child child" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Displays a combo list # C:\Apache24\htdocs\integration\course\tests\behat\frontpage_display_modes.feature:44
When I set the following administration settings values: # behat_hooks::i_look_for_exceptions()
| Front page items when logged in | Combo list |
| Maximum category depth | 2 |
And I am on site homepage # behat_hooks::i_look_for_exceptions()
Then I should see "Category 1" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I should see "Category 1 child" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I should not see "Category 1 child child" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I should see "Course 1 1" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I should see "Course 2 2" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I should not see "Course 11 1" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I toggle "Category 1 child" category children visibility in frontpage # behat_hooks::i_look_for_exceptions()
And I should see "Course 11 1" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I should see "Category 1 child child" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I toggle "Category 1" category children visibility in frontpage # behat_hooks::i_look_for_exceptions()
And I should not see "Course 1 1" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I should not see "Category 1 child" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I toggle "Category 1" category children visibility in frontpage # behat_hooks::i_look_for_exceptions()
And I should see "Course 11 1" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
@tool_behat
Feature: Verify that all form fields values can be get and set
In order to use behat steps definitions
As a test writer
I need to verify it all works in real moodle forms
Background: # C:\Apache24\htdocs\integration\admin\tool\behat\tests\behat\get_and_set_fields.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | email | firstname | lastname |
| student1 | s1@example.com | Student | 1 |
| student2 | s2@example.com | Student | 2 |
| student3 | s3@example.com | Student | 3 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
| admin | C1 | editingteacher |
And the following "groups" exist: # behat_hooks::i_look_for_exceptions()
| name | description | course | idnumber |
| Group 1 | G1 description | C1 | G1 |
| Group 2 | G1 description | C1 | G2 |
And the following "group members" exist: # behat_hooks::i_look_for_exceptions()
| user | group |
| student1 | G1 |
| student2 | G1 |
| student2 | G2 |
| student3 | G2 |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | course | idnumber | name | intro | firstpagetitle | wikimode | visible |
| wiki | C1 | wiki1 | Test this one | Test this one | Test this one | collaborative | 0 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I expand "Site administration" node # behat_hooks::i_look_for_exceptions()
And I expand "Appearance" node # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Reset" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And the "Unenrol users" select box should contain "No roles" # behat_hooks::i_look_for_exceptions()
And the "Unenrol users" select box should contain "Student" # behat_hooks::i_look_for_exceptions()
And the "Unenrol users" select box should contain "Non-editing teacher" # behat_hooks::i_look_for_exceptions()
And the "Unenrol users" select box should contain "Teacher" # behat_hooks::i_look_for_exceptions()
And the "Unenrol users" select box should contain "Manager" # behat_hooks::i_look_for_exceptions()
And the "Unenrol users" select box should contain "No roles, Student, Non-editing teacher, Teacher, Manager" # behat_hooks::i_look_for_exceptions()
And the "Unenrol users" select box should contain "Manager, Teacher, Non-editing teacher, Student, No roles" # behat_hooks::i_look_for_exceptions()
And the "Unenrol users" select box should not contain "President" # behat_hooks::i_look_for_exceptions()
And the "Unenrol users" select box should not contain "Baker" # behat_hooks::i_look_for_exceptions()
And the "Unenrol users" select box should not contain "President, Baker" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I follow "Test this one" # behat_hooks::i_look_for_exceptions()
And I press "Create page" # behat_hooks::i_look_for_exceptions()
When I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| HTML format | Student page contents |
And I press "Save" # behat_hooks::i_look_for_exceptions()
Then I should see "Student page contents" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I click on "Edit" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I set the field "Display description on course page" to "1" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Force format | 1 |
And the field "Display description on course page" matches value "1" # behat_hooks::i_look_for_exceptions()
And the field "Display description on course page" does not match value "" # behat_hooks::i_look_for_exceptions()
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
And I should see "Test this one" # behat_hooks::i_look_for_exceptions()
And I follow "Test this one" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And the following fields match these values: # behat_hooks::i_look_for_exceptions()
| Display description on course page | 1 |
| Default format | HTML |
| Wiki name | Test this one |
And the field "Force format" matches value "1" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Default format | NWiki |
| Display description on course page | |
And I set the field "Force format" to "" # behat_hooks::i_look_for_exceptions()
And I set the field "Group mode" to "Separate groups" # behat_hooks::i_look_for_exceptions()
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And the following fields match these values: # behat_hooks::i_look_for_exceptions()
| Default format | NWiki |
| Group mode | Separate groups |
| Display description on course page | |
| Force format | |
And the following fields do not match these values: # behat_hooks::i_look_for_exceptions()
| Wiki name | Test this one baby |
| Default format | HTML |
| Force format | 1 |
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I add a "Choice" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Choice name | Test choice name |
| Description | Test choice description |
| Allow choice to be updated | Yes |
| Option 1 | one |
| Option 2 | two |
| Option 3 | three |
And I follow "Test choice name" # behat_hooks::i_look_for_exceptions()
And I set the field "one" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Save my choice" # behat_hooks::i_look_for_exceptions()
And the field "one" matches value "1" # behat_hooks::i_look_for_exceptions()
And the field "two" matches value "" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I set the field with xpath "//input[@id='id_idnumber']" to "Course id number" # behat_hooks::i_look_for_exceptions()
And the field with xpath "//input[@name='idnumber']" matches value "Course id number" # behat_hooks::i_look_for_exceptions()
And the field with xpath "//input[@name='idnumber']" does not match value "" # behat_hooks::i_look_for_exceptions()
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And the field "Course ID number" matches value "Course id number" # behat_hooks::i_look_for_exceptions()
Scenario: with JS disabled all form fields getters and setters works as expected # C:\Apache24\htdocs\integration\admin\tool\behat\tests\behat\get_and_set_fields.feature:132
@javascript
Scenario: with JS enabled all form fields getters and setters works as expected # C:\Apache24\htdocs\integration\admin\tool\behat\tests\behat\get_and_set_fields.feature:135
Then I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I expand "Users" node # behat_hooks::i_look_for_exceptions()
And I follow "Groups" # behat_hooks::i_look_for_exceptions()
And I set the field "groups" to "Group 2" # behat_hooks::i_look_for_exceptions()
And the "members" select box should contain "Student 2" # behat_hooks::i_look_for_exceptions()
And the "members" select box should contain "Student 3" # behat_hooks::i_look_for_exceptions()
And the "members" select box should not contain "Student 1" # behat_hooks::i_look_for_exceptions()
And I set the field "groups" to "Group 1" # behat_hooks::i_look_for_exceptions()
And the "members" select box should contain "Student 1" # behat_hooks::i_look_for_exceptions()
And the "members" select box should contain "Student 2" # behat_hooks::i_look_for_exceptions()
And the "members" select box should not contain "Student 3" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I add a "Lesson" to section "1" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Test lesson |
| Description | Test lesson description |
| available[enabled] | 1 |
And I set the field "deadline[enabled]" to "1" # behat_hooks::i_look_for_exceptions()
And the field "available[enabled]" matches value "1" # behat_hooks::i_look_for_exceptions()
And the "available[day]" "field" should be enabled # behat_hooks::i_look_for_exceptions()
And the field "deadline[enabled]" matches value "1" # behat_hooks::i_look_for_exceptions()
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And the field "available[enabled]" matches value "1" # behat_hooks::i_look_for_exceptions()
And the "available[day]" "field" should be enabled # behat_hooks::i_look_for_exceptions()
And the field "deadline[enabled]" matches value "1" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
@block @block_glossary_random
Feature: Random glossary entry block is used in a course
In order to show the entries from glossary
As a teacher
I can add the random glossary entry to a course page
Background: # C:\Apache24\htdocs\integration\blocks\glossary_random\tests\behat\glossary_random.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname |
| Course 1 | C1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Sam1 | Student1 | student1@example.com |
| teacher1 | Terry1 | Teacher1 | teacher1@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| student1 | C1 | student |
| teacher1 | C1 | editingteacher |
Scenario: Student can not see the block if it is not configured # C:\Apache24\htdocs\integration\blocks\glossary_random\tests\behat\glossary_random.feature:20
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Random glossary entry" block # behat_hooks::i_look_for_exceptions()
Then I should see "Please configure this block using the edit icon" in the "block_glossary_random" "block" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And "block_glossary_random" "block" should not exist # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: View random (last) entry in the glossary with auto approval # C:\Apache24\htdocs\integration\blocks\glossary_random\tests\behat\glossary_random.feature:32
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | defaultapproval |
| glossary | GlossaryAuto | Test glossary description | C1 | glossary1 | 1 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Random glossary entry" block # behat_hooks::i_look_for_exceptions()
And I configure the "block_glossary_random" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Title | AutoGlossaryblock |
| Take entries from this glossary | GlossaryAuto |
| How a new entry is chosen | Last modified entry |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then I should see "There are no entries yet in the chosen glossary" in the "AutoGlossaryblock" "block" # behat_hooks::i_look_for_exceptions()
And I click on "Add a new entry" "link" in the "AutoGlossaryblock" "block" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Concept | Concept1 |
| Definition | Definition1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Concept1" in the "AutoGlossaryblock" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Definition1" in the "AutoGlossaryblock" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "There are no entries yet in the chosen glossary" in the "AutoGlossaryblock" "block" # behat_hooks::i_look_for_exceptions()
And I click on "Add a new entry" "link" in the "AutoGlossaryblock" "block" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Concept | Concept2 |
| Definition | Definition2 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should not see "Concept1" in the "AutoGlossaryblock" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Definition1" in the "AutoGlossaryblock" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Concept2" in the "AutoGlossaryblock" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Definition2" in the "AutoGlossaryblock" "block" # behat_hooks::i_look_for_exceptions()
And I click on "View all entries" "link" in the "AutoGlossaryblock" "block" # behat_hooks::i_look_for_exceptions()
And I should see "GlossaryAuto" in the "#page-navbar" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Concept1" in the "#page-content" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Concept2" in the "#page-content" "css_element" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: View random (last) entry in the glossary with manual approval # C:\Apache24\htdocs\integration\blocks\glossary_random\tests\behat\glossary_random.feature:76
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | defaultapproval |
| glossary | GlossaryManual | Test glossary description | C1 | glossary2 | 0 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Random glossary entry" block # behat_hooks::i_look_for_exceptions()
And I configure the "block_glossary_random" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Title | ManualGlossaryblock |
| Take entries from this glossary | GlossaryManual |
| How a new entry is chosen | Last modified entry |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then I should see "There are no entries yet in the chosen glossary" in the "ManualGlossaryblock" "block" # behat_hooks::i_look_for_exceptions()
And I click on "Add a new entry" "link" in the "ManualGlossaryblock" "block" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Concept | Concept1 |
| Definition | Definition1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "There are no entries yet in the chosen glossary" in the "ManualGlossaryblock" "block" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "There are no entries yet in the chosen glossary" in the "ManualGlossaryblock" "block" # behat_hooks::i_look_for_exceptions()
And I follow "GlossaryManual" # behat_hooks::i_look_for_exceptions()
And I follow "Waiting approval" # behat_hooks::i_look_for_exceptions()
And I follow "Approve" # behat_hooks::i_look_for_exceptions()
And I click on "Course 1" "link" in the "#page-navbar" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Concept1" in the "ManualGlossaryblock" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Definition1" in the "ManualGlossaryblock" "block" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@block @block_glossary_random
Feature: Random glossary entry block can be added to the frontpage
In order to show the entries from glossary on the frontpage
As a teacher
I can add the random glossary entry to the frontpage
Scenario: Admin can add random glossary block to the frontpage # C:\Apache24\htdocs\integration\blocks\glossary_random\tests\behat\glossary_random_frontpage.feature:7
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber |
| glossary | Tips and Tricks | Frontpage glossary description | Acceptance test site | glossary0 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I click on "Turn editing on" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I add the "Random glossary entry" block # behat_hooks::i_look_for_exceptions()
And I configure the "block_glossary_random" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Title | Tip of the day |
| Take entries from this glossary | Tips and Tricks |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I click on "Add a new entry" "link" in the "Tip of the day" "block" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Concept | Never come late |
| Definition | Come in time for your classes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
When I log out # behat_hooks::i_look_for_exceptions()
Then I should see "Never come late" in the "Tip of the day" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Come in time for your classes" in the "Tip of the day" "block" # behat_hooks::i_look_for_exceptions()
@block @block_glossary_random
Feature: Random glossary entry block linking to global glossary
In order to show the entries from glossary
As a teacher
I can add the random glossary entry to a course page
Background: # C:\Apache24\htdocs\integration\blocks\glossary_random\tests\behat\glossary_random_global.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname |
| Course 1 | C1 |
| Course 2 | C2 |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | globalglossary | defaultapproval |
| glossary | Tips and Tricks | Frontpage glossary description | C2 | glossary0 | 1 | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Sam1 | Student1 | student1@example.com |
| teacher1 | Terry1 | Teacher1 | teacher1@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| student1 | C1 | student |
| teacher1 | C1 | editingteacher |
Scenario: View random (last) entry in the global glossary # C:\Apache24\htdocs\integration\blocks\glossary_random\tests\behat\glossary_random_global.feature:24
When I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 2" # behat_hooks::i_look_for_exceptions()
And I follow "Tips and Tricks" # behat_hooks::i_look_for_exceptions()
And I press "Add a new entry" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Concept | Never come late |
| Definition | Come in time for your classes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Random glossary entry" block # behat_hooks::i_look_for_exceptions()
And I configure the "block_glossary_random" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Title | Tip of the day |
| Take entries from this glossary | Tips and Tricks |
| How a new entry is chosen | Last modified entry |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Never come late" in the "Tip of the day" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Add a new entry" in the "Tip of the day" "block" # behat_hooks::i_look_for_exceptions()
And I should see "View all entries" in the "Tip of the day" "block" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Never come late" in the "Tip of the day" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Add a new entry" in the "Tip of the day" "block" # behat_hooks::i_look_for_exceptions()
And I should see "View all entries" in the "Tip of the day" "block" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Removing the global glossary that is used in random glossary block # C:\Apache24\htdocs\integration\blocks\glossary_random\tests\behat\glossary_random_global.feature:58
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Random glossary entry" block # behat_hooks::i_look_for_exceptions()
And I configure the "block_glossary_random" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Title | Tip of the day |
| Take entries from this glossary | Tips and Tricks |
| How a new entry is chosen | Last modified entry |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 2" # behat_hooks::i_look_for_exceptions()
And I follow "Tips and Tricks" # behat_hooks::i_look_for_exceptions()
And I follow "Edit settings" # behat_hooks::i_look_for_exceptions()
And I set the field "globalglossary" to "0" # behat_hooks::i_look_for_exceptions()
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then I should see "Please configure this block using the edit icon." in the "Tip of the day" "block" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And "Tip of the day" "block" should not exist # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@core @core_grades
Feature: Site settings can be used to hide parts of the gradebook UI
In order to hide UI elements
As an admin
I need to modify gradebook related system settings
Background: # C:\Apache24\htdocs\integration\grade\tests\behat\grade_UI_settings.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | format |
| Course 1 | C1 | 0 | topics |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| student1 | Student | 1 | student1@example.com | s1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| student1 | C1 | student |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | course | idnumber | name | intro |
| assign | C1 | assign1 | Assignment1 | Assignment 1 intro |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Hide minimum grade # C:\Apache24\htdocs\integration\grade\tests\behat\grade_UI_settings.feature:27
When I click on "Edit assign Assignment1" "link" # behat_hooks::i_look_for_exceptions()
And I should see "Minimum grade" # behat_hooks::i_look_for_exceptions()
Then I navigate to "General settings" node in "Site administration > Grades" # behat_hooks::i_look_for_exceptions()
And I set the field "Show minimum grade" to "0" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I click on "Edit assign Assignment1" "link" # behat_hooks::i_look_for_exceptions()
And I should not see "Minimum grade" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Hide calculation icons # C:\Apache24\htdocs\integration\grade\tests\behat\grade_UI_settings.feature:40
And "Edit calculation for Course total" "link" should exist # behat_hooks::i_look_for_exceptions()
When I navigate to "Grader report" node in "Site administration > Grades > Report settings" # behat_hooks::i_look_for_exceptions()
And I set the field "Show calculations" to "0" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
Then "Edit calculation for Course total" "link" should not exist # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Disable category overriding # C:\Apache24\htdocs\integration\grade\tests\behat\grade_UI_settings.feature:51
And "tr .course input[type='text']" "css_element" should exist # behat_hooks::i_look_for_exceptions()
Then I navigate to "Grade category settings" node in "Site administration > Grades" # behat_hooks::i_look_for_exceptions()
And I set the field "Allow category grades to be manually overridden" to "0" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And "tr .course input[type='text']" "css_element" should not exist # behat_hooks::i_look_for_exceptions()
@core @core_grades
Feature: We can use calculated grade totals
In order to calculate grade totals
As an teacher
I need to add aggregate columns to the gradebook
Background: # C:\Apache24\htdocs\integration\grade\tests\behat\grade_aggregation.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | t1 |
| student1 | Student | 1 | student1@example.com | s1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "grade categories" exist: # behat_hooks::i_look_for_exceptions()
| fullname | course |
| Sub category 1 | C1 |
| Sub category 2 | C1 |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | course | idnumber | name | intro | grade |
| assign | C1 | a1 | Test assignment one | Submit something! | 300 |
| assign | C1 | a2 | Test assignment two | Submit something! | 100 |
| assign | C1 | a3 | Test assignment three | Submit something! | 150 |
| assign | C1 | a4 | Test assignment four | Submit nothing! | 150 |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | course | idnumber | name | intro | gradecategory | grade |
| assign | C1 | a5 | Test assignment five | Submit something! | Sub category 1 | 20 |
| assign | C1 | a6 | Test assignment six | Submit something! | Sub category 1 | 10 |
| assign | C1 | a7 | Test assignment seven | Submit nothing! | Sub category 1 | 15 |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | course | idnumber | name | intro | gradecategory | grade |
| assign | C1 | a8 | Test assignment eight | Submit something! | Sub category 2 | 20 |
| assign | C1 | a9 | Test assignment nine | Submit something! | Sub category 2 | 10 |
| assign | C1 | 10 | Test assignment ten | Submit nothing! | Sub category 2 | 15 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I set the following administration settings values: # behat_hooks::i_look_for_exceptions()
| 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 |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I change window size to "large" # behat_hooks::i_look_for_exceptions()
And I give the grade "60.00" to the user "Student 1" for the grade item "Test assignment one" # behat_hooks::i_look_for_exceptions()
And I give the grade "20.00" to the user "Student 1" for the grade item "Test assignment two" # behat_hooks::i_look_for_exceptions()
And I give the grade "40.00" to the user "Student 1" for the grade item "Test assignment three" # behat_hooks::i_look_for_exceptions()
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment five" # behat_hooks::i_look_for_exceptions()
And I give the grade "5.00" to the user "Student 1" for the grade item "Test assignment six" # behat_hooks::i_look_for_exceptions()
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment eight" # behat_hooks::i_look_for_exceptions()
And I give the grade "5.00" to the user "Student 1" for the grade item "Test assignment nine" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I set the following settings for grade item "Test assignment two": # behat_hooks::i_look_for_exceptions()
| Hidden | 1 |
And I set the following settings for grade item "Test assignment five": # behat_hooks::i_look_for_exceptions()
| Hidden | 1 |
And I set the following settings for grade item "Test assignment eight": # behat_hooks::i_look_for_exceptions()
| Hidden | 1 |
And I change window size to "medium" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Course grade settings" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Grade display type" to "Real (percentage)" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Scenario: Mean of grades aggregation # C:\Apache24\htdocs\integration\grade\tests\behat\grade_aggregation.feature:67
And I set the following settings for grade item "Course 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | Mean of grades |
And I set the following settings for grade item "Sub category 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | Mean of grades |
And I set the following settings for grade item "Sub category 2": # behat_hooks::i_look_for_exceptions()
| Aggregation | Mean of grades |
| Exclude empty grades | 0 |
And I turn editing mode off # behat_hooks::i_look_for_exceptions()
Then I should see "30.00 (30.00 %)" in the ".course" "css_element" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Course grade settings" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Hide totals if they contain hidden items" to "Show totals excluding hidden items" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Grades" in the user menu # behat_hooks::i_look_for_exceptions()
And I should see "30.42 (30.42 %)" in the "overview-grade" "table" # behat_hooks::i_look_for_exceptions()
Scenario: Weighted mean of grades aggregation # C:\Apache24\htdocs\integration\grade\tests\behat\grade_aggregation.feature:85
And I set the following settings for grade item "Course 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | Weighted mean of grades |
And I set the following settings for grade item "Sub category 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | Weighted mean of grades |
| Item weight | 1 |
And I set the following settings for grade item "Sub category 2": # behat_hooks::i_look_for_exceptions()
| Aggregation | Weighted mean of grades |
| Item weight | 1 |
| Exclude empty grades | 0 |
And I set the following settings for grade item "Test assignment one": # behat_hooks::i_look_for_exceptions()
| Item weight | 3 |
And I turn editing mode off # behat_hooks::i_look_for_exceptions()
Then I should see "27.14 (27.14 %)" in the ".course" "css_element" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Course grade settings" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Hide totals if they contain hidden items" to "Show totals excluding hidden items" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Grades" in the user menu # behat_hooks::i_look_for_exceptions()
And I should see "26.94 (26.94 %)" in the "overview-grade" "table" # behat_hooks::i_look_for_exceptions()
Scenario: Simple weighted mean of grades aggregation # C:\Apache24\htdocs\integration\grade\tests\behat\grade_aggregation.feature:107
And I set the following settings for grade item "Course 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | Simple weighted mean of grades |
And I set the following settings for grade item "Sub category 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | Simple weighted mean of grades |
And I set the following settings for grade item "Sub category 2": # behat_hooks::i_look_for_exceptions()
| Aggregation | Simple weighted mean of grades |
| Exclude empty grades | 0 |
And I set the following settings for grade item "Test assignment one": # behat_hooks::i_look_for_exceptions()
| Extra credit | 1 |
And I turn editing mode off # behat_hooks::i_look_for_exceptions()
Then I should see "45.19 (45.19 %)" in the ".course" "css_element" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Course grade settings" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Hide totals if they contain hidden items" to "Show totals excluding hidden items" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Grades" in the user menu # behat_hooks::i_look_for_exceptions()
And I should see "48.57 (48.57 %)" in the "overview-grade" "table" # behat_hooks::i_look_for_exceptions()
Scenario: Mean of grades (with extra credits) aggregation # C:\Apache24\htdocs\integration\grade\tests\behat\grade_aggregation.feature:127
And I set the following settings for grade item "Course 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | Mean of grades (with extra credits) |
And I set the following settings for grade item "Sub category 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | Mean of grades (with extra credits) |
And I set the following settings for grade item "Sub category 2": # behat_hooks::i_look_for_exceptions()
| Aggregation | Mean of grades (with extra credits) |
| Exclude empty grades | 0 |
And I set the following settings for grade item "Test assignment one": # behat_hooks::i_look_for_exceptions()
| Extra credit weight | 2 |
And I turn editing mode off # behat_hooks::i_look_for_exceptions()
Then I should see "42.50 (42.50 %)" in the ".course" "css_element" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Course grade settings" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Hide totals if they contain hidden items" to "Show totals excluding hidden items" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Grades" in the user menu # behat_hooks::i_look_for_exceptions()
And I should see "47.22 (47.22 %)" in the "overview-grade" "table" # behat_hooks::i_look_for_exceptions()
Scenario: Median of grades aggregation # C:\Apache24\htdocs\integration\grade\tests\behat\grade_aggregation.feature:147
And I set the following settings for grade item "Course 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | Median of grades |
And I set the following settings for grade item "Sub category 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | Median of grades |
And I set the following settings for grade item "Sub category 2": # behat_hooks::i_look_for_exceptions()
| Aggregation | Median of grades |
| Exclude empty grades | 0 |
And I turn editing mode off # behat_hooks::i_look_for_exceptions()
Then I should see "26.67 (26.67 %)" in the ".course" "css_element" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Course grade settings" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Hide totals if they contain hidden items" to "Show totals excluding hidden items" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Grades" in the user menu # behat_hooks::i_look_for_exceptions()
And I should see "25.83 (25.83 %)" in the "overview-grade" "table" # behat_hooks::i_look_for_exceptions()
Scenario: Lowest grade aggregation # C:\Apache24\htdocs\integration\grade\tests\behat\grade_aggregation.feature:165
And I set the following settings for grade item "Course 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | Lowest grade |
And I set the following settings for grade item "Sub category 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | Lowest grade |
And I set the following settings for grade item "Sub category 2": # behat_hooks::i_look_for_exceptions()
| Aggregation | Lowest grade |
| Exclude empty grades | 0 |
And I set the following settings for grade item "Test assignment five": # behat_hooks::i_look_for_exceptions()
| Hidden | 1 |
And I set the following settings for grade item "Test assignment four": # behat_hooks::i_look_for_exceptions()
| Hidden | 1 |
And I turn editing mode off # behat_hooks::i_look_for_exceptions()
Then I should see "0.00 (0.00 %)" in the ".course" "css_element" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Course grade settings" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Hide totals if they contain hidden items" to "Show totals excluding hidden items" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Grades" in the user menu # behat_hooks::i_look_for_exceptions()
And I should see "0.00 (0.00 %)" in the "overview-grade" "table" # behat_hooks::i_look_for_exceptions()
Scenario: Highest grade aggregation # C:\Apache24\htdocs\integration\grade\tests\behat\grade_aggregation.feature:187
And I set the following settings for grade item "Course 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | Highest grade |
And I set the following settings for grade item "Sub category 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | Highest grade |
And I set the following settings for grade item "Sub category 2": # behat_hooks::i_look_for_exceptions()
| Aggregation | Highest grade |
| Exclude empty grades | 0 |
And I set the following settings for grade item "Test assignment one": # behat_hooks::i_look_for_exceptions()
| Hidden | 1 |
And I turn editing mode off # behat_hooks::i_look_for_exceptions()
Then I should see "50.00 (50.00 %)" in the ".course" "css_element" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Course grade settings" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Hide totals if they contain hidden items" to "Show totals excluding hidden items" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Grades" in the user menu # behat_hooks::i_look_for_exceptions()
And I should see "50.00 (50.00 %)" in the "overview-grade" "table" # behat_hooks::i_look_for_exceptions()
Scenario: Mode of grades aggregation # C:\Apache24\htdocs\integration\grade\tests\behat\grade_aggregation.feature:207
And I set the following settings for grade item "Course 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | Mode of grades |
And I set the following settings for grade item "Sub category 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | Mode of grades |
And I set the following settings for grade item "Sub category 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | Mode of grades |
| Exclude empty grades | 0 |
And I set the following settings for grade item "Test assignment one": # behat_hooks::i_look_for_exceptions()
| Hidden | 1 |
And I turn editing mode off # behat_hooks::i_look_for_exceptions()
Then I should see "50.00 (50.00 %)" in the ".course" "css_element" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Course grade settings" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Hide totals if they contain hidden items" to "Show totals excluding hidden items" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Grades" in the user menu # behat_hooks::i_look_for_exceptions()
And I should see "50.00 (50.00 %)" in the "overview-grade" "table" # behat_hooks::i_look_for_exceptions()
Scenario: Natural aggregation on outcome items with natural weights # C:\Apache24\htdocs\integration\grade\tests\behat\grade_aggregation.feature:227
And the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| enableoutcomes | 1 |
And the following "scales" exist: # behat_hooks::i_look_for_exceptions()
| name | scale |
| Test Scale | Disappointing, Good, Very good, Excellent |
And the following "grade outcomes" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | course | scale |
| Outcome 1 | OT1 | C1 | Test Scale |
And the following "grade items" exist: # behat_hooks::i_look_for_exceptions()
| itemname | course | outcome | gradetype | scale |
| Test outcome item one | C1 | OT1 | Scale | Test Scale |
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the following settings for grade item "Course 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | Natural |
| Include outcomes in aggregation | 1 |
| Exclude empty grades | 0 |
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I give the grade "Excellent" to the user "Student 1" for the grade item "Test outcome item one" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Course grade settings" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "report_overview_showtotalsifcontainhidden" to "Show totals excluding hidden items" # behat_hooks::i_look_for_exceptions()
And I set the field "report_user_showtotalsifcontainhidden" to "Show totals excluding hidden items" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Grades" in the user menu # behat_hooks::i_look_for_exceptions()
Then I should see "114.82 (18.27 %)" in the "overview-grade" "table" # behat_hooks::i_look_for_exceptions()
And I click on "Course 1" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And "Test outcome item one" row "Grade" column of "user-grade" table should contain "Excellent (100.00 %)" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the following settings for grade item "Test outcome item one": # behat_hooks::i_look_for_exceptions()
| Extra credit | 1 |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Grades" in the user menu # behat_hooks::i_look_for_exceptions()
Then I should see "114.00 (18.39 %)" in the "overview-grade" "table" # behat_hooks::i_look_for_exceptions()
And I click on "Course 1" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And "Test outcome item one" row "Grade" column of "user-grade" table should contain "Excellent (100.00 %)" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the following settings for grade item "Course 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | Natural |
| Include outcomes in aggregation | 0 |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Grades" in the user menu # behat_hooks::i_look_for_exceptions()
Then I should see "110.00 (17.74 %)" in the "overview-grade" "table" # behat_hooks::i_look_for_exceptions()
And I click on "Course 1" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And "Test outcome item one" row "Grade" column of "user-grade" table should contain "Excellent (100.00 %)" # behat_hooks::i_look_for_exceptions()
Scenario: Natural aggregation on outcome items with modified weights # C:\Apache24\htdocs\integration\grade\tests\behat\grade_aggregation.feature:283
And the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| enableoutcomes | 1 |
And the following "scales" exist: # behat_hooks::i_look_for_exceptions()
| name | scale |
| Test Scale | Disappointing, Good, Very good, Excellent |
And the following "grade outcomes" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | course | scale |
| Outcome 1 | OT1 | C1 | Test Scale |
And the following "grade items" exist: # behat_hooks::i_look_for_exceptions()
| itemname | course | outcome | gradetype | scale |
| Test outcome item one | C1 | OT1 | Scale | Test Scale |
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the following settings for grade item "Course 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | Natural |
| Include outcomes in aggregation | 1 |
| Exclude empty grades | 0 |
And I set the following settings for grade item "Test outcome item one": # behat_hooks::i_look_for_exceptions()
| Weight adjusted | 1 |
| aggregationcoef2 | 100 |
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I give the grade "Excellent" to the user "Student 1" for the grade item "Test outcome item one" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Course grade settings" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "report_overview_showtotalsifcontainhidden" to "Show totals excluding hidden items" # behat_hooks::i_look_for_exceptions()
And I set the field "report_user_showtotalsifcontainhidden" to "Show totals excluding hidden items" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Grades" in the user menu # behat_hooks::i_look_for_exceptions()
Then I should see "4.00 (100.00 %)" in the "overview-grade" "table" # behat_hooks::i_look_for_exceptions()
And I click on "Course 1" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And "Test outcome item one" row "Grade" column of "user-grade" table should contain "Excellent (100.00 %)" # behat_hooks::i_look_for_exceptions()
Scenario: Natural aggregation # C:\Apache24\htdocs\integration\grade\tests\behat\grade_aggregation.feature:317
And I set the following settings for grade item "Sub category 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | Natural |
| Exclude empty grades | 0 |
And I set the following settings for grade item "Sub category 2": # behat_hooks::i_look_for_exceptions()
| Aggregation | Natural |
| Exclude empty grades | 1 |
And I set the following settings for grade item "Course 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | Natural |
| Exclude empty grades | 0 |
And I set the following settings for grade item "Test assignment six": # behat_hooks::i_look_for_exceptions()
| Weight adjusted | 1 |
| aggregationcoef2 | 50 |
And I set the following settings for grade item "Test assignment three": # behat_hooks::i_look_for_exceptions()
| Extra credit | 1 |
And I turn editing mode off # behat_hooks::i_look_for_exceptions()
Then I should see "152.68 (24.43 %)" in the ".course" "css_element" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Course grade settings" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "report_overview_showtotalsifcontainhidden" to "Show totals excluding hidden items" # behat_hooks::i_look_for_exceptions()
And I set the field "report_user_showtotalsifcontainhidden" to "Show totals excluding hidden items" # behat_hooks::i_look_for_exceptions()
And I set the field "Show contribution to course total" to "Show" # behat_hooks::i_look_for_exceptions()
And I set the field "Show weightings" to "Show" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I select "Myself" from the "View report as" singleselect # behat_hooks::i_look_for_exceptions()
And I select "Student 1" from the "Select all or one user" singleselect # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Contribution to course total |
| Test assignment five | 28.57 % | 10.00 (50.00 %) | 0–20 | 1.03 % |
| Test assignment six | 50.00 % | 5.00 (50.00 %) | 0–10 | 1.80 % |
| Test assignment seven | 21.43 % | - | 0–15 | 0.00 % |
| Test assignment eight | 66.67 % | 10.00 (50.00 %) | 0–20 | 1.60 % |
| Test assignment nine | 33.33 % | 5.00 (50.00 %) | 0–10 | 0.80 % |
| Test assignment ten | 0.00 %( Empty ) | - | 0–15 | 0.00 % |
| Test assignment one | 48.00 % | 60.00 (20.00 %) | 0–300 | 9.60 % |
| Test assignment two | 16.00 % | 20.00 (20.00 %) | 0–100 | 3.20 % |
| Test assignment three | 24.00 %( Extra credit ) | 40.00 (26.67 %) | 0–150 | 6.40 % |
| Test assignment four | 24.00 % | - | 0–150 | 0.00 % |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Grades" in the user menu # behat_hooks::i_look_for_exceptions()
And I should see "113.75 (23.45 %)" in the "overview-grade" "table" # behat_hooks::i_look_for_exceptions()
And I click on "Course 1" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Contribution to course total |
| Test assignment six | 70.00 % | 5.00 (50.00 %) | 0–10 | 1.80 % |
| Test assignment seven | 30.00 % | - | 0–15 | 0.00 % |
| Test assignment nine | 100.00 % | 5.00 (50.00 %) | 0–10 | 1.03 % |
| Test assignment ten | -( Empty ) | - | 0–15 | - |
| Test assignment one | 61.86 % | 60.00 (20.00 %) | 0–300 | 12.37 % |
| Test assignment three | 30.93 %( Extra credit ) | 40.00 (26.67 %) | 0–150 | 8.25 % |
| Test assignment four | 30.93 % | - | 0–150 | 0.00 % |
Scenario: Natural aggregation with drop lowest # C:\Apache24\htdocs\integration\grade\tests\behat\grade_aggregation.feature:370
When I log out # behat_hooks::i_look_for_exceptions()
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I set the following settings for grade item "Sub category 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | Natural |
| Exclude empty grades | 0 |
And I set the following settings for grade item "Sub category 2": # behat_hooks::i_look_for_exceptions()
| Aggregation | Natural |
| Exclude empty grades | 0 |
And I set the following settings for grade item "Course 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | Natural |
| Exclude empty grades | 0 |
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I press "Add category" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Category name | Sub category 3 |
| Aggregation | Natural |
| Drop the lowest | 1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Add grade item" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Item name | Manual item 1 |
| Grade category | Sub category 3 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Add grade item" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Item name | Manual item 2 |
| Grade category | Sub category 3 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Add grade item" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Item name | Manual item 3 |
| Grade category | Sub category 3 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I give the grade "60.00" to the user "Student 1" for the grade item "Manual item 1" # behat_hooks::i_look_for_exceptions()
And I give the grade "20.00" to the user "Student 1" for the grade item "Manual item 2" # behat_hooks::i_look_for_exceptions()
And I give the grade "40.00" to the user "Student 1" for the grade item "Manual item 3" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I turn editing mode off # behat_hooks::i_look_for_exceptions()
Then I should see "250.00 (25.25 %)" in the ".course" "css_element" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I set the following settings for grade item "Manual item 2": # behat_hooks::i_look_for_exceptions()
| Extra credit | 1 |
And I turn editing mode off # behat_hooks::i_look_for_exceptions()
And I should see "270.00 (27.27 %)" in the ".course" "css_element" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I set the following settings for grade item "Manual item 2": # behat_hooks::i_look_for_exceptions()
| Extra credit | 0 |
| Maximum grade | 200 |
| Rescale existing grades | No |
And I give the grade "21.00" to the user "Student 1" for the grade item "Manual item 2" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I give the grade "20.00" to the user "Student 1" for the grade item "Manual item 2" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I turn editing mode off # behat_hooks::i_look_for_exceptions()
And I should see "270.00 (22.69 %)" in the ".course" "css_element" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I set the following settings for grade item "Manual item 2": # behat_hooks::i_look_for_exceptions()
| Extra credit | 0 |
| Maximum grade | 100 |
| Rescale existing grades | No |
And I give the grade "21.00" to the user "Student 1" for the grade item "Manual item 2" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I give the grade "20.00" to the user "Student 1" for the grade item "Manual item 2" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I turn editing mode off # behat_hooks::i_look_for_exceptions()
And I should see "250.00 (25.25 %)" in the ".course" "css_element" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I press "Add category" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Category name | Sub sub category 1 |
| Parent category | Sub category 3 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I should see "270.00 (24.77 %)" in the ".course" "css_element" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Natural aggregation from the setup screen # C:\Apache24\htdocs\integration\grade\tests\behat\grade_aggregation.feature:452
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the following settings for grade item "Course 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | Natural |
And I set the following settings for grade item "Sub category 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | Natural |
And I set the following settings for grade item "Sub category 2": # behat_hooks::i_look_for_exceptions()
| Aggregation | Natural |
And I set the field "Override weight of Test assignment one" to "1" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment one" matches value "37.975" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment one" to "10" # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Test assignment two" to "1" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment two" matches value "12.658" # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Test assignment two" to "0" # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Test assignment six" to "1" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment six" matches value "22.222" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment six" to "50" # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Test assignment six" to "0" # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Test assignment ten" to "1" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment ten" matches value "33.333" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment ten" to "50" # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Sub category 1" to "1" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Sub category 1" matches value "5.696" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Sub category 1" to "15" # behat_hooks::i_look_for_exceptions()
When I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Test assignment two" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Test assignment six" to "1" # behat_hooks::i_look_for_exceptions()
Then the field "Weight of Test assignment one" matches value "10.0" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment two" matches value "16.854" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment six" matches value "22.222" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment ten" matches value "50.0" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Sub category 1" matches value "15.0" # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Test assignment one" to "0" # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Test assignment two" to "0" # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Test assignment six" to "0" # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Sub category 1" to "0" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Test assignment one" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Sub category 1" to "1" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment one" matches value "37.975" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Sub category 1" matches value "5.696" # behat_hooks::i_look_for_exceptions()
And I reset weights for grade category "Sub category 2" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment ten" matches value "33.333" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Natural aggregation with weights of zero # C:\Apache24\htdocs\integration\grade\tests\behat\grade_aggregation.feature:504
When I set the following settings for grade item "Course 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | Natural |
| Exclude empty grades | 0 |
And I set the following settings for grade item "Sub category 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | Natural |
| Exclude empty grades | 0 |
And I set the following settings for grade item "Sub category 2": # behat_hooks::i_look_for_exceptions()
| Aggregation | Natural |
| Exclude empty grades | 0 |
And I turn editing mode off # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Test assignment one" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment one" to "0" # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Test assignment six" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment six" to "0" # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Test assignment nine" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment nine" to "100" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Course grade settings" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "report_overview_showtotalsifcontainhidden" to "Show totals excluding hidden items" # behat_hooks::i_look_for_exceptions()
And I set the field "report_user_showtotalsifcontainhidden" to "Show totals excluding hidden items" # behat_hooks::i_look_for_exceptions()
And I set the field "Show contribution to course total" to "Show" # behat_hooks::i_look_for_exceptions()
And I set the field "Show weightings" to "Show" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "75.00 (16.85 %)" in the ".course" "css_element" # behat_hooks::i_look_for_exceptions()
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I select "Myself" from the "View report as" singleselect # behat_hooks::i_look_for_exceptions()
And I select "Student 1" from the "Select all or one user" singleselect # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Contribution to course total |
| Test assignment five | 57.14 % | 10.00 (50.00 %) | 2.25 % |
| Test assignment six | 0.00 % | 5.00 (50.00 %) | 0.00 % |
| Test assignment seven | 42.86 % | - | 0.00 % |
| Test assignment eight | 0.00 % | 10.00 (50.00 %) | 0.00 % |
| Test assignment nine | 100.00 % | 5.00 (50.00 %) | 1.12 % |
| Test assignment ten | 0.00 % | - | 0.00 % |
| Test assignment one | 0.00 % | 60.00 (20.00 %) | 0.00 % |
| Test assignment two | 22.47 % | 20.00 (20.00 %) | 4.49 % |
| Test assignment three | 33.71 % | 40.00 (26.67 %) | 8.99 % |
| Test assignment four | 33.71 % | - | 0.00 |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Grades" in the user menu # behat_hooks::i_look_for_exceptions()
And I should see "45.00 (13.85 %)" in the "overview-grade" "table" # behat_hooks::i_look_for_exceptions()
And I click on "Course 1" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Contribution to course total |
| Test assignment six | 0.00 % | 5.00 (50.00 %) | 0.00 % |
| Test assignment seven | 100.00 % | - | 0.00 % |
| Test assignment nine | 100.00 % | 5.00 (50.00 %) | 1.54 % |
| Test assignment ten | 0.00 | - | 0.00 % |
| Test assignment one | 0.00 % | 60.00 (20.00 %) | 0.00 % |
| Test assignment three | 46.15 % | 40.00 (26.67 %) | 12.31 % |
| Test assignment four | 46.15 % | - | 0.00 % |
@core @core_grades
Feature: Changing the aggregation of an item affects its weight and extra credit definition
In order to switch to another aggregation method
As an teacher
I need to be able to edit the grade category settings
Background: # C:\Apache24\htdocs\integration\grade\tests\behat\grade_aggregation_changes.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname |
| Course 1 | C1 |
And the following "grade categories" exist: # behat_hooks::i_look_for_exceptions()
| fullname | course | aggregation |
| Cat mean | C1 | 0 |
| Cat median | C1 | 2 |
| Cat min | C1 | 4 |
| Cat max | C1 | 6 |
| Cat mode | C1 | 8 |
| Cat weighted | C1 | 10 |
| Cat weighted2 | C1 | 10 |
| Cat simple | C1 | 11 |
| Cat ec | C1 | 12 |
| Cat natural | C1 | 13 |
And the following "grade items" exist: # behat_hooks::i_look_for_exceptions()
| itemname | course | category | aggregationcoef | aggregationcoef2 | weightoverride |
| Item a1 | C1 | ? | 0 | 0 | 0 |
| Item a2 | C1 | ? | 0 | 0.40 | 1 |
| Item a3 | C1 | ? | 1 | 0.10 | 1 |
| Item a4 | C1 | ? | 1 | 0 | 0 |
| Item b1 | C1 | Cat natural | 0 | 0 | 0 |
| Item b2 | C1 | Cat natural | 0 | 0.40 | 1 |
| Item b3 | C1 | Cat natural | 1 | 0.10 | 1 |
| Item b4 | C1 | Cat natural | 1 | 0 | 0 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I set the following administration settings values: # behat_hooks::i_look_for_exceptions()
| 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 |
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I follow "Edit Cat mean" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Weight adjusted | 1 |
| Weight | 20 |
| Extra credit | 0 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Cat median" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Weight adjusted | 1 |
| Weight | 5 |
| Extra credit | 0 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Cat min" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Weight adjusted | 0 |
| Weight | 0 |
| Extra credit | 1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a1" # behat_hooks::i_look_for_exceptions()
And the field "Weight adjusted" matches value "0" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "0" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a2" # behat_hooks::i_look_for_exceptions()
And the field "Weight adjusted" matches value "1" # behat_hooks::i_look_for_exceptions()
And the field "id_aggregationcoef2" matches value "40.0" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "0" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a3" # behat_hooks::i_look_for_exceptions()
And the field "Weight adjusted" matches value "1" # behat_hooks::i_look_for_exceptions()
And the field "id_aggregationcoef2" matches value "10.0" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "1" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a4" # behat_hooks::i_look_for_exceptions()
And the field "Weight adjusted" matches value "0" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "1" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item b1" # behat_hooks::i_look_for_exceptions()
And the field "Weight adjusted" matches value "0" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "0" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item b2" # behat_hooks::i_look_for_exceptions()
And the field "Weight adjusted" matches value "1" # behat_hooks::i_look_for_exceptions()
And the field "id_aggregationcoef2" matches value "40.0" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "0" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item b3" # behat_hooks::i_look_for_exceptions()
And the field "Weight adjusted" matches value "1" # behat_hooks::i_look_for_exceptions()
And the field "id_aggregationcoef2" matches value "10.0" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "1" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item b4" # behat_hooks::i_look_for_exceptions()
And the field "Weight adjusted" matches value "0" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "1" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
Scenario: Switching a category from Natural aggregation to Mean of grades and back # C:\Apache24\htdocs\integration\grade\tests\behat\grade_aggregation_changes.feature:95
Given I follow "Edit Course 1" # behat_hooks::i_look_for_exceptions()
And I set the field "Aggregation" to "Mean of grades" # behat_hooks::i_look_for_exceptions()
When I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a1" # behat_hooks::i_look_for_exceptions()
Then I should not see "Weight adjusted" # behat_hooks::i_look_for_exceptions()
And I should not see "Weight" # behat_hooks::i_look_for_exceptions()
And I should not see "Extra credit" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a2" # behat_hooks::i_look_for_exceptions()
And I should not see "Weight adjusted" # behat_hooks::i_look_for_exceptions()
And I should not see "Weight" # behat_hooks::i_look_for_exceptions()
And I should not see "Extra credit" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a3" # behat_hooks::i_look_for_exceptions()
And I should not see "Weight adjusted" # behat_hooks::i_look_for_exceptions()
And I should not see "Weight" # behat_hooks::i_look_for_exceptions()
And I should not see "Extra credit" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a4" # behat_hooks::i_look_for_exceptions()
And I should not see "Weight adjusted" # behat_hooks::i_look_for_exceptions()
And I should not see "Weight" # behat_hooks::i_look_for_exceptions()
And I should not see "Extra credit" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Cat mean" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I should not see "Weight adjusted" # behat_hooks::i_look_for_exceptions()
And I should not see "Weight" in the "#id_headerparent" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Extra credit" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Cat median" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I should not see "Weight adjusted" # behat_hooks::i_look_for_exceptions()
And I should not see "Weight" in the "#id_headerparent" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Extra credit" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Cat min" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I should not see "Weight adjusted" # behat_hooks::i_look_for_exceptions()
And I should not see "Weight" in the "#id_headerparent" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see "Extra credit" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Cat natural" # behat_hooks::i_look_for_exceptions()
And I set the field "Aggregation" to "Mean of grades" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item b1" # behat_hooks::i_look_for_exceptions()
And I should not see "Weight adjusted" # behat_hooks::i_look_for_exceptions()
And I should not see "Weight" # behat_hooks::i_look_for_exceptions()
And I should not see "Extra credit" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item b2" # behat_hooks::i_look_for_exceptions()
And I should not see "Weight adjusted" # behat_hooks::i_look_for_exceptions()
And I should not see "Weight" # behat_hooks::i_look_for_exceptions()
And I should not see "Extra credit" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item b3" # behat_hooks::i_look_for_exceptions()
And I should not see "Weight adjusted" # behat_hooks::i_look_for_exceptions()
And I should not see "Weight" # behat_hooks::i_look_for_exceptions()
And I should not see "Extra credit" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item b4" # behat_hooks::i_look_for_exceptions()
And I should not see "Weight adjusted" # behat_hooks::i_look_for_exceptions()
And I should not see "Weight" # behat_hooks::i_look_for_exceptions()
And I should not see "Extra credit" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Course 1" # behat_hooks::i_look_for_exceptions()
And I set the field "Aggregation" to "Natural" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a1" # behat_hooks::i_look_for_exceptions()
And the field "Weight adjusted" matches value "0" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "0" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a2" # behat_hooks::i_look_for_exceptions()
And the field "Weight adjusted" matches value "0" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "0" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a3" # behat_hooks::i_look_for_exceptions()
And the field "Weight adjusted" matches value "0" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "0" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a4" # behat_hooks::i_look_for_exceptions()
And the field "Weight adjusted" matches value "0" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "0" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Cat mean" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And the field "Weight adjusted" matches value "0" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "0" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Cat median" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And the field "Weight adjusted" matches value "0" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "0" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Cat min" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And the field "Weight adjusted" matches value "0" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "0" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Cat natural" # behat_hooks::i_look_for_exceptions()
And I set the field "Aggregation" to "Natural" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item b1" # behat_hooks::i_look_for_exceptions()
And the field "Weight adjusted" matches value "0" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "0" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item b2" # behat_hooks::i_look_for_exceptions()
And the field "Weight adjusted" matches value "0" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "0" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item b3" # behat_hooks::i_look_for_exceptions()
And the field "Weight adjusted" matches value "0" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "0" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item b4" # behat_hooks::i_look_for_exceptions()
And the field "Weight adjusted" matches value "0" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "0" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
Scenario: Switching a category from Natural aggregation to Weighted mean of grades and back # C:\Apache24\htdocs\integration\grade\tests\behat\grade_aggregation_changes.feature:215
Given I follow "Edit Course 1" # behat_hooks::i_look_for_exceptions()
And I set the field "Aggregation" to "Weighted mean of grades" # behat_hooks::i_look_for_exceptions()
When I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a1" # behat_hooks::i_look_for_exceptions()
Then I should not see "Weight adjusted" # behat_hooks::i_look_for_exceptions()
And I should not see "Extra credit" # behat_hooks::i_look_for_exceptions()
And the field "Item weight" matches value "1" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a2" # behat_hooks::i_look_for_exceptions()
And I should not see "Weight adjusted" # behat_hooks::i_look_for_exceptions()
And I should not see "Extra credit" # behat_hooks::i_look_for_exceptions()
And the field "Item weight" matches value "1" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a3" # behat_hooks::i_look_for_exceptions()
And I should not see "Weight adjusted" # behat_hooks::i_look_for_exceptions()
And I should not see "Extra credit" # behat_hooks::i_look_for_exceptions()
And the field "Item weight" matches value "1" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a4" # behat_hooks::i_look_for_exceptions()
And I should not see "Weight adjusted" # behat_hooks::i_look_for_exceptions()
And I should not see "Extra credit" # behat_hooks::i_look_for_exceptions()
And the field "Item weight" matches value "1" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Cat mean" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I should not see "Weight adjusted" # behat_hooks::i_look_for_exceptions()
And I should not see "Extra credit" # behat_hooks::i_look_for_exceptions()
And the field "Item weight" matches value "1" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Cat median" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I should not see "Weight adjusted" # behat_hooks::i_look_for_exceptions()
And I should not see "Extra credit" # behat_hooks::i_look_for_exceptions()
And the field "Item weight" matches value "1" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Cat min" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I should not see "Weight adjusted" # behat_hooks::i_look_for_exceptions()
And I should not see "Extra credit" # behat_hooks::i_look_for_exceptions()
And the field "Item weight" matches value "1" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Cat natural" # behat_hooks::i_look_for_exceptions()
And I set the field "Aggregation" to "Weighted mean of grades" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item b1" # behat_hooks::i_look_for_exceptions()
And I should not see "Weight adjusted" # behat_hooks::i_look_for_exceptions()
And I should not see "Extra credit" # behat_hooks::i_look_for_exceptions()
And the field "Item weight" matches value "1" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item b2" # behat_hooks::i_look_for_exceptions()
And I should not see "Weight adjusted" # behat_hooks::i_look_for_exceptions()
And I should not see "Extra credit" # behat_hooks::i_look_for_exceptions()
And the field "Item weight" matches value "1" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item b3" # behat_hooks::i_look_for_exceptions()
And I should not see "Weight adjusted" # behat_hooks::i_look_for_exceptions()
And I should not see "Extra credit" # behat_hooks::i_look_for_exceptions()
And the field "Item weight" matches value "1" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item b4" # behat_hooks::i_look_for_exceptions()
And I should not see "Weight adjusted" # behat_hooks::i_look_for_exceptions()
And I should not see "Extra credit" # behat_hooks::i_look_for_exceptions()
And the field "Item weight" matches value "1" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Course 1" # behat_hooks::i_look_for_exceptions()
And I set the field "Aggregation" to "Natural" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a1" # behat_hooks::i_look_for_exceptions()
And the field "Weight adjusted" matches value "0" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "0" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a2" # behat_hooks::i_look_for_exceptions()
And the field "Weight adjusted" matches value "0" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "0" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a3" # behat_hooks::i_look_for_exceptions()
And the field "Weight adjusted" matches value "0" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "0" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a4" # behat_hooks::i_look_for_exceptions()
And the field "Weight adjusted" matches value "0" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "0" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Cat mean" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And the field "Weight adjusted" matches value "0" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "0" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Cat median" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And the field "Weight adjusted" matches value "0" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "0" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Cat min" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And the field "Weight adjusted" matches value "0" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "0" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Cat natural" # behat_hooks::i_look_for_exceptions()
And I set the field "Aggregation" to "Natural" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item b1" # behat_hooks::i_look_for_exceptions()
And the field "Weight adjusted" matches value "0" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "0" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item b2" # behat_hooks::i_look_for_exceptions()
And the field "Weight adjusted" matches value "0" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "0" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item b3" # behat_hooks::i_look_for_exceptions()
And the field "Weight adjusted" matches value "0" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "0" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item b4" # behat_hooks::i_look_for_exceptions()
And the field "Weight adjusted" matches value "0" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "0" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Switching grade items between categories # C:\Apache24\htdocs\integration\grade\tests\behat\grade_aggregation_changes.feature:336
Given I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Select Item a1" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Select Item a2" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Select Item a3" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Select Item a4" to "1" # behat_hooks::i_look_for_exceptions()
When I select "Cat natural" from the "Move selected items to" singleselect # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a1" # behat_hooks::i_look_for_exceptions()
Then the field "Weight adjusted" matches value "0" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "0" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a2" # behat_hooks::i_look_for_exceptions()
And the field "Weight adjusted" matches value "1" # behat_hooks::i_look_for_exceptions()
And the field "id_aggregationcoef2" matches value "40.0" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "0" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a3" # behat_hooks::i_look_for_exceptions()
And the field "Weight adjusted" matches value "1" # behat_hooks::i_look_for_exceptions()
And the field "id_aggregationcoef2" matches value "10.0" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "1" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a4" # behat_hooks::i_look_for_exceptions()
And the field "Weight adjusted" matches value "0" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "1" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Select Item a1" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Select Item a2" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Select Item a3" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Select Item a4" to "1" # behat_hooks::i_look_for_exceptions()
And I select "Cat ec" from the "Move selected items to" singleselect # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a1" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "0" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a2" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "0" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a3" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "1" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a4" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "1" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Select Item a1" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Select Item a2" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Select Item a3" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Select Item a4" to "1" # behat_hooks::i_look_for_exceptions()
And I select "Cat simple" from the "Move selected items to" singleselect # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a1" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "0" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a2" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "0" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a3" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "1" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a4" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "1" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Select Item a1" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Select Item a2" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Select Item a3" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Select Item a4" to "1" # behat_hooks::i_look_for_exceptions()
And I select "Cat weighted" from the "Move selected items to" singleselect # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a1" # behat_hooks::i_look_for_exceptions()
And the field "Item weight" matches value "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Item weight" to "2" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a2" # behat_hooks::i_look_for_exceptions()
And the field "Item weight" matches value "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Item weight" to "5" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a3" # behat_hooks::i_look_for_exceptions()
And the field "Item weight" matches value "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Item weight" to "8" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a4" # behat_hooks::i_look_for_exceptions()
And the field "Item weight" matches value "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Item weight" to "11" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Select Item a1" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Select Item a2" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Select Item a3" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Select Item a4" to "1" # behat_hooks::i_look_for_exceptions()
And I select "Cat weighted2" from the "Move selected items to" singleselect # behat_hooks::i_look_for_exceptions()
And I wait "2" seconds # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a1" # behat_hooks::i_look_for_exceptions()
And the field "Item weight" matches value "2" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a2" # behat_hooks::i_look_for_exceptions()
And the field "Item weight" matches value "5" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a3" # behat_hooks::i_look_for_exceptions()
And the field "Item weight" matches value "8" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a4" # behat_hooks::i_look_for_exceptions()
And the field "Item weight" matches value "11" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Select Item a1" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Select Item a2" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Select Item a3" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Select Item a4" to "1" # behat_hooks::i_look_for_exceptions()
And I select "Course 1" from the "Move selected items to" singleselect # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a1" # behat_hooks::i_look_for_exceptions()
And the field "Weight adjusted" matches value "0" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "0" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a2" # behat_hooks::i_look_for_exceptions()
And the field "Weight adjusted" matches value "0" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "0" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a3" # behat_hooks::i_look_for_exceptions()
And the field "Weight adjusted" matches value "0" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "0" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Item a4" # behat_hooks::i_look_for_exceptions()
And the field "Weight adjusted" matches value "0" # behat_hooks::i_look_for_exceptions()
And the field "Extra credit" matches value "0" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
@core @core_grades
Feature: Average grades are displayed in the gradebook
In order to check the expected results are displayed
As an admin
I need to assign grades and check that they display correctly in the gradebook.
Background: # C:\Apache24\htdocs\integration\grade\tests\behat\grade_average.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
| student3 | Student | 3 | student3@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Course grade settings" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Show average | Show |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I press "Add grade item" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Item name | Manual item 1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "50.00" to the user "Student 1" for the grade item "Manual item 1" # behat_hooks::i_look_for_exceptions()
And I give the grade "50.00" to the user "Student 2" for the grade item "Manual item 1" # behat_hooks::i_look_for_exceptions()
And I give the grade "50.00" to the user "Student 3" for the grade item "Manual item 1" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I turn editing mode off # behat_hooks::i_look_for_exceptions()
And I navigate to "Enrolled users" node in "Course administration > Users" # behat_hooks::i_look_for_exceptions()
And I click on "Edit" "link" in the "Student 2" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Status | Suspended |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Scenario: Grade a grade item and ensure the results display correctly in the gradebook # C:\Apache24\htdocs\integration\grade\tests\behat\grade_average.feature:52
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
Then I should see "50.00" in the ".avg.r0.lastrow .c1" "css_element" # behat_hooks::i_look_for_exceptions()
Then I should see "50.00" in the ".avg.r0.lastrow .c2" "css_element" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
Then I should see "50.00" in the ".level2.column-grade" "css_element" # behat_hooks::i_look_for_exceptions()
Then I should see "50.00" in the ".level2.column-average" "css_element" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@core @core_grades
Feature: Gradebook calculations for calculated grade items before the fix 20150627
In order to make sure the grades are not changed after upgrade
As a teacher
I need to be able to freeze gradebook calculations
Background: # C:\Apache24\htdocs\integration\grade\tests\behat\grade_calculated_grade_items_20150627.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And gradebook calculations for the course "C1" are frozen at version "20150627" # behat_hooks::i_look_for_exceptions()
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | t1 |
| student1 | Student | 1 | student1@example.com | s1 |
| student2 | Student | 2 | student2@example.com | s2 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: The max grade for a category item, with a calculation using Natural aggregation, can be changed # C:\Apache24\htdocs\integration\grade\tests\behat\grade_calculated_grade_items_20150627.feature:28
Given I press "Add category" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Category name | Calc cat |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Add grade item" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Item name | grade item 1 |
| Grade category | Calc cat |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I set "=[[gi1]]/2" calculation for grade category "Calc cat" with idnumbers: # behat_hooks::i_look_for_exceptions()
| grade item 1 | gi1 |
And I set the following settings for grade item "Calc cat": # behat_hooks::i_look_for_exceptions()
| Maximum grade | 50 |
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "75.00" to the user "Student 1" for the grade item "grade item 1" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I select "Student 1" from the "Select all or one user" singleselect # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| grade item 1 | - | 75.00 | 0–100 | 75.00 % | - |
| Calc cat totalInclude empty grades. | 100.00 % | 37.50 | 0–100 | 37.50 % | - |
| Course total | - | 37.50 | 0–100 | 37.50 % | - |
@javascript
Scenario: Changing max grade for a category item with a calculation that has existing grades will display the same points with the new max grade values immediately. # C:\Apache24\htdocs\integration\grade\tests\behat\grade_calculated_grade_items_20150627.feature:55
Given I press "Add category" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Category name | Calc cat |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Add grade item" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Item name | grade item 1 |
| Grade category | Calc cat |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I set "=[[gi1]]/2" calculation for grade category "Calc cat" with idnumbers: # behat_hooks::i_look_for_exceptions()
| grade item 1 | gi1 |
And I set the following settings for grade item "Calc cat": # behat_hooks::i_look_for_exceptions()
| Maximum grade | 50 |
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "75.00" to the user "Student 1" for the grade item "grade item 1" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I select "Student 1" from the "Select all or one user" singleselect # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| grade item 1 | - | 75.00 | 0–100 | 75.00 % | - |
| Calc cat totalInclude empty grades. | 100.00 % | 37.50 | 0–100 | 37.50 % | - |
| Course total | - | 37.50 | 0–100 | 37.50 % | - |
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the following settings for grade item "Calc cat": # behat_hooks::i_look_for_exceptions()
| Maximum grade | 40 |
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I give the grade "65.00" to the user "Student 2" for the grade item "grade item 1" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
When I select "Student 1" from the "Select all or one user" singleselect # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| grade item 1 | - | 75.00 | 0–100 | 75.00 % | - |
| Calc cat totalInclude empty grades. | 100.00 % | 37.50 | 0–100 | 37.50 % | - |
| Course total | - | 37.50 | 0–100 | 37.50 % | - |
And I select "Student 2" from the "Select all or one user" singleselect # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| grade item 1 | - | 65.00 | 0–100 | 65.00 % | - |
| Calc cat totalInclude empty grades. | 100.00 % | 32.50 | 0–100 | 32.50 % | - |
| Course total | - | 32.50 | 0–100 | 32.50 % | - |
And I go to "Setup > Course grade settings" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Min and max grades used in calculation | Initial min and max grades |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I select "Student 1" from the "Select all or one user" singleselect # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| grade item 1 | - | 75.00 | 0–100 | 75.00 % | - |
| Calc cat totalInclude empty grades. | 100.00 % | 37.50 | 0–100 | 37.50 % | - |
| Course total | - | 37.50 | 0–100 | 37.50 % | - |
And I select "Student 2" from the "Select all or one user" singleselect # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| grade item 1 | - | 65.00 | 0–100 | 65.00 % | - |
| Calc cat totalInclude empty grades. | 100.00 % | 32.50 | 0–100 | 32.50 % | - |
| Course total | - | 32.50 | 0–100 | 32.50 % | - |
@javascript
Scenario: Values in calculated grade items are not always out of one hundred # C:\Apache24\htdocs\integration\grade\tests\behat\grade_calculated_grade_items_20150627.feature:118
Given I press "Add grade item" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Item name | grade item 1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Add grade item" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Item name | calc item |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I set "=[[gi1]]/2" calculation for grade item "calc item" with idnumbers: # behat_hooks::i_look_for_exceptions()
| grade item 1 | gi1 |
And I set the following settings for grade item "calc item": # behat_hooks::i_look_for_exceptions()
| Maximum grade | 50 |
And I go to "Setup > Course grade settings" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Min and max grades used in calculation | Initial min and max grades |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "75.00" to the user "Student 1" for the grade item "grade item 1" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
When I select "Student 1" from the "Select all or one user" singleselect # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| grade item 1 | 50.00 % | 75.00 | 0–100 | 75.00 % | 37.50 % |
| calc item | 50.00 % | 37.50 | 0–100 | 37.50 % | 18.75 % |
| Course total | - | 112.50 | 0–200 | 56.25 % | - |
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the following settings for grade item "calc item": # behat_hooks::i_look_for_exceptions()
| Rescale existing grades | No |
| Maximum grade | 40 |
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I give the grade "65.00" to the user "Student 2" for the grade item "grade item 1" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I select "Student 1" from the "Select all or one user" singleselect # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| grade item 1 | 50.00 % | 75.00 | 0–100 | 75.00 % | 37.50 % |
| calc item | 50.00 % | 37.50 | 0–100 | 37.50 % | 18.75 % |
| Course total | - | 112.50 | 0–200 | 56.25 % | - |
And I select "Student 2" from the "Select all or one user" singleselect # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| grade item 1 | 50.00 % | 65.00 | 0–100 | 65.00 % | 32.50 % |
| calc item | 50.00 % | 32.50 | 0–100 | 32.50 % | 16.25 % |
| Course total | - | 97.50 | 0–200 | 48.75 % | - |
@core @core_grades
Feature: Calculated grade items can be used in the gradebook
In order to use calculated grade items in the gradebook
As a teacher
I need setup calculated grade items in the 'Gradebook setup' page.
Background: # C:\Apache24\htdocs\integration\grade\tests\behat\grade_calculated_grade_items.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | t1 |
| student1 | Student | 1 | student1@example.com | s1 |
| student2 | Student | 2 | student2@example.com | s2 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: The max grade for a category item, with a calculation using Natural aggregation, can be changed # C:\Apache24\htdocs\integration\grade\tests\behat\grade_calculated_grade_items.feature:27
Given I press "Add category" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Category name | Calc cat |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Add grade item" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Item name | grade item 1 |
| Grade category | Calc cat |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I set "=[[gi1]]/2" calculation for grade category "Calc cat" with idnumbers: # behat_hooks::i_look_for_exceptions()
| grade item 1 | gi1 |
And I set the following settings for grade item "Calc cat": # behat_hooks::i_look_for_exceptions()
| Maximum grade | 50 |
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "75.00" to the user "Student 1" for the grade item "grade item 1" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I select "Student 1" from the "Select all or one user" singleselect # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| grade item 1 | - | 75.00 | 0–100 | 75.00 % | - |
| Calc cat totalInclude empty grades. | 100.00 % | 37.50 | 0–50 | 75.00 % | - |
| Course total | - | 37.50 | 0–50 | 75.00 % | - |
@javascript
Scenario: Changing max grade for a category item with a calculation that has existing grades will display the same points with the new max grade values immediately. # C:\Apache24\htdocs\integration\grade\tests\behat\grade_calculated_grade_items.feature:54
Given I press "Add category" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Category name | Calc cat |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Add grade item" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Item name | grade item 1 |
| Grade category | Calc cat |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I set "=[[gi1]]/2" calculation for grade category "Calc cat" with idnumbers: # behat_hooks::i_look_for_exceptions()
| grade item 1 | gi1 |
And I set the following settings for grade item "Calc cat": # behat_hooks::i_look_for_exceptions()
| Maximum grade | 50 |
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I press "Turn editing on" # behat_hooks::i_look_for_exceptions()
And I give the grade "75.00" to the user "Student 1" for the grade item "grade item 1" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I select "Student 1" from the "Select all or one user" singleselect # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| grade item 1 | - | 75.00 | 0–100 | 75.00 % | - |
| Calc cat totalInclude empty grades. | 100.00 % | 37.50 | 0–50 | 75.00 % | - |
| Course total | - | 37.50 | 0–50 | 75.00 % | - |
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the following settings for grade item "Calc cat": # behat_hooks::i_look_for_exceptions()
| Maximum grade | 40 |
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I give the grade "65.00" to the user "Student 2" for the grade item "grade item 1" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
When I select "Student 1" from the "Select all or one user" singleselect # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| grade item 1 | - | 75.00 | 0–100 | 75.00 % | - |
| Calc cat totalInclude empty grades. | 100.00 % | 37.50 | 0–40 | 93.75 % | - |
| Course total | - | 37.50 | 0–40 | 93.75 % | - |
And I select "Student 2" from the "Select all or one user" singleselect # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| grade item 1 | - | 65.00 | 0–100 | 65.00 % | - |
| Calc cat totalInclude empty grades. | 100.00 % | 32.50 | 0–40 | 81.25 % | - |
| Course total | - | 32.50 | 0–40 | 81.25 % | - |
And I go to "Setup > Course grade settings" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Min and max grades used in calculation | Initial min and max grades |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I select "Student 1" from the "Select all or one user" singleselect # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| grade item 1 | - | 75.00 | 0–100 | 75.00 % | - |
| Calc cat totalInclude empty grades. | 100.00 % | 37.50 | 0–40 | 93.75 % | - |
| Course total | - | 37.50 | 0–40 | 93.75 % | - |
And I select "Student 2" from the "Select all or one user" singleselect # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| grade item 1 | - | 65.00 | 0–100 | 65.00 % | - |
| Calc cat totalInclude empty grades. | 100.00 % | 32.50 | 0–40 | 81.25 % | - |
| Course total | - | 32.50 | 0–40 | 81.25 % | - |
@javascript
Scenario: Values in calculated grade items are not always out of one hundred # C:\Apache24\htdocs\integration\grade\tests\behat\grade_calculated_grade_items.feature:117
Given I press "Add grade item" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Item name | grade item 1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Add grade item" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Item name | calc item |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I set "=[[gi1]]/2" calculation for grade item "calc item" with idnumbers: # behat_hooks::i_look_for_exceptions()
| grade item 1 | gi1 |
And I set the following settings for grade item "calc item": # behat_hooks::i_look_for_exceptions()
| Maximum grade | 50 |
And I go to "Setup > Course grade settings" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Min and max grades used in calculation | Initial min and max grades |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I press "Turn editing on" # behat_hooks::i_look_for_exceptions()
And I give the grade "75.00" to the user "Student 1" for the grade item "grade item 1" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
When I select "Student 1" from the "Select all or one user" singleselect # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| grade item 1 | 66.67 % | 75.00 | 0–100 | 75.00 % | 50.00 % |
| calc item | 33.33 % | 37.50 | 0–50 | 75.00 % | 25.00 % |
| Course total | - | 112.50 | 0–150 | 75.00 % | - |
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the following settings for grade item "calc item": # behat_hooks::i_look_for_exceptions()
| Rescale existing grades | No |
| Maximum grade | 40 |
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I give the grade "65.00" to the user "Student 2" for the grade item "grade item 1" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I select "Student 1" from the "Select all or one user" singleselect # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| grade item 1 | 71.43 % | 75.00 | 0–100 | 75.00 % | 53.57 % |
| calc item | 28.57 % | 37.50 | 0–40 | 93.75 % | 26.79 % |
| Course total | - | 112.50 | 0–140 | 80.36 % | - |
And I select "Student 2" from the "Select all or one user" singleselect # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| grade item 1 | 71.43 % | 65.00 | 0–100 | 65.00 % | 46.43 % |
| calc item | 28.57 % | 32.50 | 0–40 | 81.25 % | 23.21 % |
| Course total | - | 97.50 | 0–140 | 69.64 % | - |
@core @core_grades
Feature: We can understand the gradebook user report
In order to understand the gradebook user report
As an teacher
I need to see the calculated weights for each type of aggregation
Background: # C:\Apache24\htdocs\integration\grade\tests\behat\grade_calculated_weights.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | t1 |
| student1 | Student | 1 | student1@example.com | s1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | course | idnumber | name | intro |
| assign | C1 | a1 | Test assignment one | Submit something! |
| assign | C1 | a2 | Test assignment two | Submit something! |
| assign | C1 | a3 | Test assignment three | Submit something! |
| assign | C1 | a4 | Test assignment four | Submit something! |
| assign | C1 | a5 | Test assignment five | Submit something! |
| assign | C1 | a6 | Test assignment six | Submit something! |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I set the following administration settings values: # behat_hooks::i_look_for_exceptions()
| 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 |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "60.00" to the user "Student 1" for the grade item "Test assignment one" # behat_hooks::i_look_for_exceptions()
And I give the grade "20.00" to the user "Student 1" for the grade item "Test assignment two" # behat_hooks::i_look_for_exceptions()
And I give the grade "40.00" to the user "Student 1" for the grade item "Test assignment three" # behat_hooks::i_look_for_exceptions()
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four" # behat_hooks::i_look_for_exceptions()
And I give the grade "70.00" to the user "Student 1" for the grade item "Test assignment five" # behat_hooks::i_look_for_exceptions()
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment six" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Course grade settings" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Show weightings" to "Show" # behat_hooks::i_look_for_exceptions()
And I set the field "Show contribution to course total" to "Show" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I press "Add category" # behat_hooks::i_look_for_exceptions()
And I set the field "Category name" to "Sub category" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I click on "Move" "link" in the "Test assignment six" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "Move to here" "link" in the "//tbody//tr[position()=last()-3]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I click on "Move" "link" in the "Test assignment five" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "Move to here" "link" in the "//tbody//tr[position()=last()-3]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I click on "Move" "link" in the "Test assignment four" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "Move to here" "link" in the "//tbody//tr[position()=last()-3]" "xpath_element" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Mean of grades aggregation # C:\Apache24\htdocs\integration\grade\tests\behat\grade_calculated_weights.feature:59
And I set the following settings for grade item "Course 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | Mean of grades |
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Select all or one user" to "Student 1" # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Contribution to course total |
| Test assignment one | 25.00 % | 60.00 | 15.00 % |
| Test assignment two | 25.00 % | 20.00 | 5.00 % |
| Test assignment three | 25.00 % | 40.00 | 10.00 % |
| Test assignment four | 33.33 % | 10.00 | 0.83 % |
| Test assignment five | 33.33 % | 70.00 | 5.83 % |
| Test assignment six | 33.33 % | 30.00 | 2.50 % |
@javascript
Scenario: Weighted mean of grades aggregation # C:\Apache24\htdocs\integration\grade\tests\behat\grade_calculated_weights.feature:76
And I set the following settings for grade item "Course 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | Weighted mean of grades |
And I set the following settings for grade item "Test assignment one": # behat_hooks::i_look_for_exceptions()
| Item weight | 2.0 |
And I set the following settings for grade item "Test assignment two": # behat_hooks::i_look_for_exceptions()
| Item weight | 1.0 |
And I set the following settings for grade item "Test assignment three": # behat_hooks::i_look_for_exceptions()
| Item weight | 1.0 |
And I set the following settings for grade item "Sub category": # behat_hooks::i_look_for_exceptions()
| Item weight | 1.0 |
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Select all or one user" to "Student 1" # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Contribution to course total |
| Test assignment one | 40.00 % | 60.00 | 24.00 % |
| Test assignment two | 20.00 % | 20.00 | 4.00 % |
| Test assignment three | 20.00 % | 40.00 | 8.00 % |
| Test assignment four | 33.33 % | 10.00 | 0.67 % |
| Test assignment five | 33.33 % | 70.00 | 4.67 % |
| Test assignment six | 33.33 % | 30.00 | 2.00 % |
@javascript
Scenario: Simple weighted mean of grades aggregation # C:\Apache24\htdocs\integration\grade\tests\behat\grade_calculated_weights.feature:101
And I set the following settings for grade item "Course 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | Simple weighted mean of grades |
And I set the following settings for grade item "Sub category": # behat_hooks::i_look_for_exceptions()
| Aggregation | Simple weighted mean of grades |
And I set the following settings for grade item "Test assignment three": # behat_hooks::i_look_for_exceptions()
| Extra credit | 1 |
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Select all or one user" to "Student 1" # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Contribution to course total |
| Test assignment one | 33.33 % | 60.00 | 20.00 % |
| Test assignment two | 33.33 % | 20.00 | 6.67 % |
| Test assignment three | 33.33 %( Extra credit ) | 40.00 | 13.33 % |
| Test assignment four | 33.33 % | 10.00 | 1.11 % |
| Test assignment five | 33.33 % | 70.00 | 7.78 % |
| Test assignment six | 33.33 % | 30.00 | 3.33 % |
@javascript
Scenario: Mean of grades (with extra credits) aggregation # C:\Apache24\htdocs\integration\grade\tests\behat\grade_calculated_weights.feature:122
And I set the following settings for grade item "Course 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | Mean of grades (with extra credits) |
And I set the following settings for grade item "Test assignment three": # behat_hooks::i_look_for_exceptions()
| Extra credit weight | 1.0 |
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Select all or one user" to "Student 1" # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Contribution to course total |
| Test assignment one | 33.33 % | 60.00 | 20.00 % |
| Test assignment two | 33.33 % | 20.00 | 6.67 % |
| Test assignment three | 33.33 %( Extra credit ) | 40.00 | 13.33 % |
| Test assignment four | 33.33 % | 10.00 | 1.11 % |
| Test assignment five | 33.33 % | 70.00 | 7.78 % |
| Test assignment six | 33.33 % | 30.00 | 3.33 % |
@javascript
Scenario: Median of grades aggregation # C:\Apache24\htdocs\integration\grade\tests\behat\grade_calculated_weights.feature:141
And I set the following settings for grade item "Course 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | Median of grades |
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Select all or one user" to "Student 1" # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Contribution to course total |
| Test assignment one | 0.00 % | 60.00 | 0.00 % |
| Test assignment two | 0.00 % | 20.00 | 0.00 % |
| Test assignment three | 50.00 % | 40.00 | 20.00 % |
| Test assignment four | 33.33 % | 10.00 | 1.67 % |
| Test assignment five | 33.33 % | 70.00 | 11.67 % |
| Test assignment six | 33.33 % | 30.00 | 5.00 % |
@javascript
Scenario: Lowest grade aggregation # C:\Apache24\htdocs\integration\grade\tests\behat\grade_calculated_weights.feature:158
And I set the following settings for grade item "Course 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | Lowest grade |
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Select all or one user" to "Student 1" # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Contribution to course total |
| Test assignment one | 0.00 % | 60.00 | 0.00 % |
| Test assignment two | 100.00 % | 20.00 | 20.00 % |
| Test assignment three | 0.00 % | 40.00 | 0.00 % |
| Test assignment four | 33.33 % | 10.00 | 0.00 % |
| Test assignment five | 33.33 % | 70.00 | 0.00 % |
| Test assignment six | 33.33 % | 30.00 | 0.00 % |
@javascript
Scenario: Highest grade aggregation # C:\Apache24\htdocs\integration\grade\tests\behat\grade_calculated_weights.feature:175
And I set the following settings for grade item "Course 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | Highest grade |
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Select all or one user" to "Student 1" # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Contribution to course total |
| Test assignment one | 100.00 % | 60.00 | 60.00 % |
| Test assignment two | 0.00 % | 20.00 | 0.00 % |
| Test assignment three | 0.00 % | 40.00 | 0.00 % |
| Test assignment four | 33.33 % | 10.00 | 0.00 % |
| Test assignment five | 33.33 % | 70.00 | 0.00 % |
| Test assignment six | 33.33 % | 30.00 | 0.00 % |
@javascript
Scenario: Mode of grades aggregation # C:\Apache24\htdocs\integration\grade\tests\behat\grade_calculated_weights.feature:192
And I set the following settings for grade item "Course 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | Mode of grades |
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Select all or one user" to "Student 1" # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Contribution to course total |
| Test assignment one | 100.00 % | 60.00 | 60.00 % |
| Test assignment two | 0.00 % | 20.00 | 0.00 % |
| Test assignment three | 0.00 % | 40.00 | 0.00 % |
| Test assignment four | 33.33 % | 10.00 | 0.00 % |
| Test assignment five | 33.33 % | 70.00 | 0.00 % |
| Test assignment six | 33.33 % | 30.00 | 0.00 % |
@javascript
Scenario: View user report with mixed aggregation methods # C:\Apache24\htdocs\integration\grade\tests\behat\grade_calculated_weights.feature:209
And I set the following settings for grade item "Course 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | Natural |
And I set the following settings for grade item "Sub category": # behat_hooks::i_look_for_exceptions()
| Aggregation | Weighted mean of grades |
And I set the following settings for grade item "Test assignment three": # behat_hooks::i_look_for_exceptions()
| Extra credit | 1 |
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Select all or one user" to "Student 1" # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Contribution to course total |
| Test assignment one | 33.33 % | 60.00 | 20.00 % |
| Test assignment two | 33.33 % | 20.00 | 6.67 % |
| Test assignment three | 33.33 %( Extra credit ) | 40.00 | 13.33 % |
| Test assignment four | 33.33 % | 10.00 | 1.11 % |
| Test assignment five | 33.33 % | 70.00 | 7.78 % |
| Test assignment six | 33.33 % | 30.00 | 3.33 % |
| Sub category totalWeighted mean of grades. | 33.33 % | 36.67 | - |
| Course total | - | 156.67 | - |
@javascript
Scenario: View user report with natural aggregation # C:\Apache24\htdocs\integration\grade\tests\behat\grade_calculated_weights.feature:232
And I set the following settings for grade item "Test assignment three": # behat_hooks::i_look_for_exceptions()
| Extra credit | 1 |
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Select all or one user" to "Student 1" # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Contribution to course total |
| Test assignment one | 20.00 % | 60.00 | 12.00 % |
| Test assignment two | 20.00 % | 20.00 | 4.00 % |
| Test assignment three | 20.00 %( Extra credit ) | 40.00 | 8.00 % |
| Test assignment four | 33.33 % | 10.00 | 2.00 % |
| Test assignment five | 33.33 % | 70.00 | 14.00 % |
| Test assignment six | 33.33 % | 30.00 | 6.00 % |
| Sub category total | 60.00 % | 110.00 | - |
| Course total | - | 230.00 | - |
@gradingform @gradingform_rubric @javascript
Feature: Converting rubric score to grades
In order to use and refine rubrics to grade students
As a teacher
I need to be able to use different grade settings
Scenario Outline: # C:\Apache24\htdocs\integration\grade\grading\form\rubric\tests\behat\grade_calculation.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "scales" exist: # behat_hooks::i_look_for_exceptions()
| name | scale |
| Test scale 1 | Disappointing, Good, Very good, Excellent |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | grade | advancedgradingmethod_submissions |
| assign | Test assignment 1 | Test | C1 | assign1 | | rubric |
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I go to "Test assignment 1" advanced grading definition page # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Assignment 1 rubric |
| Description | Rubric test description |
| When converting rubric score to points/scale assume that minimum number of points is 0 | |
And I define the following rubric: # behat_hooks::i_look_for_exceptions()
| Criterion 1 | Level 11 | 20 | Level 12 | 25 | Level 13 | 40 | Level 14 | 50 |
| Criterion 2 | Level 21 | 20 | Level 22 | 25 | Level 23 | 30 | | |
| Criterion 3 | Level 31 | 10 | Level 32 | 20 | | | | |
And I press "Save rubric and make it ready" # behat_hooks::i_look_for_exceptions()
And I go to "Student 1" "Test assignment 1" activity advanced grading page # behat_hooks::i_look_for_exceptions()
And I grade by filling the rubric with: # behat_hooks::i_look_for_exceptions()
| Criterion 1 | 25 | |
| Criterion 2 | 20 | |
| Criterion 3 | 10 | |
And I save the advanced grading form # behat_hooks::i_look_for_exceptions()
And I should see "" in the "student1@example.com" "table_row" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Examples:
| grade | lockzeropoints | studentgrade |
| 100 | 1 | 55.00 |
| 70 | 1 | 38.50 |
| Test scale 1 | 1 | Good |
| 100 | | 10.00 |
| 70 | | 7.00 |
| Test scale 1 | | Disappointing |
@core_grades
Feature: Editing a grade item
In order to ensure validation is provided to the teacher
As a teacher
I need to know why I can not add/edit values on the grade category form
Background: # C:\Apache24\htdocs\integration\grade\tests\behat\grade_category_validation.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "Scales" node in "Site administration > Grades" # behat_hooks::i_look_for_exceptions()
And I press "Add a new scale" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | ABCDEF |
| Scale | F,E,D,C,B,A |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Add a new scale" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Letter scale |
| Scale | Disappointing, Good, Very good, Excellent |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I set the following administration settings values: # behat_hooks::i_look_for_exceptions()
| 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 |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I press "Add category" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Category name | Cat 1 |
| Aggregation | Highest grade |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Add grade item" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Item name | Item 1 |
| Grade category | Cat 1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Add grade item" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Item name | Item 2 |
| Grade category | Cat 1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Scenario: Being able to change the grade type, scale and maximum grade for a grade category when there are no overridden grades # C:\Apache24\htdocs\integration\grade\tests\behat\grade_category_validation.feature:54
Given I click on "Edit" "link" in the "Cat 1" "table_row" # behat_hooks::i_look_for_exceptions()
When I click on "Edit settings" "link" in the "Cat 1" "table_row" # behat_hooks::i_look_for_exceptions()
Then I should not see "This category has associated grade items which have been overridden. Therefore some grades have already been awarded" # behat_hooks::i_look_for_exceptions()
And I set the field "Grade type" to "Scale" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "Scale must be selected" # behat_hooks::i_look_for_exceptions()
And I set the field "Scale" to "ABCDEF" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should not see "You cannot change the type, as grades already exist for this item" # behat_hooks::i_look_for_exceptions()
And I click on "Edit" "link" in the "Cat 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Cat 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I should not see "This category has associated grade items which have been overridden. Therefore some grades have already been awarded" # behat_hooks::i_look_for_exceptions()
And I set the field "Scale" to "Letter scale" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should not see "You cannot change the scale, as grades already exist for this item" # behat_hooks::i_look_for_exceptions()
Scenario: Attempting to change a category item's grade type when overridden grades already exist # C:\Apache24\htdocs\integration\grade\tests\behat\grade_category_validation.feature:71
Given I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "20.00" to the user "Student 1" for the grade item "Cat 1 total" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I click on "Edit" "link" in the "Cat 1" "table_row" # behat_hooks::i_look_for_exceptions()
When I click on "Edit settings" "link" in the "Cat 1" "table_row" # behat_hooks::i_look_for_exceptions()
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." # behat_hooks::i_look_for_exceptions()
And "//div[contains(concat(' ', normalize-space(@class), ' '), 'felement') and contains(text(), 'Value')]" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
Scenario: Attempting to change a category item's scale when overridden grades already exist # C:\Apache24\htdocs\integration\grade\tests\behat\grade_category_validation.feature:82
Given I click on "Edit" "link" in the "Cat 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Cat 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the field "Grade type" to "Scale" # behat_hooks::i_look_for_exceptions()
And I set the field "Scale" to "ABCDEF" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "C" to the user "Student 1" for the grade item "Cat 1 total" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I click on "Edit" "link" in the "Cat 1" "table_row" # behat_hooks::i_look_for_exceptions()
When I click on "Edit settings" "link" in the "Cat 1" "table_row" # behat_hooks::i_look_for_exceptions()
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." # behat_hooks::i_look_for_exceptions()
And "//div[contains(concat(' ', normalize-space(@class), ' '), 'felement') and contains(text(), 'ABCDEF')]" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
Scenario: Attempting to change a category item's maximum grade when no rescaling option has been chosen # C:\Apache24\htdocs\integration\grade\tests\behat\grade_category_validation.feature:98
Given I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "20.00" to the user "Student 1" for the grade item "Cat 1 total" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I click on "Edit" "link" in the "Cat 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Cat 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the field "Maximum grade" to "50" # behat_hooks::i_look_for_exceptions()
When I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "You must choose whether to rescale existing grades or not." # behat_hooks::i_look_for_exceptions()
@core @core_grades @javascript
Feature: Extra credit contributions are normalised when going out of bounds
In order to use extra credit
As a teacher
I need to add some extra credit items.
Background: # C:\Apache24\htdocs\integration\grade\tests\behat\grade_contribution_with_extra_credit.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | t1 |
| student1 | Student | 1 | student1@example.com | s1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I set the following administration settings values: # behat_hooks::i_look_for_exceptions()
| grade_aggregations_visible | Simple weighted mean of grades,Mean of grades (with extra credits),Natural |
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I press "Add grade item" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Item name | Manual item 1 |
| Maximum grade | 150 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Add grade item" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Item name | Manual item 2 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Add grade item" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Item name | Manual item 3 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Add grade item" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Item name | Manual item 4 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Course grade settings" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Show weighting" to "Show" # behat_hooks::i_look_for_exceptions()
And I set the field "Show contribution to course total" to "Show" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "80.00" to the user "Student 1" for the grade item "Manual item 1" # behat_hooks::i_look_for_exceptions()
And I give the grade "10.00" to the user "Student 1" for the grade item "Manual item 2" # behat_hooks::i_look_for_exceptions()
And I give the grade "70.00" to the user "Student 1" for the grade item "Manual item 3" # behat_hooks::i_look_for_exceptions()
And I give the grade "90.00" to the user "Student 1" for the grade item "Manual item 4" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Scenario Outline: The contribution of extra credit items is normalised # C:\Apache24\htdocs\integration\grade\tests\behat\grade_contribution_with_extra_credit.feature:57
Given I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
When I set the following settings for grade item "Course 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | |
And I set the following settings for grade item "Manual item 2": # behat_hooks::i_look_for_exceptions()
| Extra credit | 1 |
And I set the following settings for grade item "Manual item 3": # behat_hooks::i_look_for_exceptions()
| Extra credit | 1 |
And I set the following settings for grade item "Manual item 4": # behat_hooks::i_look_for_exceptions()
| Extra credit | 1 |
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Select all or one user" to "Student 1" # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Contribution to course total |
| Manual item 1 | | 80.00 | |
| Manual item 2 | | 10.00 | |
| Manual item 3 | | 70.00 | |
| Manual item 4 | 0.00 % | 90.00 | 0.00 % |
Examples:
| aggregation | m1w | m1c | m2w | m2c | m3w | m3c |
| Natural | 100.00 % | 53.33 % | 66.67 % | 6.67 % | 57.14 % | 40.00 % |
| Simple weighted mean of grades | 100.00 % | 53.33 % | 66.67 % | 6.67 % | 57.14 % | 40.00 % |
| Mean of grades (with extra credits) | 100.00 % | 53.33 % | 100.00 % | 10.00 % | 52.38 % | 36.67 % |
@core @core_grades
Feature: We can change the maximum and minimum number of points for manual items with existing grades
In order to verify existing grades are modified as expected
As an teacher
I need to modify a grade item with exiting grades
I need to ensure existing grades are modified in an expected manner
Background: # C:\Apache24\htdocs\integration\grade\tests\behat\grade_grade_minmax_change.feature:8
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | t1 |
| student1 | Student | 1 | student1@example.com | s1 |
| student2 | Student | 2 | student2@example.com | s2 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I press "Add grade item" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Item name | Manual item 1 |
| Minimum grade | 0 |
| Maximum grade | 100 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Course grade settings" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Show weightings" to "Show" # behat_hooks::i_look_for_exceptions()
And I set the field "Show contribution to course total" to "Show" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Scenario: Change maximum number of points on a graded item. # C:\Apache24\htdocs\integration\grade\tests\behat\grade_grade_minmax_change.feature:37
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "10.00" to the user "Student 1" for the grade item "Manual item 1" # behat_hooks::i_look_for_exceptions()
And I give the grade "8.00" to the user "Student 2" for the grade item "Manual item 1" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
When I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I click on "Edit" "link" in the "Manual item 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Manual item 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Maximum grade | 10 |
| Rescale existing grades | No |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I select "Student 1" from the "Select all or one user" singleselect # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Contribution to course total |
| Manual item 1 | 100.00 % | 10.00 | 100.00 % |
And I select "Student 2" from the "Select all or one user" singleselect # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Contribution to course total |
| Manual item 1 | 100.00 % | 8.00 | 80.00 % |
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I click on "Edit" "link" in the "Manual item 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Manual item 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Maximum grade | 20 |
| Rescale existing grades | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I select "Student 1" from the "Select all or one user" singleselect # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Contribution to course total |
| Manual item 1 | 100.00 % | 20.00 | 100.00 % |
And I select "Student 2" from the "Select all or one user" singleselect # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Contribution to course total |
| Manual item 1 | 100.00 % | 16.00 | 80.00 % |
@core @core_grades
Feature: Student and teacher's view of aggregated grade items is consistent when hidden grade items are present
In order to calculate grade totals
As an teacher
I need to add aggregate columns to the gradebook
Scenario: Natural aggregation of course categories with hidden items calculates correctly for teacher and student # C:\Apache24\htdocs\integration\grade\tests\behat\grade_hidden_items.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | t1 |
| student1 | Student | 1 | student1@example.com | s1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "grade categories" exist: # behat_hooks::i_look_for_exceptions()
| fullname | course |
| Sub category 1 | C1 |
| Sub category 2 | C1 |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | course | idnumber | name | intro | gradecategory | grade |
| assign | C1 | a1 | Test assignment one | Submit something! | Sub category 1 | 100 |
| assign | C1 | a2 | Test assignment two | Submit something! | Sub category 1 | 100 |
| assign | C1 | a3 | Test assignment three | Submit something! | Sub category 2 | 100 |
| assign | C1 | a4 | Test assignment four | Submit something! | Sub category 2 | 100 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "Overview report" node in "Site administration > Grades > Report settings" # behat_hooks::i_look_for_exceptions()
And I set the field "s__grade_report_overview_showtotalsifcontainhidden" to "Show totals excluding hidden items" # behat_hooks::i_look_for_exceptions()
And I navigate to "User report" node in "Site administration > Grades > Report settings" # behat_hooks::i_look_for_exceptions()
And I set the field "s__grade_report_user_showtotalsifcontainhidden" to "Show totals excluding hidden items" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
When I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "50.00" to the user "Student 1" for the grade item "Test assignment one" # behat_hooks::i_look_for_exceptions()
And I give the grade "50.00" to the user "Student 1" for the grade item "Test assignment three" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I set the following settings for grade item "Test assignment four": # behat_hooks::i_look_for_exceptions()
| Hidden | 1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I select "Myself" from the "View report as" singleselect # behat_hooks::i_look_for_exceptions()
And I select "Student 1" from the "Select all or one user" singleselect # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| Test assignment one | 100.00 % | 50.00 | 0–100 | 50.00 % | 25.00 % |
| Test assignment two | 0.00 %( Empty ) | - | 0–100 | - | 0.00 % |
| Test assignment three | 100.00 % | 50.00 | 0–100 | 50.00 % | 25.00 % |
| Course total | - | 100.00 | 0–200 | 50.00 % | - |
When I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| Test assignment one | 100.00 % | 50.00 | 0–100 | 50.00 % | 25.00 % |
| Test assignment two | -( Empty ) | - | 0–100 | - | - |
| Test assignment three | 100.00 % | 50.00 | 0–100 | 50.00 % | 25.00 % |
| Course total | - | 100.00 | 0–200 | 50.00 % | - |
And I should not see "Test assignment four" # behat_hooks::i_look_for_exceptions()
@core_grades
Feature: Editing a grade item
In order to ensure validation is provided to the teacher
As a teacher
I need to know why I can not add/edit values on the grade item form
Background: # C:\Apache24\htdocs\integration\grade\tests\behat\grade_item_validation.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "Scales" node in "Site administration > Grades" # behat_hooks::i_look_for_exceptions()
And I press "Add a new scale" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | ABCDEF |
| Scale | F,E,D,C,B,A |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Add a new scale" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Letter scale |
| Scale | Disappointing, Good, Very good, Excellent |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I press "Add grade item" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Item name | MI 1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Scenario: Being able to change the grade type, scale and maximum grade for a manual grade item when there are no grades # C:\Apache24\htdocs\integration\grade\tests\behat\grade_item_validation.feature:39
Given I click on "Edit" "link" in the "MI 1" "table_row" # behat_hooks::i_look_for_exceptions()
When I click on "Edit settings" "link" in the "MI 1" "table_row" # behat_hooks::i_look_for_exceptions()
Then I should not see "Some grades have already been awarded, so the grade type" # behat_hooks::i_look_for_exceptions()
And I set the field "Grade type" to "Scale" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "Scale must be selected" # behat_hooks::i_look_for_exceptions()
And I set the field "Scale" to "ABCDEF" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should not see "You cannot change the type, as grades already exist for this item" # behat_hooks::i_look_for_exceptions()
And I click on "Edit" "link" in the "MI 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "MI 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I should not see "Some grades have already been awarded, so the grade type" # behat_hooks::i_look_for_exceptions()
And I set the field "Scale" to "Letter scale" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should not see "You cannot change the scale, as grades already exist for this item" # behat_hooks::i_look_for_exceptions()
Scenario: Attempting to change a manual item's grade type when grades already exist # C:\Apache24\htdocs\integration\grade\tests\behat\grade_item_validation.feature:56
Given I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "20.00" to the user "Student 1" for the grade item "MI 1" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I click on "Edit" "link" in the "MI 1" "table_row" # behat_hooks::i_look_for_exceptions()
When I click on "Edit settings" "link" in the "MI 1" "table_row" # behat_hooks::i_look_for_exceptions()
Then I should see "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." # behat_hooks::i_look_for_exceptions()
And "//div[contains(concat(' ', normalize-space(@class), ' '), 'felement') and contains(text(), 'Value')]" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
Scenario: Attempting to change a manual item's scale when grades already exist # C:\Apache24\htdocs\integration\grade\tests\behat\grade_item_validation.feature:67
Given I click on "Edit" "link" in the "MI 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "MI 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the field "Grade type" to "Scale" # behat_hooks::i_look_for_exceptions()
And I set the field "Scale" to "ABCDEF" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "C" to the user "Student 1" for the grade item "MI 1" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I click on "Edit" "link" in the "MI 1" "table_row" # behat_hooks::i_look_for_exceptions()
When I click on "Edit settings" "link" in the "MI 1" "table_row" # behat_hooks::i_look_for_exceptions()
Then I should see "Some grades have already been awarded, so the grade type and scale cannot be changed." # behat_hooks::i_look_for_exceptions()
And "//div[contains(concat(' ', normalize-space(@class), ' '), 'felement') and contains(text(), 'ABCDEF')]" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
Scenario: Attempting to change a manual item's maximum grade when no rescaling option has been chosen # C:\Apache24\htdocs\integration\grade\tests\behat\grade_item_validation.feature:83
Given I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "20.00" to the user "Student 1" for the grade item "MI 1" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I click on "Edit" "link" in the "MI 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "MI 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the field "Maximum grade" to "50" # behat_hooks::i_look_for_exceptions()
When I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "You must choose whether to rescale existing grades or not." # behat_hooks::i_look_for_exceptions()
@core @core_grades
Feature: We can customise the letter boundary of a course.
In order to change the letter boundary of a course
As a teacher
I need to add assessments to the gradebook.
@javascript
Scenario: I edit the letter boundaries of a course and grade a student. # C:\Apache24\htdocs\integration\grade\tests\behat\grade_letter_boundary_20160518.feature:8
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And gradebook calculations for the course "C1" are frozen at version "20160518" # behat_hooks::i_look_for_exceptions()
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber | alternatename |
| teacher1 | Teacher | 1 | teacher1@example.com | t1 | Terry |
| student1 | Student | 1 | student1@example.com | s1 | Sally |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | course | idnumber | name | intro | grade |
| assign | C1 | a1 | Test assignment one | Submit something! | 100 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Course grade settings" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Grade display type | Letter |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "Letters" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I follow "Edit grade letters" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_override | 1 |
| id_gradeboundary10 | 57 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I press "Turn editing on" # behat_hooks::i_look_for_exceptions()
And I give the grade "57" to the user "Student 1" for the grade item "Test assignment one" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Turn editing off" # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grades" table: # behat_hooks::i_look_for_exceptions()
| -1- | -4- | -5- |
| Student 1 | F | F |
@core @core_grades
Feature: We can customise the letter boundary of a course.
In order to change the letter boundary of a course
As a teacher
I need to add assessments to the gradebook.
@javascript
Scenario: I edit the letter boundaries of a course and grade a student. # C:\Apache24\htdocs\integration\grade\tests\behat\grade_letter_boundary.feature:8
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber | alternatename |
| teacher1 | Teacher | 1 | teacher1@example.com | t1 | Terry |
| student1 | Student | 1 | student1@example.com | s1 | Sally |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | course | idnumber | name | intro | grade |
| assign | C1 | a1 | Test assignment one | Submit something! | 100 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Course grade settings" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Grade display type | Letter |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "Letters" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I follow "Edit grade letters" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_override | 1 |
| id_gradeboundary10 | 57 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I press "Turn editing on" # behat_hooks::i_look_for_exceptions()
And I give the grade "57" to the user "Student 1" for the grade item "Test assignment one" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Turn editing off" # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grades" table: # behat_hooks::i_look_for_exceptions()
| -1- | -4- | -5- |
| Student 1 | D | D |
@core @core_grades
Feature: We can use a minimum grade different than zero
In order to use a minimum grade different than zero
As an teacher
I need to set up a minimum grade different than zero
Background: # C:\Apache24\htdocs\integration\grade\tests\behat\grade_mingrade.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | t1 |
| student1 | Student | 1 | student1@example.com | s1 |
| student2 | Student | 2 | student2@example.com | s2 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And the following "grade categories" exist: # behat_hooks::i_look_for_exceptions()
| fullname | course |
| Sub category 1 | C1 |
| Sub category 2 | C1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I set the following administration settings values: # behat_hooks::i_look_for_exceptions()
| 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 |
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I press "Add grade item" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Item name | Manual item 1 |
| Minimum grade | -100 |
| Grade category | Course 1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Add grade item" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Item name | Manual item 2 |
| Minimum grade | 50 |
| Grade category | Course 1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Add grade item" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Item name | Manual item 3 |
| Maximum grade | 50 |
| Minimum grade | -100 |
| Grade category | Sub category 1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Add grade item" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Item name | Manual item 4 |
| Minimum grade | -100 |
| Grade category | Sub category 1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Add grade item" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Item name | Manual item 5 |
| Minimum grade | 50 |
| Grade category | Sub category 2 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Add grade item" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Item name | Manual item 6 |
| Minimum grade | 50 |
| Grade category | Sub category 2 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Course grade settings" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Show weightings" to "Show" # behat_hooks::i_look_for_exceptions()
And I set the field "Show contribution to course total" to "Show" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Natural aggregation with negative and positive grade # C:\Apache24\htdocs\integration\grade\tests\behat\grade_mingrade.feature:74
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the following settings for grade item "Sub category 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | Natural |
| Exclude empty grades | 0 |
And I set the following settings for grade item "Sub category 2": # behat_hooks::i_look_for_exceptions()
| Aggregation | Natural |
| Exclude empty grades | 0 |
And I set the following settings for grade item "Course 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | Natural |
| Exclude empty grades | 0 |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
When I give the grade "-25.00" to the user "Student 1" for the grade item "Manual item 1" # behat_hooks::i_look_for_exceptions()
And I give the grade "50.00" to the user "Student 1" for the grade item "Manual item 2" # behat_hooks::i_look_for_exceptions()
And I give the grade "-80.00" to the user "Student 1" for the grade item "Manual item 3" # behat_hooks::i_look_for_exceptions()
And I give the grade "-10.00" to the user "Student 1" for the grade item "Manual item 4" # behat_hooks::i_look_for_exceptions()
And I give the grade "50.00" to the user "Student 1" for the grade item "Manual item 5" # behat_hooks::i_look_for_exceptions()
And I give the grade "75.00" to the user "Student 1" for the grade item "Manual item 6" # behat_hooks::i_look_for_exceptions()
And I give the grade "0.00" to the user "Student 2" for the grade item "Manual item 1" # behat_hooks::i_look_for_exceptions()
And I give the grade "0.00" to the user "Student 2" for the grade item "Manual item 2" # behat_hooks::i_look_for_exceptions()
And I give the grade "-10.00" to the user "Student 2" for the grade item "Manual item 3" # behat_hooks::i_look_for_exceptions()
And I give the grade "50.00" to the user "Student 2" for the grade item "Manual item 4" # behat_hooks::i_look_for_exceptions()
And I give the grade "0.00" to the user "Student 2" for the grade item "Manual item 5" # behat_hooks::i_look_for_exceptions()
And I give the grade "0.00" to the user "Student 2" for the grade item "Manual item 6" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Select all or one user" to "Student 1" # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Contribution to course total |
| Manual item 1 | 18.18 % | -25.00 | -4.55 % |
| Manual item 2 | 18.18 % | 50.00 | 9.09 % |
| Manual item 3 | 33.33 % | -80.00 | -14.55 % |
| Manual item 4 | 66.67 % | -10.00 | -1.82 % |
| Manual item 5 | 50.00 % | 50.00 | 9.09 % |
| Manual item 6 | 50.00 % | 75.00 | 13.64 % |
And I set the field "Select all or one user" to "Student 2" # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Contribution to course total |
| Manual item 1 | 18.18 % | 0.00 | 0.00 % |
| Manual item 2 | 18.18 % | 50.00 | 9.09 % |
| Manual item 3 | 33.33 % | -10.00 | -1.82 % |
| Manual item 4 | 66.67 % | 50.00 | 9.09 % |
| Manual item 5 | 50.00 % | 50.00 | 9.09 % |
| Manual item 6 | 50.00 % | 50.00 | 9.09 % |
@core @core_grades
Feature: We can choose what min or max grade to use when aggregating grades.
In order to what min or max grade to use
As an teacher
I can update modify a course setting
Scenario: Changing the min or max grade to use updates the grades accordingly # C:\Apache24\htdocs\integration\grade\tests\behat\grade_minmax.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| C1 | C1 | 0 | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | t1 |
| student1 | Student | 1 | student1@example.com | s1 |
| student2 | Student | 2 | student2@example.com | s2 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And the following "grade categories" exist: # behat_hooks::i_look_for_exceptions()
| fullname | course |
| CAT1 | C1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I set the following administration settings values: # behat_hooks::i_look_for_exceptions()
| grade_minmaxtouse | Min and max grades as specified in grade item settings |
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "C1" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I press "Add grade item" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Item name | MI 1 |
| Grade category | C1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Add grade item" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Item name | MI 2 |
| Grade category | C1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Add grade item" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Item name | MI 3 |
| Grade category | CAT1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Add grade item" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Item name | MI 4 |
| Grade category | CAT1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Add grade item" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Item name | MI 5 |
| Grade category | C1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I set "=[[mi1]]+[[mi2]]+[[mi3]]" calculation for grade item "MI 5" with idnumbers: # behat_hooks::i_look_for_exceptions()
| MI 1 | mi1 |
| MI 2 | mi2 |
| MI 3 | mi3 |
And I go to "Setup > Course grade settings" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Min and max grades used in calculation" to "Default (Min and max grades as specified in grade item settings)" # behat_hooks::i_look_for_exceptions()
And I set the field "Show weightings" to "Show" # behat_hooks::i_look_for_exceptions()
And I set the field "Show contribution to course total" to "Show" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the following settings for grade item "CAT1": # behat_hooks::i_look_for_exceptions()
| Aggregation | Natural |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "C1" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "75.00" to the user "Student 1" for the grade item "MI 1" # behat_hooks::i_look_for_exceptions()
And I give the grade "25.00" to the user "Student 1" for the grade item "MI 2" # behat_hooks::i_look_for_exceptions()
And I give the grade "50.00" to the user "Student 1" for the grade item "MI 3" # behat_hooks::i_look_for_exceptions()
And I give the grade "100.00" to the user "Student 1" for the grade item "MI 4" # behat_hooks::i_look_for_exceptions()
And I give the grade "20.00" to the user "Student 2" for the grade item "MI 1" # behat_hooks::i_look_for_exceptions()
And I give the grade "10.00" to the user "Student 2" for the grade item "MI 3" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I select "Student 1" from the "Select all or one user" singleselect # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| MI 1 | 20.00 % | 75.00 | 0–100 | 75.00 % | 15.00 % |
| MI 2 | 20.00 % | 25.00 | 0–100 | 25.00 % | 5.00 % |
| MI 3 | 50.00 % | 50.00 | 0–100 | 50.00 % | 10.00 % |
| MI 4 | 50.00 % | 100.00 | 0–100 | 100.00 % | 20.00 % |
| MI 5 | 20.00 % | 100.00 | 0–100 | 100.00 % | 20.00 % |
| CAT1 total | 40.00 % | 150.00 | 0–200 | 75.00 % | - |
| Course total | - | 350.00 | 0–500 | 70.00 % | - |
And I select "Student 2" from the "Select all or one user" singleselect # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| MI 1 | 33.33 % | 20.00 | 0–100 | 20.00 % | 6.67 % |
| MI 2 | 0.00 % | - | 0–100 | - | 0.00 % |
| MI 3 | 100.00 % | 10.00 | 0–100 | 10.00 % | 3.33 % |
| MI 4 | 0.00 % | - | 0–100 | - | 0.00 % |
| MI 5 | 33.33 % | 30.00 | 0–100 | 30.00 % | 10.00 % |
| CAT1 total | 33.33 % | 10.00 | 0–100 | 10.00 % | - |
| Course total | - | 60.00 | 0–300 | 20.00 % | - |
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the following settings for grade item "MI 1": # behat_hooks::i_look_for_exceptions()
| Maximum grade | 50.00 |
| Minimum grade | 5.00 |
| Rescale existing grades | No |
And I set the following settings for grade item "MI 3": # behat_hooks::i_look_for_exceptions()
| Maximum grade | 50.00 |
| Minimum grade | 5.00 |
| Rescale existing grades | No |
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I select "Student 1" from the "Select all or one user" singleselect # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| MI 1 | 12.50 % | 75.00 | 5–50 | 100.00 % | 18.75 % |
| MI 2 | 25.00 % | 25.00 | 0–100 | 25.00 % | 6.25 % |
| MI 3 | 33.33 % | 50.00 | 5–50 | 100.00 % | 12.50 % |
| MI 4 | 66.67 % | 100.00 | 0–100 | 100.00 % | 25.00 % |
| MI 5 | 25.00 % | 100.00 | 0–100 | 100.00 % | 25.00 % |
| CAT1 total | 37.50 % | 150.00 | 0–150 | 100.00 % | - |
| Course total | - | 350.00 | 0–400 | 87.50 % | - |
And I select "Student 2" from the "Select all or one user" singleselect # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| MI 1 | 25.00 % | 20.00 | 5–50 | 33.33 % | 10.00 % |
| MI 2 | 0.00 % | - | 0–100 | - | 0.00 % |
| MI 3 | 100.00 % | 10.00 | 5–50 | 11.11 % | 5.00 % |
| MI 4 | 0.00 % | - | 0–100 | - | 0.00 % |
| MI 5 | 50.00 % | 30.00 | 0–100 | 30.00 % | 15.00 % |
| CAT1 total | 25.00 % | 10.00 | 0–50 | 20.00 % | - |
| Course total | - | 60.00 | 0–200 | 30.00 % | - |
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the following settings for grade item "MI 5": # behat_hooks::i_look_for_exceptions()
| Maximum grade | 200.00 |
| Rescale existing grades | No |
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I select "Student 1" from the "Select all or one user" singleselect # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| MI 5 | 40.00 % | 150.00 | 0–200 | 75.00 % | 30.00 % |
| Course total | - | 400.00 | 0–500 | 80.00 % | - |
And I select "Student 2" from the "Select all or one user" singleselect # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| MI 5 | 66.67 % | 30.00 | 0–200 | 15.00 % | 10.00 % |
| Course total | - | 60.00 | 0–300 | 20.00 % | - |
And I go to "Setup > Course grade settings" in the course gradebook # behat_hooks::i_look_for_exceptions()
When I set the field "Min and max grades used in calculation" to "Initial min and max grades" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I select "Student 1" from the "Select all or one user" singleselect # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| MI 1 | 16.67 % | 75.00 | 0–100 | 75.00 % | 12.50 % |
| MI 2 | 16.67 % | 25.00 | 0–100 | 25.00 % | 4.17 % |
| MI 3 | 50.00 % | 50.00 | 0–100 | 50.00 % | 8.33 % |
| MI 4 | 50.00 % | 100.00 | 0–100 | 100.00 % | 16.67 % |
| MI 5 | 33.33 % | 150.00 | 0–200 | 75.00 % | 25.00 % |
| CAT1 total | 33.33 % | 150.00 | 0–200 | 75.00 % | - |
| Course total | - | 400.00 | 0–600 | 66.67 % | - |
And I select "Student 2" from the "Select all or one user" singleselect # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| MI 1 | 25.00 % | 20.00 | 0–100 | 20.00 % | 5.00 % |
| MI 2 | 0.00 % | - | 0–100 | - | 0.00 % |
| MI 3 | 100.00 % | 10.00 | 0–100 | 10.00 % | 2.50 % |
| MI 4 | 0.00 % | - | 0–100 | - | 0.00 % |
| MI 5 | 50.00 % | 30.00 | 0–200 | 15.00 % | 7.50 % |
| CAT1 total | 25.00 % | 10.00 | 0–100 | 10.00 % | - |
| Course total | - | 60.00 | 0–400 | 15.00 % | - |
@core @core_grades
Feature: Gradebook calculations for extra credit items before the fix 20150619
In order to make sure the grades are not changed after upgrade
As a teacher
I need to be able to freeze gradebook calculations
Background: # C:\Apache24\htdocs\integration\grade\tests\behat\grade_natural_exclude_empty_20150619.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And gradebook calculations for the course "C1" are frozen at version "20150619" # behat_hooks::i_look_for_exceptions()
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | t1 |
| student1 | Student | 1 | student1@example.com | s1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | course | idnumber | name | intro | grade |
| assign | C1 | a1 | Test assignment one | x | 100 |
| assign | C1 | a2 | Test assignment two | x | 50 |
| assign | C1 | a3 | Test assignment three | x | 200 |
| assign | C1 | a4 | Test assignment four (extra) | x | 20 |
| assign | C1 | a5 | Test assignment five (extra) | x | 10 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the following settings for grade item "Test assignment four (extra)": # behat_hooks::i_look_for_exceptions()
| Extra credit | 1 |
And I set the following settings for grade item "Test assignment five (extra)": # behat_hooks::i_look_for_exceptions()
| Extra credit | 1 |
@javascript
Scenario: No weights are overridden and student has all grades present (before the fix 20150619) # C:\Apache24\htdocs\integration\grade\tests\behat\grade_natural_exclude_empty_20150619.feature:36
When I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one" # behat_hooks::i_look_for_exceptions()
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two" # behat_hooks::i_look_for_exceptions()
And I give the grade "150.00" to the user "Student 1" for the grade item "Test assignment three" # behat_hooks::i_look_for_exceptions()
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" # behat_hooks::i_look_for_exceptions()
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Select all or one user" to "Student 1" # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| Test assignment one | 28.57 % | 80.00 | 0–100 | 80.00 % | 22.86 % |
| Test assignment two | 14.29 % | 30.00 | 0–50 | 60.00 % | 8.57 % |
| Test assignment three | 57.14 % | 150.00 | 0–200 | 75.00 % | 42.86 % |
| Test assignment four (extra) | 5.71 %( Extra credit ) | 10.00 | 0–20 | 50.00 % | 2.86 % |
| Test assignment five (extra) | 2.86 %( Extra credit ) | 8.00 | 0–10 | 80.00 % | 2.29 % |
| Course total | - | 278.00 | 0–350 | 79.43 % | - |
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: No weights are overridden, student has some grades present (before the fix 20150619) # C:\Apache24\htdocs\integration\grade\tests\behat\grade_natural_exclude_empty_20150619.feature:58
When I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one" # behat_hooks::i_look_for_exceptions()
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two" # behat_hooks::i_look_for_exceptions()
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" # behat_hooks::i_look_for_exceptions()
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Select all or one user" to "Student 1" # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| Test assignment one | 66.67 % | 80.00 | 0–100 | 80.00 % | 53.33 % |
| Test assignment two | 33.33 % | 30.00 | 0–50 | 60.00 % | 20.00 % |
| Test assignment three | 0.00 %( Empty ) | - | 0–200 | - | 0.00 % |
| Test assignment four (extra) | 13.33 %( Extra credit ) | 10.00 | 0–20 | 50.00 % | 6.67 % |
| Test assignment five (extra) | 6.67 %( Extra credit ) | 8.00 | 0–10 | 80.00 % | 5.33 % |
| Course total | - | 128.00 | 0–150 | 85.33 % | - |
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: No weights are overridden, student has none grades present except for extra credit (before the fix 20150619) # C:\Apache24\htdocs\integration\grade\tests\behat\grade_natural_exclude_empty_20150619.feature:79
When I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" # behat_hooks::i_look_for_exceptions()
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Select all or one user" to "Student 1" # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| Test assignment one | 0.00 %( Empty ) | - | 0–100 | - | 0.00 % |
| Test assignment two | 0.00 %( Empty ) | - | 0–50 | - | 0.00 % |
| Test assignment three | 0.00 %( Empty ) | - | 0–200 | - | 0.00 % |
| Test assignment four (extra) | 0.00 %( Extra credit ) | 10.00 | 0–20 | 50.00 % | 0.00 % |
| Test assignment five (extra) | 0.00 %( Extra credit ) | 8.00 | 0–10 | 80.00 % | 0.00 % |
| Course total | - | 0.00 | 0–0 | | - |
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Make sure there are no errors when all items are marked as extra credit (before the fix 20150619) # C:\Apache24\htdocs\integration\grade\tests\behat\grade_natural_exclude_empty_20150619.feature:98
And I set the following settings for grade item "Test assignment one": # behat_hooks::i_look_for_exceptions()
| Extra credit | 1 |
And I set the following settings for grade item "Test assignment two": # behat_hooks::i_look_for_exceptions()
| Extra credit | 1 |
And I set the following settings for grade item "Test assignment three": # behat_hooks::i_look_for_exceptions()
| Extra credit | 1 |
When I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one" # behat_hooks::i_look_for_exceptions()
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two" # behat_hooks::i_look_for_exceptions()
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" # behat_hooks::i_look_for_exceptions()
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Select all or one user" to "Student 1" # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| Test assignment one | 0.00 %( Extra credit ) | 80.00 | 0–100 | 80.00 % | 0.00 % |
| Test assignment two | 0.00 %( Extra credit ) | 30.00 | 0–50 | 60.00 % | 0.00 % |
| Test assignment three | 0.00 %( Empty ) | - | 0–200 | - | 0.00 % |
| Test assignment four (extra) | 0.00 %( Extra credit ) | 10.00 | 0–20 | 50.00 % | 0.00 % |
| Test assignment five (extra) | 0.00 %( Extra credit ) | 8.00 | 0–10 | 80.00 % | 0.00 % |
| Course total | - | 0.0 | 0–0 | | - |
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Weights are overridden and student has all grades present (before the fix 20150619) # C:\Apache24\htdocs\integration\grade\tests\behat\grade_natural_exclude_empty_20150619.feature:125
When I set the field "Override weight of Test assignment one" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment one" to "50" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
When I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one" # behat_hooks::i_look_for_exceptions()
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two" # behat_hooks::i_look_for_exceptions()
And I give the grade "150.00" to the user "Student 1" for the grade item "Test assignment three" # behat_hooks::i_look_for_exceptions()
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" # behat_hooks::i_look_for_exceptions()
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Select all or one user" to "Student 1" # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| Test assignment one | 50.00 % | 80.00 | 0–100 | 80.00 % | 40.00 % |
| Test assignment two | 10.00 % | 30.00 | 0–50 | 60.00 % | 6.00 % |
| Test assignment three | 40.00 % | 150.00 | 0–200 | 75.00 % | 30.00 % |
| Test assignment four (extra) | 4.00 %( Extra credit ) | 10.00 | 0–20 | 50.00 % | 2.00 % |
| Test assignment five (extra) | 2.00 %( Extra credit ) | 8.00 | 0–10 | 80.00 % | 1.60 % |
| Course total | - | 278.60 | 0–350 | 79.60 % | - |
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Weights are overridden and student has some grades present (before the fix 20150619) # C:\Apache24\htdocs\integration\grade\tests\behat\grade_natural_exclude_empty_20150619.feature:151
When I set the field "Override weight of Test assignment one" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment one" to "50" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
When I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one" # behat_hooks::i_look_for_exceptions()
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two" # behat_hooks::i_look_for_exceptions()
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" # behat_hooks::i_look_for_exceptions()
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Select all or one user" to "Student 1" # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| Test assignment one | 83.33 % | 80.00 | 0–100 | 80.00 % | 66.67 % |
| Test assignment two | 16.67 % | 30.00 | 0–50 | 60.00 % | 10.00 % |
| Test assignment three | 0.00 %( Empty ) | - | 0–200 | - | 0.00 % |
| Test assignment four (extra) | 6.67 %( Extra credit ) | 10.00 | 0–20 | 50.00 % | 3.33 % |
| Test assignment five (extra) | 3.33 %( Extra credit ) | 8.00 | 0–10 | 80.00 % | 2.67 % |
| Course total | - | 124.00 | 0–150 | 82.67 % | - |
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Weights are overridden, student has none grades present except for extra credit (before the fix 20150619) # C:\Apache24\htdocs\integration\grade\tests\behat\grade_natural_exclude_empty_20150619.feature:176
When I set the field "Override weight of Test assignment one" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment one" to "50" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
When I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" # behat_hooks::i_look_for_exceptions()
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Select all or one user" to "Student 1" # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| Test assignment one | 0.00 %( Empty ) | - | 0–100 | - | 0.00 % |
| Test assignment two | 0.00 %( Empty ) | - | 0–50 | - | 0.00 % |
| Test assignment three | 0.00 %( Empty ) | - | 0–200 | - | 0.00 % |
| Test assignment four (extra) | 0.00 %( Extra credit ) | 10.00 | 0–20 | 50.00 % | 0.00 % |
| Test assignment five (extra) | 0.00 %( Extra credit ) | 8.00 | 0–10 | 80.00 % | 0.00 % |
| Course total | - | 0.00 | 0–0 | | - |
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Weights are overridden, including extra credit, and student has all grades present (before the fix 20150619) # C:\Apache24\htdocs\integration\grade\tests\behat\grade_natural_exclude_empty_20150619.feature:198
When I set the field "Override weight of Test assignment one" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment one" to "50" # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Test assignment four (extra)" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment four (extra)" to "10" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
When I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one" # behat_hooks::i_look_for_exceptions()
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two" # behat_hooks::i_look_for_exceptions()
And I give the grade "150.00" to the user "Student 1" for the grade item "Test assignment three" # behat_hooks::i_look_for_exceptions()
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" # behat_hooks::i_look_for_exceptions()
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Select all or one user" to "Student 1" # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| Test assignment one | 50.00 % | 80.00 | 0–100 | 80.00 % | 40.00 % |
| Test assignment two | 8.70 % | 30.00 | 0–50 | 60.00 % | 5.22 % |
| Test assignment three | 34.78 % | 150.00 | 0–200 | 75.00 % | 26.09 % |
| Test assignment four (extra) | 10.00 %( Extra credit ) | 10.00 | 0–20 | 50.00 % | 5.00 % |
| Test assignment five (extra) | 1.74 %( Extra credit ) | 8.00 | 0–10 | 80.00 % | 1.39 % |
| Course total | - | 271.93 | 0–350 | 77.70 % | - |
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Weights are overridden, including extra credit, and student has some grades present (before the fix 20150619) # C:\Apache24\htdocs\integration\grade\tests\behat\grade_natural_exclude_empty_20150619.feature:226
When I set the field "Override weight of Test assignment one" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment one" to "50" # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Test assignment four (extra)" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment four (extra)" to "10" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one" # behat_hooks::i_look_for_exceptions()
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two" # behat_hooks::i_look_for_exceptions()
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" # behat_hooks::i_look_for_exceptions()
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Select all or one user" to "Student 1" # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| Test assignment one | 83.33 % | 80.00 | 0–100 | 80.00 % | 66.67 % |
| Test assignment two | 0.00 % | 30.00 | 0–50 | 60.00 % | 0.00 % |
| Test assignment three | 0.00 %( Empty ) | - | 0–200 | - | 0.00 % |
| Test assignment four (extra) | 16.67 %( Extra credit ) | 10.00 | 0–20 | 50.00 % | 8.33 % |
| Test assignment five (extra) | 0.00 %( Extra credit ) | 8.00 | 0–10 | 80.00 % | 0.00 % |
| Course total | - | 112.50 | 0–150 | 75.00 % | - |
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Weights are overridden, including extra credit, student has none grades present except for extra credit (before the fix 20150619) # C:\Apache24\htdocs\integration\grade\tests\behat\grade_natural_exclude_empty_20150619.feature:253
When I set the field "Override weight of Test assignment one" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment one" to "50" # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Test assignment four (extra)" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment four (extra)" to "10" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
When I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" # behat_hooks::i_look_for_exceptions()
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Select all or one user" to "Student 1" # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| Test assignment one | 0.00 %( Empty ) | - | 0–100 | - | 0.00 % |
| Test assignment two | 0.00 %( Empty ) | - | 0–50 | - | 0.00 % |
| Test assignment three | 0.00 %( Empty ) | - | 0–200 | - | 0.00 % |
| Test assignment four (extra) | 0.00 %( Extra credit ) | 10.00 | 0–20 | 50.00 % | 0.00 % |
| Test assignment five (extra) | 0.00 %( Extra credit ) | 8.00 | 0–10 | 80.00 % | 0.00 % |
| Course total | - | 0.00 | 0–0 | | - |
And I log out # behat_hooks::i_look_for_exceptions()
@core @core_grades
Feature: Weights in natural aggregation are adjusted if the items are excluded from user report
In order to correctly display user report
As a teacher
I need to be able to exclude hidden grades.
Background: # C:\Apache24\htdocs\integration\grade\tests\behat\grade_natural_exclude_empty.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | t1 |
| student1 | Student | 1 | student1@example.com | s1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | course | idnumber | name | intro | grade |
| assign | C1 | a1 | Test assignment one | x | 100 |
| assign | C1 | a2 | Test assignment two | x | 50 |
| assign | C1 | a3 | Test assignment three | x | 200 |
| assign | C1 | a4 | Test assignment four (extra) | x | 20 |
| assign | C1 | a5 | Test assignment five (extra) | x | 10 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the following settings for grade item "Test assignment four (extra)": # behat_hooks::i_look_for_exceptions()
| Extra credit | 1 |
And I set the following settings for grade item "Test assignment five (extra)": # behat_hooks::i_look_for_exceptions()
| Extra credit | 1 |
@javascript
Scenario: No weights are overridden and student has all grades present # C:\Apache24\htdocs\integration\grade\tests\behat\grade_natural_exclude_empty.feature:35
When I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one" # behat_hooks::i_look_for_exceptions()
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two" # behat_hooks::i_look_for_exceptions()
And I give the grade "150.00" to the user "Student 1" for the grade item "Test assignment three" # behat_hooks::i_look_for_exceptions()
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" # behat_hooks::i_look_for_exceptions()
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Select all or one user" to "Student 1" # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| Test assignment one | 28.57 % | 80.00 | 0–100 | 80.00 % | 22.86 % |
| Test assignment two | 14.29 % | 30.00 | 0–50 | 60.00 % | 8.57 % |
| Test assignment three | 57.14 % | 150.00 | 0–200 | 75.00 % | 42.86 % |
| Test assignment four (extra) | 5.71 %( Extra credit ) | 10.00 | 0–20 | 50.00 % | 2.86 % |
| Test assignment five (extra) | 2.86 %( Extra credit ) | 8.00 | 0–10 | 80.00 % | 2.29 % |
| Course total | - | 278.00 | 0–350 | 79.43 % | - |
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: No weights are overridden, student has some grades present # C:\Apache24\htdocs\integration\grade\tests\behat\grade_natural_exclude_empty.feature:57
When I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one" # behat_hooks::i_look_for_exceptions()
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two" # behat_hooks::i_look_for_exceptions()
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" # behat_hooks::i_look_for_exceptions()
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Select all or one user" to "Student 1" # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| Test assignment one | 66.67 % | 80.00 | 0–100 | 80.00 % | 53.33 % |
| Test assignment two | 33.33 % | 30.00 | 0–50 | 60.00 % | 20.00 % |
| Test assignment three | 0.00 %( Empty ) | - | 0–200 | - | 0.00 % |
| Test assignment four (extra) | 13.33 %( Extra credit ) | 10.00 | 0–20 | 50.00 % | 6.67 % |
| Test assignment five (extra) | 6.67 %( Extra credit ) | 8.00 | 0–10 | 80.00 % | 5.33 % |
| Course total | - | 128.00 | 0–150 | 85.33 % | - |
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: No weights are overridden, student has none grades present except for extra credit # C:\Apache24\htdocs\integration\grade\tests\behat\grade_natural_exclude_empty.feature:78
When I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" # behat_hooks::i_look_for_exceptions()
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Select all or one user" to "Student 1" # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| Test assignment one | 0.00 %( Empty ) | - | 0–100 | - | 0.00 % |
| Test assignment two | 0.00 %( Empty ) | - | 0–50 | - | 0.00 % |
| Test assignment three | 0.00 %( Empty ) | - | 0–200 | - | 0.00 % |
| Test assignment four (extra) | 0.00 %( Extra credit ) | 10.00 | 0–20 | 50.00 % | 0.00 % |
| Test assignment five (extra) | 0.00 %( Extra credit ) | 8.00 | 0–10 | 80.00 % | 0.00 % |
| Course total | - | 0.00 | 0–0 | | - |
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Make sure there are no errors when all items are marked as extra credit # C:\Apache24\htdocs\integration\grade\tests\behat\grade_natural_exclude_empty.feature:97
And I set the following settings for grade item "Test assignment one": # behat_hooks::i_look_for_exceptions()
| Extra credit | 1 |
And I set the following settings for grade item "Test assignment two": # behat_hooks::i_look_for_exceptions()
| Extra credit | 1 |
And I set the following settings for grade item "Test assignment three": # behat_hooks::i_look_for_exceptions()
| Extra credit | 1 |
When I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one" # behat_hooks::i_look_for_exceptions()
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two" # behat_hooks::i_look_for_exceptions()
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" # behat_hooks::i_look_for_exceptions()
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Select all or one user" to "Student 1" # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| Test assignment one | 0.00 %( Extra credit ) | 80.00 | 0–100 | 80.00 % | 0.00 % |
| Test assignment two | 0.00 %( Extra credit ) | 30.00 | 0–50 | 60.00 % | 0.00 % |
| Test assignment three | 0.00 %( Empty ) | - | 0–200 | - | 0.00 % |
| Test assignment four (extra) | 0.00 %( Extra credit ) | 10.00 | 0–20 | 50.00 % | 0.00 % |
| Test assignment five (extra) | 0.00 %( Extra credit ) | 8.00 | 0–10 | 80.00 % | 0.00 % |
| Course total | - | 0.0 | 0–0 | | - |
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Weights are overridden and student has all grades present # C:\Apache24\htdocs\integration\grade\tests\behat\grade_natural_exclude_empty.feature:124
When I set the field "Override weight of Test assignment one" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment one" to "50" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one" # behat_hooks::i_look_for_exceptions()
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two" # behat_hooks::i_look_for_exceptions()
And I give the grade "150.00" to the user "Student 1" for the grade item "Test assignment three" # behat_hooks::i_look_for_exceptions()
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" # behat_hooks::i_look_for_exceptions()
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Select all or one user" to "Student 1" # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| Test assignment one | 50.00 % | 80.00 | 0–100 | 80.00 % | 40.00 % |
| Test assignment two | 10.00 % | 30.00 | 0–50 | 60.00 % | 6.00 % |
| Test assignment three | 40.00 % | 150.00 | 0–200 | 75.00 % | 30.00 % |
| Test assignment four (extra) | 5.71 %( Extra credit ) | 10.00 | 0–20 | 50.00 % | 2.86 % |
| Test assignment five (extra) | 2.86 %( Extra credit ) | 8.00 | 0–10 | 80.00 % | 2.29 % |
| Course total | - | 284.00 | 0–350 | 81.14 % | - |
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Weights are overridden and student has some grades present # C:\Apache24\htdocs\integration\grade\tests\behat\grade_natural_exclude_empty.feature:149
When I set the field "Override weight of Test assignment one" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment one" to "50" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one" # behat_hooks::i_look_for_exceptions()
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two" # behat_hooks::i_look_for_exceptions()
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" # behat_hooks::i_look_for_exceptions()
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Select all or one user" to "Student 1" # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| Test assignment one | 83.33 % | 80.00 | 0–100 | 80.00 % | 66.67 % |
| Test assignment two | 16.67 % | 30.00 | 0–50 | 60.00 % | 10.00 % |
| Test assignment three | 0.00 %( Empty ) | - | 0–200 | - | 0.00 % |
| Test assignment four (extra) | 13.33 %( Extra credit ) | 10.00 | 0–20 | 50.00 % | 6.67 % |
| Test assignment five (extra) | 6.67 %( Extra credit ) | 8.00 | 0–10 | 80.00 % | 5.33 % |
| Course total | - | 133.00 | 0–150 | 88.67 % | - |
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Weights are overridden, student has none grades present except for extra credit # C:\Apache24\htdocs\integration\grade\tests\behat\grade_natural_exclude_empty.feature:173
When I set the field "Override weight of Test assignment one" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment one" to "50" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" # behat_hooks::i_look_for_exceptions()
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Select all or one user" to "Student 1" # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| Test assignment one | 0.00 %( Empty ) | - | 0–100 | - | 0.00 % |
| Test assignment two | 0.00 %( Empty ) | - | 0–50 | - | 0.00 % |
| Test assignment three | 0.00 %( Empty ) | - | 0–200 | - | 0.00 % |
| Test assignment four (extra) | 0.00 %( Extra credit ) | 10.00 | 0–20 | 50.00 % | 0.00 % |
| Test assignment five (extra) | 0.00 %( Extra credit ) | 8.00 | 0–10 | 80.00 % | 0.00 % |
| Course total | - | 0.00 | 0–0 | | - |
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Weights are overridden, including extra credit, and student has all grades present # C:\Apache24\htdocs\integration\grade\tests\behat\grade_natural_exclude_empty.feature:195
When I set the field "Override weight of Test assignment one" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment one" to "50" # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Test assignment four (extra)" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment four (extra)" to "10" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one" # behat_hooks::i_look_for_exceptions()
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two" # behat_hooks::i_look_for_exceptions()
And I give the grade "150.00" to the user "Student 1" for the grade item "Test assignment three" # behat_hooks::i_look_for_exceptions()
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" # behat_hooks::i_look_for_exceptions()
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Select all or one user" to "Student 1" # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| Test assignment one | 50.00 % | 80.00 | 0–100 | 80.00 % | 40.00 % |
| Test assignment two | 10.00 % | 30.00 | 0–50 | 60.00 % | 6.00 % |
| Test assignment three | 40.00 % | 150.00 | 0–200 | 75.00 % | 30.00 % |
| Test assignment four (extra) | 10.00 %( Extra credit ) | 10.00 | 0–20 | 50.00 % | 5.00 % |
| Test assignment five (extra) | 2.86 %( Extra credit ) | 8.00 | 0–10 | 80.00 % | 2.29 % |
| Course total | - | 291.50 | 0–350 | 83.29 % | - |
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Weights are overridden, including extra credit, and student has some grades present # C:\Apache24\htdocs\integration\grade\tests\behat\grade_natural_exclude_empty.feature:222
When I set the field "Override weight of Test assignment one" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment one" to "50" # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Test assignment four (extra)" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment four (extra)" to "10" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment one" # behat_hooks::i_look_for_exceptions()
And I give the grade "30.00" to the user "Student 1" for the grade item "Test assignment two" # behat_hooks::i_look_for_exceptions()
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" # behat_hooks::i_look_for_exceptions()
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Select all or one user" to "Student 1" # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| Test assignment one | 83.33 % | 80.00 | 0–100 | 80.00 % | 66.67 % |
| Test assignment two | 16.67 % | 30.00 | 0–50 | 60.00 % | 10.00 % |
| Test assignment three | 0.00 %( Empty ) | - | 0–200 | - | 0.00 % |
| Test assignment four (extra) | 16.67 %( Extra credit ) | 10.00 | 0–20 | 50.00 % | 8.33 % |
| Test assignment five (extra) | 6.67 %( Extra credit ) | 8.00 | 0–10 | 80.00 % | 5.33 % |
| Course total | - | 135.50 | 0–150 | 90.33 % | - |
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Weights are overridden, including extra credit, student has none grades present except for extra credit # C:\Apache24\htdocs\integration\grade\tests\behat\grade_natural_exclude_empty.feature:248
When I set the field "Override weight of Test assignment one" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment one" to "50" # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Test assignment four (extra)" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment four (extra)" to "10" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "10.00" to the user "Student 1" for the grade item "Test assignment four (extra)" # behat_hooks::i_look_for_exceptions()
And I give the grade "8.00" to the user "Student 1" for the grade item "Test assignment five (extra)" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Select all or one user" to "Student 1" # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage | Contribution to course total |
| Test assignment one | 0.00 %( Empty ) | - | 0–100 | - | 0.00 % |
| Test assignment two | 0.00 %( Empty ) | - | 0–50 | - | 0.00 % |
| Test assignment three | 0.00 %( Empty ) | - | 0–200 | - | 0.00 % |
| Test assignment four (extra) | 0.00 %( Extra credit ) | 10.00 | 0–20 | 50.00 % | 0.00 % |
| Test assignment five (extra) | 0.00 %( Extra credit ) | 8.00 | 0–10 | 80.00 % | 0.00 % |
| Course total | - | 0.00 | 0–0 | | - |
And I log out # behat_hooks::i_look_for_exceptions()
@core @core_grades
Feature: Gradebook calculations for natural weights normalisation before the fix 20150619
In order to make sure the grades are not changed after upgrade
As a teacher
I need to be able to freeze gradebook calculations
Background: # C:\Apache24\htdocs\integration\grade\tests\behat\grade_natural_normalisation_20150619.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And gradebook calculations for the course "C1" are frozen at version "20150619" # behat_hooks::i_look_for_exceptions()
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | t1 |
| student1 | Student | 1 | student1@example.com | s1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "grade categories" exist: # behat_hooks::i_look_for_exceptions()
| fullname | course |
| Sub category 1 | C1 |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | course | idnumber | name | intro | grade |
| assign | C1 | a1 | Test assignment one | Submit something! | 300 |
| assign | C1 | a2 | Test assignment two | Submit something! | 100 |
| assign | C1 | a3 | Test assignment three | Submit something! | 150 |
| assign | C1 | a4 | Test assignment four | Submit nothing! | 150 |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | course | idnumber | name | intro | gradecategory | grade |
| assign | C1 | a5 | Test assignment five | Submit something! | Sub category 1 | 20 |
| assign | C1 | a6 | Test assignment six | Submit something! | Sub category 1 | 10 |
| assign | C1 | a7 | Test assignment seven | Submit nothing! | Sub category 1 | 15 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Grade items weights are normalised when all grade item weights are overridden (sum exactly 100). Extra credit is set to zero (before the fix 20150619). # C:\Apache24\htdocs\integration\grade\tests\behat\grade_natural_normalisation_20150619.feature:39
When I set the following settings for grade item "Test assignment seven": # behat_hooks::i_look_for_exceptions()
| Extra credit | 1 |
And the field "Weight of Test assignment five" matches value "66.667" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment six" matches value "33.333" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment seven" matches value "50.0" # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Test assignment five" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Test assignment six" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment five" to "60" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment six" to "40" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Your weights have been adjusted to total 100." # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment five" matches value "60.000" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment six" matches value "40.000" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment seven" matches value "0.0" # behat_hooks::i_look_for_exceptions()
And I reset weights for grade category "Sub category 1" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment five" matches value "66.667" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment six" matches value "33.333" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment seven" matches value "50.0" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Grade items weights are normalised when all grade item weights are overridden (sum over 100). Extra credit is set to zero (before the fix 20150619). # C:\Apache24\htdocs\integration\grade\tests\behat\grade_natural_normalisation_20150619.feature:62
When I set the following settings for grade item "Test assignment seven": # behat_hooks::i_look_for_exceptions()
| Extra credit | 1 |
And I set the field "Override weight of Test assignment five" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Test assignment six" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment five" to "60" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment six" to "50" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Your weights have been adjusted to total 100." # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment five" matches value "54.545" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment six" matches value "45.455" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment seven" matches value "0.0" # behat_hooks::i_look_for_exceptions()
And I reset weights for grade category "Sub category 1" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment five" matches value "66.667" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment six" matches value "33.333" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment seven" matches value "50.0" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Grade items weights are normalised when all grade item weights are overridden (sum under 100). Extra credit is set to zero (before the fix 20150619). # C:\Apache24\htdocs\integration\grade\tests\behat\grade_natural_normalisation_20150619.feature:82
When I set the following settings for grade item "Test assignment seven": # behat_hooks::i_look_for_exceptions()
| Extra credit | 1 |
And I set the field "Override weight of Test assignment five" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Test assignment six" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment five" to "40" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment six" to "30" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Your weights have been adjusted to total 100." # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment five" matches value "57.143" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment six" matches value "42.857" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment seven" matches value "0.0" # behat_hooks::i_look_for_exceptions()
And I reset weights for grade category "Sub category 1" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment five" matches value "66.667" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment six" matches value "33.333" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment seven" matches value "50.0" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Grade items weights are normalised when not all grade item weights are overridden. Extra credit is set respectful to non-overridden items (before the fix 20150619). # C:\Apache24\htdocs\integration\grade\tests\behat\grade_natural_normalisation_20150619.feature:102
When I set the following settings for grade item "Test assignment seven": # behat_hooks::i_look_for_exceptions()
| Extra credit | 1 |
And I set the field "Override weight of Test assignment five" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment five" to "40" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Your weights have been adjusted to total 100." # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment five" matches value "40.00" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment six" matches value "60.000" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment seven" matches value "90.0" # behat_hooks::i_look_for_exceptions()
And I reset weights for grade category "Sub category 1" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment five" matches value "66.667" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment six" matches value "33.333" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment seven" matches value "50.0" # behat_hooks::i_look_for_exceptions()
@core @core_grades
Feature: We can use natural aggregation and weights will be normalised to a total of one hundred
In order to override weights
As a teacher
I need to add assessments to the gradebook.
Background: # C:\Apache24\htdocs\integration\grade\tests\behat\grade_natural_normalisation.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | t1 |
| student1 | Student | 1 | student1@example.com | s1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "grade categories" exist: # behat_hooks::i_look_for_exceptions()
| fullname | course |
| Sub category 1 | C1 |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | course | idnumber | name | intro | grade |
| assign | C1 | a1 | Test assignment one | Submit something! | 300 |
| assign | C1 | a2 | Test assignment two | Submit something! | 100 |
| assign | C1 | a3 | Test assignment three | Submit something! | 150 |
| assign | C1 | a4 | Test assignment four | Submit nothing! | 150 |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | course | idnumber | name | intro | gradecategory | grade |
| assign | C1 | a5 | Test assignment five | Submit something! | Sub category 1 | 20 |
| assign | C1 | a6 | Test assignment six | Submit something! | Sub category 1 | 10 |
| assign | C1 | a7 | Test assignment seven | Submit nothing! | Sub category 1 | 15 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Setting all weights in a category to exactly one hundred in total. # C:\Apache24\htdocs\integration\grade\tests\behat\grade_natural_normalisation.feature:38
And the field "Weight of Test assignment five" matches value "44.444" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment six" matches value "22.222" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment seven" matches value "33.333" # behat_hooks::i_look_for_exceptions()
When I set the field "Override weight of Test assignment five" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Test assignment six" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Test assignment seven" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment five" to "30" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment six" to "50" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment seven" to "20" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should not see "Your weights have been adjusted to total 100." # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment five" matches value "30.0" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment six" matches value "50.0" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment seven" matches value "20.0" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Setting all weights in a category to less than one hundred is normalised. # C:\Apache24\htdocs\integration\grade\tests\behat\grade_natural_normalisation.feature:57
When I set the field "Override weight of Test assignment five" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Test assignment six" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Test assignment seven" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment five" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment six" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment seven" to "2" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Your weights have been adjusted to total 100." # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment five" matches value "25.0" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment six" matches value "25.0" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment seven" matches value "50.0" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Set one of the grade item weights to a figure over one hundred. # C:\Apache24\htdocs\integration\grade\tests\behat\grade_natural_normalisation.feature:73
When I set the field "Override weight of Test assignment five" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment five" to "120" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Your weights have been adjusted to total 100." # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment five" matches value "100.0" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment six" matches value "0.0" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment seven" matches value "0.0" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Setting several but not all grade item weights to over one hundred each. # C:\Apache24\htdocs\integration\grade\tests\behat\grade_natural_normalisation.feature:85
When I set the field "Override weight of Test assignment five" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Test assignment six" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment five" to "150" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment six" to "150" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Your weights have been adjusted to total 100." # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment five" matches value "50.000" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment six" matches value "50.000" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment seven" matches value "0.0" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Grade items weights are not normalised when all grade item weights are overridden (sum exactly 100). Extra credit is set respectful to number of items. # C:\Apache24\htdocs\integration\grade\tests\behat\grade_natural_normalisation.feature:99
When I set the following settings for grade item "Test assignment seven": # behat_hooks::i_look_for_exceptions()
| Extra credit | 1 |
And the field "Weight of Test assignment five" matches value "66.667" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment six" matches value "33.333" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment seven" matches value "50.0" # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Test assignment five" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Test assignment six" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment five" to "60" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment six" to "40" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should not see "Your weights have been adjusted to total 100." # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment five" matches value "60.000" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment six" matches value "40.000" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment seven" matches value "50.0" # behat_hooks::i_look_for_exceptions()
And I reset weights for grade category "Sub category 1" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment five" matches value "66.667" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment six" matches value "33.333" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment seven" matches value "50.0" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Grade items weights are normalised when all grade item weights are overridden (sum over 100). Extra credit is set respectful to number of items. # C:\Apache24\htdocs\integration\grade\tests\behat\grade_natural_normalisation.feature:122
When I set the following settings for grade item "Test assignment seven": # behat_hooks::i_look_for_exceptions()
| Extra credit | 1 |
And I set the field "Override weight of Test assignment five" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Test assignment six" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment five" to "60" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment six" to "50" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Your weights have been adjusted to total 100." # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment five" matches value "54.545" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment six" matches value "45.455" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment seven" matches value "50.0" # behat_hooks::i_look_for_exceptions()
And I reset weights for grade category "Sub category 1" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment five" matches value "66.667" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment six" matches value "33.333" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment seven" matches value "50.0" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Grade items weights are normalised when all grade item weights are overridden (sum under 100). Extra credit is set respectful to number of items. # C:\Apache24\htdocs\integration\grade\tests\behat\grade_natural_normalisation.feature:142
When I set the following settings for grade item "Test assignment seven": # behat_hooks::i_look_for_exceptions()
| Extra credit | 1 |
And I set the field "Override weight of Test assignment five" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Test assignment six" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment five" to "40" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment six" to "30" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Your weights have been adjusted to total 100." # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment five" matches value "57.143" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment six" matches value "42.857" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment seven" matches value "50.0" # behat_hooks::i_look_for_exceptions()
And I reset weights for grade category "Sub category 1" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment five" matches value "66.667" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment six" matches value "33.333" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment seven" matches value "50.0" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Grade items weights are normalised when not all grade item weights are overridden. Extra credit is set respectful to number of items. # C:\Apache24\htdocs\integration\grade\tests\behat\grade_natural_normalisation.feature:162
When I set the following settings for grade item "Test assignment seven": # behat_hooks::i_look_for_exceptions()
| Extra credit | 1 |
And I set the field "Override weight of Test assignment five" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment five" to "40" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Your weights have been adjusted to total 100." # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment five" matches value "40.00" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment six" matches value "60.000" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment seven" matches value "50.0" # behat_hooks::i_look_for_exceptions()
And I reset weights for grade category "Sub category 1" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment five" matches value "66.667" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment six" matches value "33.333" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment seven" matches value "50.0" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: The extra credit grade item weight is overridden to a figure over one hundred and then # C:\Apache24\htdocs\integration\grade\tests\behat\grade_natural_normalisation.feature:180
the grade item is set to normal.
When I set the following settings for grade item "Test assignment seven": # behat_hooks::i_look_for_exceptions()
| Extra credit | 1 |
And I set the field "Override weight of Test assignment seven" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment seven" to "105" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should not see "Your weights have been adjusted to total 100." # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment five" matches value "66.667" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment six" matches value "33.333" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment seven" matches value "105.0" # behat_hooks::i_look_for_exceptions()
When I set the following settings for grade item "Test assignment seven": # behat_hooks::i_look_for_exceptions()
| Extra credit | 0 |
And I should see "Your weights have been adjusted to total 100." # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment five" matches value "0.0" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment six" matches value "0.0" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment seven" matches value "100.0" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: The extra credit grade item weight is overridden to a figure over one hundred and then # C:\Apache24\htdocs\integration\grade\tests\behat\grade_natural_normalisation.feature:201
the grade category is reset.
When I set the following settings for grade item "Test assignment seven": # behat_hooks::i_look_for_exceptions()
| Extra credit | 1 |
And I set the field "Override weight of Test assignment seven" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment seven" to "105" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I reset weights for grade category "Sub category 1" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment five" matches value "66.667" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment six" matches value "33.333" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment seven" matches value "50.0" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Two out of three grade items weights are overridden and one is not. # C:\Apache24\htdocs\integration\grade\tests\behat\grade_natural_normalisation.feature:216
The overridden grade item weights total over one hundred.
Given I set the field "Override weight of Test assignment six" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Test assignment seven" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment six" to "55" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment seven" to "65" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "Your weights have been adjusted to total 100." # behat_hooks::i_look_for_exceptions()
Then the field "Weight of Test assignment five" matches value "0.0" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment six" matches value "45.833" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment seven" matches value "54.167" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: With one grade item set as extra credit, when I reset the weights for a category they return to the natural weights. # C:\Apache24\htdocs\integration\grade\tests\behat\grade_natural_normalisation.feature:231
When I set the following settings for grade item "Test assignment five": # behat_hooks::i_look_for_exceptions()
| Extra credit | 1 |
And I set the field "Override weight of Test assignment six" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Test assignment seven" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment six" to "55" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment seven" to "40" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I reset weights for grade category "Sub category 1" # behat_hooks::i_look_for_exceptions()
Then the field "Weight of Test assignment five" matches value "80.0" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment six" matches value "40.0" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment seven" matches value "60.0" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Overriding a grade item with a negative value results in the value being changed to zero. # C:\Apache24\htdocs\integration\grade\tests\behat\grade_natural_normalisation.feature:246
When I set the field "Override weight of Test assignment five" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment five" to "-15" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then the field "Weight of Test assignment five" matches value "0.0" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment six" matches value "40.0" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment seven" matches value "60.0" # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Test assignment six" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment six" to "-25" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment six" matches value "0.0" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment seven" matches value "100.0" # behat_hooks::i_look_for_exceptions()
And I reset weights for grade category "Sub category 1" # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Test assignment five" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Test assignment six" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment five" to "-10" # behat_hooks::i_look_for_exceptions()
And I set the field "Weight of Test assignment six" to "120" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment five" matches value "0.0" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment six" matches value "100.0" # behat_hooks::i_look_for_exceptions()
And the field "Weight of Test assignment seven" matches value "0.0" # behat_hooks::i_look_for_exceptions()
@core @core_grades
Feature: Grade letters can be overridden
In order to test the grade letters functionality
As a teacher I override site defaults
and alter the grade letters
Background: # C:\Apache24\htdocs\integration\grade\tests\behat\grade_override_letter.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname |
| Course 1 | C1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | t1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "Letters > Edit" in the course gradebook # behat_hooks::i_look_for_exceptions()
Scenario Outline: Grade letters can be completely overridden # C:\Apache24\htdocs\integration\grade\tests\behat\grade_override_letter.feature:21
When I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| override | 1 |
| Grade letter 1 | |
| gradeboundary1 | |
| Grade letter 2 | |
| gradeboundary2 | |
| Grade letter 3 | |
| gradeboundary3 | |
| Grade letter 4 | |
| gradeboundary4 | |
| Grade letter 5 | |
| gradeboundary5 | |
| Grade letter 6 | |
| gradeboundary6 | |
| Grade letter 7 | |
| gradeboundary7 | |
| Grade letter 8 | |
| gradeboundary8 | |
| Grade letter 9 | |
| gradeboundary9 | |
| Grade letter 10 | |
| gradeboundary10 | |
| Grade letter 11 | |
| gradeboundary11 | |
| Grade letter 12 | |
| gradeboundary12 | |
| Grade letter 13 | |
| gradeboundary13 | |
| Grade letter 14 | |
| gradeboundary14 | |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "The default grade letters are currently overridden." # behat_hooks::i_look_for_exceptions()
And the following should exist in the "grade-letters-view" table: # behat_hooks::i_look_for_exceptions()
| Highest | Lowest | Letter |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
Examples:
| l1 | b1 | l2 | b2 | l3 | b3 | l4 | b4 | l5 | b5 | l6 | b6 | l7 | b7 | l8 | b8 | l9 | b9 | high1 | low1 | letter1 | high2 | low2 | letter2 | high3 | low3 | letter3 | high4 | low4 | letter4 | high5 | low5 | letter5 | high6 | low6 | letter6 |
| Z | 95 | Y | 85 | X | 75 | W | 65 | V | 55 | U | 45 | | | | | | | 100.00 % | 95.00 % | Z | 94.99 % | 85.00 % | Y | 84.99 % | 75.00 % | X | 74.99 % | 65.00 % | W | 64.99 % | 55.00 % | V | 54.99 % | 45.00 % | U |
| 5 | 100 | 4 | 80 | 3 | 60 | 2 | 40 | 1 | 20 | 0 | 0 | | | | | | | 100.00 % | 100.00 % | 5 | 99.99 % | 80.00 % | 4 | 79.99 % | 60.00 % | 3 | 59.99 % | 40.00 % | 2 | 39.99 % | 20.00 % | 1 | 19.99 % | 0.00 % | 0 |
| A | 95.25 | B | 76.75 | C | 50.01 | D | 40 | F | 0.01 | F- | 0 | | | | | | | 100.00 % | 95.25 % | A | 95.24 % | 76.75 % | B | 76.74 % | 50.01 % | C | 50.00 % | 40.00 % | D | 39.99 % | 0.01 % | F | 0.00 % | 0.00 % | F- |
| | | | | | | A | 95.25 | B | 76.75 | C | 50.01 | D | 40 | F | 0.01 | F- | 0 | 100.00 % | 95.25 % | A | 95.24 % | 76.75 % | B | 76.74 % | 50.01 % | C | 50.00 % | 40.00 % | D | 39.99 % | 0.01 % | F | 0.00 % | 0.00 % | F- |
| | | A | 95.25 | B | 76.75 | C | 50.01 | | | | | D | 40 | F | 0.01 | F- | 0 | 100.00 % | 95.25 % | A | 95.24 % | 76.75 % | B | 76.74 % | 50.01 % | C | 50.00 % | 40.00 % | D | 39.99 % | 0.01 % | F | 0.00 % | 0.00 % | F- |
Scenario: I delete a grade letter # C:\Apache24\htdocs\integration\grade\tests\behat\grade_override_letter.feature:71
Given I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| override | 1 |
| Grade letter 1 | A |
| gradeboundary1 | 90 |
| Grade letter 2 | B |
| gradeboundary2 | 80 |
| Grade letter 3 | C |
| gradeboundary3 | 50 |
| Grade letter 4 | D |
| gradeboundary4 | 40 |
| Grade letter 5 | E |
| gradeboundary5 | 20 |
| Grade letter 6 | F |
| gradeboundary6 | 0 |
| Grade letter 7 | |
| gradeboundary7 | |
| Grade letter 8 | |
| gradeboundary8 | |
| Grade letter 9 | |
| gradeboundary9 | |
| Grade letter 10 | |
| gradeboundary10 | |
| Grade letter 11 | |
| gradeboundary11 | |
| Grade letter 12 | |
| gradeboundary12 | |
| Grade letter 13 | |
| gradeboundary13 | |
| Grade letter 14 | |
| gradeboundary14 | |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "The default grade letters are currently overridden." # behat_hooks::i_look_for_exceptions()
And the following should exist in the "grade-letters-view" table: # behat_hooks::i_look_for_exceptions()
| Highest | Lowest | Letter |
| 100.00 % | 90.00 % | A |
| 89.99 % | 80.00 % | B |
| 79.99 % | 50.00 % | C |
| 49.99 % | 40.00 % | D |
| 39.99 % | 20.00 % | E |
| 19.99 % | 0.00 % | F |
When I follow "Edit grade letters" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| override | 1 |
| Grade letter 1 | A |
| gradeboundary1 | 90 |
| Grade letter 2 | B |
| gradeboundary2 | 80 |
| Grade letter 3 | C |
| gradeboundary3 | 50 |
| Grade letter 4 | D |
| gradeboundary4 | 40 |
| Grade letter 5 | |
| gradeboundary5 | |
| Grade letter 6 | F |
| gradeboundary6 | 0 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "The default grade letters are currently overridden." # behat_hooks::i_look_for_exceptions()
And the following should exist in the "grade-letters-view" table: # behat_hooks::i_look_for_exceptions()
| Highest | Lowest | Letter |
| 100.00 % | 90.00 % | A |
| 89.99 % | 80.00 % | B |
| 79.99 % | 50.00 % | C |
| 49.99 % | 40.00 % | D |
| 39.99 % | 0.00 % | F |
Scenario: I override grade letters for a second time # C:\Apache24\htdocs\integration\grade\tests\behat\grade_override_letter.feature:137
Given I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| override | 1 |
| Grade letter 1 | A+ |
| gradeboundary1 | 90 |
| Grade letter 2 | A |
| gradeboundary2 | 80 |
| Grade letter 3 | B+ |
| gradeboundary3 | 70 |
| Grade letter 4 | B |
| gradeboundary4 | 60 |
| Grade letter 5 | C |
| gradeboundary5 | 50 |
| Grade letter 6 | D |
| gradeboundary6 | 40 |
| Grade letter 7 | F |
| gradeboundary7 | 0 |
| Grade letter 8 | |
| gradeboundary8 | |
| Grade letter 9 | |
| gradeboundary9 | |
| Grade letter 10 | |
| gradeboundary10 | |
| Grade letter 11 | |
| gradeboundary11 | |
| Grade letter 12 | |
| gradeboundary12 | |
| Grade letter 13 | |
| gradeboundary13 | |
| Grade letter 14 | |
| gradeboundary14 | |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "The default grade letters are currently overridden." # behat_hooks::i_look_for_exceptions()
And the following should exist in the "grade-letters-view" table: # behat_hooks::i_look_for_exceptions()
| Highest | Lowest | Letter |
| 100.00 % | 90.00 % | A+ |
| 89.99 % | 80.00 % | A |
| 79.99 % | 70.00 % | B+ |
| 69.99 % | 60.00 % | B |
| 59.99 % | 50.00 % | C |
| 49.99 % | 40.00 % | D |
| 39.99 % | 0.00 % | F |
When I follow "Edit grade letters" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| override | 1 |
| Grade letter 1 | α |
| gradeboundary1 | 95 |
| Grade letter 2 | β |
| gradeboundary2 | 85 |
| Grade letter 3 | γ |
| gradeboundary3 | 70 |
| Grade letter 4 | δ |
| gradeboundary4 | 55 |
| Grade letter 5 | |
| gradeboundary5 | |
| Grade letter 6 | Ω |
| gradeboundary6 | 0 |
| Grade letter 7 | π |
| gradeboundary7 | 90 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "The default grade letters are currently overridden." # behat_hooks::i_look_for_exceptions()
And the following should exist in the "grade-letters-view" table: # behat_hooks::i_look_for_exceptions()
| Highest | Lowest | Letter |
| 100.00 % | 95.00 % | α |
| 94.99 % | 90.00 % | π |
| 89.99 % | 85.00 % | β |
| 84.99 % | 70.00 % | γ |
| 69.99 % | 55.00 % | δ |
| 54.99 % | 0.00 % | Ω |
@core @core_grades
Feature: We can change the grading type and maximum grade point values
In order to verify that we can change the system-level maximum grade point value
As an admin
I need to modify the system maximum grade point and ensure that activities can use the full range.
I need to ensure that using scales for activities still works correctly.
I need to ensure that the maximum grade point value is enforced for new and existing activities.
Background: # C:\Apache24\htdocs\integration\grade\tests\behat\grade_point_maximum.feature:9
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | format |
| Course 1 | C1 | 0 | topics |
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | course | idnumber | name | intro |
| assign | C1 | assign1 | Test Assignment 1 | Test Assignment 1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "General settings" node in "Site administration > Grades" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Grade point maximum | 900 |
| Grade point default | 800 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Validate that switching the type of grading used correctly disables input form elements # C:\Apache24\htdocs\integration\grade\tests\behat\grade_point_maximum.feature:26
When I follow "Test Assignment 1" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I set the field "grade[modgrade_type]" to "Point" # behat_hooks::i_look_for_exceptions()
Then the "Scale" "select" should be disabled # behat_hooks::i_look_for_exceptions()
And the "Maximum grade" "field" should be enabled # behat_hooks::i_look_for_exceptions()
And I set the field "grade[modgrade_type]" to "Scale" # behat_hooks::i_look_for_exceptions()
And the "Maximum grade" "field" should be disabled # behat_hooks::i_look_for_exceptions()
Then the "Scale" "select" should be enabled # behat_hooks::i_look_for_exceptions()
And I set the field "grade[modgrade_type]" to "None" # behat_hooks::i_look_for_exceptions()
Then the "Scale" "select" should be disabled # behat_hooks::i_look_for_exceptions()
And the "Maximum grade" "field" should be disabled # behat_hooks::i_look_for_exceptions()
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Create an activity with a maximum grade point value less than the system maximum # C:\Apache24\htdocs\integration\grade\tests\behat\grade_point_maximum.feature:42
When I follow "Test Assignment 1" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I set the field "grade[modgrade_type]" to "point" # behat_hooks::i_look_for_exceptions()
And I set the field "grade[modgrade_point]" to "600" # behat_hooks::i_look_for_exceptions()
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
Then the field "grade[modgrade_point]" matches value "600" # behat_hooks::i_look_for_exceptions()
And the "Scale" "select" should be disabled # behat_hooks::i_look_for_exceptions()
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Create an activity with a scale as the grade type # C:\Apache24\htdocs\integration\grade\tests\behat\grade_point_maximum.feature:55
When I follow "Test Assignment 1" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I set the field "grade[modgrade_type]" to "Scale" # behat_hooks::i_look_for_exceptions()
And I set the field "grade[modgrade_scale]" to "Separate and Connected ways of knowing" # behat_hooks::i_look_for_exceptions()
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
Then the field "grade[modgrade_scale]" matches value "Separate and Connected ways of knowing" # behat_hooks::i_look_for_exceptions()
And the "Maximum grade" "field" should be disabled # behat_hooks::i_look_for_exceptions()
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Create an activity with no grade as the grade type # C:\Apache24\htdocs\integration\grade\tests\behat\grade_point_maximum.feature:68
When I follow "Test Assignment 1" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I set the field "grade[modgrade_type]" to "None" # behat_hooks::i_look_for_exceptions()
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And the "Scale" "select" should be disabled # behat_hooks::i_look_for_exceptions()
And the "Maximum grade" "field" should be disabled # behat_hooks::i_look_for_exceptions()
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
Scenario: Create an activity with a maximum grade point value higher than the system maximum # C:\Apache24\htdocs\integration\grade\tests\behat\grade_point_maximum.feature:79
When I follow "Test Assignment 1" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I set the field "grade[modgrade_type]" to "Point" # behat_hooks::i_look_for_exceptions()
And I set the field "grade[modgrade_point]" to "20000" # behat_hooks::i_look_for_exceptions()
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
Then I should see "Invalid grade value. This must be an integer between 1 and 900" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
Scenario: Create an activity with a valid maximum grade point and then change the system maximum to be lower # C:\Apache24\htdocs\integration\grade\tests\behat\grade_point_maximum.feature:89
When I follow "Test Assignment 1" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I set the field "grade[modgrade_type]" to "point" # behat_hooks::i_look_for_exceptions()
And I set the field "grade[modgrade_point]" to "600" # behat_hooks::i_look_for_exceptions()
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I navigate to "General settings" node in "Site administration > Grades" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Grade point maximum | 100 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test Assignment 1" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
Then I should see "Invalid grade value. This must be an integer between 1 and 100" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
@core @core_grades
Feature: Control the aggregation of the scales
In order to use control the aggregation of the scales
As an admin
I can change use administration setting
Background: # C:\Apache24\htdocs\integration\grade\tests\behat\grade_scales_aggregation.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname |
| Course 1 | C1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | t1 |
| student1 | Student | 1 | student1@example.com | s1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I set the following administration settings values: # behat_hooks::i_look_for_exceptions()
| 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 |
| grade_report_user_showcontributiontocoursetotal | 1 |
And I navigate to "Scales" node in "Site administration > Grades" # behat_hooks::i_look_for_exceptions()
And I press "Add a new scale" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Letterscale |
| Scale | F,D,C,B,A |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And the following "grade items" exist: # behat_hooks::i_look_for_exceptions()
| itemname | course |
| Grade me | C1 |
And the following "grade items" exist: # behat_hooks::i_look_for_exceptions()
| itemname | course | scale |
| Scale me | C1 | Letterscale |
And the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| grade_includescalesinaggregation | 0 |
And I log out # behat_hooks::i_look_for_exceptions()
Scenario Outline: Scales can be excluded from aggregation # C:\Apache24\htdocs\integration\grade\tests\behat\grade_scales_aggregation.feature:39
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
When I give the grade "10" to the user "Student 1" for the grade item "Grade me" # behat_hooks::i_look_for_exceptions()
And I give the grade "B" to the user "Student 1" for the grade item "Scale me" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I set the following settings for grade item "Course 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | |
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I select "Student 1" from the "Select all or one user" singleselect # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Grade | Percentage | Contribution to course total |
| Grade me | 10.00 | 10.00 % | |
| Scale me | B | 75.00 % | |
| Course total | | | - |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I set the following administration settings values: # behat_hooks::i_look_for_exceptions()
| grade_includescalesinaggregation | 1 |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I select "Student 1" from the "Select all or one user" singleselect # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Grade | Percentage | Contribution to course total |
| Grade me | 10.00 | 10.00 % | |
| Scale me | B | 75.00 % | |
| Course total | | | - |
Examples:
| aggregation | totalstr | coursetotal | coursepc | gradecontrib | scalecontrib | coursetotal2 | coursepc2 | gradecontrib2 | scalecontrib2 |
| Natural | | 10.00 | 10.00 % | 10.00 | 0.00 | 14.00 | 13.33 % | 9.52 % | 3.81 % |
| Mean of grades | Mean of grades. | 10.00 | 10.00 % | 10.00 | 0.00 | 42.50 | 42.50 % | 5.00 % | 37.50 % |
| Weighted mean of grades | Weighted mean of grades. | 10.00 | 10.00 % | 10.00 | 0.00 | 42.50 | 42.50 % | 5.00 % | 37.50 % |
| Simple weighted mean of grades | Simple weighted mean of grades. | 10.00 | 10.00 % | 10.00 | 0.00 | 12.50 | 12.50 % | 9.62 % | 2.88 % |
| Mean of grades (with extra credits) | Mean of grades (with extra credits). | 10.00 | 10.00 % | 10.00 | 0.00 | 42.50 | 42.50 % | 5.00 % | 37.50 % |
| Median of grades | Median of grades. | 10.00 | 10.00 % | 10.00 | 0.00 | 42.50 | 42.50 % | 5.00 % | 37.50 % |
| Lowest grade | Lowest grade. | 10.00 | 10.00 % | 10.00 | 0.00 | 10.00 | 10.00 % | 10.00 % | 0.00 % |
| Highest grade | Highest grade. | 10.00 | 10.00 % | 10.00 | 0.00 | 75.00 | 75.00 % | 0.00 % | 75.00 % |
| Mode of grades | Mode of grades. | 10.00 | 10.00 % | 10.00 | 0.00 | 75.00 | 75.00 % | 0.00 % | 75.00 % |
@javascript
Scenario: Weights of scales cannot be edited when they are not aggregated # C:\Apache24\htdocs\integration\grade\tests\behat\grade_scales_aggregation.feature:84
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
When I set the following settings for grade item "Course 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | Natural |
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Grade me" to "1" # behat_hooks::i_look_for_exceptions()
Then the field "Override weight of Grade me" matches value "100.00" # behat_hooks::i_look_for_exceptions()
And I click on "Edit" "link" in the "Scale me" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Scale me" "table_row" # behat_hooks::i_look_for_exceptions()
And I follow "Show more..." # behat_hooks::i_look_for_exceptions()
And I should not see "Weight adjusted" # behat_hooks::i_look_for_exceptions()
And I should not see "Weight" # behat_hooks::i_look_for_exceptions()
And the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| grade_includescalesinaggregation | 1 |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Grade me" to "1" # behat_hooks::i_look_for_exceptions()
And the field "Override weight of Grade me" matches value "95.238" # behat_hooks::i_look_for_exceptions()
And I set the field "Override weight of Scale me" to "1" # behat_hooks::i_look_for_exceptions()
And the field "Override weight of Scale me" matches value "4.8" # behat_hooks::i_look_for_exceptions()
And I click on "Edit" "link" in the "Scale me" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Scale me" "table_row" # behat_hooks::i_look_for_exceptions()
And I follow "Show more..." # behat_hooks::i_look_for_exceptions()
And I should see "Weight adjusted" # behat_hooks::i_look_for_exceptions()
And I should see "Weight" # behat_hooks::i_look_for_exceptions()
@core @core_grades @javascript
Feature: View gradebook when scales are used
In order to use scales to grade activities
As an teacher
I need to be able to view gradebook with scales
Background: # C:\Apache24\htdocs\integration\grade\tests\behat\grade_scales.feature:7
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I set the following administration settings values: # behat_hooks::i_look_for_exceptions()
| grade_report_showranges | 1 |
| 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 |
And I navigate to "Scales" node in "Site administration > Grades" # behat_hooks::i_look_for_exceptions()
And I press "Add a new scale" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Letterscale |
| Scale | F,D,C,B,A |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname |
| Course 1 | C1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | t1 |
| student1 | Student | 1 | student1@example.com | s1 |
| student2 | Student | 2 | student2@example.com | s2 |
| student3 | Student | 3 | student3@example.com | s3 |
| student4 | Student | 4 | student4@example.com | s4 |
| student5 | Student | 5 | student5@example.com | s5 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
| student4 | C1 | student |
| student5 | C1 | student |
And the following "grade categories" exist: # behat_hooks::i_look_for_exceptions()
| fullname | course |
| Sub category 1 | C1 |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | course | idnumber | name | intro | gradecategory |
| assign | C1 | a1 | Test assignment one | Submit something! | Sub category 1 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment one" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I set the field "grade[modgrade_type]" to "Scale" # behat_hooks::i_look_for_exceptions()
And I set the field "grade[modgrade_scale]" to "Letterscale" # behat_hooks::i_look_for_exceptions()
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I click on "Grade" "link" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the field "Grade" to "A" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Ok" # behat_hooks::i_look_for_exceptions()
And I click on "[data-action=next-user]" "css_element" # behat_hooks::i_look_for_exceptions()
And I set the field "Grade" to "B" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Ok" # behat_hooks::i_look_for_exceptions()
And I click on "[data-action=next-user]" "css_element" # behat_hooks::i_look_for_exceptions()
And I set the field "Grade" to "C" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Ok" # behat_hooks::i_look_for_exceptions()
And I click on "[data-action=next-user]" "css_element" # behat_hooks::i_look_for_exceptions()
And I set the field "Grade" to "D" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Ok" # behat_hooks::i_look_for_exceptions()
And I click on "[data-action=next-user]" "css_element" # behat_hooks::i_look_for_exceptions()
And I set the field "Grade" to "F" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Ok" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Course grade settings" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Show weightings" to "Show" # behat_hooks::i_look_for_exceptions()
And I set the field "Show contribution to course total" to "Show" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
Scenario: Test displaying scales in gradebook in aggregation method Natural # C:\Apache24\htdocs\integration\grade\tests\behat\grade_scales.feature:81
When I turn editing mode off # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grades" table: # behat_hooks::i_look_for_exceptions()
| -1- | -4- | -5- | -6- |
| Student 1 | A | 5.00 | 5.00 |
| Student 2 | B | 4.00 | 4.00 |
| Student 3 | C | 3.00 | 3.00 |
| Student 4 | D | 2.00 | 2.00 |
| Student 5 | F | 1.00 | 1.00 |
And the following should exist in the "user-grades" table: # behat_hooks::i_look_for_exceptions()
| -1- | -2- | -3- | -4- |
| Range | F–A | 0.00–5.00 | 0.00–5.00 |
| Overall average | C | 3.00 | 3.00 |
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I select "Student 3" from the "Select all or one user" singleselect # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Grade | Range | Percentage | Contribution to course total |
| Test assignment one | C | F–A | 50.00 % | 60.00 % |
| Sub category 1 total | 3.00 | 0–5 | 60.00 % | - |
| Course total | 3.00 | 0–5 | 60.00 % | - |
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And the following should exist in the "grade_edit_tree_table" table: # behat_hooks::i_look_for_exceptions()
| Name | Max grade |
| Test assignment one | 5.00 |
| Sub category 1 total | 5.00 |
| Course total | 5.00 |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Grades" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "Course 1" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Grade | Range | Percentage | Contribution to course total |
| Test assignment one | B | F–A | 75.00 % | 80.00 % |
| Sub category 1 total | 4.00 | 0–5 | 80.00 % | - |
| Course total | 4.00 | 0–5 | 80.00 % | - |
Scenario Outline: Test displaying scales in gradebook in all other aggregation methods # C:\Apache24\htdocs\integration\grade\tests\behat\grade_scales.feature:117
When I follow "Edit Course 1" # behat_hooks::i_look_for_exceptions()
And I set the field "Aggregation" to "" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Sub category 1" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I set the field "Aggregation" to "" # behat_hooks::i_look_for_exceptions()
And I set the field "Category name" to "Sub category ()" # behat_hooks::i_look_for_exceptions()
And I set the field "Maximum grade" to "5" # behat_hooks::i_look_for_exceptions()
And I set the field "Minimum grade" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I turn editing mode off # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grades" table: # behat_hooks::i_look_for_exceptions()
| -1- | -4- | -5- | -6- |
| Student 1 | A | 5.00 | |
| Student 2 | B | 4.00 | |
| Student 3 | C | 3.00 | |
| Student 4 | D | 2.00 | |
| Student 5 | F | 1.00 | |
And the following should exist in the "user-grades" table: # behat_hooks::i_look_for_exceptions()
| -1- | -2- | -3- | -4- |
| Range | F–A | 1.00–5.00 | 0.00–100.00 |
| Overall average | C | 3.00 | |
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I select "Student 3" from the "Select all or one user" singleselect # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Grade | Range | Percentage | Contribution to course total |
| Test assignment one | C | F–A | 50.00 % | |
| Sub category () total. | 3.00 | 1–5 | 50.00 % | - |
| Course total. | | 0–100 | | - |
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And the following should exist in the "grade_edit_tree_table" table: # behat_hooks::i_look_for_exceptions()
| Name | Max grade |
| Test assignment one | A (5) |
| Sub category () total. | |
| Course total. | |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Grades" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "Course 1" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Grade | Range | Percentage | Contribution to course total |
| Test assignment one | B | F–A | 75.00 % | |
| Sub category () total. | 4.00 | 1–5 | 75.00 % | - |
| Course total. | | 0–100 | | - |
Examples:
| aggregation | coursetotal1 | coursetotal2 | coursetotal3 | coursetotal4 | coursetotal5 | overallavg | courseperc2 | courseperc3 | contrib2 | contrib3 |
| Mean of grades | 100.00 | 75.00 | 50.00 | 25.00 | 0.00 | 50.00 | 75.00 % | 50.00 % | 75.00 % | 50.00 % |
| Weighted mean of grades | 100.00 | 75.00 | 50.00 | 25.00 | 0.00 | 50.00 | 75.00 % | 50.00 % | 75.00 % | 50.00 % |
| Simple weighted mean of grades | 100.00 | 75.00 | 50.00 | 25.00 | 0.00 | 50.00 | 75.00 % | 50.00 % | 75.00 % | 50.00 % |
| Mean of grades (with extra credits) | 100.00 | 75.00 | 50.00 | 25.00 | 0.00 | 50.00 | 75.00 % | 50.00 % | 75.00 % | 50.00 % |
| Median of grades | 100.00 | 75.00 | 50.00 | 25.00 | 0.00 | 50.00 | 75.00 % | 50.00 % | 75.00 % | 50.00 % |
| Lowest grade | 100.00 | 75.00 | 50.00 | 25.00 | 0.00 | 50.00 | 75.00 % | 50.00 % | 75.00 % | 50.00 % |
| Highest grade | 100.00 | 75.00 | 50.00 | 25.00 | 0.00 | 50.00 | 75.00 % | 50.00 % | 75.00 % | 50.00 % |
| Mode of grades | 100.00 | 75.00 | 50.00 | 25.00 | 0.00 | 50.00 | 75.00 % | 50.00 % | 75.00 % | 50.00 % |
@core @core_grades @javascript
Feature: View gradebook when single item scales are used
In order to use single item scales to grade activities
As an teacher
I need to be able to view gradebook with single item scales
Background: # C:\Apache24\htdocs\integration\grade\tests\behat\grade_single_item_scales.feature:7
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I set the following administration settings values: # behat_hooks::i_look_for_exceptions()
| grade_report_showranges | 1 |
| 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 |
And I navigate to "Scales" node in "Site administration > Grades" # behat_hooks::i_look_for_exceptions()
And I press "Add a new scale" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Singleitem |
| Scale | Ace! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname |
| Course 1 | C1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | t1 |
| student1 | Student | 1 | student1@example.com | s1 |
| student2 | Student | 2 | student2@example.com | s2 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And the following "grade categories" exist: # behat_hooks::i_look_for_exceptions()
| fullname | course |
| Sub category 1 | C1 |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | course | idnumber | name | intro | gradecategory |
| assign | C1 | a1 | Test assignment one | Submit something! | Sub category 1 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment one" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I set the field "grade[modgrade_type]" to "Scale" # behat_hooks::i_look_for_exceptions()
And I set the field "grade[modgrade_scale]" to "Singleitem" # behat_hooks::i_look_for_exceptions()
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I click on "Grade" "link" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the field "Grade" to "A" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Ok" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Course grade settings" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the field "Show weightings" to "Show" # behat_hooks::i_look_for_exceptions()
And I set the field "Show contribution to course total" to "Show" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
Scenario: Test displaying single item scales in gradebook in aggregation method Natural # C:\Apache24\htdocs\integration\grade\tests\behat\grade_single_item_scales.feature:59
When I turn editing mode off # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grades" table: # behat_hooks::i_look_for_exceptions()
| -1- | -4- | -5- | -6- |
| Student 1 | Ace! | 1.00 | 1.00 |
And the following should exist in the "user-grades" table: # behat_hooks::i_look_for_exceptions()
| -1- | -2- | -3- | -4- |
| Range | Ace!–Ace! | 0.00–1.00 | 0.00–1.00 |
| Overall average | Ace! | 1.00 | 1.00 |
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I select "Student 1" from the "Select all or one user" singleselect # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Grade | Range | Contribution to course total |
| Test assignment one | Ace! | Ace!–Ace! | 100.00 % |
| Sub category 1 total | 1.00 | 0–1 | - |
| Course total | 1.00 | 0–1 | - |
And I select "Student 2" from the "Select all or one user" singleselect # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Grade | Range | Contribution to course total |
| Test assignment one | - | Ace!–Ace! | - |
| Sub category 1 total | - | 0–1 | - |
| Course total | - | 0–1 | - |
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And the following should exist in the "grade_edit_tree_table" table: # behat_hooks::i_look_for_exceptions()
| Name | Max grade |
| Test assignment one | 1.00 |
| Sub category 1 total | 1.00 |
| Course total | 1.00 |
Scenario Outline: Test displaying single item scales in gradebook in all other aggregation methods # C:\Apache24\htdocs\integration\grade\tests\behat\grade_single_item_scales.feature:88
When I follow "Edit Course 1" # behat_hooks::i_look_for_exceptions()
And I set the field "Aggregation" to "" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Edit Sub category 1" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Aggregation | |
| Category name | Sub category () |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I turn editing mode off # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grades" table: # behat_hooks::i_look_for_exceptions()
| -1- | -4- | -5- | -6- |
| Student 1 | Ace! | | |
| Student 2 | - | - | - |
And the following should exist in the "user-grades" table: # behat_hooks::i_look_for_exceptions()
| -1- | -2- | -3- | -4- |
| Range | Ace!–Ace! | 0.00–100.0 | 0.00–100.00 |
| Overall average | Ace! | | |
And I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I select "Student 1" from the "Select all or one user" singleselect # behat_hooks::i_look_for_exceptions()
And the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Grade | Range | Contribution to course total |
| Test assignment one | Ace! | Ace!–Ace! | |
| Sub category () total. | | 0–100 | - |
| Course total. | | 0–100 | - |
And I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And the following should exist in the "grade_edit_tree_table" table: # behat_hooks::i_look_for_exceptions()
| Name | Max grade |
| Test assignment one | Ace! (1) |
| Sub category () total. | 100.00 |
| Course total. | 100.00 |
Examples:
| aggregation | contrib1 | cattotal1 | coursetotal1 | catavg | overallavg |
| Mean of grades | 100.00 % | 100.00 | 100.00 | 100.00 | 100.00 |
| Weighted mean of grades | 0.00 % | 100.00 | 100.00 | 100.00 | 100.00 |
| Simple weighted mean of grades | 0.00 % | - | - | - | - |
| Mean of grades (with extra credits) | 100.00 % | 100.00 | 100.00 | 100.00 | 100.00 |
| Median of grades | 100.00 % | 100.00 | 100.00 | 100.00 | 100.00 |
| Lowest grade | 100.00 % | 100.00 | 100.00 | 100.00 | 100.00 |
| Highest grade | 100.00 % | 100.00 | 100.00 | 100.00 | 100.00 |
| Mode of grades | 100.00 % | 100.00 | 100.00 | 100.00 | 100.00 |
@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: # C:\Apache24\htdocs\integration\grade\tests\behat\grade_to_pass.feature:8
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format | numsections |
| Course 1 | C1 | weeks | 5 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And the following "scales" exist: # behat_hooks::i_look_for_exceptions()
| name | scale |
| Test Scale 1 | Disappointing, Good, Very good, Excellent |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Validate that switching the type of grading used correctly disables grade to pass # C:\Apache24\htdocs\integration\grade\tests\behat\grade_to_pass.feature:25
When I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I set the field "grade[modgrade_type]" to "Point" # behat_hooks::i_look_for_exceptions()
Then the "Grade to pass" "field" should be enabled # behat_hooks::i_look_for_exceptions()
And I set the field "grade[modgrade_type]" to "None" # behat_hooks::i_look_for_exceptions()
And the "Grade to pass" "field" should be disabled # behat_hooks::i_look_for_exceptions()
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Create an activity with a Grade to pass value greater than the maximum grade # C:\Apache24\htdocs\integration\grade\tests\behat\grade_to_pass.feature:36
When I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| 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" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
Scenario: Set a valid grade to pass for an assignment activity using points # C:\Apache24\htdocs\integration\grade\tests\behat\grade_to_pass.feature:48
When I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| 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 go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I click on "Edit assign Test Assignment 1" "link" # behat_hooks::i_look_for_exceptions()
Then the field "Grade to pass" matches value "25" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test Assignment 1" # behat_hooks::i_look_for_exceptions()
And I follow "Edit settings" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I set the field "Grade to pass" to "30" # behat_hooks::i_look_for_exceptions()
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I click on "Edit assign Test Assignment 1" "link" # behat_hooks::i_look_for_exceptions()
And the field "Grade to pass" matches value "30" # behat_hooks::i_look_for_exceptions()
Scenario: Set a valid grade to pass for an assignment activity using scales # C:\Apache24\htdocs\integration\grade\tests\behat\grade_to_pass.feature:71
When I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| 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 go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I click on "Edit assign Test Assignment 1" "link" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
Then the field "Grade to pass" matches value "3" # behat_hooks::i_look_for_exceptions()
And I set the field "Grade to pass" to "4" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test Assignment 1" # behat_hooks::i_look_for_exceptions()
And I follow "Edit settings" # behat_hooks::i_look_for_exceptions()
And the field "Grade to pass" matches value "4" # behat_hooks::i_look_for_exceptions()
Scenario: Set a invalid grade to pass for an assignment activity using scales # C:\Apache24\htdocs\integration\grade\tests\behat\grade_to_pass.feature:91
When I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| 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" # behat_hooks::i_look_for_exceptions()
Scenario: Set a valid grade to pass for workshop activity # C:\Apache24\htdocs\integration\grade\tests\behat\grade_to_pass.feature:101
When I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Workshop" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Workshop name | Test Workshop 1 |
| Description | Test workshop |
| grade | 80 |
| Submission grade to pass | 40 |
| gradinggrade | 20 |
| Assessment grade to pass | 10 |
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I click on "Edit workshop Test Workshop 1 (submission)" "link" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
Then the field "Grade to pass" matches value "40" # behat_hooks::i_look_for_exceptions()
And I set the field "Grade to pass" to "45" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I click on "Edit workshop Test Workshop 1 (assessment)" "link" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And the field "Grade to pass" matches value "10" # behat_hooks::i_look_for_exceptions()
And I set the field "Grade to pass" to "15" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test Workshop 1" # behat_hooks::i_look_for_exceptions()
And I follow "Edit settings" # behat_hooks::i_look_for_exceptions()
And the field "Submission grade to pass" matches value "45" # behat_hooks::i_look_for_exceptions()
And the field "Assessment grade to pass" matches value "15" # behat_hooks::i_look_for_exceptions()
Scenario: Set an invalid grade to pass for workshop activity # C:\Apache24\htdocs\integration\grade\tests\behat\grade_to_pass.feature:128
When I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Workshop" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| 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" # behat_hooks::i_look_for_exceptions()
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" # behat_hooks::i_look_for_exceptions()
Scenario: Set a valid grade to pass for quiz activity # C:\Apache24\htdocs\integration\grade\tests\behat\grade_to_pass.feature:140
When I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Quiz" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Test Quiz 1 |
| Grade to pass | 9.5 |
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I click on "Edit quiz Test Quiz 1" "link" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
Then the field "Grade to pass" matches value "9.5" # behat_hooks::i_look_for_exceptions()
And I set the field "Grade to pass" to "8" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test Quiz 1" # behat_hooks::i_look_for_exceptions()
And I follow "Edit settings" # behat_hooks::i_look_for_exceptions()
And the field "Grade to pass" matches value "8.00" # behat_hooks::i_look_for_exceptions()
Scenario: Set a valid grade to pass for lesson activity # C:\Apache24\htdocs\integration\grade\tests\behat\grade_to_pass.feature:157
When I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Lesson" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Test Lesson 1 |
| Description | Test |
| Grade to pass | 90 |
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I click on "Edit lesson Test Lesson 1" "link" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
Then the field "Grade to pass" matches value "90" # behat_hooks::i_look_for_exceptions()
And I set the field "Grade to pass" to "80" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test Lesson 1" # behat_hooks::i_look_for_exceptions()
And I follow "Edit settings" # behat_hooks::i_look_for_exceptions()
And the field "Grade to pass" matches value "80" # behat_hooks::i_look_for_exceptions()
Scenario: Set a valid grade to pass for database activity # C:\Apache24\htdocs\integration\grade\tests\behat\grade_to_pass.feature:175
When I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Database" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Test Database 1 |
| Description | Test |
| Aggregate type | Average of ratings |
| Grade to pass | 90 |
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I click on "Edit data Test Database 1" "link" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
Then the field "Grade to pass" matches value "90" # behat_hooks::i_look_for_exceptions()
And I set the field "Grade to pass" to "80" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test Database 1" # behat_hooks::i_look_for_exceptions()
And I follow "Edit settings" # behat_hooks::i_look_for_exceptions()
And the field "Grade to pass" matches value "80" # behat_hooks::i_look_for_exceptions()
Scenario: Set an invalid grade to pass for forum activity # C:\Apache24\htdocs\integration\grade\tests\behat\grade_to_pass.feature:194
When I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| 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" # behat_hooks::i_look_for_exceptions()
Scenario: Set a valid grade to pass for forum activity # C:\Apache24\htdocs\integration\grade\tests\behat\grade_to_pass.feature:204
When I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test Forum 1 |
| Description | Test |
| Aggregate type | Average of ratings |
| Grade to pass | 90 |
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I click on "Edit forum Test Forum 1" "link" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
Then the field "Grade to pass" matches value "90" # behat_hooks::i_look_for_exceptions()
And I set the field "Grade to pass" to "80" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test Forum 1" # behat_hooks::i_look_for_exceptions()
And I follow "Edit settings" # behat_hooks::i_look_for_exceptions()
And the field "Grade to pass" matches value "80" # behat_hooks::i_look_for_exceptions()
Scenario: Set a valid grade to pass for glossary activity # C:\Apache24\htdocs\integration\grade\tests\behat\grade_to_pass.feature:223
When I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Glossary" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Test Glossary 1 |
| Description | Test |
| Aggregate type | Average of ratings |
| Grade to pass | 90 |
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I click on "Edit glossary Test Glossary 1" "link" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
Then the field "Grade to pass" matches value "90" # behat_hooks::i_look_for_exceptions()
And I set the field "Grade to pass" to "80" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test Glossary 1" # behat_hooks::i_look_for_exceptions()
And I follow "Edit settings" # behat_hooks::i_look_for_exceptions()
And the field "Grade to pass" matches value "80" # behat_hooks::i_look_for_exceptions()
@mod @mod_workshop
Feature: Setting grades to pass via workshop editing form
In order to define grades to pass
As a teacher
I can set them in the workshop settings form, without the need to go to the gradebook
Background: # C:\Apache24\htdocs\integration\mod\workshop\tests\behat\grade_to_pass.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Terry1 | Teacher1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname |
| Course1 | c1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | c1 | editingteacher |
Scenario: Adding a new workshop with grade to pass field set # C:\Apache24\htdocs\integration\mod\workshop\tests\behat\grade_to_pass.feature:18
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
When I add a "Workshop" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Workshop name | Awesome workshop |
| Description | Grades to pass are set here |
| Submission grade to pass | 45 |
| Assessment grade to pass | 10.5 |
Then I should not see "Adding a new Workshop" # behat_hooks::i_look_for_exceptions()
And I follow "Awesome workshop" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Workshop administration" # behat_hooks::i_look_for_exceptions()
And the field "Submission grade to pass" matches value "45.00" # behat_hooks::i_look_for_exceptions()
And the field "Assessment grade to pass" matches value "10.50" # behat_hooks::i_look_for_exceptions()
Scenario: Adding a new workshop with grade to pass fields left empty # C:\Apache24\htdocs\integration\mod\workshop\tests\behat\grade_to_pass.feature:33
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
When I add a "Workshop" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Workshop name | Another awesome workshop |
| Description | No grades to pass are set here |
| Submission grade to pass | |
| Assessment grade to pass | |
Then I should not see "Adding a new Workshop" # behat_hooks::i_look_for_exceptions()
And I follow "Another awesome workshop" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Workshop administration" # behat_hooks::i_look_for_exceptions()
And the field "Submission grade to pass" matches value "0.00" # behat_hooks::i_look_for_exceptions()
And the field "Assessment grade to pass" matches value "0.00" # behat_hooks::i_look_for_exceptions()
Scenario: Adding a new workshop with non-numeric value of a grade to pass # C:\Apache24\htdocs\integration\mod\workshop\tests\behat\grade_to_pass.feature:48
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
When I add a "Workshop" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Workshop name | Almost awesome workshop |
| Description | Invalid grade to pass is set here |
| Assessment grade to pass | You shall not pass! |
Then I should see "Adding a new Workshop" # behat_hooks::i_look_for_exceptions()
And I should see "You must enter a number here" # behat_hooks::i_look_for_exceptions()
Scenario: Adding a new workshop with invalid value of a grade to pass # C:\Apache24\htdocs\integration\mod\workshop\tests\behat\grade_to_pass.feature:59
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
When I add a "Workshop" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Workshop name | Almost awesome workshop |
| Description | Invalid grade to pass is set here |
| Assessment grade to pass | 10000000 |
Then I should see "Adding a new Workshop" # behat_hooks::i_look_for_exceptions()
And I should see "The grade to pass can not be greater than the maximum possible grade" # behat_hooks::i_look_for_exceptions()
Scenario: Emptying grades to pass fields sets them to zero # C:\Apache24\htdocs\integration\mod\workshop\tests\behat\grade_to_pass.feature:70
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Workshop" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Workshop name | Super awesome workshop |
| Description | Grade to pass are set and then unset here |
| Submission grade to pass | 59.99 |
| Assessment grade to pass | 0.000 |
And I should not see "Adding a new Workshop" # behat_hooks::i_look_for_exceptions()
And I follow "Super awesome workshop" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Workshop administration" # behat_hooks::i_look_for_exceptions()
And the field "Submission grade to pass" matches value "59.99" # behat_hooks::i_look_for_exceptions()
And the field "Assessment grade to pass" matches value "0.00" # behat_hooks::i_look_for_exceptions()
When I set the field "Submission grade to pass" to "" # behat_hooks::i_look_for_exceptions()
And I set the field "Assessment grade to pass" to "" # behat_hooks::i_look_for_exceptions()
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
Then I should not see "Adding a new Workshop" # behat_hooks::i_look_for_exceptions()
And I follow "Super awesome workshop" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Workshop administration" # behat_hooks::i_look_for_exceptions()
And the field "Submission grade to pass" matches value "0.00" # behat_hooks::i_look_for_exceptions()
And the field "Assessment grade to pass" matches value "0.00" # behat_hooks::i_look_for_exceptions()
@core @core_grades
Feature: We can enter in grades and view reports from the gradebook
In order to check the expected results are displayed
As a teacher
I need to assign grades and check that they display correctly in the gradebook.
I need to enable grade weightings and check that they are displayed correctly.
Background: # C:\Apache24\htdocs\integration\grade\tests\behat\grade_view.feature:8
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I set the following administration settings values: # behat_hooks::i_look_for_exceptions()
| 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 |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment name 1 |
| Description | Submit your online text |
| assignsubmission_onlinetext_enabled | 1 |
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment name 2 |
| Description | Submit your online text |
| assignsubmission_onlinetext_enabled | 1 |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name 1" # behat_hooks::i_look_for_exceptions()
When I press "Add submission" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Online text | This is a submission for assignment 1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Submitted for grading" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name 2" # behat_hooks::i_look_for_exceptions()
When I press "Add submission" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Online text | This is a submission for assignment 2 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Submitted for grading" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "80.00" to the user "Student 1" for the grade item "Test assignment name 1" # behat_hooks::i_look_for_exceptions()
And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment name 2" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Scenario: Grade a grade item and ensure the results display correctly in the gradebook # C:\Apache24\htdocs\integration\grade\tests\behat\grade_view.feature:60
When I go to "View > User report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And "Grader report" "link" should exist # behat_hooks::i_look_for_exceptions()
And "Outcomes report" "link" should exist # behat_hooks::i_look_for_exceptions()
And the "Select all or one user" select box should contain "All users (1)" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Grades" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "Course 1" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Grade | Range | Percentage |
| Test assignment name 1 | 80.00 | 0–100 | 80.00 % |
| Test assignment name 2 | 90.00 | 0–100 | 90.00 % |
| Course total | 170.00 | 0–200 | 85.00 % |
And the following should not exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Grade | Range | Percentage |
| Course total | 90.00 | 0–100 | 90.00 % |
And I follow "Grades" in the user menu # behat_hooks::i_look_for_exceptions()
And "Course 1" row "Grade" column of "overview-grade" table should contain "170.00" # behat_hooks::i_look_for_exceptions()
And "Course 1" row "Grade" column of "overview-grade" table should not contain "90.00" # behat_hooks::i_look_for_exceptions()
Scenario: We can add a weighting to a grade item and it is displayed properly in the user report # C:\Apache24\htdocs\integration\grade\tests\behat\grade_view.feature:81
When I go to "Setup > Gradebook setup" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the following settings for grade item "Course 1": # behat_hooks::i_look_for_exceptions()
| Aggregation | Weighted mean of grades |
And I set the field "Extra credit value for Test assignment name" to "0.72" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I go to "Setup > Course grade settings" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Show weightings | Show |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Grades" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "Course 1" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
Then the following should exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Grade | Range | Percentage |
| Test assignment name 1 | 41.86 % | 80.00 | 0–100 | 80.00 % |
| Test assignment name 2 | 58.14 % | 90.00 | 0–100 | 90.00 % |
| Course totalWeighted mean of grades. | - | 85.81 | 0–100 | 85.81 % |
And the following should not exist in the "user-grade" table: # behat_hooks::i_look_for_exceptions()
| Grade item | Calculated weight | Percentage |
| Test assignment name 1 | 0.72% | 0.72% |
| Test assignment name 2 | 1.00% | 1.00% |
| Course total | 1.00% | 1.00% |
@mod @mod_quiz
Feature: Basic use of the Manual grading report
In order to easily find students attempts that need manual grading
As a teacher
I need to use the manual grading report
@javascript
Scenario: Use the Manual grading report # C:\Apache24\htdocs\integration\mod\quiz\report\grading\tests\behat\grading.feature:8
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | T1 | Teacher1 | teacher1@example.com | T1000 |
| student1 | S1 | Student1 | student1@example.com | S1000 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Quiz" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Quiz 1 |
| Description | Quiz 1 description |
And I add a "Short answer" question to the "Quiz 1" quiz with: # behat_hooks::i_look_for_exceptions()
| Question name | Short answer 001 |
| Question text | Where is the capital city of France? |
| Answer 1 | Paris |
| Grade | 100% |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
When I navigate to "Manual grading" node in "Quiz administration > Results" # behat_hooks::i_look_for_exceptions()
Then I should see "Manual grading" # behat_hooks::i_look_for_exceptions()
And I should see "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I should see "Nothing to display" # behat_hooks::i_look_for_exceptions()
And I follow "Also show questions that have been graded automatically" # behat_hooks::i_look_for_exceptions()
And I should see "Nothing to display" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I press "Attempt quiz now" # behat_hooks::i_look_for_exceptions()
And I should see "Question 1" # behat_hooks::i_look_for_exceptions()
And I should see "Not yet answered" # behat_hooks::i_look_for_exceptions()
And I should see "Where is the capital city of France?" # behat_hooks::i_look_for_exceptions()
And I set the field "Answer:" to "Paris" # behat_hooks::i_look_for_exceptions()
And I press "Finish attempt ..." # behat_hooks::i_look_for_exceptions()
And I should see "Answer saved" # behat_hooks::i_look_for_exceptions()
And I press "Submit all and finish" # behat_hooks::i_look_for_exceptions()
And I click on "Submit all and finish" "button" in the "Confirmation" "dialogue" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Manual grading" node in "Quiz administration > Results" # behat_hooks::i_look_for_exceptions()
And I should see "Manual grading" # behat_hooks::i_look_for_exceptions()
And I follow "Also show questions that have been graded automatically" # behat_hooks::i_look_for_exceptions()
And I should see "Short answer 001" # behat_hooks::i_look_for_exceptions()
And I should see "0" in the ".cell.c2" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "0" in the ".cell.c3" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "update grades" "link" in the "Short answer 001" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the field "Comment" to "I have adjusted your mark to 0.6" # behat_hooks::i_look_for_exceptions()
And I set the field "Mark" to "0.6" # behat_hooks::i_look_for_exceptions()
And I press "Save and go to next page" # behat_hooks::i_look_for_exceptions()
And I should see "All selected attempts have been graded. Returning to the list of questions." # behat_hooks::i_look_for_exceptions()
And I should see "0" in the ".cell.c2" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "1" in the ".cell.c3" "css_element" # behat_hooks::i_look_for_exceptions()
@mod @mod_assign
Feature: View the grading status of an assignment
In order to test the grading status for assignments is displaying correctly
As a student
I need to view my grading status
Background: # C:\Apache24\htdocs\integration\mod\assign\tests\behat\grading_status.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
@javascript
Scenario: View the grading status for an assignment with marking workflow enabled # C:\Apache24\htdocs\integration\mod\assign\tests\behat\grading_status.feature:21
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment name |
| Description | Test assignment description |
| Online text | 1 |
| Use marking workflow | Yes |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I click on "Dashboard" "link" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I click on ".collapsibleregioncaption" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Not marked" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
When I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
Then I should not see "Feedback" # behat_hooks::i_look_for_exceptions()
And I should see "Not marked" in the "Grading status" "table_row" # behat_hooks::i_look_for_exceptions()
And I press "Add submission" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Online text | I'm the student's first submission |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I click on "Dashboard" "link" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And ".collapsibleregioncaption" "css_element" should not exist # behat_hooks::i_look_for_exceptions()
And I should not see "Not marked" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Not marked" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "Grade" "link" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the field "Grade out of 100" to "50" # behat_hooks::i_look_for_exceptions()
And I set the field "Marking workflow state" to "In review" # behat_hooks::i_look_for_exceptions()
And I set the field "Feedback comments" to "Great job! Lol, not really." # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Ok" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I should see "In review" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I should see "In review" in the "Grading status" "table_row" # behat_hooks::i_look_for_exceptions()
And I should not see "Great job! Lol, not really." # behat_hooks::i_look_for_exceptions()
And I click on "Dashboard" "link" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And ".collapsibleregioncaption" "css_element" should not exist # behat_hooks::i_look_for_exceptions()
And I should not see "In review" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I should see "In review" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "Grade" "link" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the field "Marking workflow state" to "Released" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Ok" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Released" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I should see "Released" in the "Grading status" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Great job! Lol, not really." # behat_hooks::i_look_for_exceptions()
And I click on "Dashboard" "link" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And ".collapsibleregioncaption" "css_element" should not exist # behat_hooks::i_look_for_exceptions()
And I should not see "Released" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Released" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "Grade" "link" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the field "Marking workflow state" to "In marking" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Ok" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I should see "In marking" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And "Student 1" row "Grade" column of "generaltable" table should contain "50.00" # behat_hooks::i_look_for_exceptions()
And "Student 1" row "Final grade" column of "generaltable" table should contain "-" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: View the grading status for an assignment with marking workflow disabled # C:\Apache24\htdocs\integration\mod\assign\tests\behat\grading_status.feature:121
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment name |
| Description | Test assignment description |
| Online text | 1 |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I click on "Dashboard" "link" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
When I click on ".collapsibleregioncaption" "css_element" # behat_hooks::i_look_for_exceptions()
Then I should see "Not graded" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I should not see "Feedback" # behat_hooks::i_look_for_exceptions()
And I should see "Not graded" in the "Grading status" "table_row" # behat_hooks::i_look_for_exceptions()
And I press "Add submission" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Online text | I'm the student's first submission |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Graded" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "Grade" "link" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the field "Grade out of 100" to "50" # behat_hooks::i_look_for_exceptions()
And I set the field "Feedback comments" to "Great job! Lol, not really." # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Ok" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Graded" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I should see "Graded" in the "Grading status" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Great job! Lol, not really." # behat_hooks::i_look_for_exceptions()
And I click on "Dashboard" "link" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And ".collapsibleregioncaption" "css_element" should not exist # behat_hooks::i_look_for_exceptions()
And I should not see "Graded" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@mod @mod_assign
Feature: Grant an extension to an offline student
In order to allow students to have an accurate due date
As a teacher
I need to grant students extensions at any time
Background: # C:\Apache24\htdocs\integration\mod\assign\tests\behat\grant_extension.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
| student3 | Student | 3 | student3@example.com |
| student4 | Student | 4 | student4@example.com |
| student5 | Student | 5 | student5@example.com |
| student6 | Student | 6 | student6@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
| student4 | C1 | student |
| student5 | C1 | student |
| student6 | C1 | student |
@javascript
Scenario: Granting an extension to an offline assignment # C:\Apache24\htdocs\integration\mod\assign\tests\behat\grant_extension.feature:31
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | course | idnumber | name | intro | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled | duedate |
| assign | C1 | assign1 | Test assignment name | Test assignment description | 0 | 0 | 1388534400 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
When I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I click on "Edit" "link" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I follow "Grant extension" # behat_hooks::i_look_for_exceptions()
And I should see "Student 1 (student1@example.com)" # behat_hooks::i_look_for_exceptions()
And I set the field "Enable" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Extension granted until:" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I should see "Extension due date" # behat_hooks::i_look_for_exceptions()
@javascript @_alert
Scenario: Granting extensions to an offline assignment (batch action) # C:\Apache24\htdocs\integration\mod\assign\tests\behat\grant_extension.feature:52
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | course | idnumber | name | intro | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled | duedate |
| assign | C1 | assign1 | Test assignment name | Test assignment description | 0 | 0 | 1388534400 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
When I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I set the field "selectall" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "operation" to "Grant extension" # behat_hooks::i_look_for_exceptions()
And I click on "Go" "button" confirming the dialogue # behat_hooks::i_look_for_exceptions()
And I should see "Student 1 (student1@example.com)" # behat_hooks::i_look_for_exceptions()
And I should see "Student 2 (student2@example.com)" # behat_hooks::i_look_for_exceptions()
And I should see "Student 3 (student3@example.com)" # behat_hooks::i_look_for_exceptions()
And I should see "Student 4 (student4@example.com)" # behat_hooks::i_look_for_exceptions()
And I should see "Student 5 (student5@example.com)" # behat_hooks::i_look_for_exceptions()
And I should see "1 more..." # behat_hooks::i_look_for_exceptions()
And I set the field "Enable" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Extension granted until:" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Extension granted until:" in the "Student 2" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Extension granted until:" in the "Student 3" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Extension granted until:" in the "Student 4" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Extension granted until:" in the "Student 5" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Extension granted until:" in the "Student 6" "table_row" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I should see "Extension due date" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Validating that extension date is after due date # C:\Apache24\htdocs\integration\mod\assign\tests\behat\grant_extension.feature:84
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | course | idnumber | name | intro | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled | allowsubmissionsfromdate | duedate |
| assign | C1 | assign1 | Test assignment name | Test assignment description | 0 | 0 | 1388534400 | 1388620800 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
When I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I click on "Edit" "link" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I follow "Grant extension" # behat_hooks::i_look_for_exceptions()
And I should see "Student 1 (student1@example.com)" # behat_hooks::i_look_for_exceptions()
And I set the field "Enable" to "1" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| extensionduedate[day] | 1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Extension date must be after the due date" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| extensionduedate[year] | 2013 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Extension date must be after the allow submissions from date" # behat_hooks::i_look_for_exceptions()
@javascript @_alert
Scenario: Granting extensions to an offline assignment (batch action) # C:\Apache24\htdocs\integration\mod\assign\tests\behat\grant_extension.feature:106
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | course | idnumber | name | intro | assignsubmission_onlinetext_enabled | assignsubmission_file_enabled | allowsubmissionsfromdate | duedate |
| assign | C1 | assign1 | Test assignment name | Test assignment description | 0 | 0 | 1388534400 | 1388620800 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
When I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I set the field "selectall" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "operation" to "Grant extension" # behat_hooks::i_look_for_exceptions()
And I click on "Go" "button" confirming the dialogue # behat_hooks::i_look_for_exceptions()
And I should see "Student 1 (student1@example.com)" # behat_hooks::i_look_for_exceptions()
And I should see "Student 2 (student2@example.com)" # behat_hooks::i_look_for_exceptions()
And I should see "Student 3 (student3@example.com)" # behat_hooks::i_look_for_exceptions()
And I should see "Student 4 (student4@example.com)" # behat_hooks::i_look_for_exceptions()
And I should see "Student 5 (student5@example.com)" # behat_hooks::i_look_for_exceptions()
And I should see "1 more..." # behat_hooks::i_look_for_exceptions()
And I set the field "Enable" to "1" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| extensionduedate[day] | 1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Extension date must be after the due date" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| extensionduedate[year] | 2013 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Extension date must be after the allow submissions from date" # behat_hooks::i_look_for_exceptions()
@mod @mod_assign @assignfeedback @assignfeedback_editpdf @_file_upload
Feature: In a group assignment, teacher can annotate PDF files for all users
In order to provide visual report on a graded PDF for all users
As a teacher
I need to use the PDF editor for a group assignment
Background: # C:\Apache24\htdocs\integration\mod\assign\feedback\editpdf\tests\behat\group_annotations.feature:7
Given ghostscript is installed # behat_assignfeedback_editpdf::ghostscript_is_installed()
And the following "courses" exist: # behat_data_generators::the_following_exist()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_data_generators::the_following_exist()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the following "course enrolments" exist: # behat_data_generators::the_following_exist()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And the following "groups" exist: # behat_data_generators::the_following_exist()
| name | course | idnumber |
| G1 | C1 | G1 |
And the following "group members" exist: # behat_data_generators::the_following_exist()
| user | group |
| student1 | G1 |
| student2 | G1 |
And I log in as "teacher1" # behat_auth::i_log_in_as()
And I follow "Course 1" # behat_general::click_link()
And I turn editing mode on # behat_theme_boost_behat_course::i_turn_editing_mode_on()
And I add a "Assignment" to section "1" and I fill the form with: # behat_theme_boost_behat_course::i_add_to_section_and_i_fill_the_form_with()
| Assignment name | Test assignment name |
| Description | Submit your PDF file |
| assignsubmission_file_enabled | 1 |
| Maximum number of uploaded files | 1 |
| Students submit in groups | Yes |
And I log out # behat_auth::i_log_out()
And I log in as "student1" # behat_auth::i_log_in_as()
And I follow "Course 1" # behat_general::click_link()
And I follow "Test assignment name" # behat_general::click_link()
And I press "Add submission" # behat_forms::press_button()
And I upload "mod/assign/feedback/editpdf/tests/fixtures/submission.pdf" file to "File submissions" filemanager # behat_theme_boost_behat_repository_upload::i_upload_file_to_filemanager()
And I press "Save changes" # behat_forms::press_button()
And I should see "Submitted for grading" # behat_general::assert_page_contains_text()
And I should see "submission.pdf" # behat_general::assert_page_contains_text()
And I should see "Not graded" # behat_general::assert_page_contains_text()
And I log out # behat_auth::i_log_out()
And I log in as "teacher1" # behat_auth::i_log_in_as()
And I follow "Course 1" # behat_general::click_link()
And I follow "Test assignment name" # behat_general::click_link()
And I click on "View all submissions" "link" in the "Administration" "block" # behat_general::i_click_on_in_the()
And I click on "Grade" "link" in the "Submitted for grading" "table_row" # behat_general::i_click_on_in_the()
And I wait until the page is ready # behat_general::wait_until_the_page_is_ready()
And I click on ".navigate-next-button" "css_element" # behat_general::i_click_on()
And I wait until the page is ready # behat_general::wait_until_the_page_is_ready()
And I click on ".stampbutton" "css_element" # behat_general::i_click_on()
And I draw on the pdf # behat_assignfeedback_editpdf::i_draw_on_the_pdf()
And I wait until the page is ready # behat_general::wait_until_the_page_is_ready()
@javascript
Scenario: Submit a PDF file as a student and annotate the PDF as a teacher # C:\Apache24\htdocs\integration\mod\assign\feedback\editpdf\tests\behat\group_annotations.feature:62
Given I set the field "applytoall" to "0" # behat_forms::i_set_the_field_to()
And I press "Save changes" # behat_forms::press_button()
And I should see "The changes to the grade and feedback were saved" # behat_general::assert_page_contains_text()
And I press "Ok" # behat_forms::press_button()
And I click on "Edit settings" "link" # behat_general::i_click_on()
And I log out # behat_auth::i_log_out()
And I log in as "student1" # behat_auth::i_log_in_as()
And I follow "Course 1" # behat_general::click_link()
And I follow "Test assignment name" # behat_general::click_link()
When I follow "View annotated PDF..." # behat_general::click_link()
Then I should see "Annotate PDF" # behat_general::assert_page_contains_text()
And I wait until the page is ready # behat_general::wait_until_the_page_is_ready()
And I click on "Close" "button" # behat_general::i_click_on()
And I log out # behat_auth::i_log_out()
And I log in as "student2" # behat_auth::i_log_in_as()
And I follow "Course 1" # behat_general::click_link()
And I follow "Test assignment name" # behat_general::click_link()
And I should not see "View annotated PDF..." # behat_general::assert_page_not_contains_text()
@javascript
Scenario: Submit a PDF file as a student and annotate the PDF as a teacher and all students in the group get a copy of the annotated PDF. # C:\Apache24\htdocs\integration\mod\assign\feedback\editpdf\tests\behat\group_annotations.feature:83
Given I press "Save changes" # behat_forms::press_button()
And I click on "Ok" "button" # behat_general::i_click_on()
And I follow "Course 1" # behat_general::click_link()
And I log out # behat_auth::i_log_out()
And I log in as "student1" # behat_auth::i_log_in_as()
And I follow "Course 1" # behat_general::click_link()
And I follow "Test assignment name" # behat_general::click_link()
When I follow "View annotated PDF..." # behat_general::click_link()
And I change window size to "large" # behat_general::i_change_window_size_to()
Then I should see "Annotate PDF" # behat_general::assert_page_contains_text()
And I change window size to "medium" # behat_general::i_change_window_size_to()
And I wait until the page is ready # behat_general::wait_until_the_page_is_ready()
And I click on "Close" "button" # behat_general::i_click_on()
And I log out # behat_auth::i_log_out()
And I log in as "student2" # behat_auth::i_log_in_as()
And I follow "Course 1" # behat_general::click_link()
And I follow "Test assignment name" # behat_general::click_link()
And I should see "View annotated PDF..." # behat_general::assert_page_contains_text()
@mod @mod_assign
Feature: Group assignment submissions
In order to allow students to work collaboratively on an assignment
As a teacher
I need to group submissions in groups
@javascript
Scenario: Switch between group modes # C:\Apache24\htdocs\integration\mod\assign\tests\behat\group_submission.feature:8
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student0 | Student | 0 | student0@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
| student3 | Student | 3 | student3@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student0 | C1 | student |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
And the following "groups" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| Group 1 | C1 | G1 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment name |
| Description | Test assignment description |
| Students submit in groups | Yes |
| Group mode | No groups |
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
When I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
Then "//tr[contains(., 'Student 0')][contains(., 'Default group')]" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
And "//tr[contains(., 'Student 1')][contains(., 'Default group')]" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
And "//tr[contains(., 'Student 2')][contains(., 'Default group')]" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
And "//tr[contains(., 'Student 3')][contains(., 'Default group')]" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
And I follow "Edit settings" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Group mode | Separate groups |
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Group mode | Separate groups |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I expand "Users" node # behat_hooks::i_look_for_exceptions()
And I follow "Groups" # behat_hooks::i_look_for_exceptions()
And I add "Student 0 (student0@example.com)" user to "Group 1" group members # behat_hooks::i_look_for_exceptions()
And I add "Student 1 (student1@example.com)" user to "Group 1" group members # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And "//tr[contains(., 'Student 0')][contains(., 'Group 1')]" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
And "//tr[contains(., 'Student 1')][contains(., 'Group 1')]" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
And I should not see "Student 2" # behat_hooks::i_look_for_exceptions()
And I set the field "Separate groups" to "All participants" # behat_hooks::i_look_for_exceptions()
And "//tr[contains(., 'Student 0')][contains(., 'Group 1')]" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
And "//tr[contains(., 'Student 1')][contains(., 'Group 1')]" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
And "//tr[contains(., 'Student 2')][contains(., 'Default group')]" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
And "//tr[contains(., 'Student 3')][contains(., 'Default group')]" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Confirm that the grading status changes for each group member # C:\Apache24\htdocs\integration\mod\assign\tests\behat\group_submission.feature:68
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
| student3 | Student | 3 | student3@example.com |
| student4 | Student | 4 | student4@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
| student4 | C1 | student |
And the following "groups" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| Group 1 | C1 | G1 |
And the following "group members" exist: # behat_hooks::i_look_for_exceptions()
| user | group |
| student1 | G1 |
| student2 | G1 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment name |
| Description | Test assignment description |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_file_enabled | 0 |
| Students submit in groups | Yes |
| Group mode | No groups |
| Require group to make submission | No |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I press "Add submission" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Online text | I'm the student's first submission |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
When I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
Then "Student 1" row "Status" column of "generaltable" table should contain "Submitted for grading" # behat_hooks::i_look_for_exceptions()
And "Student 2" row "Status" column of "generaltable" table should contain "Submitted for grading" # behat_hooks::i_look_for_exceptions()
And "Student 3" row "Status" column of "generaltable" table should not contain "Submitted for grading" # behat_hooks::i_look_for_exceptions()
And "Student 4" row "Status" column of "generaltable" table should not contain "Submitted for grading" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student3" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I press "Add submission" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Online text | I'm the student's first submission |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And "Student 1" row "Status" column of "generaltable" table should contain "Submitted for grading" # behat_hooks::i_look_for_exceptions()
And "Student 2" row "Status" column of "generaltable" table should contain "Submitted for grading" # behat_hooks::i_look_for_exceptions()
And "Student 3" row "Status" column of "generaltable" table should contain "Submitted for grading" # behat_hooks::i_look_for_exceptions()
And "Student 4" row "Status" column of "generaltable" table should contain "Submitted for grading" # behat_hooks::i_look_for_exceptions()
Scenario: Confirm groups and submission counts are correct # C:\Apache24\htdocs\integration\mod\assign\tests\behat\group_submission.feature:139
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
| student3 | Student | 3 | student3@example.com |
| student4 | Student | 4 | student4@example.com |
| student5 | Student | 5 | student5@example.com |
| student6 | Student | 6 | student6@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
| student4 | C1 | student |
| student5 | C1 | student |
| student6 | C1 | student |
And the following "groups" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| Group 1 | C1 | G1 |
| Group 2 | C1 | G2 |
| Group 3 | C1 | G3 |
And the following "group members" exist: # behat_hooks::i_look_for_exceptions()
| user | group |
| student1 | G1 |
| student2 | G1 |
| student3 | G2 |
| student4 | G2 |
| student5 | G3 |
| student6 | G3 |
And the following "groupings" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| Grouping 1 | C1 | GG1 |
And the following "grouping groups" exist: # behat_hooks::i_look_for_exceptions()
| grouping | group |
| GG1 | G1 |
| GG1 | G2 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment name |
| Description | Test assignment description |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_file_enabled | 0 |
| Students submit in groups | Yes |
| Grouping for student groups | Grouping 1 |
| Group mode | Separate groups |
| Require group to make submission | No |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I press "Add submission" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Online text | I'm the student's 1 submission |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student3" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I press "Add submission" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Online text | I'm the student's 3 submission |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student5" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I press "Add submission" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Online text | I'm the student's 5 submission |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I should see "3" in the "Groups" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "3" in the "Submitted" "table_row" # behat_hooks::i_look_for_exceptions()
When I set the field "Separate groups" to "Group 1" # behat_hooks::i_look_for_exceptions()
And I press "Go" # behat_hooks::i_look_for_exceptions()
Then I should see "1" in the "Groups" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "1" in the "Submitted" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the field "Separate groups" to "Group 2" # behat_hooks::i_look_for_exceptions()
And I press "Go" # behat_hooks::i_look_for_exceptions()
And I should see "1" in the "Groups" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "1" in the "Submitted" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the field "Separate groups" to "Group 3" # behat_hooks::i_look_for_exceptions()
And I press "Go" # behat_hooks::i_look_for_exceptions()
And I should see "1" in the "Groups" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "1" in the "Submitted" "table_row" # behat_hooks::i_look_for_exceptions()
@mod @mod_feedback
Feature: Feedbacks in courses with groups
In order to collect feedbacks per group
As an teacher
I need to be able to filter feedback replies by groups
Background: # C:\Apache24\htdocs\integration\mod\feedback\tests\behat\groups.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname |
| user1 | Username | 1 |
| user2 | Username | 2 |
| user3 | Username | 3 |
| user4 | Username | 4 |
| user5 | Username | 5 |
| user6 | Username | 6 |
| user7 | Username | 7 |
| teacher | Teacher | T |
| manager | Manager | M |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | groupmode |
| Course 1 | C1 | 1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| user1 | C1 | student |
| user2 | C1 | student |
| user3 | C1 | student |
| user4 | C1 | student |
| user5 | C1 | student |
| user6 | C1 | student |
| user7 | C1 | student |
| teacher | C1 | editingteacher |
And the following "groups" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| Group 1 | C1 | G1 |
| Group 2 | C1 | G2 |
And the following "group members" exist: # behat_hooks::i_look_for_exceptions()
| user | group |
| user1 | G1 |
| user2 | G1 |
| user2 | G2 |
| user3 | G2 |
| user4 | G1 |
| user5 | G1 |
| user6 | G2 |
And the following "system role assigns" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| manager | Acceptance test site | manager |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | course | idnumber | anonymous | publish_stats | groupmode |
| feedback | Site feedback | Acceptance test site | feedback0 | 2 | 1 | 1 |
| feedback | Course feedback | C1 | feedback1 | 2 | 1 | 1 |
| feedback | Course anon feedback | C1 | feedback2 | 1 | 1 | 1 |
When I log in as "manager" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I navigate to "Site feedback" node in "Site pages" # behat_hooks::i_look_for_exceptions()
And I click on "Edit questions" "link" in the "[role=main]" "css_element" # behat_hooks::i_look_for_exceptions()
And I add a "Multiple choice" question to the feedback with: # behat_hooks::i_look_for_exceptions()
| Question | Do you like our site? |
| Label | multichoice2 |
| Multiple choice type | Multiple choice - single answer |
| Hide the "Not selected" option | Yes |
| Multiple choice values | Yes of course\nNot at all\nI don't know |
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Non anonymous feedback with groups in a course # C:\Apache24\htdocs\integration\mod\feedback\tests\behat\groups.feature:66
When I log in as "teacher" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Course feedback" # behat_hooks::i_look_for_exceptions()
And I click on "Edit questions" "link" in the "[role=main]" "css_element" # behat_hooks::i_look_for_exceptions()
And I add a "Multiple choice" question to the feedback with: # behat_hooks::i_look_for_exceptions()
| Question | Do you like this course? |
| Label | multichoice1 |
| Multiple choice type | Multiple choice - single answer |
| Hide the "Not selected" option | Yes |
| Multiple choice values | Yes of course\nNot at all\nI don't know |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "user1" and complete feedback "Course feedback" in course "Course 1" with: # behat_hooks::i_look_for_exceptions()
| Not at all | 1 |
And I log in as "user2" and complete feedback "Course feedback" in course "Course 1" with: # behat_hooks::i_look_for_exceptions()
| I don't know | 1 |
And I log in as "user3" and complete feedback "Course feedback" in course "Course 1" with: # behat_hooks::i_look_for_exceptions()
| Not at all | 1 |
And I log in as "user4" and complete feedback "Course feedback" in course "Course 1" with: # behat_hooks::i_look_for_exceptions()
| Yes of course | 1 |
And I log in as "user5" and complete feedback "Course feedback" in course "Course 1" with: # behat_hooks::i_look_for_exceptions()
| Yes of course | 1 |
And I log in as "user6" and complete feedback "Course feedback" in course "Course 1" with: # behat_hooks::i_look_for_exceptions()
| Not at all | 1 |
And I log in as "user7" and complete feedback "Course feedback" in course "Course 1" with: # behat_hooks::i_look_for_exceptions()
| I don't know | 1 |
And I log in as "user1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Course feedback" # behat_hooks::i_look_for_exceptions()
And I follow "Submitted answers" # behat_hooks::i_look_for_exceptions()
And I should see "Separate groups: Group 1" # behat_hooks::i_look_for_exceptions()
And I show chart data for the "multichoice1" feedback # behat_hooks::i_look_for_exceptions()
And I should see "2 (50.00 %)" in the "Yes of course" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "1 (25.00 %)" in the "Not at all" "table_row" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "user3" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Course feedback" # behat_hooks::i_look_for_exceptions()
And I follow "Submitted answers" # behat_hooks::i_look_for_exceptions()
And I should see "Separate groups: Group 2" # behat_hooks::i_look_for_exceptions()
And I show chart data for the "multichoice1" feedback # behat_hooks::i_look_for_exceptions()
And I should see "0" in the "Yes of course" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "2 (66.67 %)" in the "Not at all" "table_row" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "user2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Course feedback" # behat_hooks::i_look_for_exceptions()
And I follow "Submitted answers" # behat_hooks::i_look_for_exceptions()
And the field "Separate groups" matches value "Group 1" # behat_hooks::i_look_for_exceptions()
And I show chart data for the "multichoice1" feedback # behat_hooks::i_look_for_exceptions()
And I should see "2 (50.00 %)" in the "Yes of course" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "1 (25.00 %)" in the "Not at all" "table_row" # behat_hooks::i_look_for_exceptions()
And I select "Group 2" from the "Separate groups" singleselect # behat_hooks::i_look_for_exceptions()
And I show chart data for the "multichoice1" feedback # behat_hooks::i_look_for_exceptions()
And I should see "0" in the "Yes of course" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "2 (66.67 %)" in the "Not at all" "table_row" # behat_hooks::i_look_for_exceptions()
And the "Separate groups" select box should not contain "All participants" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "user7" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Course feedback" # behat_hooks::i_look_for_exceptions()
And I follow "Submitted answers" # behat_hooks::i_look_for_exceptions()
And I should see "Separate groups: All participants" # behat_hooks::i_look_for_exceptions()
And I show chart data for the "multichoice1" feedback # behat_hooks::i_look_for_exceptions()
And I should see "2 (28.57 %)" in the "Yes of course" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "3 (42.86 %)" in the "Not at all" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "2 (28.57 %)" in the "I don't know" "table_row" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Course feedback" # behat_hooks::i_look_for_exceptions()
And I click on "Analysis" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And the field "Separate groups" matches value "All participants" # behat_hooks::i_look_for_exceptions()
And I show chart data for the "multichoice1" feedback # behat_hooks::i_look_for_exceptions()
And I should see "2 (28.57 %)" in the "Yes of course" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "3 (42.86 %)" in the "Not at all" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "2 (28.57 %)" in the "I don't know" "table_row" # behat_hooks::i_look_for_exceptions()
And I select "Group 1" from the "Separate groups" singleselect # behat_hooks::i_look_for_exceptions()
And I show chart data for the "multichoice1" feedback # behat_hooks::i_look_for_exceptions()
And I should see "2 (50.00 %)" in the "Yes of course" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "1 (25.00 %)" in the "Not at all" "table_row" # behat_hooks::i_look_for_exceptions()
And I select "Group 2" from the "Separate groups" singleselect # behat_hooks::i_look_for_exceptions()
And I show chart data for the "multichoice1" feedback # behat_hooks::i_look_for_exceptions()
And I should see "0" in the "Yes of course" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "2 (66.67 %)" in the "Not at all" "table_row" # behat_hooks::i_look_for_exceptions()
And I follow "Show responses" # behat_hooks::i_look_for_exceptions()
And the field "Separate groups" matches value "Group 2" # behat_hooks::i_look_for_exceptions()
And I should not see "Username 1" # behat_hooks::i_look_for_exceptions()
And I should see "Username 3" # behat_hooks::i_look_for_exceptions()
And I select "Group 1" from the "Separate groups" singleselect # behat_hooks::i_look_for_exceptions()
And I should see "Username 1" # behat_hooks::i_look_for_exceptions()
And I should not see "Username 3" # behat_hooks::i_look_for_exceptions()
And I select "All participants" from the "Separate groups" singleselect # behat_hooks::i_look_for_exceptions()
And I should see "Username 1" # behat_hooks::i_look_for_exceptions()
And I should see "Username 3" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Anonymous feedback with groups in a course # C:\Apache24\htdocs\integration\mod\feedback\tests\behat\groups.feature:169
When I log in as "teacher" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Course anon feedback" # behat_hooks::i_look_for_exceptions()
And I click on "Edit questions" "link" in the "[role=main]" "css_element" # behat_hooks::i_look_for_exceptions()
And I add a "Multiple choice" question to the feedback with: # behat_hooks::i_look_for_exceptions()
| Question | Do you like this course? |
| Label | multichoice1 |
| Multiple choice type | Multiple choice - single answer |
| Hide the "Not selected" option | Yes |
| Multiple choice values | Yes of course\nNot at all\nI don't know |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "user1" and complete feedback "Course anon feedback" in course "Course 1" with: # behat_hooks::i_look_for_exceptions()
| Not at all | 1 |
And I log in as "user1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Course anon feedback" # behat_hooks::i_look_for_exceptions()
And I follow "Submitted answers" # behat_hooks::i_look_for_exceptions()
And I should see "There are insufficient responses for this group" # behat_hooks::i_look_for_exceptions()
And I should not see "Yes of course" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "user2" and complete feedback "Course anon feedback" in course "Course 1" with: # behat_hooks::i_look_for_exceptions()
| I don't know | 1 |
And I log in as "user3" and complete feedback "Course anon feedback" in course "Course 1" with: # behat_hooks::i_look_for_exceptions()
| Not at all | 1 |
And I log in as "user4" and complete feedback "Course anon feedback" in course "Course 1" with: # behat_hooks::i_look_for_exceptions()
| Yes of course | 1 |
And I log in as "user5" and complete feedback "Course anon feedback" in course "Course 1" with: # behat_hooks::i_look_for_exceptions()
| Yes of course | 1 |
And I log in as "user6" and complete feedback "Course anon feedback" in course "Course 1" with: # behat_hooks::i_look_for_exceptions()
| Not at all | 1 |
And I log in as "user7" and complete feedback "Course anon feedback" in course "Course 1" with: # behat_hooks::i_look_for_exceptions()
| I don't know | 1 |
And I log in as "user1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Course anon feedback" # behat_hooks::i_look_for_exceptions()
And I follow "Submitted answers" # behat_hooks::i_look_for_exceptions()
And I should see "Separate groups: Group 1" # behat_hooks::i_look_for_exceptions()
And I show chart data for the "multichoice1" feedback # behat_hooks::i_look_for_exceptions()
And I should see "2 (50.00 %)" in the "Yes of course" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "1 (25.00 %)" in the "Not at all" "table_row" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "user3" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Course anon feedback" # behat_hooks::i_look_for_exceptions()
And I follow "Submitted answers" # behat_hooks::i_look_for_exceptions()
And I should see "Separate groups: Group 2" # behat_hooks::i_look_for_exceptions()
And I show chart data for the "multichoice1" feedback # behat_hooks::i_look_for_exceptions()
And I should see "0" in the "Yes of course" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "2 (66.67 %)" in the "Not at all" "table_row" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "user2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Course anon feedback" # behat_hooks::i_look_for_exceptions()
And I follow "Submitted answers" # behat_hooks::i_look_for_exceptions()
And the field "Separate groups" matches value "Group 1" # behat_hooks::i_look_for_exceptions()
And I show chart data for the "multichoice1" feedback # behat_hooks::i_look_for_exceptions()
And I should see "2 (50.00 %)" in the "Yes of course" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "1 (25.00 %)" in the "Not at all" "table_row" # behat_hooks::i_look_for_exceptions()
And I select "Group 2" from the "Separate groups" singleselect # behat_hooks::i_look_for_exceptions()
And I show chart data for the "multichoice1" feedback # behat_hooks::i_look_for_exceptions()
And I should see "0" in the "Yes of course" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "2 (66.67 %)" in the "Not at all" "table_row" # behat_hooks::i_look_for_exceptions()
And the "Separate groups" select box should not contain "All participants" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "user7" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Course anon feedback" # behat_hooks::i_look_for_exceptions()
And I follow "Submitted answers" # behat_hooks::i_look_for_exceptions()
And I should see "Separate groups: All participants" # behat_hooks::i_look_for_exceptions()
And I show chart data for the "multichoice1" feedback # behat_hooks::i_look_for_exceptions()
And I should see "2 (28.57 %)" in the "Yes of course" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "3 (42.86 %)" in the "Not at all" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "2 (28.57 %)" in the "I don't know" "table_row" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Course anon feedback" # behat_hooks::i_look_for_exceptions()
And I click on "Analysis" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And the field "Separate groups" matches value "All participants" # behat_hooks::i_look_for_exceptions()
And I show chart data for the "multichoice1" feedback # behat_hooks::i_look_for_exceptions()
And I should see "2 (28.57 %)" in the "Yes of course" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "3 (42.86 %)" in the "Not at all" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "2 (28.57 %)" in the "I don't know" "table_row" # behat_hooks::i_look_for_exceptions()
And I select "Group 1" from the "Separate groups" singleselect # behat_hooks::i_look_for_exceptions()
And I show chart data for the "multichoice1" feedback # behat_hooks::i_look_for_exceptions()
And I should see "2 (50.00 %)" in the "Yes of course" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "1 (25.00 %)" in the "Not at all" "table_row" # behat_hooks::i_look_for_exceptions()
And I select "Group 2" from the "Separate groups" singleselect # behat_hooks::i_look_for_exceptions()
And I show chart data for the "multichoice1" feedback # behat_hooks::i_look_for_exceptions()
And I should see "0" in the "Yes of course" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "2 (66.67 %)" in the "Not at all" "table_row" # behat_hooks::i_look_for_exceptions()
And I follow "Show responses" # behat_hooks::i_look_for_exceptions()
And the field "Separate groups" matches value "Group 2" # behat_hooks::i_look_for_exceptions()
And "//tr[contains(@id,'_r2') and contains(.,'Response number')]" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
And "//tr[contains(@id,'_r3') and contains(@class,'emptyrow')]" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
And I select "Group 1" from the "Separate groups" singleselect # behat_hooks::i_look_for_exceptions()
And "//tr[contains(@id,'_r3') and contains(.,'Response number')]" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
And "//tr[contains(@id,'_r4') and contains(@class,'emptyrow')]" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
And I select "All participants" from the "Separate groups" singleselect # behat_hooks::i_look_for_exceptions()
And "//tr[contains(@id,'_r6') and contains(.,'Response number')]" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
And "//tr[contains(@id,'_r7') and contains(@class,'emptyrow')]" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@core @core_group @_file_upload
Feature: Importing of groups and groupings
In order to import groups and grouping
As a teacher
I need to upload a file and verify groups and groupings can be imported
Background: # C:\Apache24\htdocs\integration\group\tests\behat\groups_import.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
@javascript
Scenario: Import groups and groupings as teacher # C:\Apache24\htdocs\integration\group\tests\behat\groups_import.feature:19
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I expand "Users" node # behat_hooks::i_look_for_exceptions()
And I follow "Groups" # behat_hooks::i_look_for_exceptions()
And I press "Import groups" # behat_hooks::i_look_for_exceptions()
When I upload "group/tests/fixtures/groups_import.csv" file to "Import" filemanager # behat_hooks::i_look_for_exceptions()
And I press "Import groups" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
Then I should see "group-id-1" # behat_hooks::i_look_for_exceptions()
And I should see "group-id-2" # behat_hooks::i_look_for_exceptions()
And I should see "group-id-1-duplicate" # behat_hooks::i_look_for_exceptions()
And I should see "group-noid-1" # behat_hooks::i_look_for_exceptions()
And I should see "group-noid-2" # behat_hooks::i_look_for_exceptions()
And I follow "Groupings" # behat_hooks::i_look_for_exceptions()
And I should see "Grouping-1" # behat_hooks::i_look_for_exceptions()
And I should see "Grouping-2" # behat_hooks::i_look_for_exceptions()
And I should see "Grouping-3" # behat_hooks::i_look_for_exceptions()
And I should see "group-id-1" in the "Grouping-1" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "group-id-2" in the "Grouping-2" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "group-noid-2" in the "Grouping-2" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "group-id-1-duplicate" in the "Grouping-3" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "group-noid-1" in the "Grouping-3" "table_row" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Import groups with idnumber when the user has proper permissions for the idnumber field # C:\Apache24\htdocs\integration\group\tests\behat\groups_import.feature:44
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I expand "Users" node # behat_hooks::i_look_for_exceptions()
And I follow "Groups" # behat_hooks::i_look_for_exceptions()
And I press "Import groups" # behat_hooks::i_look_for_exceptions()
When I upload "group/tests/fixtures/groups_import.csv" file to "Import" filemanager # behat_hooks::i_look_for_exceptions()
And I press "Import groups" # behat_hooks::i_look_for_exceptions()
Then I should see "Group group-id-1 added successfully" # behat_hooks::i_look_for_exceptions()
And I should see "Group group-id-2 added successfully" # behat_hooks::i_look_for_exceptions()
And I should see "group-id-1-duplicate: Group \"group-id-1\" with an idnumber of \"group-id-1\" already exists for this course" # behat_hooks::i_look_for_exceptions()
And I should see "Group group-id-1-duplicate added successfully" # behat_hooks::i_look_for_exceptions()
And I should see "Group group-noid-1 added successfully" # behat_hooks::i_look_for_exceptions()
And I should see "Group group-noid-2 added successfully" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I set the field "groups" to "group-id-1" # behat_hooks::i_look_for_exceptions()
And I press "Edit group settings" # behat_hooks::i_look_for_exceptions()
And the field "id_idnumber" matches value "group-id-1" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I set the field "groups" to "group-id-2" # behat_hooks::i_look_for_exceptions()
And I press "Edit group settings" # behat_hooks::i_look_for_exceptions()
And the field "id_idnumber" matches value "group-id-2" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I set the field "groups" to "group-id-1-duplicate" # behat_hooks::i_look_for_exceptions()
And I press "Edit group settings" # behat_hooks::i_look_for_exceptions()
And the field "id_idnumber" matches value "" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I set the field "groups" to "group-noid-1" # behat_hooks::i_look_for_exceptions()
And I press "Edit group settings" # behat_hooks::i_look_for_exceptions()
And the field "id_idnumber" matches value "" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I set the field "groups" to "group-noid-2" # behat_hooks::i_look_for_exceptions()
And I press "Edit group settings" # behat_hooks::i_look_for_exceptions()
And the field "id_idnumber" matches value "" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Import groups with idnumber when the user does not have proper permissions for the idnumber field # C:\Apache24\htdocs\integration\group\tests\behat\groups_import.feature:81
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I expand "Users" node # behat_hooks::i_look_for_exceptions()
And I follow "Permissions" # behat_hooks::i_look_for_exceptions()
And I override the system permissions of "Teacher" role with: # behat_hooks::i_look_for_exceptions()
| moodle/course:changeidnumber | Prevent |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I expand "Users" node # behat_hooks::i_look_for_exceptions()
And I follow "Groups" # behat_hooks::i_look_for_exceptions()
And I press "Import groups" # behat_hooks::i_look_for_exceptions()
When I upload "group/tests/fixtures/groups_import.csv" file to "Import" filemanager # behat_hooks::i_look_for_exceptions()
And I press "Import groups" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
Then I set the field "groups" to "group-id-1" # behat_hooks::i_look_for_exceptions()
And I press "Edit group settings" # behat_hooks::i_look_for_exceptions()
And the field "id_idnumber" matches value "" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I set the field "groups" to "group-id-2" # behat_hooks::i_look_for_exceptions()
And I press "Edit group settings" # behat_hooks::i_look_for_exceptions()
And the field "id_idnumber" matches value "" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I set the field "groups" to "group-id-1-duplicate" # behat_hooks::i_look_for_exceptions()
And I press "Edit group settings" # behat_hooks::i_look_for_exceptions()
And the field "id_idnumber" matches value "" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I set the field "groups" to "group-noid-1" # behat_hooks::i_look_for_exceptions()
And I press "Edit group settings" # behat_hooks::i_look_for_exceptions()
And the field "id_idnumber" matches value "" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I set the field "groups" to "group-noid-2" # behat_hooks::i_look_for_exceptions()
And I press "Edit group settings" # behat_hooks::i_look_for_exceptions()
And the field "id_idnumber" matches value "" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
@mod @mod_forum
Feature: Forums in 'No groups' mode allow posting to All participants for all users
In order to post to a forum in 'No groups' mode, which is in course which has groups
As any user
I need to post
Background: # C:\Apache24\htdocs\integration\mod\forum\tests\behat\groups_in_course_no_groups_in_forum.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "groups" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| Group A | C1 | G1 |
| Group B | C1 | G2 |
And the following "group members" exist: # behat_hooks::i_look_for_exceptions()
| user | group |
| teacher1 | G1 |
| teacher1 | G2 |
| student1 | G1 |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | groupmode |
| forum | Standard forum name | Standard forum description | C1 | nogroups | 0 |
Scenario: Teacher can post # C:\Apache24\htdocs\integration\mod\forum\tests\behat\groups_in_course_no_groups_in_forum.feature:32
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Standard forum name" # behat_hooks::i_look_for_exceptions()
And I should not see "Group A" # behat_hooks::i_look_for_exceptions()
And I should not see "Group B" # behat_hooks::i_look_for_exceptions()
When I click on "Add a new discussion topic" "button" # behat_hooks::i_look_for_exceptions()
Then I should not see "Post a copy to all groups" # behat_hooks::i_look_for_exceptions()
And I should not see "Group" in the "form" "css_element" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Subject | Teacher 1 -> Forum |
| Message | Teacher 1 -> Forum |
And I press "Post to forum" # behat_hooks::i_look_for_exceptions()
And I wait to be redirected # behat_hooks::i_look_for_exceptions()
And I should see "Teacher 1 -> Forum" # behat_hooks::i_look_for_exceptions()
Scenario: Student can post # C:\Apache24\htdocs\integration\mod\forum\tests\behat\groups_in_course_no_groups_in_forum.feature:48
Given I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Standard forum name" # behat_hooks::i_look_for_exceptions()
And I should not see "Group A" # behat_hooks::i_look_for_exceptions()
And I should not see "Group B" # behat_hooks::i_look_for_exceptions()
When I click on "Add a new discussion topic" "button" # behat_hooks::i_look_for_exceptions()
Then I should not see "Post a copy to all groups" # behat_hooks::i_look_for_exceptions()
And I should not see "Group" in the "form" "css_element" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Subject | Student 1 -> Forum |
| Message | Student 1 -> Forum |
And I press "Post to forum" # behat_hooks::i_look_for_exceptions()
And I wait to be redirected # behat_hooks::i_look_for_exceptions()
And I should see "Student 1 -> Forum" # behat_hooks::i_look_for_exceptions()
@enrol @enrol_guest
Feature: Guest users can auto-enrol themself in courses where guest access is allowed
In order to access courses contents
As a guest
I need to access courses as a guest
Background: # C:\Apache24\htdocs\integration\enrol\guest\tests\behat\guest_access.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name |
| Description | Test forum description |
Scenario: Allow guest access without password # C:\Apache24\htdocs\integration\enrol\guest\tests\behat\guest_access.feature:25
Given I navigate to "Enrolment methods" node in "Course administration > Users" # behat_hooks::i_look_for_exceptions()
And I click on "Edit" "link" in the "Guest access" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Allow guest access | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
When I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
Then I should not see "Subscribe to this forum" # behat_hooks::i_look_for_exceptions()
Scenario: Allow guest access with password # C:\Apache24\htdocs\integration\enrol\guest\tests\behat\guest_access.feature:38
Given I navigate to "Enrolment methods" node in "Course administration > Users" # behat_hooks::i_look_for_exceptions()
And I click on "Edit" "link" in the "Guest access" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Allow guest access | Yes |
| Password | moodle_rules |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
When I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then I should see "Guest access" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Password | moodle_rules |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I should see "Test forum name" # behat_hooks::i_look_for_exceptions()
@core @core_block
Feature: Show hidden blocks in a docked block region when editing
In order to edit blocks in a hidden region
As a teacher
I need to be able to see the blocks when editing is on
Background: # C:\Apache24\htdocs\integration\blocks\tests\behat\hidden_block_region.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| admin | C1 | editingteacher |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Search forums" block # behat_hooks::i_look_for_exceptions()
And I add the "Latest announcements" block # behat_hooks::i_look_for_exceptions()
And I add the "Upcoming events" block # behat_hooks::i_look_for_exceptions()
And I add the "Recent activity" block # behat_hooks::i_look_for_exceptions()
And I configure the "Search forums" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Visible | No |
And I click on "Save changes" "button" # behat_hooks::i_look_for_exceptions()
And I configure the "Latest announcements" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Visible | No |
And I click on "Save changes" "button" # behat_hooks::i_look_for_exceptions()
And I configure the "Upcoming events" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Visible | No |
And I click on "Save changes" "button" # behat_hooks::i_look_for_exceptions()
And I configure the "Recent activity" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Visible | No |
When I click on "Save changes" "button" # behat_hooks::i_look_for_exceptions()
Then I should see "Search forums" # behat_hooks::i_look_for_exceptions()
And I should see "Latest announcements" # behat_hooks::i_look_for_exceptions()
And I should see "Upcoming events" # behat_hooks::i_look_for_exceptions()
And I should see "Recent activity" # behat_hooks::i_look_for_exceptions()
And I turn editing mode off # behat_hooks::i_look_for_exceptions()
And I should not see "Search forums" # behat_hooks::i_look_for_exceptions()
And I should not see "Latest announcements" # behat_hooks::i_look_for_exceptions()
And I should not see "Upcoming events" # behat_hooks::i_look_for_exceptions()
And I should not see "Recent activity" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Check that a region with only hidden blocks is not docked in editing mode (javascript enabled) # C:\Apache24\htdocs\integration\blocks\tests\behat\hidden_block_region.feature:51
Scenario: Check that a region with only hidden blocks is not docked in editing mode (javascript disabled) # C:\Apache24\htdocs\integration\blocks\tests\behat\hidden_block_region.feature:53
@block @block_activity_results
Feature: The activity results block displays student scores
In order to be display student scores
As a user
I need to see the activity results block
Background: # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\highscoreswithoutgroups.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
| student1 | Student | 1 | student1@example.com | S1 |
| student2 | Student | 2 | student2@example.com | S2 |
| student3 | Student | 3 | student3@example.com | S3 |
| student4 | Student | 4 | student4@example.com | S4 |
| student5 | Student | 5 | student5@example.com | S5 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
| student4 | C1 | student |
| student5 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "80.00" to the user "Student 2" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "70.00" to the user "Student 3" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "60.00" to the user "Student 4" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "50.00" to the user "Student 5" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Scenario: Configure the block on the course page to show 0 high scores # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\highscoreswithoutgroups.feature:45
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 0 |
| id_config_showworst | 0 |
| id_config_gradeformat | Percentages |
| id_config_nameformat | Display full names |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "This block's configuration currently does not allow it to show any results." in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Configure the block on the course page to show 1 high score # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\highscoreswithoutgroups.feature:56
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 1 |
| id_config_showworst | 0 |
| id_config_gradeformat | Percentages |
| id_config_nameformat | Display full names |
| id_config_decimalpoints | 0 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Student 1" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "90%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show 1 high score as a fraction # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\highscoreswithoutgroups.feature:69
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 1 |
| id_config_showworst | 0 |
| id_config_gradeformat | Fractions |
| id_config_nameformat | Display full names |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Student 1" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "90.00/100.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show 1 high score as a absolute numbers # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\highscoreswithoutgroups.feature:81
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 1 |
| id_config_showworst | 0 |
| id_config_gradeformat | Absolute numbers |
| id_config_nameformat | Display full names |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Student 1" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "90.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show multiple high scores as percentages # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\highscoreswithoutgroups.feature:93
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 3 |
| id_config_showworst | 0 |
| id_config_gradeformat | Percentages |
| id_config_nameformat | Display full names |
| id_config_decimalpoints | 0 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Student 1" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "90%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Student 2" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "80%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Student 3" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "70%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show multiple high scores as fractions # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\highscoreswithoutgroups.feature:110
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 3 |
| id_config_showworst | 0 |
| id_config_gradeformat | Fractions |
| id_config_nameformat | Display full names |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Student 1" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "90.00/100.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Student 2" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "80.00/100.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Student 3" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "70.00/100.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show multiple high scores as absolute numbers # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\highscoreswithoutgroups.feature:126
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 3 |
| id_config_showworst | 0 |
| id_config_gradeformat | Absolute numbers |
| id_config_nameformat | Display full names |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Student 1" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "90.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Student 2" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "80.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Student 3" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "70.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show multiple high scores using ID numbers # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\highscoreswithoutgroups.feature:142
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 3 |
| id_config_showworst | 0 |
| id_config_gradeformat | Percentages |
| id_config_nameformat | Display only ID numbers |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "User S1" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "90.00%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "User S2" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "80.00%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "User S3" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "70.00%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show multiple high scores using anonymous names # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\highscoreswithoutgroups.feature:158
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 3 |
| id_config_showworst | 0 |
| id_config_gradeformat | Percentages |
| id_config_nameformat | Anonymous results |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "User" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "90.00%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "80.00%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "70.00%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
@block @block_activity_results
Feature: The activity results block displays student scores as scales
In order to be display student scores as scales
As a user
I need to see the activity results block
Background: # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\highscoreswithscales.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
| student1 | Student | 1 | student1@example.com | S1 |
| student2 | Student | 2 | student2@example.com | S2 |
| student3 | Student | 3 | student3@example.com | S3 |
| student4 | Student | 4 | student4@example.com | S4 |
| student5 | Student | 5 | student5@example.com | S5 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
| student4 | C1 | student |
| student5 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "Scales" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I press "Add a new scale" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | My Scale |
| Scale | Disappointing, Not good enough, Average, Good, Very good, Excellent! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| id_grade_modgrade_type | Scale |
| id_grade_modgrade_scale | My Scale |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "Good" to the user "Student 3" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "Average" to the user "Student 4" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "Not good enough" to the user "Student 5" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Scenario: Configure the block on the course page to show 1 high score # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\highscoreswithscales.feature:54
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 1 |
| id_config_showworst | 0 |
| id_config_nameformat | Display full names |
| id_config_decimalpoints | 0 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Student 1" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Excellent!" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show multiple high scores using full names # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\highscoreswithscales.feature:66
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 3 |
| id_config_showworst | 0 |
| id_config_nameformat | Display full names |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Student 1" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Excellent!" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Student 2" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Very good" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Student 3" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Good" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show multiple high scores using ID numbers # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\highscoreswithscales.feature:81
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 3 |
| id_config_showworst | 0 |
| id_config_nameformat | Display only ID numbers |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "User S1" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Excellent!" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "User S2" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Very good" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "User S3" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Good" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show multiple high scores using anonymous names # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\highscoreswithscales.feature:96
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 3 |
| id_config_showworst | 0 |
| id_config_nameformat | Anonymous results |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "User" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 1" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Excellent!" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 2" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Very good" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 3" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Good" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
@block @block_activity_results
Feature: The activity results block displays student scores as scales
In order to be display student scores as scales
As a user
I need to see the activity results block
Background: # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\highscoreswithscalesandgroups.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
| student1 | Student | 1 | student1@example.com | S1 |
| student2 | Student | 2 | student2@example.com | S2 |
| student3 | Student | 3 | student3@example.com | S3 |
| student4 | Student | 4 | student4@example.com | S4 |
| student5 | Student | 5 | student5@example.com | S5 |
| student6 | Student | 6 | student6@example.com | S6 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "groups" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| Group 1 | C1 | G1 |
| Group 2 | C1 | G2 |
| Group 3 | C1 | G3 |
| Group 4 | C1 | G4 |
| Group 5 | C1 | G5 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
| student4 | C1 | student |
| student5 | C1 | student |
| student6 | C1 | student |
And the following "group members" exist: # behat_hooks::i_look_for_exceptions()
| user | group |
| student1 | G1 |
| student2 | G1 |
| student3 | G2 |
| student4 | G2 |
| student5 | G3 |
| student6 | G3 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "Scales" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I press "Add a new scale" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | My Scale |
| Scale | Disappointing, Not good enough, Average, Good, Very good, Excellent! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| id_grade_modgrade_type | Scale |
| id_grade_modgrade_scale | My Scale |
| Group mode | Separate groups |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "Very good" to the user "Student 3" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "Good" to the user "Student 4" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "Good" to the user "Student 5" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "Average" to the user "Student 6" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show 1 high score # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\highscoreswithscalesandgroups.feature:73
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 1 |
| id_config_showworst | 0 |
| id_config_nameformat | Display full names |
| id_config_usegroups | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Group 1" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Excellent!" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Student 1" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Excellent!" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show multiple high scores using full names # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\highscoreswithscalesandgroups.feature:90
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 3 |
| id_config_showworst | 0 |
| id_config_nameformat | Display full names |
| id_config_usegroups | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Group 1" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Excellent!" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Group 2" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Very good" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Group 3" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Good" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student3" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Student 3" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Very good" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Student 4" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Good" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show multiple high scores using ID numbers # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\highscoreswithscalesandgroups.feature:113
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 3 |
| id_config_showworst | 0 |
| id_config_nameformat | Display only ID numbers |
| id_config_usegroups | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Group" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Excellent!" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Very good" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Good" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "User S1" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Excellent!" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "User S2" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Very good" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show multiple high scores using anonymous names # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\highscoreswithscalesandgroups.feature:134
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 3 |
| id_config_showworst | 0 |
| id_config_nameformat | Anonymous results |
| id_config_usegroups | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Group" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Excellent!" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Very good" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Good" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "User" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Excellent!" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Very good" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
@block @block_activity_results
Feature: The activity results block displays student scores
In order to be display student scores
As a user
I need to see the activity results block
Background: # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\highscoreswithseperategroups.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
| student1 | Student | 1 | student1@example.com | S1 |
| student2 | Student | 2 | student2@example.com | S2 |
| student3 | Student | 3 | student3@example.com | S3 |
| student4 | Student | 4 | student4@example.com | S4 |
| student5 | Student | 5 | student5@example.com | S5 |
| student6 | Student | 6 | student6@example.com | S6 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "groups" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| Group 1 | C1 | G1 |
| Group 2 | C1 | G2 |
| Group 3 | C1 | G3 |
| Group 4 | C1 | G4 |
| Group 5 | C1 | G5 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
| student4 | C1 | student |
| student5 | C1 | student |
| student6 | C1 | student |
And the following "group members" exist: # behat_hooks::i_look_for_exceptions()
| user | group |
| student1 | G1 |
| student2 | G1 |
| student3 | G2 |
| student4 | G2 |
| student5 | G3 |
| student6 | G3 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| Group mode | Separate groups |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Scenario: Configure the block on the course page to show 1 high score # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\highscoreswithseperategroups.feature:64
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 1 |
| id_config_showworst | 0 |
| id_config_gradeformat | Percentages |
| id_config_nameformat | Display full names |
| id_config_decimalpoints | 0 |
| id_config_usegroups | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Group 1" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "95%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show 1 high score as a fraction # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\highscoreswithseperategroups.feature:78
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 1 |
| id_config_showworst | 0 |
| id_config_gradeformat | Fractions |
| id_config_nameformat | Display full names |
| id_config_usegroups | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Group 1" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "95.00/100.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Student 1" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "100.00/100.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show 1 high score as a absolute numbers # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\highscoreswithseperategroups.feature:96
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 1 |
| id_config_showworst | 0 |
| id_config_gradeformat | Absolute numbers |
| id_config_nameformat | Display full names |
| id_config_usegroups | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Group 1" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "95.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Student 1" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "100.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show multiple high scores as percentages # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\highscoreswithseperategroups.feature:114
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 3 |
| id_config_showworst | 0 |
| id_config_gradeformat | Percentages |
| id_config_nameformat | Display full names |
| id_config_decimalpoints | 0 |
| id_config_usegroups | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Group 1" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "95%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Group 2" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "85%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Group 3" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "75%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Student 1" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "100%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Student 2" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "90%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show multiple high scores as fractions # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\highscoreswithseperategroups.feature:139
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 3 |
| id_config_showworst | 0 |
| id_config_gradeformat | Fractions |
| id_config_nameformat | Display full names |
| id_config_usegroups | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Group 1" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "95.00/100.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Group 2" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "85.00/100.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Group 3" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "75.00/100.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student3" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Student 3" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "90.00/100.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Student 4" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "80.00/100.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show multiple high scores as absolute numbers # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\highscoreswithseperategroups.feature:163
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 3 |
| id_config_showworst | 0 |
| id_config_gradeformat | Absolute numbers |
| id_config_nameformat | Display full names |
| id_config_usegroups | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Group 1" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "95.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Group 2" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "85.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Group 3" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "75.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Student 1" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "100.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Student 2" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "90.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show multiple high scores using ID numbers # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\highscoreswithseperategroups.feature:187
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 3 |
| id_config_showworst | 0 |
| id_config_gradeformat | Percentages |
| id_config_nameformat | Display only ID numbers |
| id_config_usegroups | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Group" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "95.00%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "85.00%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "75.00%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "User S1" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "100.00%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "User S2" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "90.00%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show multiple high scores using anonymous names # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\highscoreswithseperategroups.feature:209
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 3 |
| id_config_showworst | 0 |
| id_config_gradeformat | Percentages |
| id_config_nameformat | Anonymous results |
| id_config_usegroups | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Group" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "95.00%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "85.00%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "75.00%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "User" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "100.00%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "90.00%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
@block @block_activity_results
Feature: The activity results block displays student scores
In order to be display student scores
As a user
I need to see the activity results block
Background: # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\highscoreswithvisiblegroups.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
| student1 | Student | 1 | student1@example.com | S1 |
| student2 | Student | 2 | student2@example.com | S2 |
| student3 | Student | 3 | student3@example.com | S3 |
| student4 | Student | 4 | student4@example.com | S4 |
| student5 | Student | 5 | student5@example.com | S5 |
| student6 | Student | 6 | student6@example.com | S6 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "groups" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| Group 1 | C1 | G1 |
| Group 2 | C1 | G2 |
| Group 3 | C1 | G3 |
| Group 4 | C1 | G4 |
| Group 5 | C1 | G5 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
| student4 | C1 | student |
| student5 | C1 | student |
| student6 | C1 | student |
And the following "group members" exist: # behat_hooks::i_look_for_exceptions()
| user | group |
| student1 | G1 |
| student2 | G1 |
| student3 | G2 |
| student4 | G2 |
| student5 | G3 |
| student6 | G3 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| Group mode | Visible groups |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Scenario: Configure the block on the course page to show 1 high score # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\highscoreswithvisiblegroups.feature:64
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 1 |
| id_config_showworst | 0 |
| id_config_gradeformat | Percentages |
| id_config_nameformat | Display full names |
| id_config_decimalpoints | 0 |
| id_config_usegroups | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Group 1" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "95%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show 1 high score as a fraction # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\highscoreswithvisiblegroups.feature:78
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 1 |
| id_config_showworst | 0 |
| id_config_gradeformat | Fractions |
| id_config_nameformat | Display full names |
| id_config_usegroups | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Then I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Group 1" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "95.00/100.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show 1 high score as a absolute numbers # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\highscoreswithvisiblegroups.feature:94
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 1 |
| id_config_showworst | 0 |
| id_config_gradeformat | Absolute numbers |
| id_config_nameformat | Display full names |
| id_config_usegroups | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Then I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Group 1" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "95.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show multiple high scores as percentages # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\highscoreswithvisiblegroups.feature:110
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 3 |
| id_config_showworst | 0 |
| id_config_gradeformat | Percentages |
| id_config_nameformat | Display full names |
| id_config_decimalpoints | 0 |
| id_config_usegroups | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Then I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Group 1" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "95%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Group 2" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "85%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Group 3" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "75%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show multiple high scores as fractions # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\highscoreswithvisiblegroups.feature:131
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 3 |
| id_config_showworst | 0 |
| id_config_gradeformat | Fractions |
| id_config_nameformat | Display full names |
| id_config_usegroups | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Then I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Group 1" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "95.00/100.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Group 2" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "85.00/100.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Group 3" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "75.00/100.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show multiple high scores as absolute numbers # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\highscoreswithvisiblegroups.feature:151
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 3 |
| id_config_showworst | 0 |
| id_config_gradeformat | Absolute numbers |
| id_config_nameformat | Display full names |
| id_config_usegroups | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Then I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Group 1" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "95.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Group 2" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "85.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Group 3" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "75.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show multiple high scores using ID numbers # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\highscoreswithvisiblegroups.feature:171
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 3 |
| id_config_showworst | 0 |
| id_config_gradeformat | Percentages |
| id_config_nameformat | Display only ID numbers |
| id_config_usegroups | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Then I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Group" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "95.00%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "85.00%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "75.00%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show multiple high scores using anonymous names # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\highscoreswithvisiblegroups.feature:189
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 3 |
| id_config_showworst | 0 |
| id_config_gradeformat | Percentages |
| id_config_nameformat | Anonymous results |
| id_config_usegroups | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Then I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Group" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "95.00%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "85.00%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "75.00%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
@editor @editor_atto @atto @atto_html
Feature: Atto edit HTML
To write advanced HTML, I need to edit the HTML source code
@javascript
Scenario: Edit the html source # C:\Apache24\htdocs\integration\lib\editor\atto\plugins\html\tests\behat\html.feature:6
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
When I follow "Profile" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I set the field "Description" to "Smurf
" # behat_hooks::i_look_for_exceptions()
And I click on "Show more buttons" "button" # behat_hooks::i_look_for_exceptions()
And I click on "HTML" "button" # behat_hooks::i_look_for_exceptions()
Then the field "Description" matches value "Smurf
" # behat_hooks::i_look_for_exceptions()
@core @core_group
Feature: Uniqueness of Group ID number
In order to create unique groups and groupings
As a teacher
I need to create groups with unique identificators
Background: # C:\Apache24\htdocs\integration\group\tests\behat\id_uniqueness.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I expand "Users" node # behat_hooks::i_look_for_exceptions()
And I follow "Groups" # behat_hooks::i_look_for_exceptions()
Scenario: Group ID number uniqueness # C:\Apache24\htdocs\integration\group\tests\behat\id_uniqueness.feature:22
Given I press "Create group" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Group name | Group 1 |
| Group ID number | G1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
When I press "Create group" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Group name | Group 2 |
| Group ID number | G1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "This ID number is already taken" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Group ID number | G2 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I set the field "groups" to "Group 1 (0)" # behat_hooks::i_look_for_exceptions()
And I press "Edit group settings" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Group ID number | G2 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "This ID number is already taken" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
Scenario: Grouping ID number uniqueness # C:\Apache24\htdocs\integration\group\tests\behat\id_uniqueness.feature:45
Given I follow "Groupings" # behat_hooks::i_look_for_exceptions()
And I press "Create grouping" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Grouping name | Grouping 1 |
| Grouping ID number | GG1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
When I press "Create grouping" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Grouping name | Grouping 2 |
| Grouping ID number | GG1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "This ID number is already taken" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Grouping ID number | GG2 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I click on "Edit" "link" in the "Grouping 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Grouping ID number | GG2 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "This ID number is already taken" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
@editor @editor_atto @atto @atto_image @_file_upload
Feature: Add images to Atto
To write rich text - I need to add images.
@javascript
Scenario: Insert an image # C:\Apache24\htdocs\integration\lib\editor\atto\plugins\image\tests\behat\image.feature:6
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I follow "Manage private files..." # behat_hooks::i_look_for_exceptions()
And I upload "lib/editor/atto/tests/fixtures/moodle-logo.png" file to "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I click on "Save changes" "button" # behat_hooks::i_look_for_exceptions()
And I follow "Profile" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
When I set the field "Description" to "Image test
" # behat_hooks::i_look_for_exceptions()
And I select the text in the "Description" Atto editor # behat_hooks::i_look_for_exceptions()
And I click on "Image" "button" # behat_hooks::i_look_for_exceptions()
And I click on "Browse repositories..." "button" # behat_hooks::i_look_for_exceptions()
And I click on "Private files" "link" in the ".fp-repo-area" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "moodle-logo.png" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Select this file" "button" # behat_hooks::i_look_for_exceptions()
And I set the field "Describe this image for someone who cannot see it" to "It's the Moodle" # behat_hooks::i_look_for_exceptions()
And I wait until the page is ready # behat_hooks::i_look_for_exceptions()
And the field "Width" matches value "204" # behat_hooks::i_look_for_exceptions()
And the field "Height" matches value "61" # behat_hooks::i_look_for_exceptions()
And I set the field "Auto size" to "1" # behat_hooks::i_look_for_exceptions()
And I wait until the page is ready # behat_hooks::i_look_for_exceptions()
And I set the field "Width" to "2040" # behat_hooks::i_look_for_exceptions()
And I take focus off "Width" "field" # behat_hooks::i_look_for_exceptions()
And the field "Height" matches value "610" # behat_hooks::i_look_for_exceptions()
And I set the field "Height" to "61" # behat_hooks::i_look_for_exceptions()
And I take focus off "Height" "field" # behat_hooks::i_look_for_exceptions()
And the field "Width" matches value "204" # behat_hooks::i_look_for_exceptions()
And I set the field "Auto size" to "0" # behat_hooks::i_look_for_exceptions()
And I wait until the page is ready # behat_hooks::i_look_for_exceptions()
And I set the field "Width" to "123" # behat_hooks::i_look_for_exceptions()
And I set the field "Height" to "456" # behat_hooks::i_look_for_exceptions()
And I take focus off "Height" "field" # behat_hooks::i_look_for_exceptions()
And the field "Width" matches value "123" # behat_hooks::i_look_for_exceptions()
And the field "Height" matches value "456" # behat_hooks::i_look_for_exceptions()
And I click on "Save image" "button" # behat_hooks::i_look_for_exceptions()
And I click on "Update profile" "button" # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I select the text in the "Description" Atto editor # behat_hooks::i_look_for_exceptions()
And I click on "Image" "button" # behat_hooks::i_look_for_exceptions()
Then the field "Describe this image for someone who cannot see it" matches value "It's the Moodle" # behat_hooks::i_look_for_exceptions()
And the field "Width" matches value "123" # behat_hooks::i_look_for_exceptions()
And the field "Height" matches value "456" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Manually inserting an image # C:\Apache24\htdocs\integration\lib\editor\atto\plugins\image\tests\behat\image.feature:53
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I follow "Profile" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I set the field "Description" to "Image:
.
" # behat_hooks::i_look_for_exceptions()
And I select the text in the "Description" Atto editor # behat_hooks::i_look_for_exceptions()
When I click on "Image" "button" # behat_hooks::i_look_for_exceptions()
Then the field "Enter URL" matches value "/nothing/here" # behat_hooks::i_look_for_exceptions()
And I set the field "Describe this image for someone who cannot see it" to "Something" # behat_hooks::i_look_for_exceptions()
And I set the field "Enter URL" to "" # behat_hooks::i_look_for_exceptions()
And I press "Save image" # behat_hooks::i_look_for_exceptions()
And I set the field "Description" to "Image:
.
" # behat_hooks::i_look_for_exceptions()
And I press "Update profile" # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I select the text in the "Description" Atto editor # behat_hooks::i_look_for_exceptions()
And I click on "Image" "button" # behat_hooks::i_look_for_exceptions()
And the field "Enter URL" matches value "/nothing/again" # behat_hooks::i_look_for_exceptions()
And the field "Width" matches value "123" # behat_hooks::i_look_for_exceptions()
And the field "Height" matches value "456" # behat_hooks::i_look_for_exceptions()
And the field "Describe this image" matches value "Awesome!" # behat_hooks::i_look_for_exceptions()
@qtype @qtype_ddimageortext
Feature: Test importing drag and drop onto image questions
As a teacher
In order to reuse drag and drop onto image questions
I need to import them
Background: # C:\Apache24\htdocs\integration\question\type\ddimageortext\tests\behat\import.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
@javascript @_file_upload
Scenario: import drag and drop onto image question. # C:\Apache24\htdocs\integration\question\type\ddimageortext\tests\behat\import.feature:21
When I navigate to "Import" node in "Course administration > Question bank" # behat_hooks::i_look_for_exceptions()
And I set the field "id_format_xml" to "1" # behat_hooks::i_look_for_exceptions()
And I upload "question/type/ddimageortext/tests/fixtures/testquestion.moodle.xml" file to "Import" filemanager # behat_hooks::i_look_for_exceptions()
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Parsing questions from import file." # behat_hooks::i_look_for_exceptions()
And I should see "Importing 1 questions from file" # behat_hooks::i_look_for_exceptions()
And I should see "Identify the features in this cross-section by dragging the labels into the boxes." # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Imported Drag and drop onto image 001" # behat_hooks::i_look_for_exceptions()
@qtype @qtype_ddmarker
Feature: Test importing drag and drop markers questions
As a teacher
In order to reuse drag and drop markers questions
I need to import them
Background: # C:\Apache24\htdocs\integration\question\type\ddmarker\tests\behat\import.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
@javascript @_file_upload
Scenario: import drag and drop markers question. # C:\Apache24\htdocs\integration\question\type\ddmarker\tests\behat\import.feature:21
When I navigate to "Import" node in "Course administration > Question bank" # behat_hooks::i_look_for_exceptions()
And I set the field "id_format_xml" to "1" # behat_hooks::i_look_for_exceptions()
And I upload "question/type/ddmarker/tests/fixtures/testquestion.moodle.xml" file to "Import" filemanager # behat_hooks::i_look_for_exceptions()
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Parsing questions from import file." # behat_hooks::i_look_for_exceptions()
And I should see "Importing 1 questions from file" # behat_hooks::i_look_for_exceptions()
And I should see "Please place the markers on the map of Milton Keynes and be aware that there is more than one railway station." # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Milton Keynes landmarks" # behat_hooks::i_look_for_exceptions()
@qtype @qtype_ddwtos
Feature: Test importing drag and drop into text questions
As a teacher
In order to reuse drag and drop into text questions
I need to import them
Background: # C:\Apache24\htdocs\integration\question\type\ddwtos\tests\behat\import.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
@javascript @_file_upload
Scenario: import drag and drop into text question. # C:\Apache24\htdocs\integration\question\type\ddwtos\tests\behat\import.feature:21
When I navigate to "Import" node in "Course administration > Question bank" # behat_hooks::i_look_for_exceptions()
And I set the field "id_format_xml" to "1" # behat_hooks::i_look_for_exceptions()
And I upload "question/type/ddwtos/tests/fixtures/testquestion.moodle.xml" file to "Import" filemanager # behat_hooks::i_look_for_exceptions()
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Parsing questions from import file." # behat_hooks::i_look_for_exceptions()
And I should see "Importing 1 questions from file" # behat_hooks::i_look_for_exceptions()
And I should see "1. The [[1]] [[2]] on the [[3]]." # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Imported Drag and drop into text 001" # behat_hooks::i_look_for_exceptions()
@qtype @qtype_description
Feature: Test importing Description questions
As a teacher
In order to reuse Description questions
I need to import them
Background: # C:\Apache24\htdocs\integration\question\type\description\tests\behat\import.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
@javascript @_file_upload
Scenario: import a Description question. # C:\Apache24\htdocs\integration\question\type\description\tests\behat\import.feature:21
When I navigate to "Import" node in "Course administration > Question bank" # behat_hooks::i_look_for_exceptions()
And I set the field "id_format_xml" to "1" # behat_hooks::i_look_for_exceptions()
And I upload "question/type/description/tests/fixtures/testquestion.moodle.xml" file to "Import" filemanager # behat_hooks::i_look_for_exceptions()
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Parsing questions from import file." # behat_hooks::i_look_for_exceptions()
And I should see "Importing 1 questions from file" # behat_hooks::i_look_for_exceptions()
And I should see "Instructions about the following questions." # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "description-001" # behat_hooks::i_look_for_exceptions()
@qtype @qtype_essay
Feature: Test importing Essay questions
As a teacher
In order to reuse Essay questions
I need to import them
Background: # C:\Apache24\htdocs\integration\question\type\essay\tests\behat\import.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
@javascript @_file_upload
Scenario: import Essay question. # C:\Apache24\htdocs\integration\question\type\essay\tests\behat\import.feature:21
When I navigate to "Import" node in "Course administration > Question bank" # behat_hooks::i_look_for_exceptions()
And I set the field "id_format_xml" to "1" # behat_hooks::i_look_for_exceptions()
And I upload "question/type/essay/tests/fixtures/testquestion.moodle.xml" file to "Import" filemanager # behat_hooks::i_look_for_exceptions()
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Parsing questions from import file." # behat_hooks::i_look_for_exceptions()
And I should see "Importing 1 questions from file" # behat_hooks::i_look_for_exceptions()
And I should see "Write an essay with 500 words." # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "essay-001" # behat_hooks::i_look_for_exceptions()
@qtype @qtype_match
Feature: Test importing Matching questions
As a teacher
In order to reuse Matching questions
I need to import them
Background: # C:\Apache24\htdocs\integration\question\type\match\tests\behat\import.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
@javascript @_file_upload
Scenario: import Matching question. # C:\Apache24\htdocs\integration\question\type\match\tests\behat\import.feature:21
When I navigate to "Import" node in "Course administration > Question bank" # behat_hooks::i_look_for_exceptions()
And I set the field "id_format_xml" to "1" # behat_hooks::i_look_for_exceptions()
And I upload "question/type/match/tests/fixtures/testquestion.moodle.xml" file to "Import" filemanager # behat_hooks::i_look_for_exceptions()
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Parsing questions from import file." # behat_hooks::i_look_for_exceptions()
And I should see "Importing 1 questions from file" # behat_hooks::i_look_for_exceptions()
And I should see "1. Classify the animals." # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "matching-001" # behat_hooks::i_look_for_exceptions()
@qtype @qtype_multichoice
Feature: Test importing Multiple choice questions
As a teacher
In order to reuse Multiple choice questions
I need to import them
Background: # C:\Apache24\htdocs\integration\question\type\multichoice\tests\behat\import.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
@javascript @_file_upload
Scenario: import Multiple choice question. # C:\Apache24\htdocs\integration\question\type\multichoice\tests\behat\import.feature:21
When I navigate to "Import" node in "Course administration > Question bank" # behat_hooks::i_look_for_exceptions()
And I set the field "id_format_xml" to "1" # behat_hooks::i_look_for_exceptions()
And I upload "question/type/multichoice/tests/fixtures/testquestion.moodle.xml" file to "Import" filemanager # behat_hooks::i_look_for_exceptions()
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Parsing questions from import file." # behat_hooks::i_look_for_exceptions()
And I should see "Importing 1 questions from file" # behat_hooks::i_look_for_exceptions()
And I should see "1. Find the capital cities in Europe." # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Multi-choice-001" # behat_hooks::i_look_for_exceptions()
@qtype @qtype_shortanswer
Feature: Test importing Short answer questions
As a teacher
In order to reuse Short answer questions
I need to import them
Background: # C:\Apache24\htdocs\integration\question\type\shortanswer\tests\behat\import.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
@javascript @_file_upload
Scenario: import Matching question. # C:\Apache24\htdocs\integration\question\type\shortanswer\tests\behat\import.feature:21
When I navigate to "Import" node in "Course administration > Question bank" # behat_hooks::i_look_for_exceptions()
And I set the field "id_format_xml" to "1" # behat_hooks::i_look_for_exceptions()
And I upload "question/type/shortanswer/tests/fixtures/testquestion.moodle.xml" file to "Import" filemanager # behat_hooks::i_look_for_exceptions()
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Parsing questions from import file." # behat_hooks::i_look_for_exceptions()
And I should see "Importing 1 questions from file" # behat_hooks::i_look_for_exceptions()
And I should see "1. Name an amphibian: __________" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "shortanswer-001" # behat_hooks::i_look_for_exceptions()
@qtype @qtype_truefalse
Feature: Test importing True/False questions
As a teacher
In order to reuse True/False questions
I need to import them
Background: # C:\Apache24\htdocs\integration\question\type\truefalse\tests\behat\import.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
@javascript @_file_upload
Scenario: import a True/False question. # C:\Apache24\htdocs\integration\question\type\truefalse\tests\behat\import.feature:21
When I navigate to "Import" node in "Course administration > Question bank" # behat_hooks::i_look_for_exceptions()
And I set the field "id_format_xml" to "1" # behat_hooks::i_look_for_exceptions()
And I upload "question/type/truefalse/tests/fixtures/testquestion.moodle.xml" file to "Import" filemanager # behat_hooks::i_look_for_exceptions()
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Parsing questions from import file." # behat_hooks::i_look_for_exceptions()
And I should see "Importing 1 questions from file" # behat_hooks::i_look_for_exceptions()
And I should see "The answer is true." # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "true-false-001" # behat_hooks::i_look_for_exceptions()
@qformat @qformat_webct
Feature: Test importing questions from WebCT format.
In order to reuse questions from am obsolete commercial LMS
As an teacher
I need to be able to import them in WebCT format.
Background: # C:\Apache24\htdocs\integration\question\format\webct\tests\behat\import.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname |
| teacher | Teacher |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher | C1 | editingteacher |
And I log in as "teacher" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
@javascript @_file_upload
Scenario: import some WebCT questions # C:\Apache24\htdocs\integration\question\format\webct\tests\behat\import.feature:21
When I navigate to "Import" node in "Course administration > Question bank" # behat_hooks::i_look_for_exceptions()
And I set the field "id_format_webct" to "1" # behat_hooks::i_look_for_exceptions()
And I upload "question/format/webct/tests/fixtures/sample_webct.txt" file to "Import" filemanager # behat_hooks::i_look_for_exceptions()
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Parsing questions from import file." # behat_hooks::i_look_for_exceptions()
And I should see "Importing 6 questions from file" # behat_hooks::i_look_for_exceptions()
And I should see "What's between orange and green in the spectrum?" # behat_hooks::i_look_for_exceptions()
When I press "Continue" # behat_hooks::i_look_for_exceptions()
Then I should see "USER-3" # behat_hooks::i_look_for_exceptions()
@core @core_backup
Feature: Import course's contents into another course
In order to move and copy contents between courses
As a teacher
I need to import a course contents into another course selecting what I want to import
Scenario: Import course's contents to another course # C:\Apache24\htdocs\integration\backup\util\ui\tests\behat\import_course.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
| Course 2 | C2 | 0 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| teacher1 | C2 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Database" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Test database name |
| Description | Test database description |
And I add a "Forum" to section "2" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name |
| Description | Test forum description |
And I add the "Comments" block # behat_hooks::i_look_for_exceptions()
And I add the "Recent blog entries" block # behat_hooks::i_look_for_exceptions()
And I turn editing mode off # behat_hooks::i_look_for_exceptions()
When I import "Course 1" course into "Course 2" course using this options: # behat_hooks::i_look_for_exceptions()
Then I should see "Test database name" # behat_hooks::i_look_for_exceptions()
And I should see "Test forum name" # behat_hooks::i_look_for_exceptions()
And I should see "Comments" in the "Comments" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Recent blog entries" # behat_hooks::i_look_for_exceptions()
@qformat @qformat_gift
Feature: Test importing questions from GIFT format.
In order to reuse questions
As an teacher
I need to be able to import them in GIFT format.
Background: # C:\Apache24\htdocs\integration\question\format\gift\tests\behat\import_export.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname |
| teacher | Teacher |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher | C1 | editingteacher |
And I log in as "teacher" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
@javascript @_file_upload
Scenario: import some GIFT questions # C:\Apache24\htdocs\integration\question\format\gift\tests\behat\import_export.feature:21
When I navigate to "Import" node in "Course administration > Question bank" # behat_hooks::i_look_for_exceptions()
And I set the field "id_format_gift" to "1" # behat_hooks::i_look_for_exceptions()
And I upload "question/format/gift/tests/fixtures/questions.gift.txt" file to "Import" filemanager # behat_hooks::i_look_for_exceptions()
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Parsing questions from import file." # behat_hooks::i_look_for_exceptions()
And I should see "Importing 9 questions from file" # behat_hooks::i_look_for_exceptions()
And I should see "What's between orange and green in the spectrum?" # behat_hooks::i_look_for_exceptions()
When I press "Continue" # behat_hooks::i_look_for_exceptions()
Then I should see "colours" # behat_hooks::i_look_for_exceptions()
And I navigate to "Export" node in "Course administration > Question bank" # behat_hooks::i_look_for_exceptions()
And I set the field "id_format_gift" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Export questions to file" # behat_hooks::i_look_for_exceptions()
And following "click here" should download between "1550" and "1650" bytes # behat_hooks::i_look_for_exceptions()
@qformat @qformat_xml
Feature: Test importing questions from Moodle XML format.
In order to reuse questions
As an teacher
I need to be able to import them in XML format.
Background: # C:\Apache24\htdocs\integration\question\format\xml\tests\behat\import_export.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname |
| teacher | Teacher |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher | C1 | editingteacher |
And I log in as "teacher" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
@javascript @_file_upload
Scenario: import some true/false questions from Moodle XML format # C:\Apache24\htdocs\integration\question\format\xml\tests\behat\import_export.feature:21
When I navigate to "Import" node in "Course administration > Question bank" # behat_hooks::i_look_for_exceptions()
And I set the field "id_format_xml" to "1" # behat_hooks::i_look_for_exceptions()
And I upload "question/format/xml/tests/fixtures/truefalse.xml" file to "Import" filemanager # behat_hooks::i_look_for_exceptions()
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Parsing questions from import file." # behat_hooks::i_look_for_exceptions()
And I should see "Importing 2 questions from file" # behat_hooks::i_look_for_exceptions()
And I should see "is an acronym for Modular Object-Oriented Dynamic Learning Education" # behat_hooks::i_look_for_exceptions()
And I should see "is an acronym for Modular Object-Oriented Dynamic Learning Environment" # behat_hooks::i_look_for_exceptions()
When I press "Continue" # behat_hooks::i_look_for_exceptions()
Then I should see "Moodle acronym (False)" # behat_hooks::i_look_for_exceptions()
Then I should see "Moodle acronym (True)" # behat_hooks::i_look_for_exceptions()
And I navigate to "Export" node in "Course administration > Question bank" # behat_hooks::i_look_for_exceptions()
And I set the field "id_format_xml" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Export questions to file" # behat_hooks::i_look_for_exceptions()
And following "click here" should download between "57000" and "58000" bytes # behat_hooks::i_look_for_exceptions()
@javascript @_file_upload
Scenario: import some multiple choice questions from Moodle XML format # C:\Apache24\htdocs\integration\question\format\xml\tests\behat\import_export.feature:41
When I navigate to "Import" node in "Course administration > Question bank" # behat_hooks::i_look_for_exceptions()
And I set the field "id_format_xml" to "1" # behat_hooks::i_look_for_exceptions()
And I upload "question/format/xml/tests/fixtures/multichoice.xml" file to "Import" filemanager # behat_hooks::i_look_for_exceptions()
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Parsing questions from import file." # behat_hooks::i_look_for_exceptions()
And I should see "Importing 1 questions from file" # behat_hooks::i_look_for_exceptions()
And I should see "What language is being spoken?" # behat_hooks::i_look_for_exceptions()
When I press "Continue" # behat_hooks::i_look_for_exceptions()
Then I should see "Greeting" # behat_hooks::i_look_for_exceptions()
@javascript @_file_upload
Scenario: import some multi-answer questions from Moodle XML format # C:\Apache24\htdocs\integration\question\format\xml\tests\behat\import_export.feature:53
When I navigate to "Import" node in "Course administration > Question bank" # behat_hooks::i_look_for_exceptions()
And I set the field "id_format_xml" to "1" # behat_hooks::i_look_for_exceptions()
And I upload "question/format/xml/tests/fixtures/multianswer.xml" file to "Import" filemanager # behat_hooks::i_look_for_exceptions()
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Parsing questions from import file." # behat_hooks::i_look_for_exceptions()
And I should see "Importing 1 questions from file" # behat_hooks::i_look_for_exceptions()
And I should see "Match the following cities with the correct state," # behat_hooks::i_look_for_exceptions()
When I press "Continue" # behat_hooks::i_look_for_exceptions()
Then I should see "cloze with images" # behat_hooks::i_look_for_exceptions()
@javascript @_file_upload
Scenario: import some questions with legacy-style images from Moodle XML format # C:\Apache24\htdocs\integration\question\format\xml\tests\behat\import_export.feature:65
When I navigate to "Import" node in "Course administration > Question bank" # behat_hooks::i_look_for_exceptions()
And I set the field "id_format_xml" to "1" # behat_hooks::i_look_for_exceptions()
And I upload "question/format/xml/tests/fixtures/sample_questions_with_old_image_tag.xml" file to "Import" filemanager # behat_hooks::i_look_for_exceptions()
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Parsing questions from import file." # behat_hooks::i_look_for_exceptions()
And I should see "Importing 2 questions from file" # behat_hooks::i_look_for_exceptions()
And I should see "This is a multianswer question with an image in the old" # behat_hooks::i_look_for_exceptions()
And I should see "This is a multichoice question with an image in the old" # behat_hooks::i_look_for_exceptions()
When I press "Continue" # behat_hooks::i_look_for_exceptions()
Then I should see "cloze question with image" # behat_hooks::i_look_for_exceptions()
Then I should see "mcq with image" # behat_hooks::i_look_for_exceptions()
@mod @mod_lesson
Feature: In a lesson activity, teacher can import blackboard fill in the blank question
As a teacher
I need to import a fill in the blank question made in Blackboard in a lesson
@javascript @_file_upload
Scenario: Import fill in the blank question in a lesson # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\import_fillintheblank_question.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
When I am on homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Lesson" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Test lesson name |
| Description | Test lesson description |
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I follow "Import questions" # behat_hooks::i_look_for_exceptions()
And I set the field "File format" to "Blackboard" # behat_hooks::i_look_for_exceptions()
And I upload "mod/lesson/tests/fixtures/sample_blackboard_fib_qti.dat" file to "Upload" filemanager # behat_hooks::i_look_for_exceptions()
And I press "Import" # behat_hooks::i_look_for_exceptions()
Then I should see "Importing 1 questions" # behat_hooks::i_look_for_exceptions()
And I should see "Name an amphibian: __________" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should not see "__________" # behat_hooks::i_look_for_exceptions()
And I should not see "Your answer" # behat_hooks::i_look_for_exceptions()
And I set the field "id_answer" to "frog" # behat_hooks::i_look_for_exceptions()
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I should see "Your answer : frog" # behat_hooks::i_look_for_exceptions()
And I should see "A frog is an amphibian" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Congratulations - end of lesson reached" # behat_hooks::i_look_for_exceptions()
@core @core_backup
Feature: Option to include groups and groupings when importing a course to another course
In order to import a course to another course with groups and groupings
As a teacher
I need an option to include groups and groupings when importing a course to another course
Background: # C:\Apache24\htdocs\integration\backup\util\ui\tests\behat\import_groups.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname |
| Course 1 | C1 |
| Course 2 | C2 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| teacher1 | C2 | editingteacher |
And the following "groups" exist: # behat_hooks::i_look_for_exceptions()
| name | description | course | idnumber |
| Group 1 | Group description | C1 | GROUP1 |
| Group 2 | Group description | C1 | GROUP2 |
And the following "groupings" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| Grouping 1 | C1 | GROUPING1 |
| Grouping 2 | C1 | GROUPING2 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Scenario: Include groups and groupings when importing a course to another course # C:\Apache24\htdocs\integration\backup\util\ui\tests\behat\import_groups.feature:30
Given I import "Course 1" course into "Course 2" course using this options: # behat_hooks::i_look_for_exceptions()
| Initial | Include groups and groupings | 1 |
When I navigate to "Groups" node in "Course administration > Users" # behat_hooks::i_look_for_exceptions()
Then I should see "Group 1" # behat_hooks::i_look_for_exceptions()
And I should see "Group 2" # behat_hooks::i_look_for_exceptions()
And I follow "Groupings" # behat_hooks::i_look_for_exceptions()
And I should see "Grouping 1" # behat_hooks::i_look_for_exceptions()
And I should see "Grouping 2" # behat_hooks::i_look_for_exceptions()
Scenario: Do not include groups and groupings when importing a course to another course # C:\Apache24\htdocs\integration\backup\util\ui\tests\behat\import_groups.feature:40
Given I import "Course 1" course into "Course 2" course using this options: # behat_hooks::i_look_for_exceptions()
| Initial | Include groups and groupings | 0 |
When I navigate to "Groups" node in "Course administration > Users" # behat_hooks::i_look_for_exceptions()
Then I should not see "Group 1" # behat_hooks::i_look_for_exceptions()
And I should not see "Group 2" # behat_hooks::i_look_for_exceptions()
And I follow "Groupings" # behat_hooks::i_look_for_exceptions()
And I should not see "Grouping 1" # behat_hooks::i_look_for_exceptions()
And I should not see "Grouping 2" # behat_hooks::i_look_for_exceptions()
@mod @mod_lesson
Feature: In a lesson activity, teacher can import embedded images in questions answers and responses
As a teacher
I need to import a question with images in answers and responses in a lesson
@javascript @_file_upload
Scenario: Import questions with images in answers and responses in a lesson # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\import_images.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
When I am on homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Lesson" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Test lesson name |
| Description | Test lesson description |
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I follow "Import questions" # behat_hooks::i_look_for_exceptions()
And I set the field "File format" to "Moodle XML format" # behat_hooks::i_look_for_exceptions()
And I upload "mod/lesson/tests/fixtures/multichoice.xml" file to "Upload" filemanager # behat_hooks::i_look_for_exceptions()
And I press "Import" # behat_hooks::i_look_for_exceptions()
Then I should see "Importing 1 questions" # behat_hooks::i_look_for_exceptions()
And I should see " Listen to this greeting:" # behat_hooks::i_look_for_exceptions()
And I should see "What language is being spoken?" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "What language is being spoken?" # behat_hooks::i_look_for_exceptions()
And "//audio[contains(@title, 'Listen to this greeting:')]/source[contains(@src, 'bonjour.mp3')]" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
And "//*[contains(@class, 'answeroption')]//img[contains(@src, 'pluginfile.php')]" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
And "//*[contains(@class, 'answeroption')]//img[contains(@src, 'flag-france.jpg')]" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
@qtype @qtype_gapselect
Feature: Import and export select missing words questions
As a teacher
In order to reuse my select missing words questions
I need to be able to import and export them
Background: # C:\Apache24\htdocs\integration\question\type\gapselect\tests\behat\import_test.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | T1 | Teacher1 | teacher1@moodle.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
@javascript @_file_upload
Scenario: Import and export select missing words questions # C:\Apache24\htdocs\integration\question\type\gapselect\tests\behat\import_test.feature:21
When I navigate to "Import" node in "Course administration > Question bank" # behat_hooks::i_look_for_exceptions()
And I set the field "id_format_xml" to "1" # behat_hooks::i_look_for_exceptions()
And I upload "question/type/gapselect/tests/fixtures/testquestion.moodle.xml" file to "Import" filemanager # behat_hooks::i_look_for_exceptions()
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Parsing questions from import file." # behat_hooks::i_look_for_exceptions()
And I should see "Importing 1 questions from file" # behat_hooks::i_look_for_exceptions()
And I should see "1. The [[1]] [[2]] on the [[3]]." # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Imported Select missing words 001" # behat_hooks::i_look_for_exceptions()
When I navigate to "Export" node in "Course administration > Question bank" # behat_hooks::i_look_for_exceptions()
And I set the field "id_format_xml" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Export questions to file" # behat_hooks::i_look_for_exceptions()
Then following "click here" should download between "1550" and "1650" bytes # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@qformat @qformat_webct
Feature: Test importing calculated question from WebCT format.
In order to reuse calculated questions from a commercial LMS
As a teacher
I need to be able to import them in WebCT format.
Background: # C:\Apache24\htdocs\integration\question\format\webct\tests\behat\importcalculated.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname |
| teacher | Teacher |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher | C1 | editingteacher |
And I log in as "teacher" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
@javascript @_file_upload
Scenario: import a WebCT calculated question # C:\Apache24\htdocs\integration\question\format\webct\tests\behat\importcalculated.feature:21
When I navigate to "Import" node in "Course administration > Question bank" # behat_hooks::i_look_for_exceptions()
And I set the field "id_format_webct" to "1" # behat_hooks::i_look_for_exceptions()
And I upload "question/format/webct/tests/fixtures/sample_calculated_webct.txt" file to "Import" filemanager # behat_hooks::i_look_for_exceptions()
And I press "id_submitbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "Parsing questions from import file." # behat_hooks::i_look_for_exceptions()
And I should see "Importing 1 questions from file" # behat_hooks::i_look_for_exceptions()
And I should see "Find the area in m2 of a square with sides of length {l} m." # behat_hooks::i_look_for_exceptions()
When I press "Continue" # behat_hooks::i_look_for_exceptions()
Then I should see "calculated: Square area" # behat_hooks::i_look_for_exceptions()
@mod @mod_choice
Feature: Include responses from inactive users
In order to view responses from inactive or suspended users in choice results
As a teacher
I need to enable the choice include inactive option
Background: # C:\Apache24\htdocs\integration\mod\choice\tests\behat\include_inactive.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
| student3 | Student | 3 | student3@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
Scenario: Enable the choice include inactive option and check that responses from inactive students are visible # C:\Apache24\htdocs\integration\mod\choice\tests\behat\include_inactive.feature:27
Given I add a "Choice" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Choice name | Choice name |
| Description | Choice Description |
| option[0] | Option 1 |
| option[1] | Option 2 |
| option[2] | Option 3 |
| Include responses from inactive/suspended users | Yes |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I choose "Option 1" from "Choice name" choice activity # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I choose "Option 2" from "Choice name" choice activity # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student3" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I choose "Option 3" from "Choice name" choice activity # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role | status |
| student1 | C1 | student | 1 |
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Choice name" # behat_hooks::i_look_for_exceptions()
Then I should see "View 3 responses" # behat_hooks::i_look_for_exceptions()
And I follow "View 3 responses" # behat_hooks::i_look_for_exceptions()
And I should see "Student 1" # behat_hooks::i_look_for_exceptions()
And I should see "Student 2" # behat_hooks::i_look_for_exceptions()
And I should see "Student 3" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role | timestart |
| student2 | C1 | student | 2145830400 |
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Choice name" # behat_hooks::i_look_for_exceptions()
Then I should see "View 3 responses" # behat_hooks::i_look_for_exceptions()
And I follow "View 3 responses" # behat_hooks::i_look_for_exceptions()
And I should see "Student 1" # behat_hooks::i_look_for_exceptions()
And I should see "Student 2" # behat_hooks::i_look_for_exceptions()
And I should see "Student 3" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role | timeend |
| student3 | C1 | student | 1425168000 |
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Choice name" # behat_hooks::i_look_for_exceptions()
Then I should see "View 3 responses" # behat_hooks::i_look_for_exceptions()
And I follow "View 3 responses" # behat_hooks::i_look_for_exceptions()
And I should see "Student 1" # behat_hooks::i_look_for_exceptions()
And I should see "Student 2" # behat_hooks::i_look_for_exceptions()
And I should see "Student 3" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Disable the choice include inactive option and check that responses from inactive students are not visible # C:\Apache24\htdocs\integration\mod\choice\tests\behat\include_inactive.feature:85
Given I add a "Choice" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Choice name | Choice name |
| Description | Choice Description |
| option[0] | Option 1 |
| option[1] | Option 2 |
| option[2] | Option 3 |
| Include responses from inactive/suspended users | No |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I choose "Option 1" from "Choice name" choice activity # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I choose "Option 2" from "Choice name" choice activity # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student3" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I choose "Option 3" from "Choice name" choice activity # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role | status |
| student1 | C1 | student | 1 |
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Choice name" # behat_hooks::i_look_for_exceptions()
Then I should see "View 2 responses" # behat_hooks::i_look_for_exceptions()
And I follow "View 2 responses" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 1" # behat_hooks::i_look_for_exceptions()
And I should see "Student 2" # behat_hooks::i_look_for_exceptions()
And I should see "Student 3" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role | timestart |
| student2 | C1 | student | 2145830400 |
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Choice name" # behat_hooks::i_look_for_exceptions()
Then I should see "View 1 responses" # behat_hooks::i_look_for_exceptions()
And I follow "View 1 responses" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 1" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 2" # behat_hooks::i_look_for_exceptions()
And I should see "Student 3" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role | timeend |
| student3 | C1 | student | 1425168000 |
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Choice name" # behat_hooks::i_look_for_exceptions()
Then I should see "View 0 responses" # behat_hooks::i_look_for_exceptions()
And I follow "View 0 responses" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 1" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 2" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 3" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@editor @editor_atto @atto @atto_indent
Feature: Indent text in Atto
To write rich text - I need to indent and outdent things.
@javascript
Scenario: Indent # C:\Apache24\htdocs\integration\lib\editor\atto\plugins\indent\tests\behat\indent.feature:6
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I follow "Profile" in the user menu # behat_hooks::i_look_for_exceptions()
When I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I set the field "Description" to "I need some space.
" # behat_hooks::i_look_for_exceptions()
And I select the text in the "Description" Atto editor # behat_hooks::i_look_for_exceptions()
And I click on "Show more buttons" "button" # behat_hooks::i_look_for_exceptions()
And I click on "Indent" "button" # behat_hooks::i_look_for_exceptions()
And I press "Update profile" # behat_hooks::i_look_for_exceptions()
And I follow "Preferences" in the user menu # behat_hooks::i_look_for_exceptions()
And I follow "Editor preferences" # behat_hooks::i_look_for_exceptions()
And I set the field "Text editor" to "Plain text area" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
Then I should see "class=\"editor-indent\"" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Indent and outdent # C:\Apache24\htdocs\integration\lib\editor\atto\plugins\indent\tests\behat\indent.feature:23
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I follow "Profile" in the user menu # behat_hooks::i_look_for_exceptions()
When I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I set the field "Description" to "I need some space.
" # behat_hooks::i_look_for_exceptions()
And I select the text in the "Description" Atto editor # behat_hooks::i_look_for_exceptions()
And I click on "Show more buttons" "button" # behat_hooks::i_look_for_exceptions()
And I click on "Indent" "button" # behat_hooks::i_look_for_exceptions()
And I click on "Outdent" "button" # behat_hooks::i_look_for_exceptions()
And I press "Update profile" # behat_hooks::i_look_for_exceptions()
And I follow "Preferences" in the user menu # behat_hooks::i_look_for_exceptions()
And I follow "Editor preferences" # behat_hooks::i_look_for_exceptions()
And I set the field "Text editor" to "Plain text area" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
Then I should not see "class=\"editor-indent\"" # behat_hooks::i_look_for_exceptions()
@enrol @enrol_lti
Feature: Check that the page listing the shared external tools is functioning as expected
In order to edit an external tool
As a teacher
I need to ensure the tool listing page is working as expected
Background: # C:\Apache24\htdocs\integration\enrol\lti\tests\behat\index_page.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "Manage enrol plugins" node in "Site administration > Plugins > Enrolments" # behat_hooks::i_look_for_exceptions()
And I click on "Enable" "link" in the "Publish as LTI tool" "table_row" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: I want to edit an external tool # C:\Apache24\htdocs\integration\enrol\lti\tests\behat\index_page.feature:22
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment name |
| Description | Submit your online text |
And I navigate to "Enrolment methods" node in "Course administration > Users" # behat_hooks::i_look_for_exceptions()
And I select "Publish as LTI tool" from the "Add method" singleselect # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Custom instance name | Assignment - LTI |
| Tool to be published | Test assignment name |
And I press "Add method" # behat_hooks::i_look_for_exceptions()
And I navigate to "Published as LTI tools" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I should see "Assignment - LTI" in the ".generaltable" "css_element" # behat_hooks::i_look_for_exceptions()
When I click on "Disable" "link" in the "Assignment - LTI" "table_row" # behat_hooks::i_look_for_exceptions()
Then ".dimmed_text" "css_element" should exist in the "Assignment - LTI" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "Enable" "link" in the "Assignment - LTI" "table_row" # behat_hooks::i_look_for_exceptions()
And ".dimmed_text" "css_element" should not exist in the "Assignment - LTI" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "Edit" "link" in the "Assignment - LTI" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Custom instance name | Course - LTI |
| Tool to be published | Course |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "Course - LTI" in the ".generaltable" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Delete" "link" in the "Course - LTI" "table_row" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I should see "Course - LTI" in the ".generaltable" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Delete" "link" in the "Course - LTI" "table_row" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "No tools provided" # behat_hooks::i_look_for_exceptions()
And I should not see "Course - LTI" # behat_hooks::i_look_for_exceptions()
@editor @editor_atto @atto @atto_italic @_bug_phantomjs
Feature: Atto italic button
To format text in Atto, I need to use the italic button.
@javascript
Scenario: Italicise some text # C:\Apache24\htdocs\integration\lib\editor\atto\plugins\italic\tests\behat\italic.feature:6
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I follow "Profile" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I set the field "Description" to "Tower of Pisa" # behat_hooks::i_look_for_exceptions()
And I select the text in the "Description" Atto editor # behat_hooks::i_look_for_exceptions()
When I click on "Italic" "button" # behat_hooks::i_look_for_exceptions()
And I press "Update profile" # behat_hooks::i_look_for_exceptions()
And I follow "Preferences" in the user menu # behat_hooks::i_look_for_exceptions()
And I follow "Editor preferences" # behat_hooks::i_look_for_exceptions()
And I set the field "Text editor" to "Plain text area" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
Then I should see "Tower of Pisa" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Toggle italics in some text # C:\Apache24\htdocs\integration\lib\editor\atto\plugins\italic\tests\behat\italic.feature:22
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I follow "Profile" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I set the field "Description" to "GHD - for hair" # behat_hooks::i_look_for_exceptions()
And I select the text in the "Description" Atto editor # behat_hooks::i_look_for_exceptions()
When I click on "Italic" "button" # behat_hooks::i_look_for_exceptions()
And I click on "Italic" "button" # behat_hooks::i_look_for_exceptions()
And I press "Update profile" # behat_hooks::i_look_for_exceptions()
And I follow "Preferences" in the user menu # behat_hooks::i_look_for_exceptions()
And I follow "Editor preferences" # behat_hooks::i_look_for_exceptions()
And I set the field "Text editor" to "Plain text area" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
Then I should not see "GHD - for hair" # behat_hooks::i_look_for_exceptions()
And I should see "GHD - for hair" # behat_hooks::i_look_for_exceptions()
@enrol @enrol_self
Feature: Users can be defined as key holders in courses where self enrolment is allowed
In order to participate in courses
As a user
I need to auto enrol me in courses
Background: # C:\Apache24\htdocs\integration\enrol\self\tests\behat\key_holder.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| manager1 | Manager | 1 | manager1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | topics |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "Define roles" node in "Site administration > Users > Permissions" # behat_hooks::i_look_for_exceptions()
And I click on "Add a new role" "button" # behat_hooks::i_look_for_exceptions()
And I click on "Continue" "button" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Short name | keyholder |
| Custom full name | Key holder |
| contextlevel50 | 1 |
| enrol/self:holdkey | 1 |
And I click on "Create this role" "button" # behat_hooks::i_look_for_exceptions()
And I navigate to "Courses" node in "Site administration > Appearance" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Key holder | 1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| manager1 | C1 | keyholder |
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: The key holder name is displayed on site home page # C:\Apache24\htdocs\integration\enrol\self\tests\behat\key_holder.feature:35
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
When I add "Self enrolment" enrolment method with: # behat_hooks::i_look_for_exceptions()
| Custom instance name | Test student enrolment |
| Enrolment key | moodle_rules |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "You should have received this enrolment key from:" # behat_hooks::i_look_for_exceptions()
And I should see "Manager 1" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Enrolment key | moodle_rules |
And I press "Enrol me" # behat_hooks::i_look_for_exceptions()
Then I should see "Topic 1" # behat_hooks::i_look_for_exceptions()
And I should not see "Enrolment options" # behat_hooks::i_look_for_exceptions()
And I should not see "Enrol me in this course" # behat_hooks::i_look_for_exceptions()
@mod @mod_label
Feature: Check label visibility works
In order to check label visibility works
As a teacher
I should create label activity
@javascript
Scenario: Hidden label activity should be show as hidden. # C:\Apache24\htdocs\integration\mod\label\tests\behat\label_visibility.feature:8
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Test | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| admin | C1 | editingteacher |
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I follow "Test" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
When I add a "label" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Label text | Swanky label |
| Visible | Hide |
Then "Swanky label" activity should be hidden # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Visible label activity should be shown as visible. # C:\Apache24\htdocs\integration\mod\label\tests\behat\label_visibility.feature:24
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Test | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| admin | C1 | editingteacher |
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I follow "Test" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
When I add a "label" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Label text | Swanky label |
| Visible | Show |
Then "Swanky label" activity should be visible # behat_hooks::i_look_for_exceptions()
@core
Feature: Forms with a large number of fields
In order to use certain forms on large Moodle installations
As an admin
I need forms to work with more fields than the PHP max_input_vars setting
Background: # C:\Apache24\htdocs\integration\lib\tests\behat\largeforms.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber |
| label | L1 | FixtureLink | C1 | label1 |
When I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "FixtureLink" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Small form with checkboxes (not using workaround) # C:\Apache24\htdocs\integration\lib\tests\behat\largeforms.feature:23
When I follow "Advanced checkboxes / Small" # behat_hooks::i_look_for_exceptions()
And I press "Submit here!" # behat_hooks::i_look_for_exceptions()
Then I should see "_qf__core_max_input_vars_form=1" # behat_hooks::i_look_for_exceptions()
And I should see "mform_isexpanded_id_general=1" # behat_hooks::i_look_for_exceptions()
And I should see "arraytest=[13,42]" # behat_hooks::i_look_for_exceptions()
And I should see "array2test=[13,42]" # behat_hooks::i_look_for_exceptions()
And I should see "submitbutton=Submit here!" # behat_hooks::i_look_for_exceptions()
And I should see "Bulk checkbox success: true" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Medium length form with checkboxes (needs workaround) # C:\Apache24\htdocs\integration\lib\tests\behat\largeforms.feature:34
When I follow "Advanced checkboxes / Below limit" # behat_hooks::i_look_for_exceptions()
And I press "Submit here!" # behat_hooks::i_look_for_exceptions()
Then I should see "_qf__core_max_input_vars_form=1" # behat_hooks::i_look_for_exceptions()
And I should see "mform_isexpanded_id_general=1" # behat_hooks::i_look_for_exceptions()
And I should see "arraytest=[13,42]" # behat_hooks::i_look_for_exceptions()
And I should see "array2test=[13,42]" # behat_hooks::i_look_for_exceptions()
And I should see "submitbutton=Submit here!" # behat_hooks::i_look_for_exceptions()
And I should see "Bulk checkbox success: true" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Exact PHP limit length form with checkboxes (uses workaround but doesn't need it) # C:\Apache24\htdocs\integration\lib\tests\behat\largeforms.feature:45
When I follow "Advanced checkboxes / Exact PHP limit" # behat_hooks::i_look_for_exceptions()
And I press "Submit here!" # behat_hooks::i_look_for_exceptions()
Then I should see "_qf__core_max_input_vars_form=1" # behat_hooks::i_look_for_exceptions()
And I should see "mform_isexpanded_id_general=1" # behat_hooks::i_look_for_exceptions()
And I should see "arraytest=[13,42]" # behat_hooks::i_look_for_exceptions()
And I should see "array2test=[13,42]" # behat_hooks::i_look_for_exceptions()
And I should see "submitbutton=Submit here!" # behat_hooks::i_look_for_exceptions()
And I should see "Bulk checkbox success: true" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Longer than the limit with checkboxes (needs workaround) # C:\Apache24\htdocs\integration\lib\tests\behat\largeforms.feature:56
When I follow "Advanced checkboxes / Above limit" # behat_hooks::i_look_for_exceptions()
And I press "Submit here!" # behat_hooks::i_look_for_exceptions()
Then I should see "_qf__core_max_input_vars_form=1" # behat_hooks::i_look_for_exceptions()
And I should see "mform_isexpanded_id_general=1" # behat_hooks::i_look_for_exceptions()
And I should see "arraytest=[13,42]" # behat_hooks::i_look_for_exceptions()
And I should see "array2test=[13,42]" # behat_hooks::i_look_for_exceptions()
And I should see "submitbutton=Submit here!" # behat_hooks::i_look_for_exceptions()
And I should see "Bulk checkbox success: true" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Small form with array fields (not using workaround) # C:\Apache24\htdocs\integration\lib\tests\behat\largeforms.feature:67
When I follow "Select options / Small" # behat_hooks::i_look_for_exceptions()
And I press "Submit here!" # behat_hooks::i_look_for_exceptions()
Then I should see "_qf__core_max_input_vars_form=1" # behat_hooks::i_look_for_exceptions()
And I should see "mform_isexpanded_id_general=1" # behat_hooks::i_look_for_exceptions()
And I should see "arraytest=[13,42]" # behat_hooks::i_look_for_exceptions()
And I should see "array2test=[13,42]" # behat_hooks::i_look_for_exceptions()
And I should see "submitbutton=Submit here!" # behat_hooks::i_look_for_exceptions()
And I should see "Bulk array success: true" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Below limit form with array fields (uses workaround but doesn't need it) # C:\Apache24\htdocs\integration\lib\tests\behat\largeforms.feature:78
When I follow "Select options / Below limit" # behat_hooks::i_look_for_exceptions()
And I press "Submit here!" # behat_hooks::i_look_for_exceptions()
Then I should see "_qf__core_max_input_vars_form=1" # behat_hooks::i_look_for_exceptions()
And I should see "mform_isexpanded_id_general=1" # behat_hooks::i_look_for_exceptions()
And I should see "arraytest=[13,42]" # behat_hooks::i_look_for_exceptions()
And I should see "array2test=[13,42]" # behat_hooks::i_look_for_exceptions()
And I should see "submitbutton=Submit here!" # behat_hooks::i_look_for_exceptions()
And I should see "Bulk array success: true" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Exact PHP limit length form with array fields (uses workaround but doesn't need it) # C:\Apache24\htdocs\integration\lib\tests\behat\largeforms.feature:89
When I follow "Select options / Exact PHP limit" # behat_hooks::i_look_for_exceptions()
And I press "Submit here!" # behat_hooks::i_look_for_exceptions()
Then I should see "_qf__core_max_input_vars_form=1" # behat_hooks::i_look_for_exceptions()
And I should see "mform_isexpanded_id_general=1" # behat_hooks::i_look_for_exceptions()
And I should see "arraytest=[13,42]" # behat_hooks::i_look_for_exceptions()
And I should see "array2test=[13,42]" # behat_hooks::i_look_for_exceptions()
And I should see "submitbutton=Submit here!" # behat_hooks::i_look_for_exceptions()
And I should see "Bulk array success: true" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Longer than the limit with array fields (needs workaround) # C:\Apache24\htdocs\integration\lib\tests\behat\largeforms.feature:100
When I follow "Select options / Above limit" # behat_hooks::i_look_for_exceptions()
And I press "Submit here!" # behat_hooks::i_look_for_exceptions()
Then I should see "_qf__core_max_input_vars_form=1" # behat_hooks::i_look_for_exceptions()
And I should see "mform_isexpanded_id_general=1" # behat_hooks::i_look_for_exceptions()
And I should see "arraytest=[13,42]" # behat_hooks::i_look_for_exceptions()
And I should see "array2test=[13,42]" # behat_hooks::i_look_for_exceptions()
And I should see "submitbutton=Submit here!" # behat_hooks::i_look_for_exceptions()
And I should see "Bulk array success: true" # behat_hooks::i_look_for_exceptions()
@mod @mod_lesson
Feature: Teachers can review student progress on all lessons in a course by viewing the complete report
As a Teacher
I need to view the complete report for one of my students.
Background: # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_complete_report.feature:6
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Lesson" to section "1" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Test lesson name |
| Description | Test lesson description |
| Re-takes allowed | Yes |
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
Scenario: View student progress for lesson that was never attempted # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_complete_report.feature:29
Given I follow "Add a content page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | First page name |
| Page contents | First page contents |
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Question" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True/false question 1 |
| Page contents | Paper is made from trees. |
| id_answer_editor_0 | True |
| id_response_editor_0 | Correct |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | False |
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
When I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Participants" # behat_hooks::i_look_for_exceptions()
And I follow "Student 1" # behat_hooks::i_look_for_exceptions()
And I follow "Complete report" # behat_hooks::i_look_for_exceptions()
Then I should see "No attempts have been made on this lesson" # behat_hooks::i_look_for_exceptions()
Scenario: View student progress for an incomplete lesson containing both content and question pages # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_complete_report.feature:56
Given I follow "Add a content page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | First page name |
| Page contents | First page contents |
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Question" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True/false question 1 |
| Page contents | Paper is made from trees. |
| id_answer_editor_0 | True |
| id_response_editor_0 | Correct |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | False |
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Add a content page" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Second page name |
| Page contents | Second page contents |
| id_answer_editor_0 | Previous page |
| id_jumpto_0 | Previous page |
| id_answer_editor_1 | Next page |
| id_jumpto_1 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "First page contents" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Then I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Participants" # behat_hooks::i_look_for_exceptions()
And I follow "Student 1" # behat_hooks::i_look_for_exceptions()
And I follow "Complete report" # behat_hooks::i_look_for_exceptions()
And I should see "Lesson has been started, but not yet completed" # behat_hooks::i_look_for_exceptions()
And I should see "1" in the ".cell.c1" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "0" in the ".cell.c2" "css_element" # behat_hooks::i_look_for_exceptions()
Scenario: View student progress for a lesson containing both content and question pages # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_complete_report.feature:102
Given I follow "Add a content page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | First page name |
| Page contents | First page contents |
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Question" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True/false question 1 |
| Page contents | The sky is Pink. |
| id_answer_editor_0 | False |
| id_response_editor_0 | Correct |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | True |
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Question" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True/false question 1 |
| Page contents | Paper is made from trees. |
| id_answer_editor_0 | True |
| id_response_editor_0 | Correct |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | False |
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Add a content page" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Second page name |
| Page contents | Second page contents |
| id_answer_editor_0 | Previous page |
| id_jumpto_0 | Previous page |
| id_answer_editor_1 | Next page |
| id_jumpto_1 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "First page contents" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Second page contents" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Paper is made from trees." # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| True | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "The sky is Pink." # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| True | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Congratulations - end of lesson reached" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Then I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Participants" # behat_hooks::i_look_for_exceptions()
And I follow "Student 1" # behat_hooks::i_look_for_exceptions()
And I follow "Complete report" # behat_hooks::i_look_for_exceptions()
And I should see "Grade: 50.00 / 100.00" # behat_hooks::i_look_for_exceptions()
And I should see "4" in the ".cell.c1" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "2" in the ".cell.c2" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "1" in the ".cell.c3" "css_element" # behat_hooks::i_look_for_exceptions()
Scenario: View student attempts in a lesson containing only content pages # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_complete_report.feature:175
Given I follow "Add a content page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | First page name |
| Page contents | First page contents |
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Add a content page" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Second page name |
| Page contents | Second page contents |
| id_answer_editor_0 | Previous page |
| id_jumpto_0 | Previous page |
| id_answer_editor_1 | End of lesson |
| id_jumpto_1 | End of lesson |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "First page contents" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Second page contents" # behat_hooks::i_look_for_exceptions()
And I press "End of lesson" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Then I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Participants" # behat_hooks::i_look_for_exceptions()
And I follow "Student 1" # behat_hooks::i_look_for_exceptions()
And I follow "Complete report" # behat_hooks::i_look_for_exceptions()
And I should see "Completed" # behat_hooks::i_look_for_exceptions()
And I should see "2" in the ".cell.c1" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "0" in the ".cell.c2" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "0" in the ".cell.c3" "css_element" # behat_hooks::i_look_for_exceptions()
@mod @mod_lesson
Feature: Lesson reset
In order to reuse past lessons
As a teacher
I need to remove all previous data.
Background: # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_course_reset.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Tina | Teacher1 | teacher1@example.com |
| student1 | Sam1 | Student1 | student1@example.com |
| student2 | Sam2 | Student2 | student2@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And the following "groups" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| Group 1 | C1 | G1 |
| Group 2 | C1 | G2 |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber |
| lesson | Test lesson name | Test lesson description | C1 | lesson1 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I follow "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True/false question 1 |
| Page contents | Cat is an amphibian |
| id_answer_editor_0 | False |
| id_response_editor_0 | Correct |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | True |
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
Scenario: Use course reset to clear all attempt data # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_course_reset.feature:46
When I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "Cat is an amphibian" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| False | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Congratulations - end of lesson reached" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I navigate to "Overview" node in "Lesson administration > Reports" # behat_hooks::i_look_for_exceptions()
And I should see "Sam1 Student1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Reset" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Delete all lesson attempts | 1 |
And I press "Reset course" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I navigate to "Overview" node in "Lesson administration > Reports" # behat_hooks::i_look_for_exceptions()
Then I should see "No attempts have been made on this lesson" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Use course reset to remove user overrides. # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_course_reset.feature:74
When I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I navigate to "User overrides" node in "Lesson administration" # behat_hooks::i_look_for_exceptions()
And I press "Add user override" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Override user | Student1 |
| Re-takes allowed | 1 |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "Sam1 Student1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Reset" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Delete all user overrides | 1 |
And I press "Reset course" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I navigate to "User overrides" node in "Lesson administration" # behat_hooks::i_look_for_exceptions()
Then I should not see "Sam1 Student1" # behat_hooks::i_look_for_exceptions()
Scenario: Use course reset to remove group overrides. # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_course_reset.feature:93
When I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I navigate to "Group overrides" node in "Lesson administration" # behat_hooks::i_look_for_exceptions()
And I press "Add group override" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Override group | Group 1 |
| Re-takes allowed | 1 |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "Group 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Reset" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Delete all group overrides | 1 |
And I press "Reset course" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I navigate to "Group overrides" node in "Lesson administration" # behat_hooks::i_look_for_exceptions()
Then I should not see "Group 1" # behat_hooks::i_look_for_exceptions()
@mod @mod_lesson
Feature: In a lesson activity, teacher can delete question answers and
branch table contents
In order to modify an existing lesson
As a teacher
I need to question answers and branch table contents in the lesson
Background: # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_delete_answers.feature:8
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Lesson" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Test lesson name |
| Description | Test lesson description |
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I follow "Add a content page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | First page name |
| Page contents | First page contents |
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | Previous page |
| id_jumpto_1 | Previous page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Question" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "Numerical" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Hardest question ever |
| Page contents | 1 + 1? |
| id_answer_editor_0 | 2 |
| id_response_editor_0 | Correct answer |
| id_jumpto_0 | End of lesson |
| id_score_0 | 1 |
| id_answer_editor_1 | 1 |
| id_response_editor_1 | Incorrect answer |
| id_jumpto_1 | First page name |
| id_score_1 | 0 |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I follow "Expanded" # behat_hooks::i_look_for_exceptions()
Scenario: Edit lesson content page # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_delete_answers.feature:53
Given I click on "//th[normalize-space(.)='First page name']/descendant::a[2]" "xpath_element" # behat_hooks::i_look_for_exceptions()
When I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_answer_editor_1 | |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I should not see "Previous page" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "First page contents" # behat_hooks::i_look_for_exceptions()
And I should not see "Previous page" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "1 + 1?" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Your answer | 2 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I should see "Correct answer" # behat_hooks::i_look_for_exceptions()
And I should not see "Incorrect answer" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Congratulations - end of lesson reached" # behat_hooks::i_look_for_exceptions()
And I should see "Your score is 1 (out of 1)." # behat_hooks::i_look_for_exceptions()
Scenario: Edit lesson question page # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_delete_answers.feature:76
Given I click on "//th[normalize-space(.)='Hardest question ever']/descendant::a[2]" "xpath_element" # behat_hooks::i_look_for_exceptions()
When I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_answer_editor_1 | |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I should not see "Incorrect answer" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "First page contents" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "1 + 1?" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Your answer | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I should not see "Incorrect answer" # behat_hooks::i_look_for_exceptions()
And I should see "Congratulations - end of lesson reached" # behat_hooks::i_look_for_exceptions()
And I should see "Your score is 0 (out of 1)." # behat_hooks::i_look_for_exceptions()
@mod @mod_lesson
Feature: In a lesson activity, teacher can edit a cluster page
In order to modify an existing lesson and change navigation
As a teacher
I need to edit cluster pages in the lesson
Background: # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_edit_cluster.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Lesson" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Lesson with cluster |
| Description | Test lesson description |
And I follow "Lesson with cluster" # behat_hooks::i_look_for_exceptions()
And I follow "Add a content page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | First page name |
| Page contents | First page contents |
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I follow "Expanded" # behat_hooks::i_look_for_exceptions()
And I click on "Add a cluster" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][2]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I click on "Add a question page here" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][3]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "Multichoice" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | question 1 |
| Page contents | Question from cluster |
| id_answer_editor_0 | Correct answer |
| id_response_editor_0 | Good |
| id_jumpto_0 | Cluster |
| id_score_0 | 1 |
| id_answer_editor_1 | Incorrect answer |
| id_response_editor_1 | Bad |
| id_jumpto_1 | This page |
| id_score_1 | 0 |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I click on "Add a question page here" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][4]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "Multichoice" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | question 2 |
| Page contents | Question from cluster |
| id_answer_editor_0 | Correct answer |
| id_response_editor_0 | Good |
| id_jumpto_0 | Cluster |
| id_score_0 | 1 |
| id_answer_editor_1 | Incorrect answer |
| id_response_editor_1 | Bad |
| id_jumpto_1 | This page |
| id_score_1 | 0 |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I click on "Add an end of cluster" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][5]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I click on "Add a content page" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][6]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Second page name |
| Page contents | Content page after cluster |
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
Scenario: Edit lesson cluster page # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_edit_cluster.feature:74
Given I click on "//th[normalize-space(.)='Cluster']/descendant::a[2]" "xpath_element" # behat_hooks::i_look_for_exceptions()
When I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Modified name |
| Page contents | Modified contents |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
Then I should see "Modified name" # behat_hooks::i_look_for_exceptions()
And I click on "//th[normalize-space(.)='Modified name']/descendant::a[2]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I should see "Unseen question within a cluster" # behat_hooks::i_look_for_exceptions()
And I press "Cancel" # behat_hooks::i_look_for_exceptions()
And I click on "//th[normalize-space(.)='End of cluster']/descendant::a[2]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Modified end |
| Page contents | Modified end contents |
| id_jumpto_0 | Second page name |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I should see "Modified end" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Lesson with cluster" # behat_hooks::i_look_for_exceptions()
And I should see "First page contents" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Question from cluster" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Correct answer | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I should see "Good" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Question from cluster" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Correct answer | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I should see "Good" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Content page after cluster" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Congratulations - end of lesson reached" # behat_hooks::i_look_for_exceptions()
And I should see "Your score is 2 (out of 2)." # behat_hooks::i_look_for_exceptions()
@mod @mod_lesson
Feature: In a lesson activity, teacher can edit lesson's pages
In order to modify an existing lesson
As a teacher
I need to edit pages in the lesson
Background: # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_edit_pages.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Lesson" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Test lesson name |
| Description | Test lesson description |
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I follow "Add a content page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | First page name |
| Page contents | First page contents |
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Add a content page" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Second page name |
| Page contents | Second page contents |
| id_answer_editor_0 | Previous page |
| id_jumpto_0 | Previous page |
| id_answer_editor_1 | Next page |
| id_jumpto_1 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I follow "Expanded" # behat_hooks::i_look_for_exceptions()
And I click on "Add a question page here" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][3]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "Numerical" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Hardest question ever |
| Page contents | 1 + 1? |
| id_answer_editor_0 | 2 |
| id_response_editor_0 | Correct answer |
| id_jumpto_0 | End of lesson |
| id_score_0 | 1 |
| id_answer_editor_1 | 1 |
| id_response_editor_1 | Incorrect answer |
| id_jumpto_1 | Second page name |
| id_score_1 | 0 |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
Scenario: Edit lesson content page # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_edit_pages.feature:59
Given I click on "//th[normalize-space(.)='Second page name']/descendant::a[2]" "xpath_element" # behat_hooks::i_look_for_exceptions()
When I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Modified second page |
| Page contents | Modified contents |
| id_answer_editor_0 | Forward |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | Backward |
| id_jumpto_1 | Previous page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
Then I should see "Modified second page" # behat_hooks::i_look_for_exceptions()
And I should not see "Second page name" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "First page contents" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Modified contents" # behat_hooks::i_look_for_exceptions()
And I should not see "Second page contents" # behat_hooks::i_look_for_exceptions()
And I press "Backward" # behat_hooks::i_look_for_exceptions()
And I should see "First page contents" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Modified contents" # behat_hooks::i_look_for_exceptions()
And I press "Forward" # behat_hooks::i_look_for_exceptions()
And I should see "1 + 1?" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Your answer | 2 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I should see "Correct answer" # behat_hooks::i_look_for_exceptions()
And I should not see "Incorrect answer" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Congratulations - end of lesson reached" # behat_hooks::i_look_for_exceptions()
And I should see "Your score is 1 (out of 1)." # behat_hooks::i_look_for_exceptions()
Scenario: Edit lesson question page # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_edit_pages.feature:94
Given I click on "//th[normalize-space(.)='Hardest question ever']/descendant::a[2]" "xpath_element" # behat_hooks::i_look_for_exceptions()
When I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | New hardest question |
| Page contents | 1 + 2? |
| id_answer_editor_0 | 2 |
| id_response_editor_0 | Your answer is incorrect |
| id_jumpto_0 | End of lesson |
| id_score_0 | 0 |
| id_answer_editor_1 | 3 |
| id_response_editor_1 | Your answer is correct |
| id_jumpto_1 | End of lesson |
| id_score_1 | 1 |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
Then I should see "New hardest question" # behat_hooks::i_look_for_exceptions()
And I should not see "Hardest question ever" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "First page contents" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Second page contents" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "1 + 2?" # behat_hooks::i_look_for_exceptions()
And I should not see "1 + 1?" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Your answer | 3 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I should see "Your answer is correct" # behat_hooks::i_look_for_exceptions()
And I should not see "Incorrect answer" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Congratulations - end of lesson reached" # behat_hooks::i_look_for_exceptions()
And I should see "Your score is 1 (out of 1)." # behat_hooks::i_look_for_exceptions()
@mod @mod_lesson @_file_upload
Feature: In a lesson activity, teacher can add an essay question
As a teacher
I need to add an essay question in a lesson and grade student attempts
Scenario: questions with essay question # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_essay_question.feature:6
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Lesson" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Test lesson name |
| Description | Test lesson description |
| Use default feedback | Yes |
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I follow "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "Essay" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Essay question |
| Page contents | Please write a story about a frog.
|
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
When I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
Then I should see "Please write a story about a frog." # behat_hooks::i_look_for_exceptions()
And I set the field "Your answer" to "Once upon a time there was a little green frog." # behat_hooks::i_look_for_exceptions()
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I should see "Your answer" # behat_hooks::i_look_for_exceptions()
And I should see "Once upon a time there was a little green frog." # behat_hooks::i_look_for_exceptions()
And I should not see "<b>" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Congratulations - end of lesson reached" # behat_hooks::i_look_for_exceptions()
And I should see "You earned 0 out of 0 for the automatically graded questions." # behat_hooks::i_look_for_exceptions()
And I should see "Your 1 essay question(s) will be graded and added into your final score at a later date." # behat_hooks::i_look_for_exceptions()
And I should see "Your current grade without the essay question(s) is 0 out of 1." # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I follow "Grade essays" # behat_hooks::i_look_for_exceptions()
And I should see "Student 1" # behat_hooks::i_look_for_exceptions()
And I should see "Essay question" # behat_hooks::i_look_for_exceptions()
And I follow "Essay question" # behat_hooks::i_look_for_exceptions()
And I should see "Student 1's response" # behat_hooks::i_look_for_exceptions()
And I should see "Once upon a time there was a little green frog." # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Your comments |
Well done.
|
| Essay score | 1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I should see "Changes saved" # behat_hooks::i_look_for_exceptions()
And I follow "Reports" # behat_hooks::i_look_for_exceptions()
And I should see "Student 1" # behat_hooks::i_look_for_exceptions()
And I click on ".lesson-attempt-link" "css_element" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Essay: Essay question" # behat_hooks::i_look_for_exceptions()
And I should see "Please write a story about a frog." # behat_hooks::i_look_for_exceptions()
And I should see "Once upon a time there was a little green frog." # behat_hooks::i_look_for_exceptions()
And I should see "Well done." # behat_hooks::i_look_for_exceptions()
And I should not see "<b>" # behat_hooks::i_look_for_exceptions()
@mod @mod_lesson
Feature: Lesson user override
In order to grant a student special access to a lesson
As a teacher
I need to create an override for that user.
Background: # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_group_override.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Tina | Teacher1 | teacher1@example.com |
| student1 | Sam1 | Student1 | student1@example.com |
| student2 | Sam2 | Student2 | student2@example.com |
| student3 | Sam3 | Student3 | student3@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
And the following "groups" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| Group 1 | C1 | G1 |
| Group 2 | C1 | G2 |
Given the following "group members" exist: # behat_hooks::i_look_for_exceptions()
| user | group |
| student1 | G1 |
| student2 | G2 |
| student3 | G1 |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | groupmode | course | idnumber |
| lesson | Test lesson name | Test lesson description | 1 | C1 | lesson1 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I follow "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True/false question 1 |
| Page contents | Cat is an amphibian |
| id_answer_editor_0 | False |
| id_response_editor_0 | Correct |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | True |
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
Scenario: Add, modify then delete a group override # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_group_override.feature:53
When I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I navigate to "Group overrides" node in "Lesson administration" # behat_hooks::i_look_for_exceptions()
And I press "Add group override" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Override group | Group 1 |
| id_deadline_enabled | 1 |
| deadline[day] | 1 |
| deadline[month] | January |
| deadline[year] | 2020 |
| deadline[hour] | 08 |
| deadline[minute] | 00 |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "Wednesday, 1 January 2020, 8:00" # behat_hooks::i_look_for_exceptions()
Then I click on "Edit" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| deadline[year] | 2030 |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "Tuesday, 1 January 2030, 8:00" # behat_hooks::i_look_for_exceptions()
And I click on "Delete" "link" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should not see "Group 1" # behat_hooks::i_look_for_exceptions()
Scenario: Duplicate a user override # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_group_override.feature:76
When I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I navigate to "Group overrides" node in "Lesson administration" # behat_hooks::i_look_for_exceptions()
And I press "Add group override" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Override group | Group 1 |
| id_deadline_enabled | 1 |
| deadline[day] | 1 |
| deadline[month] | January |
| deadline[year] | 2020 |
| deadline[hour] | 08 |
| deadline[minute] | 00 |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "Wednesday, 1 January 2020, 8:00" # behat_hooks::i_look_for_exceptions()
Then I click on "copy" "link" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Override group | Group 2 |
| deadline[year] | 2030 |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "Tuesday, 1 January 2030, 8:00" # behat_hooks::i_look_for_exceptions()
And I should see "Group 2" # behat_hooks::i_look_for_exceptions()
Scenario: Allow a single group to have re-take the lesson # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_group_override.feature:98
When I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Lesson administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Re-takes allowed | 0 |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I navigate to "Group overrides" node in "Lesson administration" # behat_hooks::i_look_for_exceptions()
And I press "Add group override" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Override group | Group 1 |
| Re-takes allowed | 1 |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "Re-takes allowed" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "Cat is an amphibian" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| False | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Congratulations - end of lesson reached" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
Then I should not see "You are not allowed to retake this lesson." # behat_hooks::i_look_for_exceptions()
And I should see "Cat is an amphibian" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "Cat is an amphibian" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| False | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Congratulations - end of lesson reached" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "You are not allowed to retake this lesson." # behat_hooks::i_look_for_exceptions()
Scenario: Allow a single group to have a different password # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_group_override.feature:137
When I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Lesson administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Password protected lesson | Yes |
| id_password | moodle_rules |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I navigate to "Group overrides" node in "Lesson administration" # behat_hooks::i_look_for_exceptions()
And I press "Add group override" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Override group | Group 1 |
| Password protected lesson | 12345 |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "Password protected lesson" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
Then I should see "Test lesson name is a password protected lesson" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat is an amphibian" # behat_hooks::i_look_for_exceptions()
And I set the field "userpassword" to "moodle_rules" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Login failed, please try again..." # behat_hooks::i_look_for_exceptions()
And I should see "Test lesson name is a password protected lesson" # behat_hooks::i_look_for_exceptions()
And I set the field "userpassword" to "12345" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Cat is an amphibian" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| False | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Congratulations - end of lesson reached" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "Test lesson name is a password protected lesson" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat is an amphibian" # behat_hooks::i_look_for_exceptions()
And I set the field "userpassword" to "12345" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Login failed, please try again..." # behat_hooks::i_look_for_exceptions()
And I should see "Test lesson name is a password protected lesson" # behat_hooks::i_look_for_exceptions()
And I set the field "userpassword" to "moodle_rules" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
Scenario: Allow a group to have a different due date # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_group_override.feature:182
When I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Lesson administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_deadline_enabled | 1 |
| deadline[day] | 1 |
| deadline[month] | January |
| deadline[year] | 2000 |
| deadline[hour] | 08 |
| deadline[minute] | 00 |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I navigate to "Group overrides" node in "Lesson administration" # behat_hooks::i_look_for_exceptions()
And I press "Add group override" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Override group | Group 1 |
| id_deadline_enabled | 1 |
| deadline[day] | 1 |
| deadline[month] | January |
| deadline[year] | 2020 |
| deadline[hour] | 08 |
| deadline[minute] | 00 |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "Lesson closes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson" # behat_hooks::i_look_for_exceptions()
Then I should see "This lesson closed on Saturday, 1 January 2000, 8:00" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat is an amphibian" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson" # behat_hooks::i_look_for_exceptions()
And I should see "Cat is an amphibian" # behat_hooks::i_look_for_exceptions()
Scenario: Allow a group to have a different start date # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_group_override.feature:217
When I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Lesson administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_available_enabled | 1 |
| available[day] | 1 |
| available[month] | January |
| available[year] | 2020 |
| available[hour] | 08 |
| available[minute] | 00 |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I navigate to "Group overrides" node in "Lesson administration" # behat_hooks::i_look_for_exceptions()
And I press "Add group override" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Override group | Group 1 |
| id_available_enabled | 1 |
| available[day] | 1 |
| available[month] | January |
| available[year] | 2015 |
| available[hour] | 08 |
| available[minute] | 00 |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "Lesson opens" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson" # behat_hooks::i_look_for_exceptions()
Then I should see "This lesson will be open on Wednesday, 1 January 2020, 8:00" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat is an amphibian" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson" # behat_hooks::i_look_for_exceptions()
And I should see "Cat is an amphibian" # behat_hooks::i_look_for_exceptions()
Scenario: Allow a single group to have multiple attempts at each question # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_group_override.feature:252
When I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Lesson administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Re-takes allowed | 1 |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I navigate to "Group overrides" node in "Lesson administration" # behat_hooks::i_look_for_exceptions()
And I press "Add group override" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Override group | Group 1 |
| Maximum number of attempts | 2 |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "Maximum number of attempts" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "Cat is an amphibian" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| True | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Cat is an amphibian" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| True | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Congratulations - end of lesson reached" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "Cat is an amphibian" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| True | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
Then I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Congratulations - end of lesson reached" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Add both a user and group override and verify that both are applied correctly # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_group_override.feature:292
When I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Lesson administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_available_enabled | 1 |
| available[day] | 1 |
| available[month] | January |
| available[year] | 2030 |
| available[hour] | 08 |
| available[minute] | 00 |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I navigate to "Group overrides" node in "Lesson administration" # behat_hooks::i_look_for_exceptions()
And I press "Add group override" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Override group | Group 1 |
| id_available_enabled | 1 |
| available[day] | 1 |
| available[month] | January |
| available[year] | 2020 |
| available[hour] | 08 |
| available[minute] | 00 |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "Wednesday, 1 January 2020, 8:00" # behat_hooks::i_look_for_exceptions()
And I navigate to "User overrides" node in "Lesson administration" # behat_hooks::i_look_for_exceptions()
And I press "Add user override" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Override user | Student1 |
| id_available_enabled | 1 |
| available[day] | 1 |
| available[month] | January |
| available[year] | 2021 |
| available[hour] | 08 |
| available[minute] | 00 |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "Friday, 1 January 2021, 8:00" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Then I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson" # behat_hooks::i_look_for_exceptions()
And I should see "This lesson will be open on Friday, 1 January 2021, 8:00" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson" # behat_hooks::i_look_for_exceptions()
And I should see "This lesson will be open on Tuesday, 1 January 2030, 8:00" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student3" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson" # behat_hooks::i_look_for_exceptions()
And I should see "This lesson will be open on Wednesday, 1 January 2020, 8:00" # behat_hooks::i_look_for_exceptions()
@mod @mod_lesson
Feature: In a lesson activity, if custom scoring is not enabled, student should see
some informations at the end of lesson: questions answered, correct answers, grade, score
Scenario: Informations at end of lesson if custom scoring not enabled # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_informations_at_end.feature:5
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Lesson" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Test lesson name |
| Description | Test lesson description |
| Custom scoring | No |
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I follow "Add a content page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | First page name |
| Page contents | First page contents |
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Question" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "Numerical" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Hardest question ever |
| Page contents | 1 + 1? |
| id_answer_editor_0 | 2 |
| id_response_editor_0 | Correct answer |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | 1 |
| id_response_editor_1 | Incorrect answer |
| id_jumpto_1 | This page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
When I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
Then I should see "First page contents" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "1 + 1?" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Your answer | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I should see "Incorrect answer" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Congratulations - end of lesson reached" # behat_hooks::i_look_for_exceptions()
And I should see "Number of questions answered: 1" # behat_hooks::i_look_for_exceptions()
And I should see "Number of correct answers: 0" # behat_hooks::i_look_for_exceptions()
And I should see "Your score is 0 (out of 1)." # behat_hooks::i_look_for_exceptions()
And I should see "Your current grade is 0.0 out of 100" # behat_hooks::i_look_for_exceptions()
@mod @mod_lesson
Feature: In a lesson activity, students can navigate through a series of pages in various ways depending upon their answers to questions
In order to create a lesson with conditional paths
As a teacher
I need to add pages and questions with links between them
Background: # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_navigation.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
Scenario: Student navigation with pages and questions # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_navigation.feature:23
Given I add a "Lesson" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Test lesson name |
| Description | Test lesson description |
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I follow "Add a content page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | First page name |
| Page contents | First page contents |
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Add a content page" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Second page name |
| Page contents | Second page contents |
| id_answer_editor_0 | Previous page |
| id_jumpto_0 | Previous page |
| id_answer_editor_1 | Next page |
| id_jumpto_1 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I follow "Expanded" # behat_hooks::i_look_for_exceptions()
And I click on "Add a question page here" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][3]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "Numerical" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Hardest question ever |
| Page contents | 1 + 1? |
| id_answer_editor_0 | 2 |
| id_response_editor_0 | Correct answer |
| id_jumpto_0 | End of lesson |
| id_score_0 | 1 |
| id_answer_editor_1 | 1 |
| id_response_editor_1 | Incorrect answer |
| id_jumpto_1 | Second page name |
| id_score_1 | 0 |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
When I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
Then I should see "First page contents" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Second page contents" # behat_hooks::i_look_for_exceptions()
And I should not see "First page contents" # behat_hooks::i_look_for_exceptions()
And I press "Previous page" # behat_hooks::i_look_for_exceptions()
And I should see "First page contents" # behat_hooks::i_look_for_exceptions()
And I should not see "Second page contents" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Second page contents" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "1 + 1?" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Your answer | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I should see "Incorrect answer" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Second page name" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "1 + 1?" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Your answer | 2 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I should see "Maximum number of attempts reached - Moving to next page" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Congratulations - end of lesson reached" # behat_hooks::i_look_for_exceptions()
And I should see "Your score is 0 (out of 1)." # behat_hooks::i_look_for_exceptions()
Scenario: Student reattempts a question until out of attempts # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_navigation.feature:91
Given I add a "Lesson" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Test lesson name |
| Description | Test lesson description |
| id_review | Yes |
| id_maxattempts | 3 |
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I follow "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_qtype | True/false |
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Test question |
| Page contents | Test content |
| id_answer_editor_0 | right |
| id_answer_editor_1 | wrong |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
When I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
Then I should see "Test content" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| wrong | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I should see "You have 2 attempt(s) remaining" # behat_hooks::i_look_for_exceptions()
And I press "Yes, I'd like to try again" # behat_hooks::i_look_for_exceptions()
And I should see "Test content" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| wrong | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I should see "You have 1 attempt(s) remaining" # behat_hooks::i_look_for_exceptions()
And I press "Yes, I'd like to try again" # behat_hooks::i_look_for_exceptions()
And I should see "Test content" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| wrong | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I should not see "Yes, I'd like to try again" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Congratulations - end of lesson reached" # behat_hooks::i_look_for_exceptions()
@mod @mod_lesson
Feature: In Dashboard, teacher can see the number of student attempts to lessons
In order to know the number of student attempts to a lesson
As a teacher
I need to see it in Dashboard
Background: # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_number_of_student_attempts.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
Scenario: number of student attempts # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_number_of_student_attempts.feature:25
Given I add a "Lesson" to section "1" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Test lesson name |
| Description | Test lesson description |
| id_deadline_enabled | 1 |
| deadline[day] | 1 |
| deadline[month] | January |
| deadline[year] | 2030 |
| deadline[hour] | 08 |
| deadline[minute] | 00 |
| Re-takes allowed | Yes |
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I follow "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True/false question 1 |
| Page contents | Cat is an amphibian |
| id_answer_editor_0 | False |
| id_response_editor_0 | Correct |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | True |
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Question" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True/false question 2 |
| Page contents | Paper is made from trees. |
| id_answer_editor_0 | True |
| id_response_editor_0 | Correct |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | False |
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I follow "Expanded" # behat_hooks::i_look_for_exceptions()
And I click on "Add a question page here" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][3]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True/false question 3 |
| Page contents | 1+1=2 |
| id_answer_editor_0 | True |
| id_response_editor_0 | Correct |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | False |
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "Cat is an amphibian" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| False | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Paper is made from trees." # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| False | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "1+1=2" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| False | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Congratulations - end of lesson reached" # behat_hooks::i_look_for_exceptions()
And I should see "Your score is 1 (out of 3)." # behat_hooks::i_look_for_exceptions()
And I follow "Return to Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "Cat is an amphibian" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| False | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Paper is made from trees." # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| True | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "1+1=2" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| True | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Congratulations - end of lesson reached" # behat_hooks::i_look_for_exceptions()
And I should see "Your score is 3 (out of 3)." # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "Cat is an amphibian" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| True | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Paper is made from trees." # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| True | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "1+1=2" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| True | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Congratulations - end of lesson reached" # behat_hooks::i_look_for_exceptions()
And I should see "Your score is 2 (out of 3)." # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
When I click on "Dashboard" "link" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
Then I should see "You have lessons that are due" # behat_hooks::i_look_for_exceptions()
And I should see "3 attempts" # behat_hooks::i_look_for_exceptions()
@mod @mod_lesson
Feature: Teachers can review student progress on all lessons in a course by viewing the overview report
As a Teacher
I need to view the overview report for one of my students.
Background: # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_outline_report.feature:6
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Lesson" to section "1" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Test lesson name |
| Description | Test lesson description |
| Re-takes allowed | Yes |
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
Scenario: View student progress for lesson that was never attempted # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_outline_report.feature:29
Given I follow "Add a content page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | First page name |
| Page contents | First page contents |
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Question" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True/false question 1 |
| Page contents | Paper is made from trees. |
| id_answer_editor_0 | True |
| id_response_editor_0 | Correct |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | False |
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
When I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Participants" # behat_hooks::i_look_for_exceptions()
And I follow "Student 1" # behat_hooks::i_look_for_exceptions()
And I follow "Outline report" # behat_hooks::i_look_for_exceptions()
Then I should see "No attempts have been made on this lesson" # behat_hooks::i_look_for_exceptions()
Scenario: View student progress for an incomplete lesson containing both content and question pages # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_outline_report.feature:56
Given I follow "Add a content page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | First page name |
| Page contents | First page contents |
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Question" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True/false question 1 |
| Page contents | Paper is made from trees. |
| id_answer_editor_0 | True |
| id_response_editor_0 | Correct |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | False |
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Add a content page" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Second page name |
| Page contents | Second page contents |
| id_answer_editor_0 | Previous page |
| id_jumpto_0 | Previous page |
| id_answer_editor_1 | Next page |
| id_jumpto_1 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "First page contents" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Then I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Participants" # behat_hooks::i_look_for_exceptions()
And I follow "Student 1" # behat_hooks::i_look_for_exceptions()
And I follow "Outline report" # behat_hooks::i_look_for_exceptions()
And I should see "Lesson has been started, but not yet completed" # behat_hooks::i_look_for_exceptions()
Scenario: View student progress for a lesson containing both content and question pages # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_outline_report.feature:100
Given I follow "Add a content page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | First page name |
| Page contents | First page contents |
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Question" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True/false question 1 |
| Page contents | Paper is made from trees. |
| id_answer_editor_0 | True |
| id_response_editor_0 | Correct |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | False |
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Add a content page" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Second page name |
| Page contents | Second page contents |
| id_answer_editor_0 | Previous page |
| id_jumpto_0 | Previous page |
| id_answer_editor_1 | Next page |
| id_jumpto_1 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "First page contents" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Second page contents" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Paper is made from trees." # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| True | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Congratulations - end of lesson reached" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Then I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Participants" # behat_hooks::i_look_for_exceptions()
And I follow "Student 1" # behat_hooks::i_look_for_exceptions()
And I follow "Outline report" # behat_hooks::i_look_for_exceptions()
And I should see "Grade: 100.00 / 100.00" # behat_hooks::i_look_for_exceptions()
Scenario: View student attempts in a lesson containing only content pages # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_outline_report.feature:152
Given I follow "Add a content page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | First page name |
| Page contents | First page contents |
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Add a content page" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Second page name |
| Page contents | Second page contents |
| id_answer_editor_0 | Previous page |
| id_jumpto_0 | Previous page |
| id_answer_editor_1 | End of lesson |
| id_jumpto_1 | End of lesson |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "First page contents" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Second page contents" # behat_hooks::i_look_for_exceptions()
And I press "End of lesson" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Then I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Participants" # behat_hooks::i_look_for_exceptions()
And I follow "Student 1" # behat_hooks::i_look_for_exceptions()
And I follow "Outline report" # behat_hooks::i_look_for_exceptions()
And I should see "Completed" # behat_hooks::i_look_for_exceptions()
@mod @mod_lesson
Feature: Practice mode in a lesson activity
In order to improve my students understanding of a subject
As a teacher
I need to be able to set ungraded practice lesson activites
Background: # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_practice.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Lesson" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Test lesson name |
| Description | Lesson description |
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I follow "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True or False |
| Page contents | Paper is made from trees. |
| id_answer_editor_0 | True |
| id_answer_editor_1 | False |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
Scenario: Non-practice lesson records grades in the gradebook # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_practice.feature:37
Given I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Lesson administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Non-practice lesson |
| Description | This lesson will affect your course grade |
| Practice lesson | No |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Non-practice lesson" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| True | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
Then I should see "View grades" # behat_hooks::i_look_for_exceptions()
And I follow "Grades" in the user menu # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Non-practice lesson" # behat_hooks::i_look_for_exceptions()
Scenario: Practice lesson doesn't record grades in the gradebook # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_practice.feature:57
Given I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Lesson administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Practice lesson |
| Description | This lesson will NOT affect your course grade |
| Practice lesson | Yes |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Practice lesson" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| True | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
Then I should not see "View grades" # behat_hooks::i_look_for_exceptions()
And I follow "Grades" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "Course 1" "link" in the "Course 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I should not see "Practice lesson" # behat_hooks::i_look_for_exceptions()
Scenario: Practice lesson with scale doesn't record grades in the gradebook # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_practice.feature:77
Given I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Lesson administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Practice lesson with scale |
| Description | This lesson will NOT affect your course grade |
| Practice lesson | Yes |
| Type | Scale |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Practice lesson with scale" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| True | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
Then I should not see "View grades" # behat_hooks::i_look_for_exceptions()
And I follow "Grades" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "Course 1" "link" in the "Course 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I should not see "Practice lesson with scale" # behat_hooks::i_look_for_exceptions()
@mod @mod_lesson
Feature: In a lesson activity, students can see their progress viewing a progress bar.
In order to create a lesson with conditional paths
As a teacher
I need to add pages and questions with links between them
Scenario: Student navigation with progress bar # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_progress_bar.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Lesson" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Test lesson name |
| Description | Test lesson description |
| Progress bar | Yes |
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I follow "Add a content page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | First page name |
| Page contents | First page contents |
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Add a content page" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Second page name |
| Page contents | Second page contents |
| id_answer_editor_0 | Previous page |
| id_jumpto_0 | Previous page |
| id_answer_editor_1 | Next page |
| id_jumpto_1 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I follow "Expanded" # behat_hooks::i_look_for_exceptions()
And I click on "Add a question page here" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][3]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "Numerical" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Hardest question ever |
| Page contents | 1 + 1? |
| id_answer_editor_0 | 2 |
| id_response_editor_0 | Correct answer |
| id_jumpto_0 | End of lesson |
| id_score_0 | 1 |
| id_answer_editor_1 | 1 |
| id_response_editor_1 | Incorrect answer |
| id_jumpto_1 | Second page name |
| id_score_1 | 0 |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
When I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
Then I should see "First page contents" # behat_hooks::i_look_for_exceptions()
And I should see "You have completed 0% of the lesson" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Second page contents" # behat_hooks::i_look_for_exceptions()
And I should see "You have completed 33% of the lesson" # behat_hooks::i_look_for_exceptions()
And I press "Previous page" # behat_hooks::i_look_for_exceptions()
And I should see "First page contents" # behat_hooks::i_look_for_exceptions()
And I should see "You have completed 67% of the lesson" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Second page contents" # behat_hooks::i_look_for_exceptions()
And I should see "You have completed 67% of the lesson" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "1 + 1?" # behat_hooks::i_look_for_exceptions()
And I should see "You have completed 67% of the lesson" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Your answer | 2 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I should see "Correct answer" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Congratulations - end of lesson reached" # behat_hooks::i_look_for_exceptions()
And I should see "You have completed 100% of the lesson" # behat_hooks::i_look_for_exceptions()
@mod @mod_lesson
Feature: In a lesson activity, students can not re-attempt a question more than the allowed amount
In order to check a lesson question can not be attempted more than the allowed amount
As a student I need to check I cannot reattempt a question more than I should be allowed
Background: # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_question_attempts.feature:6
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Lesson" to section "1" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Test lesson name |
| Description | Test lesson description |
| Re-takes allowed | Yes |
| Minimum number of questions | 3 |
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I follow "Add a content page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | First page name |
| Page contents | First page contents |
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Add a content page" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Third page name |
| Page contents | Third page contents |
| id_answer_editor_0 | Previous page |
| id_jumpto_0 | Previous page |
| id_answer_editor_1 | Next page |
| id_jumpto_1 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Question" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True/false question 3 |
| Page contents | Paper is made from trees. |
| id_answer_editor_0 | True |
| id_response_editor_0 | Correct |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | False |
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Add a content page" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Second page name |
| Page contents | Second page contents |
| id_answer_editor_0 | Previous page |
| id_jumpto_0 | Previous page |
| id_answer_editor_1 | Next page |
| id_jumpto_1 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Question" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True/false question 2 |
| Page contents | Kermit is a frog |
| id_answer_editor_0 | True |
| id_response_editor_0 | Correct |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | False |
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Question" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True/false question 1 |
| Page contents | The earth is round. |
| id_answer_editor_0 | True |
| id_response_editor_0 | Correct |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | False |
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Check that we can leave a quiz and when we re-enter we can not re-attempt the question again # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_question_attempts.feature:95
Given I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "First page contents" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "The earth is round" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| False | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I should see "Wrong" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "Do you want to start at the last page you saw?" # behat_hooks::i_look_for_exceptions()
And I click on "No" "link" in the "#page-content" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "First page contents" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "The earth is round" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| False | 1 |
When I press "Submit" # behat_hooks::i_look_for_exceptions()
Then I should see "Maximum number of attempts reached - Moving to next page" # behat_hooks::i_look_for_exceptions()
@javascript @_bug_phantomjs
Scenario: Check that we can not click back on the browser at the last quiz result page and re-attempt the last question to get full marks # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_question_attempts.feature:119
Given I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "First page contents" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "The earth is round" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| True | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I should see "Correct" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Kermit is a frog" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| True | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I should see "Correct" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Second page contents" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Paper is made from trees" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| False | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I should see "Wrong" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Third page contents" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Congratulations - end of lesson reached" # behat_hooks::i_look_for_exceptions()
And I should see "Your score is 2 (out of 3)" # behat_hooks::i_look_for_exceptions()
And I press the "back" button in the browser # behat_hooks::i_look_for_exceptions()
And I press the "back" button in the browser # behat_hooks::i_look_for_exceptions()
And I press the "back" button in the browser # behat_hooks::i_look_for_exceptions()
And I should see "Paper is made from trees" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| True | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I should see "Correct" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Third page contents" # behat_hooks::i_look_for_exceptions()
When I press "Next page" # behat_hooks::i_look_for_exceptions()
Then I should see "Number of questions answered: 1 (You should answer at least 3)" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Check that we can not click back on the browser and re-attempt a question # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_question_attempts.feature:163
Given I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "First page contents" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "The earth is round" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| False | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I should see "Wrong" # behat_hooks::i_look_for_exceptions()
And I press the "back" button in the browser # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| True | 1 |
When I press "Submit" # behat_hooks::i_look_for_exceptions()
Then I should see "Maximum number of attempts reached - Moving to next page" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Kermit is a frog" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| False | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I should see "Wrong" # behat_hooks::i_look_for_exceptions()
And I press the "back" button in the browser # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| True | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I should see "Maximum number of attempts reached - Moving to next page" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Second page contents" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Paper is made from trees" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| True | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I should see "Correct" # behat_hooks::i_look_for_exceptions()
And I press the "back" button in the browser # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| False | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I should see "Maximum number of attempts reached - Moving to next page" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Third page contents" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Congratulations - end of lesson reached" # behat_hooks::i_look_for_exceptions()
And I should see "Your score is 1 (out of 3)" # behat_hooks::i_look_for_exceptions()
@mod @mod_lesson
Feature: In a lesson activity, teachers can review student attempts
To review student attempts in a lesson
As a Teacher
I need to view the reports.
Background: # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_report.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Lesson" to section "1" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Test lesson name |
| Description | Test lesson description |
| Re-takes allowed | Yes |
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
Scenario: View student attempts in a lesson containing both content and question pages # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_report.feature:30
Given I follow "Add a content page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | First page name |
| Page contents | First page contents |
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Question" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True/false question 2 |
| Page contents | Kermit is a frog |
| id_answer_editor_0 | True |
| id_response_editor_0 | Correct |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | False |
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Question" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True/false question 1 |
| Page contents | Paper is made from trees. |
| id_answer_editor_0 | True |
| id_response_editor_0 | Correct |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | False |
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Add a content page" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Third page name |
| Page contents | Third page contents |
| id_answer_editor_0 | Previous page |
| id_jumpto_0 | Previous page |
| id_answer_editor_1 | Next page |
| id_jumpto_1 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Add a content page" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Second page name |
| Page contents | Second page contents |
| id_answer_editor_0 | Previous page |
| id_jumpto_0 | Previous page |
| id_answer_editor_1 | Next page |
| id_jumpto_1 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "First page contents" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Second page contents" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Third page contents" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Paper is made from trees." # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| True | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Kermit is a frog" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| True | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Congratulations - end of lesson reached" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Then I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I follow "Reports" # behat_hooks::i_look_for_exceptions()
And I should see "Student 1" # behat_hooks::i_look_for_exceptions()
And I should see "100%" # behat_hooks::i_look_for_exceptions()
And I should see "High score" # behat_hooks::i_look_for_exceptions()
And I should see "Average score" # behat_hooks::i_look_for_exceptions()
And I should see "Low score" # behat_hooks::i_look_for_exceptions()
Scenario: View student attempts in a lesson containing only content pages # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_report.feature:114
Given I follow "Add a content page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | First page name |
| Page contents | First page contents |
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Add a content page" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Fourth page name |
| Page contents | Fourth page contents |
| id_answer_editor_0 | Previous page |
| id_jumpto_0 | Previous page |
| id_answer_editor_1 | End of lesson |
| id_jumpto_1 | End of lesson |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Add a content page" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Third page name |
| Page contents | Third page contents |
| id_answer_editor_0 | Previous page |
| id_jumpto_0 | Previous page |
| id_answer_editor_1 | Next page |
| id_jumpto_1 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Add a content page" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Second page name |
| Page contents | Second page contents |
| id_answer_editor_0 | Previous page |
| id_jumpto_0 | Previous page |
| id_answer_editor_1 | Next page |
| id_jumpto_1 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "First page contents" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Second page contents" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Third page contents" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Fourth page contents" # behat_hooks::i_look_for_exceptions()
And I press "End of lesson" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Then I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I follow "Reports" # behat_hooks::i_look_for_exceptions()
And I should see "Student 1" # behat_hooks::i_look_for_exceptions()
And I should not see "High score" # behat_hooks::i_look_for_exceptions()
And I should not see "Average score" # behat_hooks::i_look_for_exceptions()
And I should not see "Low score" # behat_hooks::i_look_for_exceptions()
@mod @mod_lesson
Feature: In a lesson activity, students can review the answers they gave to questions
To review questions of a lesson
As a student
I need to complete a lesson answering all of the questions.
Scenario: Student answers questions and then reviews them. # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_review.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Lesson" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Test lesson name |
| Description | Test lesson description |
| Display ongoing score | Yes |
| Slideshow | Yes |
| Maximum number of answers | 10 |
| Allow student review | Yes |
| Maximum number of attempts | 3 |
| Custom scoring | No |
| Re-takes allowed | Yes |
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I follow "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "Numerical" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Hardest question ever |
| Page contents | 1 + 1? |
| id_answer_editor_0 | 2 |
| id_response_editor_0 | Correct answer |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | 1 |
| id_response_editor_1 | Incorrect answer |
| id_jumpto_1 | This page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Question" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Next question |
| Page contents | Paper is made from trees. |
| id_answer_editor_0 | True |
| id_response_editor_0 | Correct |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | False |
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "You have answered 0 correctly out of 0 attempts." # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Your answer | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I should see "You have answered 0 correctly out of 1 attempts." # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Your answer | 2 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I should see "You have answered 1 correctly out of 2 attempts." # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| True | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I should see "You have answered 2 correctly out of 3 attempts." # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
When I follow "Review lesson" # behat_hooks::i_look_for_exceptions()
Then I should see "You have answered 2 correctly out of 3 attempts." # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "You have answered 2 correctly out of 3 attempts." # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "You have answered 2 correctly out of 3 attempts." # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "You have answered 2 correctly out of 3 attempts." # behat_hooks::i_look_for_exceptions()
@mod @mod_lesson
Feature: In Dashboard, a student can see their current status on all lessons with an upcoming due date
In order to know my status on a lesson
As a student
I need to see it in Dashboard
Background: # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_student_dashboard.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | deadline | retake | course | idnumber |
| lesson | Test lesson name | Test lesson description | 1893481200 | 1 | C1 | lesson1 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
Scenario: A completed lesson with only questions that allows multiple attempts # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_student_dashboard.feature:26
Given I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I follow "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True/false question 1 |
| Page contents | Cat is an amphibian |
| id_answer_editor_0 | False |
| id_response_editor_0 | Correct |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | True |
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Question" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True/false question 2 |
| Page contents | Paper is made from trees. |
| id_answer_editor_0 | True |
| id_response_editor_0 | Correct |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | False |
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "Cat is an amphibian" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| False | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Paper is made from trees." # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| False | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Congratulations - end of lesson reached" # behat_hooks::i_look_for_exceptions()
When I click on "Dashboard" "link" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
Then I should see "You have lessons that are due" # behat_hooks::i_look_for_exceptions()
And I should see "Completed, You can re-attempt this lesson" # behat_hooks::i_look_for_exceptions()
Scenario: A completed lesson with only questions that does not allow multiple attempts # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_student_dashboard.feature:73
Given I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Lesson administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Re-takes allowed | 0 |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I follow "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True/false question 1 |
| Page contents | Cat is an amphibian |
| id_answer_editor_0 | False |
| id_response_editor_0 | Correct |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | True |
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Question" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True/false question 2 |
| Page contents | Paper is made from trees. |
| id_answer_editor_0 | True |
| id_response_editor_0 | Correct |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | False |
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "Cat is an amphibian" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| False | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Paper is made from trees." # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| False | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Congratulations - end of lesson reached" # behat_hooks::i_look_for_exceptions()
When I click on "Dashboard" "link" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
Then I should not see "You have lessons that are due" # behat_hooks::i_look_for_exceptions()
Scenario: A completed lesson with only content pages that allows multiple attempts # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_student_dashboard.feature:123
Given I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I follow "Add a content page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | First page name |
| Page contents | First page contents |
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Add a content page" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Second page name |
| Page contents | Second page contents |
| id_answer_editor_0 | Previous page |
| id_jumpto_0 | Previous page |
| id_answer_editor_1 | End of lesson |
| id_jumpto_1 | End of lesson |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "First page contents" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Second page contents" # behat_hooks::i_look_for_exceptions()
And I press "End of lesson" # behat_hooks::i_look_for_exceptions()
When I click on "Dashboard" "link" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
Then I should see "You have lessons that are due" # behat_hooks::i_look_for_exceptions()
And I should see "Completed, You can re-attempt this lesson" # behat_hooks::i_look_for_exceptions()
Scenario: A completed lesson with only content pages that does not allow multiple attempts # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_student_dashboard.feature:153
Given I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Lesson administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Re-takes allowed | 0 |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I follow "Add a content page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | First page name |
| Page contents | First page contents |
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Add a content page" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Second page name |
| Page contents | Second page contents |
| id_answer_editor_0 | Previous page |
| id_jumpto_0 | Previous page |
| id_answer_editor_1 | End of lesson |
| id_jumpto_1 | End of lesson |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "First page contents" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Second page contents" # behat_hooks::i_look_for_exceptions()
And I press "End of lesson" # behat_hooks::i_look_for_exceptions()
When I click on "Dashboard" "link" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
Then I should not see "You have lessons that are due" # behat_hooks::i_look_for_exceptions()
Scenario: An incomplete lesson with only questions. # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_student_dashboard.feature:186
Given I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I follow "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True/false question 1 |
| Page contents | Cat is an amphibian |
| id_answer_editor_0 | False |
| id_response_editor_0 | Correct |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | True |
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Question" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True/false question 2 |
| Page contents | Paper is made from trees. |
| id_answer_editor_0 | True |
| id_response_editor_0 | Correct |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | False |
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "Cat is an amphibian" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| False | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
When I click on "Dashboard" "link" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
Then I should see "You have lessons that are due" # behat_hooks::i_look_for_exceptions()
And I should see "Lesson has been started, but not yet completed" # behat_hooks::i_look_for_exceptions()
Scenario: An incomplete lesson with only content pages. # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_student_dashboard.feature:227
Given I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I follow "Add a content page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | First page name |
| Page contents | First page contents |
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Add a content page" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Second page name |
| Page contents | Second page contents |
| id_answer_editor_0 | Previous page |
| id_jumpto_0 | Previous page |
| id_answer_editor_1 | End of lesson |
| id_jumpto_1 | End of lesson |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "First page contents" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Second page contents" # behat_hooks::i_look_for_exceptions()
When I click on "Dashboard" "link" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
Then I should see "You have lessons that are due" # behat_hooks::i_look_for_exceptions()
And I should see "Lesson has been started, but not yet completed" # behat_hooks::i_look_for_exceptions()
Scenario: A lesson with only questions that has not been started. # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_student_dashboard.feature:256
Given I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I follow "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True/false question 1 |
| Page contents | Cat is an amphibian |
| id_answer_editor_0 | False |
| id_response_editor_0 | Correct |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | True |
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Question" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True/false question 2 |
| Page contents | Paper is made from trees. |
| id_answer_editor_0 | True |
| id_response_editor_0 | Correct |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | False |
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
When I click on "Dashboard" "link" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
Then I should see "You have lessons that are due" # behat_hooks::i_look_for_exceptions()
And I should see "No attempts have been made on this lesson" # behat_hooks::i_look_for_exceptions()
Scenario: A lesson with only content pages that has not been started. # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_student_dashboard.feature:290
Given I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I follow "Add a content page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | First page name |
| Page contents | First page contents |
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Add a content page" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Second page name |
| Page contents | Second page contents |
| id_answer_editor_0 | Previous page |
| id_jumpto_0 | Previous page |
| id_answer_editor_1 | End of lesson |
| id_jumpto_1 | End of lesson |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
When I click on "Dashboard" "link" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
Then I should see "You have lessons that are due" # behat_hooks::i_look_for_exceptions()
And I should see "No attempts have been made on this lesson" # behat_hooks::i_look_for_exceptions()
Scenario: Viewing the status for multiple lessons in multiple courses # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_student_dashboard.feature:314
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 2 | C2 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C2 | editingteacher |
| student1 | C2 | student |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | deadline | retake | course | idnumber |
| lesson | Test lesson name 2 | Test lesson description | 1893481200 | 1 | C1 | lesson1 |
| lesson | Test lesson name 3 | Test lesson description | 1893481200 | 1 | C2 | lesson1 |
And I turn editing mode off # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I follow "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True/false question |
| Page contents | D035 M00d13 r0x0rz j00 b0x0rs? |
| id_answer_editor_0 | True |
| id_answer_editor_1 | False |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name 2" # behat_hooks::i_look_for_exceptions()
And I follow "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True/false question |
| Page contents | D035 M00d13 r0x0rz j00 b0x0rs? |
| id_answer_editor_0 | True |
| id_answer_editor_1 | False |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I click on "Dashboard" "link" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I follow "Course 2" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name 3" # behat_hooks::i_look_for_exceptions()
And I follow "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True/false question 1 |
| Page contents | D035 M00d13 r0x0rz j00 b0x0rs? |
| id_answer_editor_0 | True |
| id_answer_editor_1 | False |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Question" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True/false question 2 |
| Page contents | D035 M00d13 r0x0rz j00 b0x0rs? |
| id_answer_editor_0 | True |
| id_answer_editor_1 | False |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "D035 M00d13 r0x0rz j00 b0x0rs?" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| True | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I click on "Dashboard" "link" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I follow "Course 2" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name 3" # behat_hooks::i_look_for_exceptions()
And I should see "D035 M00d13 r0x0rz j00 b0x0rs?" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| True | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
When I click on "Dashboard" "link" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
Then I should see "You have lessons that are due" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' coursebox ' ) and contains(normalize-space(.), 'Course 1')]/div[contains( normalize-space(.), 'You have lessons that are due ' )]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I should see "You have lessons that are due" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' coursebox ' ) and contains(normalize-space(.), 'Course 2')]/div[contains( normalize-space(.), 'You have lessons that are due ' )]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I should see "Lesson has been started, but not yet completed" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' overview ' ) and descendant-or-self::a[.='Test lesson name 3']]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I should see "Completed, You can re-attempt this lesson" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' overview ' ) and descendant-or-self::a[.='Test lesson name']]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I should see "No attempts have been made on this lesson" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' overview ' ) and descendant-or-self::a[.='Test lesson name 2']]" "xpath_element" # behat_hooks::i_look_for_exceptions()
@mod @mod_lesson
Feature: In a lesson activity a student should
be able to close the lesson and then later resume.
Background: # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_student_resume.feature:5
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Lesson" to section "1" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Test lesson name |
| Description | Test lesson description |
| Re-takes allowed | Yes |
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
Scenario: resume a lesson with both content then question pages # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_student_resume.feature:28
Given I follow "Add a content page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | First page name |
| Page contents | First page contents |
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Question" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True/false question 2 |
| Page contents | Kermit is a frog |
| id_answer_editor_0 | True |
| id_response_editor_0 | Correct |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | False |
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Question" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True/false question 1 |
| Page contents | Paper is made from trees. |
| id_answer_editor_0 | True |
| id_response_editor_0 | Correct |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | False |
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Add a content page" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Third page name |
| Page contents | Third page contents |
| id_answer_editor_0 | Previous page |
| id_jumpto_0 | Previous page |
| id_answer_editor_1 | Next page |
| id_jumpto_1 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Add a content page" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Second page name |
| Page contents | Second page contents |
| id_answer_editor_0 | Previous page |
| id_jumpto_0 | Previous page |
| id_answer_editor_1 | Next page |
| id_jumpto_1 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "First page contents" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I wait "1" seconds # behat_hooks::i_look_for_exceptions()
And I should see "Second page contents" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Third page contents" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "You have seen more than one page of this lesson already." # behat_hooks::i_look_for_exceptions()
And I should see "Do you want to start at the last page you saw?" # behat_hooks::i_look_for_exceptions()
And I follow "Yes" # behat_hooks::i_look_for_exceptions()
Then I should see "Third page contents" # behat_hooks::i_look_for_exceptions()
And I wait "1" seconds # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Paper is made from trees." # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "You have seen more than one page of this lesson already." # behat_hooks::i_look_for_exceptions()
And I should see "Do you want to start at the last page you saw?" # behat_hooks::i_look_for_exceptions()
And I follow "Yes" # behat_hooks::i_look_for_exceptions()
And I should see "Paper is made from trees." # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| True | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Kermit is a frog" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "You have seen more than one page of this lesson already." # behat_hooks::i_look_for_exceptions()
And I should see "Do you want to start at the last page you saw?" # behat_hooks::i_look_for_exceptions()
And I follow "Yes" # behat_hooks::i_look_for_exceptions()
And I should see "Kermit is a frog" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| True | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Congratulations - end of lesson reached" # behat_hooks::i_look_for_exceptions()
Scenario: resume a lesson with only content pages # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_student_resume.feature:121
Given I follow "Add a content page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | First page name |
| Page contents | First page contents |
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Add a content page" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Fourth page name |
| Page contents | Fourth page contents |
| id_answer_editor_0 | Previous page |
| id_jumpto_0 | Previous page |
| id_answer_editor_1 | End of lesson |
| id_jumpto_1 | End of lesson |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Add a content page" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Third page name |
| Page contents | Third page contents |
| id_answer_editor_0 | Previous page |
| id_jumpto_0 | Previous page |
| id_answer_editor_1 | Next page |
| id_jumpto_1 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Add a content page" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Second page name |
| Page contents | Second page contents |
| id_answer_editor_0 | Previous page |
| id_jumpto_0 | Previous page |
| id_answer_editor_1 | Next page |
| id_jumpto_1 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "First page contents" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Second page contents" # behat_hooks::i_look_for_exceptions()
And I wait "1" seconds # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Third page contents" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
Then I should see "You have seen more than one page of this lesson already." # behat_hooks::i_look_for_exceptions()
And I should see "Do you want to start at the last page you saw?" # behat_hooks::i_look_for_exceptions()
And I follow "Yes" # behat_hooks::i_look_for_exceptions()
And I should see "Third page contents" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Fourth page contents" # behat_hooks::i_look_for_exceptions()
And I wait "1" seconds # behat_hooks::i_look_for_exceptions()
And I press "End of lesson" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "First page contents" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: resume a lesson with both question then content pages # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_student_resume.feature:184
Given I follow "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True/false question 1 |
| Page contents | Cat is an amphibian |
| id_answer_editor_0 | False |
| id_response_editor_0 | Correct |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | True |
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Question" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True/false question 5 |
| Page contents | Kermit is a frog |
| id_answer_editor_0 | True |
| id_response_editor_0 | Correct |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | False |
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Add a content page" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Content page 2 |
| Page contents | Second content page |
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Question" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True/false question 4 |
| Page contents | 2+2=4 |
| id_answer_editor_0 | True |
| id_response_editor_0 | Correct |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | False |
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Question" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True/false question 3 |
| Page contents | 1+1=2 |
| id_answer_editor_0 | True |
| id_response_editor_0 | Correct |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | False |
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Question" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True/false question 2 |
| Page contents | Paper is made from trees. |
| id_answer_editor_0 | True |
| id_response_editor_0 | Correct |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | False |
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Add a content page" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Content page 1 |
| Page contents | First content page |
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "Cat is an amphibian" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| False | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "First content page" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Paper is made from trees." # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| True | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "1+1=2" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| True | 1 |
And I wait "1" seconds # behat_hooks::i_look_for_exceptions()
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "2+2=4" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "You have seen more than one page of this lesson already." # behat_hooks::i_look_for_exceptions()
Then I should see "Do you want to start at the last page you saw?" # behat_hooks::i_look_for_exceptions()
And I follow "Yes" # behat_hooks::i_look_for_exceptions()
And I should see "2+2=4" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| True | 1 |
And I wait "1" seconds # behat_hooks::i_look_for_exceptions()
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Second content page" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "You have seen more than one page of this lesson already." # behat_hooks::i_look_for_exceptions()
And I should see "Do you want to start at the last page you saw?" # behat_hooks::i_look_for_exceptions()
And I follow "Yes" # behat_hooks::i_look_for_exceptions()
And I should see "Second content page" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Kermit is a frog" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| True | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Congratulations - end of lesson reached" # behat_hooks::i_look_for_exceptions()
Scenario: resume a lesson with only question pages # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_student_resume.feature:313
Given I follow "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True/false question 1 |
| Page contents | Cat is an amphibian |
| id_answer_editor_0 | False |
| id_response_editor_0 | Correct |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | True |
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Question" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True/false question 5 |
| Page contents | Kermit is a frog |
| id_answer_editor_0 | True |
| id_response_editor_0 | Correct |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | False |
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Question" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True/false question 4 |
| Page contents | 2+2=4 |
| id_answer_editor_0 | True |
| id_response_editor_0 | Correct |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | False |
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Question" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True/false question 3 |
| Page contents | 1+1=2 |
| id_answer_editor_0 | True |
| id_response_editor_0 | Correct |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | False |
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Question" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True/false question 2 |
| Page contents | Paper is made from trees. |
| id_answer_editor_0 | True |
| id_response_editor_0 | Correct |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | False |
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "Cat is an amphibian" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| False | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Paper is made from trees." # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| True | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "1+1=2" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| True | 1 |
And I wait "1" seconds # behat_hooks::i_look_for_exceptions()
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "2+2=4" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
Then I should see "You have seen more than one page of this lesson already." # behat_hooks::i_look_for_exceptions()
And I should see "Do you want to start at the last page you saw?" # behat_hooks::i_look_for_exceptions()
And I follow "Yes" # behat_hooks::i_look_for_exceptions()
And I should see "2+2=4" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| True | 1 |
And I wait "1" seconds # behat_hooks::i_look_for_exceptions()
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Kermit is a frog" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| True | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Congratulations - end of lesson reached" # behat_hooks::i_look_for_exceptions()
@mod @mod_lesson @javascript
Feature: Lesson user override
In order to grant a student special access to a lesson
As a teacher
I need to create an override for that user.
Background: # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_user_override.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Tina | Teacher1 | teacher1@example.com |
| student1 | Sam1 | Student1 | student1@example.com |
| student2 | Sam2 | Student2 | student2@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And the following "groups" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| Group 1 | C1 | G1 |
| Group 2 | C1 | G2 |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber |
| lesson | Test lesson name | Test lesson description | C1 | lesson1 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I follow "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "True/false" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | True/false question 1 |
| Page contents | Cat is an amphibian |
| id_answer_editor_0 | False |
| id_response_editor_0 | Correct |
| id_jumpto_0 | Next page |
| id_answer_editor_1 | True |
| id_response_editor_1 | Wrong |
| id_jumpto_1 | This page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Add, modify then delete a user override # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_user_override.feature:47
When I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I navigate to "User overrides" node in "Lesson administration" # behat_hooks::i_look_for_exceptions()
And I press "Add user override" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Override user | Student1 |
| id_deadline_enabled | 1 |
| deadline[day] | 1 |
| deadline[month] | January |
| deadline[year] | 2020 |
| deadline[hour] | 08 |
| deadline[minute] | 00 |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "Wednesday, 1 January 2020, 8:00" # behat_hooks::i_look_for_exceptions()
Then I click on "Edit" "link" in the "Sam1 Student1" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| deadline[year] | 2030 |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "Tuesday, 1 January 2030, 8:00" # behat_hooks::i_look_for_exceptions()
And I click on "Delete" "link" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should not see "Sam1 Student1" # behat_hooks::i_look_for_exceptions()
Scenario: Duplicate a user override # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_user_override.feature:70
When I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I navigate to "User overrides" node in "Lesson administration" # behat_hooks::i_look_for_exceptions()
And I press "Add user override" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Override user | Student1 |
| id_deadline_enabled | 1 |
| deadline[day] | 1 |
| deadline[month] | January |
| deadline[year] | 2020 |
| deadline[hour] | 08 |
| deadline[minute] | 00 |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "Wednesday, 1 January 2020, 8:00" # behat_hooks::i_look_for_exceptions()
Then I click on "copy" "link" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Override user | Student2 |
| deadline[year] | 2030 |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "Tuesday, 1 January 2030, 8:00" # behat_hooks::i_look_for_exceptions()
And I should see "Sam2 Student2" # behat_hooks::i_look_for_exceptions()
Scenario: Allow a single user to have re-take the lesson # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_user_override.feature:92
When I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Lesson administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Re-takes allowed | 0 |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I navigate to "User overrides" node in "Lesson administration" # behat_hooks::i_look_for_exceptions()
And I press "Add user override" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Override user | Student1 |
| Re-takes allowed | 1 |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "Re-takes allowed" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "Cat is an amphibian" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| False | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Congratulations - end of lesson reached" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
Then I should not see "You are not allowed to retake this lesson." # behat_hooks::i_look_for_exceptions()
And I should see "Cat is an amphibian" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "Cat is an amphibian" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| False | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Congratulations - end of lesson reached" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "You are not allowed to retake this lesson." # behat_hooks::i_look_for_exceptions()
Scenario: Allow a single user to have a different password # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_user_override.feature:131
When I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Lesson administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Password protected lesson | Yes |
| id_password | moodle_rules |
And I wait until the page is ready # behat_hooks::i_look_for_exceptions()
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I navigate to "User overrides" node in "Lesson administration" # behat_hooks::i_look_for_exceptions()
And I press "Add user override" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Override user | Student1 |
| Password protected lesson | 12345 |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "Password protected lesson" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
Then I should see "Test lesson name is a password protected lesson" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat is an amphibian" # behat_hooks::i_look_for_exceptions()
And I set the field "userpassword" to "moodle_rules" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Login failed, please try again..." # behat_hooks::i_look_for_exceptions()
And I should see "Test lesson name is a password protected lesson" # behat_hooks::i_look_for_exceptions()
And I set the field "userpassword" to "12345" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Cat is an amphibian" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| False | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Congratulations - end of lesson reached" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "Test lesson name is a password protected lesson" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat is an amphibian" # behat_hooks::i_look_for_exceptions()
And I set the field "userpassword" to "12345" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Login failed, please try again..." # behat_hooks::i_look_for_exceptions()
And I should see "Test lesson name is a password protected lesson" # behat_hooks::i_look_for_exceptions()
And I set the field "userpassword" to "moodle_rules" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
Scenario: Allow a user to have a different due date # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_user_override.feature:177
When I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Lesson administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_deadline_enabled | 1 |
| deadline[day] | 1 |
| deadline[month] | January |
| deadline[year] | 2000 |
| deadline[hour] | 08 |
| deadline[minute] | 00 |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I navigate to "User overrides" node in "Lesson administration" # behat_hooks::i_look_for_exceptions()
And I press "Add user override" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Override user | Student1 |
| id_deadline_enabled | 1 |
| deadline[day] | 1 |
| deadline[month] | January |
| deadline[year] | 2020 |
| deadline[hour] | 08 |
| deadline[minute] | 00 |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "Lesson closes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson" # behat_hooks::i_look_for_exceptions()
Then I should see "This lesson closed on Saturday, 1 January 2000, 8:00" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat is an amphibian" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson" # behat_hooks::i_look_for_exceptions()
And I should see "Cat is an amphibian" # behat_hooks::i_look_for_exceptions()
Scenario: Allow a user to have a different start date # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_user_override.feature:212
When I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Lesson administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_available_enabled | 1 |
| available[day] | 1 |
| available[month] | January |
| available[year] | 2020 |
| available[hour] | 08 |
| available[minute] | 00 |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I navigate to "User overrides" node in "Lesson administration" # behat_hooks::i_look_for_exceptions()
And I press "Add user override" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Override user | Student1 |
| id_available_enabled | 1 |
| available[day] | 1 |
| available[month] | January |
| available[year] | 2015 |
| available[hour] | 08 |
| available[minute] | 00 |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "Lesson opens" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson" # behat_hooks::i_look_for_exceptions()
Then I should see "This lesson will be open on Wednesday, 1 January 2020, 8:00" # behat_hooks::i_look_for_exceptions()
And I should not see "Cat is an amphibian" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson" # behat_hooks::i_look_for_exceptions()
And I should see "Cat is an amphibian" # behat_hooks::i_look_for_exceptions()
Scenario: Allow a single user to have multiple attempts at each question # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_user_override.feature:247
When I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Lesson administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Re-takes allowed | 1 |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I navigate to "User overrides" node in "Lesson administration" # behat_hooks::i_look_for_exceptions()
And I press "Add user override" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Override user | Student1 |
| Maximum number of attempts | 2 |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "Maximum number of attempts" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "Cat is an amphibian" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| True | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Cat is an amphibian" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| True | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Congratulations - end of lesson reached" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson name" # behat_hooks::i_look_for_exceptions()
And I should see "Cat is an amphibian" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| True | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
Then I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Congratulations - end of lesson reached" # behat_hooks::i_look_for_exceptions()
@mod @mod_lesson
Feature: In a lesson activity, students can see questions in random order
In order to create a lesson with clusters
As a teacher
I need to add content pages and questions with clusters and end of clusters pages
Background: # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_with_clusters.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
Scenario: Lesson with two clusters # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_with_clusters.feature:23
Given I add a "Lesson" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Lesson with clusters |
| Description | Test lesson description |
And I follow "Lesson with clusters" # behat_hooks::i_look_for_exceptions()
And I follow "Add a content page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | First page name |
| Page contents | First page contents |
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Add a content page" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Second page name |
| Page contents | Second page contents |
| id_answer_editor_0 | Previous page |
| id_jumpto_0 | Previous page |
| id_answer_editor_1 | Next page |
| id_jumpto_1 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I follow "Expanded" # behat_hooks::i_look_for_exceptions()
And I click on "Add a cluster" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][3]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I click on "Add a question page here" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][4]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "Multichoice" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | question 1 |
| Page contents | Question from cluster 1 |
| id_answer_editor_0 | Correct answer |
| id_response_editor_0 | Good |
| id_jumpto_0 | Cluster |
| id_score_0 | 1 |
| id_answer_editor_1 | Incorrect answer |
| id_response_editor_1 | Bad |
| id_jumpto_1 | This page |
| id_score_1 | 0 |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I click on "Add a question page here" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][5]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "Multichoice" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | question 2 |
| Page contents | Question from cluster 1 |
| id_answer_editor_0 | Correct answer |
| id_response_editor_0 | Good |
| id_jumpto_0 | Cluster |
| id_score_0 | 1 |
| id_answer_editor_1 | Incorrect answer |
| id_response_editor_1 | Bad |
| id_jumpto_1 | This page |
| id_score_1 | 0 |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I click on "Add an end of cluster" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][6]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I click on "Add a content page" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][7]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Third page name |
| Page contents | Content page after cluster 1 |
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I click on "Add a cluster" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][8]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I click on "Add a question page here" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][9]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "Multichoice" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | question 3 |
| Page contents | Question from cluster 2 |
| id_answer_editor_0 | Correct answer |
| id_response_editor_0 | Good |
| id_jumpto_0 | Unseen question within a cluster |
| id_score_0 | 1 |
| id_answer_editor_1 | Incorrect answer |
| id_response_editor_1 | Bad |
| id_jumpto_1 | This page |
| id_score_1 | 0 |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I click on "Add a question page here" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][10]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "Multichoice" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | question 4 |
| Page contents | Question from cluster 2 |
| id_answer_editor_0 | Correct answer |
| id_response_editor_0 | Good |
| id_jumpto_0 | Unseen question within a cluster |
| id_score_0 | 1 |
| id_answer_editor_1 | Incorrect answer |
| id_response_editor_1 | Bad |
| id_jumpto_1 | This page |
| id_score_1 | 0 |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I click on "Add an end of cluster" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][11]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I click on "Add a content page" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][12]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Fourth page name |
| Page contents | Content page after cluster 2 |
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
When I follow "Lesson with clusters" # behat_hooks::i_look_for_exceptions()
Then I should see "First page contents" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Second page contents" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Question from cluster 1" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Correct answer | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I should see "Good" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Question from cluster 1" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Correct answer | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I should see "Good" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Content page after cluster 1" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Question from cluster 2" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Correct answer | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I should see "Good" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Question from cluster 2" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Correct answer | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I should see "Good" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Content page after cluster 2" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Congratulations - end of lesson reached" # behat_hooks::i_look_for_exceptions()
And I should see "Your score is 4 (out of 4)." # behat_hooks::i_look_for_exceptions()
@mod @mod_lesson
Feature: In a lesson activity, students can see questions in random order and a single question drawn from a branch
In order to create a lesson with a cluster and a subcluster
As a teacher
I need to add content pages and questions with cluster, branchtable and end of branchtable and end of cluster pages
Background: # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_with_subcluster.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
Scenario: Lesson with subcluster # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\lesson_with_subcluster.feature:23
Given I add a "Lesson" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Lesson with subcluster |
| Description | Test lesson description |
And I follow "Lesson with subcluster" # behat_hooks::i_look_for_exceptions()
And I follow "Add a content page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | First page name |
| Page contents | First page contents |
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I follow "Expanded" # behat_hooks::i_look_for_exceptions()
And I click on "Add a cluster" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][2]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I click on "Add a question page here" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][3]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "Multichoice" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | question 1 |
| Page contents | Question from cluster |
| id_answer_editor_0 | Correct answer |
| id_response_editor_0 | Good |
| id_jumpto_0 | Cluster |
| id_score_0 | 1 |
| id_answer_editor_1 | Incorrect answer |
| id_response_editor_1 | Bad |
| id_jumpto_1 | This page |
| id_score_1 | 0 |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I click on "Add a question page here" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][4]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "Multichoice" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | question 2 |
| Page contents | Question from cluster |
| id_answer_editor_0 | Correct answer |
| id_response_editor_0 | Good |
| id_jumpto_0 | Cluster |
| id_score_0 | 1 |
| id_answer_editor_1 | Incorrect answer |
| id_response_editor_1 | Bad |
| id_jumpto_1 | This page |
| id_score_1 | 0 |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I click on "Add a content page" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][5]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Second page name |
| Page contents | This page mark the the beginning of the subcluster it should not be seen by students |
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I click on "Add a question page here" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][6]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "Multichoice" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | question 3 |
| Page contents | Question from cluster |
| id_answer_editor_0 | Correct answer |
| id_response_editor_0 | Good |
| id_jumpto_0 | Cluster |
| id_score_0 | 1 |
| id_answer_editor_1 | Incorrect answer |
| id_response_editor_1 | Bad |
| id_jumpto_1 | This page |
| id_score_1 | 0 |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I click on "Add a question page here" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][7]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "Multichoice" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | question 4 |
| Page contents | Question from cluster |
| id_answer_editor_0 | Correct answer |
| id_response_editor_0 | Good |
| id_jumpto_0 | Cluster |
| id_score_0 | 1 |
| id_answer_editor_1 | Incorrect answer |
| id_response_editor_1 | Bad |
| id_jumpto_1 | This page |
| id_score_1 | 0 |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I click on "Add a question page here" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][8]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "Multichoice" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | question 5 |
| Page contents | Question from cluster |
| id_answer_editor_0 | Correct answer |
| id_response_editor_0 | Good |
| id_jumpto_0 | Cluster |
| id_score_0 | 1 |
| id_answer_editor_1 | Incorrect answer |
| id_response_editor_1 | Bad |
| id_jumpto_1 | This page |
| id_score_1 | 0 |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I click on "Add an end of branch" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][9]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I click on "Add a question page here" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][10]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I set the field "Select a question type" to "Multichoice" # behat_hooks::i_look_for_exceptions()
And I press "Add a question page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | question 6 |
| Page contents | Question from cluster |
| id_answer_editor_0 | Correct answer |
| id_response_editor_0 | Good |
| id_jumpto_0 | Cluster |
| id_score_0 | 1 |
| id_answer_editor_1 | Incorrect answer |
| id_response_editor_1 | Bad |
| id_jumpto_1 | This page |
| id_score_1 | 0 |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I click on "Add an end of cluster" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][11]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I click on "Add a content page" "link" in the "//div[contains(concat(' ', normalize-space(@class), ' '), ' addlinks ')][12]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Third page name |
| Page contents | Content page after cluster |
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
When I follow "Lesson with subcluster" # behat_hooks::i_look_for_exceptions()
Then I should see "First page contents" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Question from cluster" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Correct answer | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I should see "Good" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Question from cluster" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Correct answer | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I should see "Good" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Question from cluster" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Correct answer | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I should see "Good" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Question from cluster" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Correct answer | 1 |
And I press "Submit" # behat_hooks::i_look_for_exceptions()
And I should see "Good" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Content page after cluster" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Congratulations - end of lesson reached" # behat_hooks::i_look_for_exceptions()
And I should see "Your score is 4 (out of 4)." # behat_hooks::i_look_for_exceptions()
@mod @mod_choice
Feature: Limit choice responses
In order to restrict students from selecting a response more than a specified number of times
As a teacher
I need to limit the choice responses
Scenario: Limit the number of responses allowed for a choice activity and verify the result as students # C:\Apache24\htdocs\integration\mod\choice\tests\behat\limit_responses.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Choice" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Choice name | Choice name |
| Description | Choice Description |
| Limit the number of responses allowed | 1 |
| option[0] | Option 1 |
| limit[0] | 1 |
| option[1] | Option 2 |
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I choose "Option 1" from "Choice name" choice activity # behat_hooks::i_look_for_exceptions()
Then I should see "Your selection: Option 1" # behat_hooks::i_look_for_exceptions()
And I should see "Your choice has been saved" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Choice name" # behat_hooks::i_look_for_exceptions()
And I should see "Option 1 (Full)" # behat_hooks::i_look_for_exceptions()
And the "choice_1" "radio" should be disabled # behat_hooks::i_look_for_exceptions()
@editor @editor_atto @atto @atto_link @_file_upload
Feature: Add links to Atto
To write rich text - I need to add links.
@javascript
Scenario: Insert a links # C:\Apache24\htdocs\integration\lib\editor\atto\plugins\link\tests\behat\link.feature:6
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I follow "Manage private files..." # behat_hooks::i_look_for_exceptions()
And I upload "lib/editor/atto/tests/fixtures/moodle-logo.png" file to "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I click on "Save changes" "button" # behat_hooks::i_look_for_exceptions()
When I follow "Profile" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I set the field "Description" to "Super cool" # behat_hooks::i_look_for_exceptions()
And I select the text in the "Description" Atto editor # behat_hooks::i_look_for_exceptions()
And I click on "Link" "button" # behat_hooks::i_look_for_exceptions()
And I click on "Browse repositories..." "button" # behat_hooks::i_look_for_exceptions()
And I click on "Private files" "link" in the ".fp-repo-area" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "moodle-logo.png" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Select this file" "button" # behat_hooks::i_look_for_exceptions()
And I click on "Update profile" "button" # behat_hooks::i_look_for_exceptions()
And I follow "Preferences" in the user menu # behat_hooks::i_look_for_exceptions()
And I follow "Editor preferences" # behat_hooks::i_look_for_exceptions()
And I set the field "Text editor" to "Plain text area" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
Then I should see "Super cool" # behat_hooks::i_look_for_exceptions()
@mod @mod_lesson
Feature: link to gradebook on the end of lesson page
In order to allow students to see their lesson grades
As a teacher
I need to provide a link to gradebook on the end of lesson page
Background: # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\link_to_gradebook.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Lesson" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Test lesson |
| Description | Test lesson description |
And I follow "Test lesson" # behat_hooks::i_look_for_exceptions()
And I follow "Add a content page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | First page name |
| Page contents | First page contents |
| id_answer_editor_0 | Next page |
| id_jumpto_0 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
And I select "Add a content page" from the "qtype" singleselect # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Page title | Second page name |
| Page contents | Second page contents |
| id_answer_editor_0 | Previous page |
| id_jumpto_0 | Previous page |
| id_answer_editor_1 | Next page |
| id_jumpto_1 | Next page |
And I press "Save page" # behat_hooks::i_look_for_exceptions()
Scenario: Link to gradebook for non practice lesson # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\link_to_gradebook.feature:43
Given I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
Then I should see "Congratulations - end of lesson reached" # behat_hooks::i_look_for_exceptions()
And I should see "View grades" # behat_hooks::i_look_for_exceptions()
And I follow "View grades" # behat_hooks::i_look_for_exceptions()
And I should see "User report - Student 1" # behat_hooks::i_look_for_exceptions()
And I should see "Test lesson" # behat_hooks::i_look_for_exceptions()
Scenario: No link to gradebook for non graded lesson # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\link_to_gradebook.feature:56
Given I follow "Test lesson" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Lesson administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Type | None |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
Then I should see "Congratulations - end of lesson reached" # behat_hooks::i_look_for_exceptions()
And I should not see "View grades" # behat_hooks::i_look_for_exceptions()
Scenario: No link to gradebook for practice lesson # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\link_to_gradebook.feature:71
Given I follow "Test lesson" # behat_hooks::i_look_for_exceptions()
And I navigate to "Edit settings" node in "Lesson administration" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Practice lesson | Yes |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
Then I should see "Congratulations - end of lesson reached" # behat_hooks::i_look_for_exceptions()
And I should not see "View grades" # behat_hooks::i_look_for_exceptions()
Scenario: No link if Show gradebook to student disabled # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\link_to_gradebook.feature:86
Given I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Show gradebook to students | No |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
Then I should see "Congratulations - end of lesson reached" # behat_hooks::i_look_for_exceptions()
And I should not see "View grades" # behat_hooks::i_look_for_exceptions()
Scenario: No link to gradebook if no gradereport/user:view capability # C:\Apache24\htdocs\integration\mod\lesson\tests\behat\link_to_gradebook.feature:101
Given I log out # behat_hooks::i_look_for_exceptions()
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I set the following system permissions of "Student" role: # behat_hooks::i_look_for_exceptions()
| capability | permission |
| gradereport/user:view | Prevent |
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test lesson" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
Then I should see "Congratulations - end of lesson reached" # behat_hooks::i_look_for_exceptions()
And I should not see "View grades" # behat_hooks::i_look_for_exceptions()
@tool @tool_behat
Feature: List the system steps definitions
In order to create new tests
As a tests writer
I need to list and filter the system steps definitions
Background: # C:\Apache24\htdocs\integration\admin\tool\behat\tests\behat\list_steps.feature:7
Given I am on homepage # behat_hooks::i_look_for_exceptions()
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "Acceptance testing" node in "Site administration > Development" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Accessing the list # C:\Apache24\htdocs\integration\admin\tool\behat\tests\behat\list_steps.feature:13
Then I should see "Steps definitions" # behat_hooks::i_look_for_exceptions()
And I should not see "There aren't steps definitions matching this filter" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Filtering by type # C:\Apache24\htdocs\integration\admin\tool\behat\tests\behat\list_steps.feature:18
Given I set the field "Type" to "Then. Checkings to ensure the outcomes are the expected ones" # behat_hooks::i_look_for_exceptions()
When I press "Filter" # behat_hooks::i_look_for_exceptions()
Then I should see "Checks, that page contains specified text." # behat_hooks::i_look_for_exceptions()
And I should not see "Opens Moodle homepage." # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Filtering by keyword # C:\Apache24\htdocs\integration\admin\tool\behat\tests\behat\list_steps.feature:25
Given I set the field "Contains" to "homepage" # behat_hooks::i_look_for_exceptions()
When I press "Filter" # behat_hooks::i_look_for_exceptions()
Then I should see "Opens Moodle homepage." # behat_hooks::i_look_for_exceptions()
@mod @mod_book
Feature: In a book, verify log entries
In order to create log entries
As an admin
I need to perform various actions in a book.
@javascript @_switch_window
Scenario: perform various book actions and verify log entries. # C:\Apache24\htdocs\integration\mod\book\tests\behat\log_entries.feature:8
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
When I add a "Book" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Test book |
| Description | A book about dreams! |
And I follow "Test book" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Chapter title | First chapter |
| Content | First chapter |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I click on "Add new chapter" "link" in the "Table of contents" "block" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Chapter title | Second chapter |
| Content | Second chapter |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I click on "Edit" "link" in the "Table of contents" "block" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Chapter title | First chapter edited |
| Content | First chapter edited |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I click on "Next" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Previous" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Print book" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I click on "Generate IMS CP" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I click on "Logs" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
Then I should see "Book exported" # behat_hooks::i_look_for_exceptions()
And I should see "Book printed" # behat_hooks::i_look_for_exceptions()
And I should see "Chapter viewed" in the "#report_log_r2_c5" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Chapter viewed" in the "#report_log_r3_c5" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Chapter viewed" in the "#report_log_r4_c5" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Chapter updated" in the "#report_log_r5_c5" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Chapter viewed" in the "#report_log_r6_c5" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Chapter created" in the "#report_log_r7_c5" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "Chapter created" in the "#report_log_r9_c5" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Chapter viewed" "link" in the "#report_log_r2_c5" "css_element" # behat_hooks::i_look_for_exceptions()
And I switch to "action" window # behat_hooks::i_look_for_exceptions()
And I should see "1. First chapter edited" in the ".book_content" "css_element" # behat_hooks::i_look_for_exceptions()
And I switch to the main window # behat_hooks::i_look_for_exceptions()
And I click on "Chapter viewed" "link" in the "#report_log_r3_c5" "css_element" # behat_hooks::i_look_for_exceptions()
And I switch to "action" window # behat_hooks::i_look_for_exceptions()
And I should see "2. Second chapter" in the ".book_content" "css_element" # behat_hooks::i_look_for_exceptions()
And I switch to the main window # behat_hooks::i_look_for_exceptions()
And I click on "Chapter updated" "link" in the "#report_log_r5_c5" "css_element" # behat_hooks::i_look_for_exceptions()
And I switch to "action" window # behat_hooks::i_look_for_exceptions()
And I should see "1. First chapter edited" in the ".book_content" "css_element" # behat_hooks::i_look_for_exceptions()
And I switch to the main window # behat_hooks::i_look_for_exceptions()
And I click on "Chapter created" "link" in the "#report_log_r7_c5" "css_element" # behat_hooks::i_look_for_exceptions()
And I switch to "action" window # behat_hooks::i_look_for_exceptions()
And I should see "2. Second chapter" in the ".book_content" "css_element" # behat_hooks::i_look_for_exceptions()
And I switch to the main window # behat_hooks::i_look_for_exceptions()
And I click on "Chapter created" "link" in the "#report_log_r9_c5" "css_element" # behat_hooks::i_look_for_exceptions()
And I switch to "action" window # behat_hooks::i_look_for_exceptions()
And I should see "1. First chapter edited" in the ".book_content" "css_element" # behat_hooks::i_look_for_exceptions()
And I switch to the main window # behat_hooks::i_look_for_exceptions()
@core @core_auth
Feature: Authentication
In order to validate my credentials in the system
As a user
I need to log into the system
Scenario: Log in with the predefined admin user with Javascript disabled # C:\Apache24\htdocs\integration\auth\tests\behat\login.feature:7
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
Then I should see "You are logged in as Admin User" in the "page-footer" "region" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Log in with the predefined admin user with Javascript enabled # C:\Apache24\htdocs\integration\auth\tests\behat\login.feature:12
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
Then I should see "You are logged in as Admin User" in the "page-footer" "region" # behat_hooks::i_look_for_exceptions()
Scenario: Log in as an existing admin user filling the form # C:\Apache24\htdocs\integration\auth\tests\behat\login.feature:16
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | password | firstname | lastname | email |
| testuser | testuser | Test | User | moodle@example.com |
And I am on site homepage # behat_hooks::i_look_for_exceptions()
When I follow "Log in" # behat_hooks::i_look_for_exceptions()
And I set the field "Username" to "testuser" # behat_hooks::i_look_for_exceptions()
And I set the field "Password" to "testuser" # behat_hooks::i_look_for_exceptions()
And I press "Log in" # behat_hooks::i_look_for_exceptions()
Then I should see "You are logged in as" in the "page-footer" "region" # behat_hooks::i_look_for_exceptions()
Scenario: Log in as an unexisting user filling the form # C:\Apache24\htdocs\integration\auth\tests\behat\login.feature:27
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | password | firstname | lastname | email |
| testuser | testuser | Test | User | moodle@example.com |
And I am on site homepage # behat_hooks::i_look_for_exceptions()
When I follow "Log in" # behat_hooks::i_look_for_exceptions()
And I set the field "Username" to "testuser" # behat_hooks::i_look_for_exceptions()
And I set the field "Password" to "unexisting" # behat_hooks::i_look_for_exceptions()
And I press "Log in" # behat_hooks::i_look_for_exceptions()
Then I should see "Invalid login, please try again" # behat_hooks::i_look_for_exceptions()
Scenario: Log out # C:\Apache24\htdocs\integration\auth\tests\behat\login.feature:38
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
When I log out # behat_hooks::i_look_for_exceptions()
Then I should see "You are not logged in" in the "page-footer" "region" # behat_hooks::i_look_for_exceptions()
@block @block_login
Feature: Login from a block
In order to make it easier to login
As an user
In need to login through a block
Background: # C:\Apache24\htdocs\integration\blocks\login\tests\behat\login_block.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | password | firstname | lastname | email |
| testuser | testpass | Test | User | student1@example.com |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I navigate to "Turn editing on" node in "Front page settings" # behat_hooks::i_look_for_exceptions()
And I add the "Login" block # behat_hooks::i_look_for_exceptions()
Scenario: Login block visible to non-logged in users # C:\Apache24\htdocs\integration\blocks\login\tests\behat\login_block.feature:16
Given I log out # behat_hooks::i_look_for_exceptions()
When I am on homepage # behat_hooks::i_look_for_exceptions()
Then "Login" "block" should exist # behat_hooks::i_look_for_exceptions()
Scenario: Login as student through login block # C:\Apache24\htdocs\integration\blocks\login\tests\behat\login_block.feature:21
Given I log out # behat_hooks::i_look_for_exceptions()
And I am on homepage # behat_hooks::i_look_for_exceptions()
When I set the field "Username" to "testuser" # behat_hooks::i_look_for_exceptions()
And I set the field "Password" to "testpass" # behat_hooks::i_look_for_exceptions()
And I click on "Log in" "button" in the "Login" "block" # behat_hooks::i_look_for_exceptions()
Then I should see "You are logged in as Test User" # behat_hooks::i_look_for_exceptions()
And "Login" "block" should not exist # behat_hooks::i_look_for_exceptions()
@report @report_loglive
Feature: In a report, admin can see loglive data
In order see loglive data
As an admin
I need to view loglive report and see if the live update feature works
Background: # C:\Apache24\htdocs\integration\report\loglive\tests\behat\loglive_report.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "Manage log stores" node in "Site administration > Plugins > Logging" # behat_hooks::i_look_for_exceptions()
And I click on "Enable" "link" in the "Legacy log" "table_row" # behat_hooks::i_look_for_exceptions()
And the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| loglegacy | 1 | logstore_legacy |
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Database" to section "3" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Test name |
| Description | Test database description |
@javascript
Scenario: Check loglive report entries and make sure the report works for standard and legacy reader # C:\Apache24\htdocs\integration\report\loglive\tests\behat\loglive_report.feature:24
Given I navigate to "Live logs" node in "Site administration > Reports" # behat_hooks::i_look_for_exceptions()
When I set the field "reader" to "Standard log" # behat_hooks::i_look_for_exceptions()
Then I should see "Course module created" # behat_hooks::i_look_for_exceptions()
And I should see "Test name" # behat_hooks::i_look_for_exceptions()
And I set the field "reader" to "Legacy log" # behat_hooks::i_look_for_exceptions()
And I wait to be redirected # behat_hooks::i_look_for_exceptions()
And I should see "course_add mod" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@javascript @_switch_window
Scenario: Check loglive report entries and make sure the pause/resume button works for standard reader along with ajax calls # C:\Apache24\htdocs\integration\report\loglive\tests\behat\loglive_report.feature:35
Given I am on site homepage # behat_hooks::i_look_for_exceptions()
When I navigate to "Live logs" node in "Site administration > Reports" # behat_hooks::i_look_for_exceptions()
And I set the field "reader" to "Standard log" # behat_hooks::i_look_for_exceptions()
And I wait to be redirected # behat_hooks::i_look_for_exceptions()
And I should not see "Test name2" # behat_hooks::i_look_for_exceptions()
And I press "Pause live updates" # behat_hooks::i_look_for_exceptions()
And I follow "Course module created" # behat_hooks::i_look_for_exceptions()
And I switch to "action" window # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I add a "Database" to section "3" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Test name2 |
| Description | Test database description |
And I switch to the main window # behat_hooks::i_look_for_exceptions()
And I wait "8" seconds # behat_hooks::i_look_for_exceptions()
Then I should not see "Test name2" # behat_hooks::i_look_for_exceptions()
And I press "Resume live updates" # behat_hooks::i_look_for_exceptions()
And I wait "8" seconds # behat_hooks::i_look_for_exceptions()
And I should see "Test name2" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@javascript @_switch_window
Scenario: Check loglive report entries and make sure the pause/resume button works for legacy reader along with ajax calls # C:\Apache24\htdocs\integration\report\loglive\tests\behat\loglive_report.feature:58
Given I am on site homepage # behat_hooks::i_look_for_exceptions()
When I navigate to "Live logs" node in "Site administration > Reports" # behat_hooks::i_look_for_exceptions()
And I set the field "reader" to "Legacy log" # behat_hooks::i_look_for_exceptions()
And I wait to be redirected # behat_hooks::i_look_for_exceptions()
And I should not see "Test name2" # behat_hooks::i_look_for_exceptions()
And I press "Pause live updates" # behat_hooks::i_look_for_exceptions()
And I follow "course_add mod" # behat_hooks::i_look_for_exceptions()
And I switch to "action" window # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I add a "Database" to section "3" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Test name2 |
| Description | Test database description |
And I switch to the main window # behat_hooks::i_look_for_exceptions()
And I wait "8" seconds # behat_hooks::i_look_for_exceptions()
Then I should not see "Test name2" # behat_hooks::i_look_for_exceptions()
And I press "Resume live updates" # behat_hooks::i_look_for_exceptions()
And I wait "8" seconds # behat_hooks::i_look_for_exceptions()
And I should see "Test name2" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@block @block_activity_results
Feature: The activity results block displays student scores
In order to be display student scores
As a user
I need to see the activity results block
Background: # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\lowscoreswithoutgroups.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
| student1 | Student | 1 | student1@example.com | S1 |
| student2 | Student | 2 | student2@example.com | S2 |
| student3 | Student | 3 | student3@example.com | S3 |
| student4 | Student | 4 | student4@example.com | S4 |
| student5 | Student | 5 | student5@example.com | S5 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
| student4 | C1 | student |
| student5 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "90.00" to the user "Student 1" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "80.00" to the user "Student 2" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "70.00" to the user "Student 3" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "60.00" to the user "Student 4" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "50.00" to the user "Student 5" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Scenario: Configure the block on the course page to show 1 low score # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\lowscoreswithoutgroups.feature:45
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 0 |
| id_config_showworst | 1 |
| id_config_gradeformat | Percentages |
| id_config_nameformat | Display full names |
| id_config_decimalpoints | 0 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Student 5" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "50%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show 1 low score as a fraction # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\lowscoreswithoutgroups.feature:58
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 0 |
| id_config_showworst | 1 |
| id_config_gradeformat | Fractions |
| id_config_nameformat | Display full names |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Student 5" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "50.00/100.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show 1 low score as a absolute number # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\lowscoreswithoutgroups.feature:70
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 0 |
| id_config_showworst | 1 |
| id_config_gradeformat | Absolute numbers |
| id_config_nameformat | Display full names |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Student 5" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "50.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show multiple low scores as percentages # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\lowscoreswithoutgroups.feature:82
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 0 |
| id_config_showworst | 3 |
| id_config_gradeformat | Percentages |
| id_config_nameformat | Display full names |
| id_config_decimalpoints | 0 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Student 5" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "50%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Student 4" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "60%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Student 3" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "70%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show multiple low scores as fractions # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\lowscoreswithoutgroups.feature:99
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 0 |
| id_config_showworst | 3 |
| id_config_gradeformat | Fractions |
| id_config_nameformat | Display full names |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Student 5" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "50.00/100.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Student 4" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "60.00/100.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Student 3" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "70.00/100.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show multiple low scores as absolute numbers # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\lowscoreswithoutgroups.feature:115
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 0 |
| id_config_showworst | 3 |
| id_config_gradeformat | Absolute numbers |
| id_config_nameformat | Display full names |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Student 5" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "50.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Student 4" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "60.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Student 3" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "70.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show multiple low scores using ID numbers # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\lowscoreswithoutgroups.feature:131
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 0 |
| id_config_showworst | 3 |
| id_config_gradeformat | Percentages |
| id_config_nameformat | Display only ID numbers |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "User S5" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "50.00%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "User S4" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "60.00%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "User S3" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "70.00%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show multiple low scores using anonymous names # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\lowscoreswithoutgroups.feature:147
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 0 |
| id_config_showworst | 3 |
| id_config_gradeformat | Percentages |
| id_config_nameformat | Anonymous results |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "User" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "50.00%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "60.00%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "70.00%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
@block @block_activity_results
Feature: The activity results block displays student scores as scales
In order to be display student scores as scales
As a user
I need to see the activity results block
Background: # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\lowscoreswithscales.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
| student1 | Student | 1 | student1@example.com | S1 |
| student2 | Student | 2 | student2@example.com | S2 |
| student3 | Student | 3 | student3@example.com | S3 |
| student4 | Student | 4 | student4@example.com | S4 |
| student5 | Student | 5 | student5@example.com | S5 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
| student4 | C1 | student |
| student5 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "Scales" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I press "Add a new scale" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | My Scale |
| Scale | Disappointing, Not good enough, Average, Good, Very good, Excellent! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| id_grade_modgrade_type | Scale |
| id_grade_modgrade_scale | My Scale |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "Good" to the user "Student 3" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "Average" to the user "Student 4" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "Not good enough" to the user "Student 5" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Scenario: Configure the block on the course page to show 1 low score # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\lowscoreswithscales.feature:54
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 0 |
| id_config_showworst | 1 |
| id_config_gradeformat | Percentages |
| id_config_nameformat | Display full names |
| id_config_decimalpoints | 0 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Student 5" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Not good enough" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show multiple low scores using full names # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\lowscoreswithscales.feature:67
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 0 |
| id_config_showworst | 3 |
| id_config_nameformat | Display full names |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Student 5" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Not good enough" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Student 4" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Average" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Student 3" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Good" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show multiple low scores using ID numbers # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\lowscoreswithscales.feature:82
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 0 |
| id_config_showworst | 3 |
| id_config_nameformat | Display only ID numbers |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "User S5" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Not good enough" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "User S4" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Average" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "User S3" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Good" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show multiple low scores using anonymous names # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\lowscoreswithscales.feature:97
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 0 |
| id_config_showworst | 3 |
| id_config_nameformat | Anonymous results |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "User" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 5" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Not good enough" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 4" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Average" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 3" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Good" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
@block @block_activity_results
Feature: The activity results block displays student scores as scales
In order to be display student scores as scales
As a user
I need to see the activity results block
Background: # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\lowscoreswithscalesandgroups.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
| student1 | Student | 1 | student1@example.com | S1 |
| student2 | Student | 2 | student2@example.com | S2 |
| student3 | Student | 3 | student3@example.com | S3 |
| student4 | Student | 4 | student4@example.com | S4 |
| student5 | Student | 5 | student5@example.com | S5 |
| student6 | Student | 6 | student6@example.com | S6 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "groups" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| Group 1 | C1 | G1 |
| Group 2 | C1 | G2 |
| Group 3 | C1 | G3 |
| Group 4 | C1 | G4 |
| Group 5 | C1 | G5 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
| student4 | C1 | student |
| student5 | C1 | student |
| student6 | C1 | student |
And the following "group members" exist: # behat_hooks::i_look_for_exceptions()
| user | group |
| student1 | G1 |
| student2 | G1 |
| student3 | G2 |
| student4 | G2 |
| student5 | G3 |
| student6 | G3 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "Scales" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I press "Add a new scale" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | My Scale |
| Scale | Disappointing, Not good enough, Average, Good, Very good, Excellent! |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| id_grade_modgrade_type | Scale |
| id_grade_modgrade_scale | My Scale |
| Group mode | Separate groups |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "Excellent!" to the user "Student 1" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "Very good" to the user "Student 2" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "Very good" to the user "Student 3" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "Good" to the user "Student 4" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "Good" to the user "Student 5" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "Average" to the user "Student 6" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show 1 low score # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\lowscoreswithscalesandgroups.feature:73
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 0 |
| id_config_showworst | 1 |
| id_config_nameformat | Display full names |
| id_config_usegroups | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Group 3" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Good" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student5" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Student 6" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Average" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show multiple high scores using full names # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\lowscoreswithscalesandgroups.feature:90
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 0 |
| id_config_showworst | 2 |
| id_config_nameformat | Display full names |
| id_config_usegroups | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Group 2" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Very good" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Group 3" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Good" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student3" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Student 3" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Very good" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Student 4" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Good" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show multiple high scores using ID numbers # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\lowscoreswithscalesandgroups.feature:111
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 0 |
| id_config_showworst | 2 |
| id_config_nameformat | Display only ID numbers |
| id_config_usegroups | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Group" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Very good" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Good" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student5" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "User S5" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Good" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "User S6" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Average" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show multiple high scores using anonymous names # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\lowscoreswithscalesandgroups.feature:131
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 0 |
| id_config_showworst | 2 |
| id_config_nameformat | Anonymous results |
| id_config_usegroups | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Group" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Very good" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Good" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student5" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "User" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Good" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Average" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
@block @block_activity_results
Feature: The activity results block displays student scores
In order to be display student scores
As a user
I need to see the activity results block
Background: # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\lowscoreswithseperategroups.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
| student1 | Student | 1 | student1@example.com | S1 |
| student2 | Student | 2 | student2@example.com | S2 |
| student3 | Student | 3 | student3@example.com | S3 |
| student4 | Student | 4 | student4@example.com | S4 |
| student5 | Student | 5 | student5@example.com | S5 |
| student6 | Student | 6 | student6@example.com | S6 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "groups" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| Group 1 | C1 | G1 |
| Group 2 | C1 | G2 |
| Group 3 | C1 | G3 |
| Group 4 | C1 | G4 |
| Group 5 | C1 | G5 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
| student4 | C1 | student |
| student5 | C1 | student |
| student6 | C1 | student |
And the following "group members" exist: # behat_hooks::i_look_for_exceptions()
| user | group |
| student1 | G1 |
| student2 | G1 |
| student3 | G2 |
| student4 | G2 |
| student5 | G3 |
| student6 | G3 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| Group mode | Separate groups |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Scenario: Configure the block on the course page to show 1 low score # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\lowscoreswithseperategroups.feature:64
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 0 |
| id_config_showworst | 1 |
| id_config_gradeformat | Percentages |
| id_config_nameformat | Display full names |
| id_config_decimalpoints | 0 |
| id_config_usegroups | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Group 3" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "75%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show 1 low score as a fraction # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\lowscoreswithseperategroups.feature:78
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 0 |
| id_config_showworst | 1 |
| id_config_gradeformat | Fractions |
| id_config_nameformat | Display full names |
| id_config_usegroups | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Group 3" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "75.00/100.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student5" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Student 6" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "70.00/100.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show 1 low score as a absolute numbers # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\lowscoreswithseperategroups.feature:96
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 0 |
| id_config_showworst | 1 |
| id_config_gradeformat | Absolute numbers |
| id_config_nameformat | Display full names |
| id_config_usegroups | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Group 3" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "75.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student5" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Student 6" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "70.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show multiple low scores as percentages # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\lowscoreswithseperategroups.feature:114
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 0 |
| id_config_showworst | 2 |
| id_config_gradeformat | Percentages |
| id_config_nameformat | Display full names |
| id_config_decimalpoints | 0 |
| id_config_usegroups | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Group 2" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "85%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Group 3" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "75%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student5" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Student 6" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "70%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Student 5" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "80%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show multiple low scores as fractions # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\lowscoreswithseperategroups.feature:137
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 0 |
| id_config_showworst | 2 |
| id_config_gradeformat | Fractions |
| id_config_nameformat | Display full names |
| id_config_usegroups | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Group 2" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "85.00/100.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Group 3" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "75.00/100.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student3" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Student 3" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "90.00/100.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Student 4" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "80.00/100.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show multiple low scores as absolute numbers # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\lowscoreswithseperategroups.feature:159
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 0 |
| id_config_showworst | 2 |
| id_config_gradeformat | Absolute numbers |
| id_config_nameformat | Display full names |
| id_config_usegroups | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Group 2" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "85.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Group 3" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "75.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student5" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Student 5" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "80.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Student 6" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "70.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show multiple low scores using ID numbers # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\lowscoreswithseperategroups.feature:181
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 0 |
| id_config_showworst | 2 |
| id_config_gradeformat | Percentages |
| id_config_nameformat | Display only ID numbers |
| id_config_usegroups | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Group" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "85.00%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "75.00%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "User S1" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "100.00%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "User S2" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "90.00%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show multiple low scores using anonymous names # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\lowscoreswithseperategroups.feature:202
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 0 |
| id_config_showworst | 2 |
| id_config_gradeformat | Percentages |
| id_config_nameformat | Anonymous results |
| id_config_usegroups | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Group" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "85.00%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "75.00%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "User" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "100.00%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "90.00%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
@block @block_activity_results
Feature: The activity results block displays student scores
In order to be display student scores
As a user
I need to see the activity results block
Background: # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\lowscoreswithvisiblegroups.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email | idnumber |
| teacher1 | Teacher | 1 | teacher1@example.com | T1 |
| student1 | Student | 1 | student1@example.com | S1 |
| student2 | Student | 2 | student2@example.com | S2 |
| student3 | Student | 3 | student3@example.com | S3 |
| student4 | Student | 4 | student4@example.com | S4 |
| student5 | Student | 5 | student5@example.com | S5 |
| student6 | Student | 6 | student6@example.com | S6 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "groups" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| Group 1 | C1 | G1 |
| Group 2 | C1 | G2 |
| Group 3 | C1 | G3 |
| Group 4 | C1 | G4 |
| Group 5 | C1 | G5 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
| student4 | C1 | student |
| student5 | C1 | student |
| student6 | C1 | student |
And the following "group members" exist: # behat_hooks::i_look_for_exceptions()
| user | group |
| student1 | G1 |
| student2 | G1 |
| student3 | G2 |
| student4 | G2 |
| student5 | G3 |
| student6 | G3 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment |
| Description | Offline text |
| assignsubmission_file_enabled | 0 |
| Group mode | Visible groups |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I go to "View > Grader report" in the course gradebook # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I give the grade "100.00" to the user "Student 1" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "90.00" to the user "Student 2" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "90.00" to the user "Student 3" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "80.00" to the user "Student 4" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "80.00" to the user "Student 5" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I give the grade "70.00" to the user "Student 6" for the grade item "Test assignment" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Scenario: Configure the block on the course page to show 1 low score # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\lowscoreswithvisiblegroups.feature:64
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 0 |
| id_config_showworst | 1 |
| id_config_gradeformat | Percentages |
| id_config_nameformat | Display full names |
| id_config_decimalpoints | 0 |
| id_config_usegroups | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Group 3" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "75%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show 1 low score as a fraction # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\lowscoreswithvisiblegroups.feature:78
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 0 |
| id_config_showworst | 1 |
| id_config_gradeformat | Fractions |
| id_config_nameformat | Display full names |
| id_config_usegroups | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Then I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Group 3" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "75.00/100.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show 1 low score as a absolute numbers # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\lowscoreswithvisiblegroups.feature:94
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 0 |
| id_config_showworst | 1 |
| id_config_gradeformat | Absolute numbers |
| id_config_nameformat | Display full names |
| id_config_usegroups | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Then I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Group 3" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "75.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show multiple low scores as percentages # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\lowscoreswithvisiblegroups.feature:110
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 0 |
| id_config_showworst | 2 |
| id_config_gradeformat | Percentages |
| id_config_nameformat | Display full names |
| id_config_decimalpoints | 0 |
| id_config_usegroups | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Group 2" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "85%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Group 3" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "75%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student5" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then I should see "Group 2" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "85%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Group 3" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "75%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show multiple low scores as fractions # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\lowscoreswithvisiblegroups.feature:133
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 0 |
| id_config_showworst | 2 |
| id_config_gradeformat | Fractions |
| id_config_nameformat | Display full names |
| id_config_usegroups | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Then I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Group 2" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "85.00/100.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Group 3" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "75.00/100.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show multiple low scores as absolute numbers # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\lowscoreswithvisiblegroups.feature:151
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 0 |
| id_config_showworst | 2 |
| id_config_gradeformat | Absolute numbers |
| id_config_nameformat | Display full names |
| id_config_usegroups | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Then I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Group 2" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "85.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Group 3" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "75.00" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show multiple low scores using ID numbers # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\lowscoreswithvisiblegroups.feature:169
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 0 |
| id_config_showworst | 2 |
| id_config_gradeformat | Percentages |
| id_config_nameformat | Display only ID numbers |
| id_config_usegroups | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Then I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Group" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "85.00%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "75.00%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
Scenario: Try to configure the block on the course page to show multiple low scores using anonymous names # C:\Apache24\htdocs\integration\blocks\activity_results\tests\behat\lowscoreswithvisiblegroups.feature:186
Given I add the "Activity results" block # behat_hooks::i_look_for_exceptions()
When I configure the "Activity results" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| id_config_showbest | 0 |
| id_config_showworst | 2 |
| id_config_gradeformat | Percentages |
| id_config_nameformat | Anonymous results |
| id_config_usegroups | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Then I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I should see "Group" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "85.00%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
And I should see "75.00%" in the "Activity results" "block" # behat_hooks::i_look_for_exceptions()
@report @report_eventlist
Feature: Page contains a list of events
In order to find information about events
As a user
I need to check the page contents
@javascript
Scenario: Event list page is viewable and filtering works # C:\Apache24\htdocs\integration\report\eventlist\tests\behat\mainsection.feature:8
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "Events list" node in "Site administration > Reports" # behat_hooks::i_look_for_exceptions()
And I should see "Event name" # behat_hooks::i_look_for_exceptions()
And I set the field "eventname" to "phase" # behat_hooks::i_look_for_exceptions()
And I press "filterbutton" # behat_hooks::i_look_for_exceptions()
And I should see "Phase switched" # behat_hooks::i_look_for_exceptions()
And I should not see "Comment created" # behat_hooks::i_look_for_exceptions()
And I press "clearbutton" # behat_hooks::i_look_for_exceptions()
And I set the field "eventcomponent" to "URL" # behat_hooks::i_look_for_exceptions()
And I press "filterbutton" # behat_hooks::i_look_for_exceptions()
And I should see "Course module instance list viewed" # behat_hooks::i_look_for_exceptions()
And I should not see "User added to cohort" # behat_hooks::i_look_for_exceptions()
And I press "clearbutton" # behat_hooks::i_look_for_exceptions()
And I set the field "eventedulevel" to "Teaching" # behat_hooks::i_look_for_exceptions()
And I press "filterbutton" # behat_hooks::i_look_for_exceptions()
And I should see "Attempt deleted" # behat_hooks::i_look_for_exceptions()
And I should not see "Quiz attempt abandoned" # behat_hooks::i_look_for_exceptions()
And I press "clearbutton" # behat_hooks::i_look_for_exceptions()
And I set the field "eventcrud" to "delete" # behat_hooks::i_look_for_exceptions()
And I press "filterbutton" # behat_hooks::i_look_for_exceptions()
And I should see "Cohort deleted" # behat_hooks::i_look_for_exceptions()
And I should not see "Cohort updated" # behat_hooks::i_look_for_exceptions()
And I press "clearbutton" # behat_hooks::i_look_for_exceptions()
And I set the field "eventcomponent" to "Assignment" # behat_hooks::i_look_for_exceptions()
And I set the field "eventedulevel" to "Participating" # behat_hooks::i_look_for_exceptions()
And I press "filterbutton" # behat_hooks::i_look_for_exceptions()
And I should see "A submission has been submitted" # behat_hooks::i_look_for_exceptions()
And I should not see "An extension has been granted" # behat_hooks::i_look_for_exceptions()
And I press "clearbutton" # behat_hooks::i_look_for_exceptions()
And I set the field "eventedulevel" to "Other" # behat_hooks::i_look_for_exceptions()
And I set the field "eventcrud" to "read" # behat_hooks::i_look_for_exceptions()
And I press "filterbutton" # behat_hooks::i_look_for_exceptions()
And I should see "Notes viewed" # behat_hooks::i_look_for_exceptions()
And I should not see "Highscores viewed" # behat_hooks::i_look_for_exceptions()
And I press "clearbutton" # behat_hooks::i_look_for_exceptions()
And I set the field "eventname" to "viewed" # behat_hooks::i_look_for_exceptions()
And I set the field "eventcomponent" to "Forum" # behat_hooks::i_look_for_exceptions()
And I set the field "eventedulevel" to "Participating" # behat_hooks::i_look_for_exceptions()
And I set the field "eventcrud" to "read" # behat_hooks::i_look_for_exceptions()
And I press "filterbutton" # behat_hooks::i_look_for_exceptions()
Then I should see "User report viewed" # behat_hooks::i_look_for_exceptions()
And I should not see "Subscribers viewed" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Details of an event are viewable # C:\Apache24\htdocs\integration\report\eventlist\tests\behat\mainsection.feature:53
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "Events list" node in "Site administration > Reports" # behat_hooks::i_look_for_exceptions()
And I should see "Event name" # behat_hooks::i_look_for_exceptions()
And I follow "Blog association created" # behat_hooks::i_look_for_exceptions()
And I should see "Blog association created" # behat_hooks::i_look_for_exceptions()
And I should see "blog_association" # behat_hooks::i_look_for_exceptions()
And I should see "create" # behat_hooks::i_look_for_exceptions()
And I should see "Log store manager (tool_log)" # behat_hooks::i_look_for_exceptions()
And I follow "\core\event\base" # behat_hooks::i_look_for_exceptions()
Then I should see "core: base" # behat_hooks::i_look_for_exceptions()
@core @core_block
Feature: Block appearances
In order to configure blocks appearance
As a teacher
I need to add and modify block configuration for the page
Background: # C:\Apache24\htdocs\integration\blocks\tests\behat\manage_blocks.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | teacher | 1 | teacher1@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Turn editing on" # behat_hooks::i_look_for_exceptions()
And I add a "Survey" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Test survey name |
| Survey type | ATTLS (20 item version) |
| Description | Test survey description |
And I add a "Book" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Test book name |
| Description | Test book description |
And I follow "Test book name" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Chapter title | Book title |
| Content | Book content test test |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Turn editing on" # behat_hooks::i_look_for_exceptions()
And I add the "Comments" block # behat_hooks::i_look_for_exceptions()
And I configure the "Comments" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Display on page types | Any page |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Scenario: Block settings can be modified so that a block apprears on any page # C:\Apache24\htdocs\integration\blocks\tests\behat\manage_blocks.feature:43
When I follow "Test survey name" # behat_hooks::i_look_for_exceptions()
Then I should see "Comments" in the "Comments" "block" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I configure the "Comments" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Display on page types | Any course page |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Turn editing off" # behat_hooks::i_look_for_exceptions()
And I follow "Test survey name" # behat_hooks::i_look_for_exceptions()
And I should not see "Comments" # behat_hooks::i_look_for_exceptions()
Scenario: Block settings can be modified so that a block can be hidden # C:\Apache24\htdocs\integration\blocks\tests\behat\manage_blocks.feature:55
When I follow "Test book name" # behat_hooks::i_look_for_exceptions()
And I configure the "Comments" block # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Visible | No |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Turn editing off" # behat_hooks::i_look_for_exceptions()
And I follow "Test book name" # behat_hooks::i_look_for_exceptions()
Then I should not see "Comments" # behat_hooks::i_look_for_exceptions()
@tool @tool_availabilityconditions
Feature: Manage availability conditions
In order to control availability restrictions
As an administrator
I need to see the list of restrictions and hide or show them
@javascript
Scenario: Display list of availability conditions # C:\Apache24\htdocs\integration\admin\tool\availabilityconditions\tests\behat\manage_conditions.feature:8
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| enableavailability | 0 |
And I expand "Site administration" node # behat_hooks::i_look_for_exceptions()
When I expand "Plugins" node # behat_hooks::i_look_for_exceptions()
Then I should not see "Availability restrictions" # behat_hooks::i_look_for_exceptions()
And the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| enableavailability | 1 |
And I am on homepage # behat_hooks::i_look_for_exceptions()
And I navigate to "Manage restrictions" node in "Site administration > Plugins > Availability restrictions" # behat_hooks::i_look_for_exceptions()
And I should see "Restriction by date" # behat_hooks::i_look_for_exceptions()
And I should see "Restriction by grades" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Hide and show conditions # C:\Apache24\htdocs\integration\admin\tool\availabilityconditions\tests\behat\manage_conditions.feature:28
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | topics |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
When I navigate to "Manage restrictions" node in "Site administration > Plugins > Availability restrictions" # behat_hooks::i_look_for_exceptions()
Then "input[title=Hide]" "css_element" should exist in the "Restriction by date" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "input[title=Hide]" "css_element" in the "Restriction by date" "table_row" # behat_hooks::i_look_for_exceptions()
And "input[title=Show]" "css_element" should exist in the "Restriction by date" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "input[title=Show]" "css_element" in the "Restriction by date" "table_row" # behat_hooks::i_look_for_exceptions()
And "input[title=Hide]" "css_element" should exist in the "Restriction by date" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "input[title=Hide]" "css_element" in the "Restriction by grade" "table_row" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Page" to section "1" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I click on "Add restriction..." "button" # behat_hooks::i_look_for_exceptions()
And "Add restriction..." "dialogue" should be visible # behat_hooks::i_look_for_exceptions()
And "Date" "button" should exist in the "Add restriction..." "dialogue" # behat_hooks::i_look_for_exceptions()
And "Grade" "button" should not exist in the "Add restriction..." "dialogue" # behat_hooks::i_look_for_exceptions()
@core @message @javascript
Feature: Search users
In order to communicate with fellow users
As a user
I need to be able to add and remove them from my contacts
Background: # C:\Apache24\htdocs\integration\message\tests\behat\manage_contacts.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| user1 | User | 1 | user1@example.com |
| user2 | User | 2 | user2@example.com |
| user3 | User | 3 | user3@example.com |
And I log in as "user1" # behat_hooks::i_look_for_exceptions()
And I view the "User 2" contact in the message area # behat_hooks::i_look_for_exceptions()
And I click on "Add contact" "link" # behat_hooks::i_look_for_exceptions()
And I view the "User 3" contact in the message area # behat_hooks::i_look_for_exceptions()
And I click on "Add contact" "link" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Add contact shows in contacts tab # C:\Apache24\htdocs\integration\message\tests\behat\manage_contacts.feature:20
When I log in as "user1" # behat_hooks::i_look_for_exceptions()
And I follow "Messages" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "contacts-view" "message_area_action" # behat_hooks::i_look_for_exceptions()
Then I should see "User 2" in the "contacts" "message_area_region_content" # behat_hooks::i_look_for_exceptions()
And I should see "User 3" in the "contacts" "message_area_region_content" # behat_hooks::i_look_for_exceptions()
Scenario: Remove contact # C:\Apache24\htdocs\integration\message\tests\behat\manage_contacts.feature:27
When I log in as "user1" # behat_hooks::i_look_for_exceptions()
And I view the "User 3" contact in the message area # behat_hooks::i_look_for_exceptions()
And I click on "Remove contact" "link" # behat_hooks::i_look_for_exceptions()
And I reload the page # behat_hooks::i_look_for_exceptions()
And I click on "contacts-view" "message_area_action" # behat_hooks::i_look_for_exceptions()
Then I should see "User 2" in the "contacts" "message_area_region_content" # behat_hooks::i_look_for_exceptions()
And I should not see "User 3" in the "contacts" "message_area_region_content" # behat_hooks::i_look_for_exceptions()
@core_enrol
Feature: Manage enrollments from participants page
In order to manage course participants
As a teacher
In need to get to the enrolment page from the course participants page
Background: # C:\Apache24\htdocs\integration\enrol\tests\behat\manage_enrolments_from_participants.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
| teacher1 | teacher | 1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| student1 | C1 | student |
| student2 | C1 | student |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Participants" node in "My courses > C1" # behat_hooks::i_look_for_exceptions()
Scenario: Check the participants link when "All partipants" selected # C:\Apache24\htdocs\integration\enrol\tests\behat\manage_enrolments_from_participants.feature:25
Given I select "All participants" from the "roleid" singleselect # behat_hooks::i_look_for_exceptions()
When I click on "Edit" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
Then I should see "Enrolled users" in the "h2" "css_element" # behat_hooks::i_look_for_exceptions()
And the field "Role" matches value "All" # behat_hooks::i_look_for_exceptions()
Scenario: Check the participants link when "Student" selected # C:\Apache24\htdocs\integration\enrol\tests\behat\manage_enrolments_from_participants.feature:31
Given I select "Student" from the "roleid" singleselect # behat_hooks::i_look_for_exceptions()
When I click on "Edit" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
Then I should see "Enrolled users" in the "h2" "css_element" # behat_hooks::i_look_for_exceptions()
And the field "Role" matches value "Student" # behat_hooks::i_look_for_exceptions()
@tool @tool_langimport
Feature: Manage language packs
In order to support different languages
As an administrator
I need to be able to add, update and remove language packs
Background: # C:\Apache24\htdocs\integration\admin\tool\langimport\tests\behat\manage_langpacks.feature:8
Given remote langimport tests are enabled # behat_tool_langimport::remote_langimport_tests_are_enabled()
Scenario: Install language pack # C:\Apache24\htdocs\integration\admin\tool\langimport\tests\behat\manage_langpacks.feature:13
Given I log in as "admin" # behat_auth::i_log_in_as()
And I navigate to "Language packs" node in "Site administration > Language" # behat_theme_boost_behat_navigation::i_navigate_to_node_in()
When I set the field "Available language packs" to "en_ar" # behat_forms::i_set_the_field_to()
And I press "Install selected language pack(s)" # behat_forms::press_button()
Then I should see "Language pack 'en_ar' was successfully installed" # behat_general::assert_page_contains_text()
And the "Installed language packs" select box should contain "en_ar" # behat_forms::the_select_box_should_contain()
And I navigate to "Live logs" node in "Site administration > Reports" # behat_theme_boost_behat_navigation::i_navigate_to_node_in()
And I should see "The language pack 'en_ar' was installed." # behat_general::assert_page_contains_text()
And I log out # behat_auth::i_log_out()
Scenario: Update language pack # C:\Apache24\htdocs\integration\admin\tool\langimport\tests\behat\manage_langpacks.feature:24
Given outdated langpack 'en_ar' is installed # behat_tool_langimport::outdated_langpack_is_installed()
And I log in as "admin" # behat_auth::i_log_in_as()
And I navigate to "Language packs" node in "Site administration > Language" # behat_theme_boost_behat_navigation::i_navigate_to_node_in()
When I press "Update all installed language packs" # behat_forms::press_button()
Then I should see "Language pack 'en_ar' was successfully updated" # behat_general::assert_page_contains_text()
And I should see "Language pack update completed" # behat_general::assert_page_contains_text()
And I navigate to "Live logs" node in "Site administration > Reports" # behat_theme_boost_behat_navigation::i_navigate_to_node_in()
And I should see "The language pack 'en_ar' was updated." # behat_general::assert_page_contains_text()
And I log out # behat_auth::i_log_out()
Scenario: Try to uninstall language pack # C:\Apache24\htdocs\integration\admin\tool\langimport\tests\behat\manage_langpacks.feature:35
Given I log in as "admin" # behat_auth::i_log_in_as()
And I navigate to "Language packs" node in "Site administration > Language" # behat_theme_boost_behat_navigation::i_navigate_to_node_in()
And I set the field "Available language packs" to "en_ar" # behat_forms::i_set_the_field_to()
And I press "Install selected language pack(s)" # behat_forms::press_button()
When I set the field "Installed language packs" to "en_ar" # behat_forms::i_set_the_field_to()
And I press "Uninstall selected language pack(s)" # behat_forms::press_button()
And I press "Continue" # behat_forms::press_button()
Then I should see "Language pack 'en_ar' was uninstalled" # behat_general::assert_page_contains_text()
And the "Installed language packs" select box should not contain "en_ar" # behat_forms::the_select_box_should_not_contain()
And the "Available language packs" select box should contain "en_ar" # behat_forms::the_select_box_should_contain()
And I navigate to "Live logs" node in "Site administration > Reports" # behat_theme_boost_behat_navigation::i_navigate_to_node_in()
And I should see "The language pack 'en_ar' was removed." # behat_general::assert_page_contains_text()
And I should see "Language pack uninstalled" # behat_general::assert_page_contains_text()
And I log out # behat_auth::i_log_out()
Scenario: Try to uninstall English language pack # C:\Apache24\htdocs\integration\admin\tool\langimport\tests\behat\manage_langpacks.feature:51
Given I log in as "admin" # behat_auth::i_log_in_as()
And I navigate to "Language packs" node in "Site administration > Language" # behat_theme_boost_behat_navigation::i_navigate_to_node_in()
When I set the field "Installed language packs" to "en" # behat_forms::i_set_the_field_to()
And I press "Uninstall selected language pack(s)" # behat_forms::press_button()
Then I should see "The English language pack cannot be uninstalled." # behat_general::assert_page_contains_text()
And I navigate to "Live logs" node in "Site administration > Reports" # behat_theme_boost_behat_navigation::i_navigate_to_node_in()
And I should not see "Language pack uninstalled" # behat_general::assert_page_not_contains_text()
And I log out # behat_auth::i_log_out()
@tool @tool_task @javascript
Feature: Manage scheduled tasks
In order to configure scheduled tasks
As an admin
I need to be able to disable, enable, edit and reset to default scheduled tasks
Background: # C:\Apache24\htdocs\integration\admin\tool\task\tests\behat\manage_tasks.feature:7
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "Scheduled tasks" node in "Site administration > Server" # behat_hooks::i_look_for_exceptions()
Scenario: Disable scheduled task # C:\Apache24\htdocs\integration\admin\tool\task\tests\behat\manage_tasks.feature:11
When I click on "Edit task schedule: Log table cleanup" "link" in the "Log table cleanup" "table_row" # behat_hooks::i_look_for_exceptions()
Then I should see "Edit task schedule: Log table cleanup" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| disabled | 1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Changes saved" # behat_hooks::i_look_for_exceptions()
And I should see "Task disabled" in the "Log table cleanup" "table_row" # behat_hooks::i_look_for_exceptions()
Scenario: Enable scheduled task # C:\Apache24\htdocs\integration\admin\tool\task\tests\behat\manage_tasks.feature:20
When I click on "Edit task schedule: Log table cleanup" "link" in the "Log table cleanup" "table_row" # behat_hooks::i_look_for_exceptions()
Then I should see "Edit task schedule: Log table cleanup" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| disabled | 0 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Changes saved" # behat_hooks::i_look_for_exceptions()
And I should not see "Task disabled" in the "Log table cleanup" "table_row" # behat_hooks::i_look_for_exceptions()
Scenario: Edit scheduled task # C:\Apache24\htdocs\integration\admin\tool\task\tests\behat\manage_tasks.feature:29
When I click on "Edit task schedule: Log table cleanup" "link" in the "Log table cleanup" "table_row" # behat_hooks::i_look_for_exceptions()
Then I should see "Edit task schedule: Log table cleanup" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| minute | */5 |
| hour | 1 |
| day | 2 |
| month | 3 |
| dayofweek | 4 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Changes saved" # behat_hooks::i_look_for_exceptions()
And the following should exist in the "admintable" table: # behat_hooks::i_look_for_exceptions()
| Component | Minute | Hour | Day | Day of week | Month |
| Standard log | */5 | 1 | 2 | 4 | 3 |
Scenario: Reset scheduled task to default # C:\Apache24\htdocs\integration\admin\tool\task\tests\behat\manage_tasks.feature:44
When I click on "Edit task schedule: Log table cleanup" "link" in the "Log table cleanup" "table_row" # behat_hooks::i_look_for_exceptions()
Then I should see "Edit task schedule: Log table cleanup" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| resettodefaults | 1 |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Changes saved" # behat_hooks::i_look_for_exceptions()
And the following should not exist in the "admintable" table: # behat_hooks::i_look_for_exceptions()
| Name | Component | Minute | Hour | Day | Day of week | Month |
| Log table cleanup | Standard log | */5 | 1 | 2 | 4 | 3 |
@mod @mod_data
Feature: Users can edit approved entries in database activities
In order to control whether approved database entries can be changed
As a teacher
I need to be able to enable or disable management of approved entries
Background: # C:\Apache24\htdocs\integration\mod\data\tests\behat\manageapproved.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Students can manage their approved entries to a database # C:\Apache24\htdocs\integration\mod\data\tests\behat\manageapproved.feature:24
And I add a "Database" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Test database name |
| Description | Test |
| id_approval | Yes |
| id_manageapproved | Yes |
And I add a "Text input" field to "Test database name" database and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Field name | Test field name |
| Field description | Test field description |
And I follow "Templates" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I add an entry to "Test database name" database with: # behat_hooks::i_look_for_exceptions()
| Test field name | Student entry |
And I press "Save and view" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test database name" # behat_hooks::i_look_for_exceptions()
And I follow "Approve" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test database name" # behat_hooks::i_look_for_exceptions()
Then I should see "Student entry" # behat_hooks::i_look_for_exceptions()
And "Edit" "link" should exist # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Students can not manage their approved entries to a database # C:\Apache24\htdocs\integration\mod\data\tests\behat\manageapproved.feature:59
And I add a "Database" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Test database name |
| Description | Test |
| id_approval | Yes |
| id_manageapproved | No |
And I add a "Text input" field to "Test database name" database and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Field name | Test field name |
| Field description | Test field description |
And I follow "Templates" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I add an entry to "Test database name" database with: # behat_hooks::i_look_for_exceptions()
| Test field name | Student entry |
And I press "Save and view" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test database name" # behat_hooks::i_look_for_exceptions()
And I follow "Approve" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test database name" # behat_hooks::i_look_for_exceptions()
Then I should see "Student entry" # behat_hooks::i_look_for_exceptions()
And "Edit" "link" should not exist # behat_hooks::i_look_for_exceptions()
@tool @tool_behat
Feature: Forms manipulation
In order to interact with Moodle
As a user
I need to set forms values
@javascript
Scenario: Basic forms manipulation # C:\Apache24\htdocs\integration\admin\tool\behat\tests\behat\manipulate_forms.feature:8
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I follow "Preferences" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
When I set the field "First name" to "Field value" # behat_hooks::i_look_for_exceptions()
And I set the field "Select a country" to "Japan" # behat_hooks::i_look_for_exceptions()
And I set the field "New password" to "TestPass" # behat_hooks::i_look_for_exceptions()
Then the field "First name" matches value "Field value" # behat_hooks::i_look_for_exceptions()
And the "Select a country" select box should contain "Japan" # behat_hooks::i_look_for_exceptions()
And the field "New password" matches value "TestPass" # behat_hooks::i_look_for_exceptions()
And I take focus off "Update profile" "button" # behat_hooks::i_look_for_exceptions()
And I press "Update profile" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Expand all fieldsets and advanced elements # C:\Apache24\htdocs\integration\admin\tool\behat\tests\behat\manipulate_forms.feature:22
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Quiz" to section "1" # behat_hooks::i_look_for_exceptions()
When I expand all fieldsets # behat_hooks::i_look_for_exceptions()
Then I should see "Close the quiz" # behat_hooks::i_look_for_exceptions()
And I should see "Group mode" # behat_hooks::i_look_for_exceptions()
And I should see "Grouping" # behat_hooks::i_look_for_exceptions()
And I should not see "Show more..." in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I should see "Show less..." # behat_hooks::i_look_for_exceptions()
@mod @mod_quiz
Feature: Teachers can override the grade for any question
As a teacher
In order to correct errors
I must be able to override the grades that Moodle gives.
Background: # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\manually_mark_question.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student0@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "question categories" exist: # behat_hooks::i_look_for_exceptions()
| contextlevel | reference | name |
| Course | C1 | Test questions |
And the following "questions" exist: # behat_hooks::i_look_for_exceptions()
| questioncategory | qtype | name | questiontext | defaultmark |
| Test questions | essay | TF1 | First question | 20 |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | grade |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | 20 |
And quiz "Quiz 1" contains the following questions: # behat_hooks::i_look_for_exceptions()
| question | page |
| TF1 | 1 |
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I press "Attempt quiz now" # behat_hooks::i_look_for_exceptions()
And I follow "Finish attempt ..." # behat_hooks::i_look_for_exceptions()
And I press "Submit all and finish" # behat_hooks::i_look_for_exceptions()
And I click on "Submit all and finish" "button" in the "Confirmation" "dialogue" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Quiz 1" # behat_hooks::i_look_for_exceptions()
And I follow "Attempts: 1" # behat_hooks::i_look_for_exceptions()
And I follow "Review attempt" # behat_hooks::i_look_for_exceptions()
@javascript @_switch_window @_bug_phantomjs
Scenario: Validating the marking of an essay question attempt. # C:\Apache24\htdocs\integration\mod\quiz\tests\behat\manually_mark_question.feature:46
When I follow "Make comment or override mark" # behat_hooks::i_look_for_exceptions()
And I switch to "commentquestion" window # behat_hooks::i_look_for_exceptions()
And I set the field "Mark" to "25" # behat_hooks::i_look_for_exceptions()
And I press "Save" # behat_hooks::i_look_for_exceptions()
Then I should see "This grade is outside the valid range." # behat_hooks::i_look_for_exceptions()
And I set the field "Mark" to "aa" # behat_hooks::i_look_for_exceptions()
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I should see "That is not a valid number." # behat_hooks::i_look_for_exceptions()
And I set the field "Mark" to "10.0" # behat_hooks::i_look_for_exceptions()
And I press "Save" and switch to main window # behat_hooks::i_look_for_exceptions()
And I should see "Complete" in the "Manually graded 10 with comment: " "table_row" # behat_hooks::i_look_for_exceptions()
And I wait "2" seconds # behat_hooks::i_look_for_exceptions()
@core @core_course
Feature: The maximum number of weeks/topics in a course can be configured
In order to set boundaries to courses size
As a manager
I need to limit the number of weeks/topics a course can have
Background: # C:\Apache24\htdocs\integration\course\tests\behat\max_number_sections.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| manager1 | Manager | 1 | manager1@example.com |
And the following "system role assigns" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| manager1 | Acceptance test site | manager |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "Course default settings" node in "Site administration > Courses" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: The number of sections can be increased and the limits are applied to courses # C:\Apache24\htdocs\integration\course\tests\behat\max_number_sections.feature:18
Given I set the field "Maximum number of sections" to "100" # behat_hooks::i_look_for_exceptions()
When I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then the field "Maximum number of sections" matches value "100" # behat_hooks::i_look_for_exceptions()
And the "Number of sections" select box should contain "100" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "manager1" # behat_hooks::i_look_for_exceptions()
And I create a course with: # behat_hooks::i_look_for_exceptions()
| Course full name | New course fullname |
| Course short name | New course shortname |
| Number of sections | 90 |
| Format | Topics format |
And I follow "New course fullname" # behat_hooks::i_look_for_exceptions()
And I should see "Topic 90" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: The number of sections can be reduced to 0 and the limits are applied to courses # C:\Apache24\htdocs\integration\course\tests\behat\max_number_sections.feature:34
Given I set the field "Maximum number of sections" to "0" # behat_hooks::i_look_for_exceptions()
When I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then the field "Maximum number of sections" matches value "0" # behat_hooks::i_look_for_exceptions()
And the "Number of sections" select box should contain "0" # behat_hooks::i_look_for_exceptions()
And the "Number of sections" select box should not contain "52" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "manager1" # behat_hooks::i_look_for_exceptions()
And I create a course with: # behat_hooks::i_look_for_exceptions()
| Course full name | New course fullname |
| Course short name | New course shortname |
| Number of sections | 0 |
| Format | Topics format |
And I follow "New course fullname" # behat_hooks::i_look_for_exceptions()
And I should not see "Topic 1" # behat_hooks::i_look_for_exceptions()
@editor @editor_atto @atto @atto_media @_file_upload
Feature: Add media to Atto
To write rich text - I need to add media.
Background: # C:\Apache24\htdocs\integration\lib\editor\atto\plugins\media\tests\behat\media.feature:5
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I follow "Manage private files..." # behat_hooks::i_look_for_exceptions()
And I upload "lib/editor/atto/tests/fixtures/moodle-logo.webm" file to "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I upload "lib/editor/atto/tests/fixtures/moodle-logo.mp4" file to "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I upload "lib/editor/atto/tests/fixtures/moodle-logo.png" file to "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I upload "lib/editor/atto/tests/fixtures/pretty-good-en.vtt" file to "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I upload "lib/editor/atto/tests/fixtures/pretty-good-sv.vtt" file to "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I click on "Save changes" "button" # behat_hooks::i_look_for_exceptions()
And I follow "Profile" in the user menu # behat_hooks::i_look_for_exceptions()
And I follow "Blog entries" # behat_hooks::i_look_for_exceptions()
And I follow "Add a new entry" # behat_hooks::i_look_for_exceptions()
And I set the field "Blog entry body" to "Media test
" # behat_hooks::i_look_for_exceptions()
And I select the text in the "Blog entry body" Atto editor # behat_hooks::i_look_for_exceptions()
And I set the field "Entry title" to "The best video in the entire world (not really)" # behat_hooks::i_look_for_exceptions()
And I click on "Media" "button" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Insert some media as a link # C:\Apache24\htdocs\integration\lib\editor\atto\plugins\media\tests\behat\media.feature:23
Given I click on "Browse repositories..." "button" in the "#id_summary_editor_link .atto_media_source.atto_media_link_source" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Private files" "link" in the ".fp-repo-area" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "moodle-logo.webm" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Select this file" "button" # behat_hooks::i_look_for_exceptions()
And the field "Enter name" matches value "moodle-logo.webm" # behat_hooks::i_look_for_exceptions()
And I wait until the page is ready # behat_hooks::i_look_for_exceptions()
And I click on "Insert media" "button" # behat_hooks::i_look_for_exceptions()
When I click on "Save changes" "button" # behat_hooks::i_look_for_exceptions()
Then "//a[. = 'moodle-logo.webm']" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Insert some media as a plain video # C:\Apache24\htdocs\integration\lib\editor\atto\plugins\media\tests\behat\media.feature:35
Given I click on "Video" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Browse repositories..." "button" in the "#id_summary_editor_video .atto_media_source.atto_media_media_source" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Private files" "link" in the ".fp-repo-area" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "moodle-logo.webm" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Select this file" "button" # behat_hooks::i_look_for_exceptions()
And I click on "Add alternative source" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Browse repositories..." "button" in the "#id_summary_editor_video .atto_media_source.atto_media_media_source:nth-of-type(2)" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Private files" "link" in the ".fp-repo-area" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "moodle-logo.mp4" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Select this file" "button" # behat_hooks::i_look_for_exceptions()
When I click on "Insert media" "button" # behat_hooks::i_look_for_exceptions()
Then "//video[descendant::source[contains(@src, 'moodle-logo.webm')]][descendant::source[contains(@src, 'moodle-logo.mp4')]]" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Insert some media as a video with display settings # C:\Apache24\htdocs\integration\lib\editor\atto\plugins\media\tests\behat\media.feature:50
Given I click on "Video" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Browse repositories..." "button" in the "#id_summary_editor_video .atto_media_source.atto_media_media_source" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Private files" "link" in the ".fp-repo-area" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "moodle-logo.webm" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Select this file" "button" # behat_hooks::i_look_for_exceptions()
And I click on "Display options" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Browse repositories..." "button" in the "#id_summary_editor_video .atto_media_source.atto_media_poster_source" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Private files" "link" in the ".moodle-dialogue-base[aria-hidden='false'] .fp-repo-area" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "moodle-logo.png" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Select this file" "button" in the ".moodle-dialogue-base[aria-hidden='false']" "css_element" # behat_hooks::i_look_for_exceptions()
And I change window size to "large" # behat_hooks::i_look_for_exceptions()
And I set the field with xpath "//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_width_entry ')]" to "420" # behat_hooks::i_look_for_exceptions()
And I set the field with xpath "//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_height_entry ')]" to "69" # behat_hooks::i_look_for_exceptions()
And I click on "Display options" "link" # behat_hooks::i_look_for_exceptions()
When I click on "Insert media" "button" # behat_hooks::i_look_for_exceptions()
Then "//video[descendant::source[contains(@src, 'moodle-logo.webm')]][contains(@poster, 'moodle-logo.png')][@width=420][@height=69]" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Insert some media as a video with advanced settings # C:\Apache24\htdocs\integration\lib\editor\atto\plugins\media\tests\behat\media.feature:69
Given I click on "Video" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Browse repositories..." "button" in the "#id_summary_editor_video .atto_media_source.atto_media_media_source" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Private files" "link" in the ".fp-repo-area" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "moodle-logo.webm" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Select this file" "button" # behat_hooks::i_look_for_exceptions()
And I click on "Advanced settings" "link" # behat_hooks::i_look_for_exceptions()
And the field "Show controls" matches value "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Play automatically" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Muted" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "Loop" to "1" # behat_hooks::i_look_for_exceptions()
When I click on "Insert media" "button" # behat_hooks::i_look_for_exceptions()
Then "//video[descendant::source[contains(@src, 'moodle-logo.webm')]][@controls='true'][@loop='true'][@autoplay='true'][@autoplay='true']" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Insert some media as a video with tracks # C:\Apache24\htdocs\integration\lib\editor\atto\plugins\media\tests\behat\media.feature:84
Given I click on "Video" "link" # behat_hooks::i_look_for_exceptions()
And I change window size to "large" # behat_hooks::i_look_for_exceptions()
And I click on "Browse repositories..." "button" in the "#id_summary_editor_video .atto_media_source.atto_media_media_source" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Private files" "link" in the ".fp-repo-area" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "moodle-logo.webm" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Select this file" "button" # behat_hooks::i_look_for_exceptions()
And I click on "Subtitles and captions" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Browse repositories..." "button" in the "#id_summary_editor_video_subtitles .atto_media_track_source" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Private files" "link" in the ".moodle-dialogue-base[aria-hidden='false'] .fp-repo-area" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "pretty-good-sv.vtt" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Select this file" "button" in the ".moodle-dialogue-base[aria-hidden='false']" "css_element" # behat_hooks::i_look_for_exceptions()
And the field "Label" matches value "Swedish" # behat_hooks::i_look_for_exceptions()
And the field "Language" matches value "sv" # behat_hooks::i_look_for_exceptions()
And I click on "Add subtitle track" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Browse repositories..." "button" in the "#id_summary_editor_video_subtitles .atto_media_track~.atto_media_track .atto_media_source.atto_media_track_source" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Private files" "link" in the ".moodle-dialogue-base[aria-hidden='false'] .fp-repo-area" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "pretty-good-en.vtt" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Select this file" "button" in the ".moodle-dialogue-base[aria-hidden='false']" "css_element" # behat_hooks::i_look_for_exceptions()
And the field with xpath "(//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_track_label_entry ')])[2]" matches value "English" # behat_hooks::i_look_for_exceptions()
And I set the field with xpath "(//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_track_default ')])[1]" to "1" # behat_hooks::i_look_for_exceptions()
And I click on "Captions" "link" in the ".nav-item[data-track-kind='captions']" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Browse repositories..." "button" in the "#id_summary_editor_video_captions .atto_media_track_source" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Private files" "link" in the ".moodle-dialogue-base[aria-hidden='false'] .fp-repo-area" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "pretty-good-sv.vtt" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Select this file" "button" in the ".moodle-dialogue-base[aria-hidden='false']" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Overwrite" "button" # behat_hooks::i_look_for_exceptions()
And the field with xpath "(//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_track_label_entry ')])[3]" matches value "Swedish" # behat_hooks::i_look_for_exceptions()
And I click on "Add caption track" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Browse repositories..." "button" in the "#id_summary_editor_video_captions .atto_media_track~.atto_media_track .atto_media_source.atto_media_track_source" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Private files" "link" in the ".moodle-dialogue-base[aria-hidden='false'] .fp-repo-area" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "pretty-good-en.vtt" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Select this file" "button" in the ".moodle-dialogue-base[aria-hidden='false']" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Overwrite" "button" # behat_hooks::i_look_for_exceptions()
And the field with xpath "(//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_track_label_entry ')])[4]" matches value "English" # behat_hooks::i_look_for_exceptions()
And I set the field with xpath "(//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_track_default ')])[4]" to "1" # behat_hooks::i_look_for_exceptions()
And I click on "Descriptions" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Browse repositories..." "button" in the "#id_summary_editor_video_descriptions .atto_media_track_source" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Private files" "link" in the ".moodle-dialogue-base[aria-hidden='false'] .fp-repo-area" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "pretty-good-sv.vtt" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Select this file" "button" in the ".moodle-dialogue-base[aria-hidden='false']" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Overwrite" "button" # behat_hooks::i_look_for_exceptions()
And the field with xpath "(//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_track_label_entry ')])[5]" matches value "Swedish" # behat_hooks::i_look_for_exceptions()
And I click on "Add description track" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Browse repositories..." "button" in the "#id_summary_editor_video_descriptions .atto_media_track~.atto_media_track .atto_media_source.atto_media_track_source" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Private files" "link" in the ".moodle-dialogue-base[aria-hidden='false'] .fp-repo-area" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "pretty-good-en.vtt" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Select this file" "button" in the ".moodle-dialogue-base[aria-hidden='false']" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Overwrite" "button" # behat_hooks::i_look_for_exceptions()
And the field with xpath "(//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_track_label_entry ')])[6]" matches value "English" # behat_hooks::i_look_for_exceptions()
And I set the field with xpath "(//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_track_default ')])[5]" to "1" # behat_hooks::i_look_for_exceptions()
And I click on "Chapters" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Browse repositories..." "button" in the "#id_summary_editor_video_chapters .atto_media_track_source" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Private files" "link" in the ".moodle-dialogue-base[aria-hidden='false'] .fp-repo-area" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "pretty-good-sv.vtt" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Select this file" "button" in the ".moodle-dialogue-base[aria-hidden='false']" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Overwrite" "button" # behat_hooks::i_look_for_exceptions()
And the field with xpath "(//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_track_label_entry ')])[7]" matches value "Swedish" # behat_hooks::i_look_for_exceptions()
And I click on "Add chapter track" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Browse repositories..." "button" in the "#id_summary_editor_video_chapters .atto_media_track~.atto_media_track .atto_media_source.atto_media_track_source" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Private files" "link" in the ".moodle-dialogue-base[aria-hidden='false'] .fp-repo-area" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "pretty-good-en.vtt" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Select this file" "button" in the ".moodle-dialogue-base[aria-hidden='false']" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Overwrite" "button" # behat_hooks::i_look_for_exceptions()
And the field with xpath "(//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_track_label_entry ')])[8]" matches value "English" # behat_hooks::i_look_for_exceptions()
And I set the field with xpath "(//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_track_default ')])[8]" to "1" # behat_hooks::i_look_for_exceptions()
And I click on "Metadata" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Browse repositories..." "button" in the "#id_summary_editor_video_metadata .atto_media_track_source" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Private files" "link" in the ".moodle-dialogue-base[aria-hidden='false'] .fp-repo-area" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "pretty-good-sv.vtt" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Select this file" "button" in the ".moodle-dialogue-base[aria-hidden='false']" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Overwrite" "button" # behat_hooks::i_look_for_exceptions()
And the field with xpath "(//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_track_label_entry ')])[9]" matches value "Swedish" # behat_hooks::i_look_for_exceptions()
And I click on "Add metadata track" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Browse repositories..." "button" in the "#id_summary_editor_video_metadata .atto_media_track~.atto_media_track .atto_media_source.atto_media_track_source" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Private files" "link" in the ".moodle-dialogue-base[aria-hidden='false'] .fp-repo-area" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "pretty-good-en.vtt" "link" # behat_hooks::i_look_for_exceptions()
And I click on "Select this file" "button" in the ".moodle-dialogue-base[aria-hidden='false']" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Overwrite" "button" # behat_hooks::i_look_for_exceptions()
And the field with xpath "(//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_track_label_entry ')])[10]" matches value "English" # behat_hooks::i_look_for_exceptions()
And I set the field with xpath "(//*[contains(concat(' ', normalize-space(@class), ' '), ' atto_media_track_default ')])[9]" to "1" # behat_hooks::i_look_for_exceptions()
When I click on "Insert media" "button" # behat_hooks::i_look_for_exceptions()
Then "//video[descendant::source[contains(@src, 'moodle-logo.webm')]][descendant::track[contains(@src, 'pretty-good-sv.vtt')][@kind='subtitles'][@label='Swedish'][@srclang='sv'][@default='true']][descendant::track[contains(@src, 'pretty-good-en.vtt')][@kind='subtitles'][@label='English'][@srclang='en'][not(@default)]][descendant::track[contains(@src, 'pretty-good-sv.vtt')][@kind='captions'][@label='Swedish'][@srclang='sv'][not(@default)]][descendant::track[contains(@src, 'pretty-good-en.vtt')][@kind='captions'][@label='English'][@srclang='en'][@default='true']][descendant::track[contains(@src, 'pretty-good-sv.vtt')][@kind='descriptions'][@label='Swedish'][@srclang='sv'][@default='true']][descendant::track[contains(@src, 'pretty-good-en.vtt')][@kind='descriptions'][@label='English'][@srclang='en'][not(@default)]][descendant::track[contains(@src, 'pretty-good-sv.vtt')][@kind='chapters'][@label='Swedish'][@srclang='sv'][not(@default)]][descendant::track[contains(@src, 'pretty-good-en.vtt')][@kind='chapters'][@label='English'][@srclang='en'][@default='true']][descendant::track[contains(@src, 'pretty-good-sv.vtt')][@kind='metadata'][@label='Swedish'][@srclang='sv'][@default='true']][descendant::track[contains(@src, 'pretty-good-en.vtt')][@kind='metadata'][@label='English'][@srclang='en'][not(@default)]]" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
@report @report_participation @javascript
Feature: Use the particiaption report to message groups of students
In order to engage with students based on participation
As a teacher
I need to be able to message students who have not participated in an activity
Background: # C:\Apache24\htdocs\integration\report\participation\tests\behat\message_participants.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
| student3 | Student | 3 | student3@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Book" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Test book name |
| Description | Test book |
And I follow "Test book name" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Chapter title | Test chapter |
| Content | Test chapter content |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test book name" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Message students who have not participated in book # C:\Apache24\htdocs\integration\report\participation\tests\behat\message_participants.feature:39
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Course participation" node in "Course administration > Reports" # behat_hooks::i_look_for_exceptions()
And I set the field "instanceid" to "Test book name" # behat_hooks::i_look_for_exceptions()
And I set the field "roleid" to "Student" # behat_hooks::i_look_for_exceptions()
And I press "Go" # behat_hooks::i_look_for_exceptions()
And I should see "Yes (1)" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "No" in the "Student 2" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "No" in the "Student 3" "table_row" # behat_hooks::i_look_for_exceptions()
When I press "Select all 'No'" # behat_hooks::i_look_for_exceptions()
And I set the field "With selected users..." to "Send a message" # behat_hooks::i_look_for_exceptions()
And I press "OK" # behat_hooks::i_look_for_exceptions()
Then I should see "Added 2 new recipients" # behat_hooks::i_look_for_exceptions()
And I should see "Student 2" in the "Currently selected users" "table" # behat_hooks::i_look_for_exceptions()
And I should see "Student 3" in the "Currently selected users" "table" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 1" in the "Currently selected users" "table" # behat_hooks::i_look_for_exceptions()
Scenario: Ensure no message options when messaging is disabled # C:\Apache24\htdocs\integration\report\participation\tests\behat\message_participants.feature:57
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I set the following administration settings values: # behat_hooks::i_look_for_exceptions()
| messaging | 0 |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Course participation" node in "Course administration > Reports" # behat_hooks::i_look_for_exceptions()
When I set the field "instanceid" to "Test book name" # behat_hooks::i_look_for_exceptions()
And I set the field "roleid" to "Student" # behat_hooks::i_look_for_exceptions()
And I press "Go" # behat_hooks::i_look_for_exceptions()
Then I should not see "With selected users..." # behat_hooks::i_look_for_exceptions()
And I should not see "Select all" # behat_hooks::i_look_for_exceptions()
@message @message_popup
Feature: Message popover preferences
In order to modify my message preferences
As a user
I can navigate to the preferences page from the popover
Background: # C:\Apache24\htdocs\integration\message\output\popup\tests\behat\message_popover_preferences.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| user1 | User | 1 | user1@asd.com |
@javascript
Scenario: User navigates to preferences page # C:\Apache24\htdocs\integration\message\output\popup\tests\behat\message_popover_preferences.feature:13
Given I log in as "user1" # behat_hooks::i_look_for_exceptions()
And I open the message popover # behat_hooks::i_look_for_exceptions()
When I follow "Message preferences" # behat_hooks::i_look_for_exceptions()
Then I should see "Message preferences" # behat_hooks::i_look_for_exceptions()
@message @message_popup @javascript
Feature: Message popover unread messages
In order to be kept informed
As a user
I am notified about unread messages from other users
Background: # C:\Apache24\htdocs\integration\message\output\popup\tests\behat\message_popover_unread.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I send "Test message" message to "Student 1" user # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Notification popover shows correct unread count # C:\Apache24\htdocs\integration\message\output\popup\tests\behat\message_popover_unread.feature:16
When I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I send "Test message 2" message to "Student 1" user # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
Then I should see "1" in the "#nav-message-popover-container [data-region='count-container']" "css_element" # behat_hooks::i_look_for_exceptions()
And I open the message popover # behat_hooks::i_look_for_exceptions()
And I should see "Test message 2" in the "#nav-message-popover-container" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "2" in the "#nav-message-popover-container [data-region='unread-count']" "css_element" # behat_hooks::i_look_for_exceptions()
Scenario: Clicking a message marks it as read # C:\Apache24\htdocs\integration\message\output\popup\tests\behat\message_popover_unread.feature:30
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I open the message popover # behat_hooks::i_look_for_exceptions()
And I click on "[aria-label='View unread messages with Student 2']" "css_element" in the "#nav-message-popover-container" "css_element" # behat_hooks::i_look_for_exceptions()
Then "[data-region='count-container']" "css_element" in the "#nav-message-popover-container" "css_element" should not be visible # behat_hooks::i_look_for_exceptions()
And I should see "Test message" in the "[data-region='message-text']" "css_element" # behat_hooks::i_look_for_exceptions()
Scenario: Mark all notifications as read # C:\Apache24\htdocs\integration\message\output\popup\tests\behat\message_popover_unread.feature:41
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I open the message popover # behat_hooks::i_look_for_exceptions()
And I click on "[data-action='mark-all-read']" "css_element" in the "#nav-message-popover-container" "css_element" # behat_hooks::i_look_for_exceptions()
And I reload the page # behat_hooks::i_look_for_exceptions()
Then "[data-region='count-container']" "css_element" in the "#nav-message-popover-container" "css_element" should not be visible # behat_hooks::i_look_for_exceptions()
@core @core_calendar
Feature: Open calendar popup
In order to view calendar information
As a user
I need to interact with the calendar
Background: # C:\Apache24\htdocs\integration\calendar\tests\behat\minicalendar.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| student1 | C1 | student |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: I view calendar details of a day with multiple events # C:\Apache24\htdocs\integration\calendar\tests\behat\minicalendar.feature:20
Given I follow "This month" # behat_hooks::i_look_for_exceptions()
And I create a calendar event: # behat_hooks::i_look_for_exceptions()
| Type of event | site |
| Event title | Event 1:1 |
| timestart[day] | 1 |
And I create a calendar event: # behat_hooks::i_look_for_exceptions()
| Type of event | site |
| Event title | Event 1:2 |
| timestart[day] | 1 |
When I hover over day "1" of this month in the calendar # behat_hooks::i_look_for_exceptions()
Then I should see "Event 1:1" # behat_hooks::i_look_for_exceptions()
And I should see "Event 1:2" # behat_hooks::i_look_for_exceptions()
And I follow "Home" # behat_hooks::i_look_for_exceptions()
And I hover over day "1" of this month in the calendar # behat_hooks::i_look_for_exceptions()
And I should see "Event 1:1" # behat_hooks::i_look_for_exceptions()
And I should see "Event 1:2" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: I view calendar details for today # C:\Apache24\htdocs\integration\calendar\tests\behat\minicalendar.feature:39
Given I follow "This month" # behat_hooks::i_look_for_exceptions()
And I create a calendar event: # behat_hooks::i_look_for_exceptions()
| Type of event | site |
| Event title | Today's event |
When I hover over today in the calendar # behat_hooks::i_look_for_exceptions()
Then I should see "Today's event" # behat_hooks::i_look_for_exceptions()
And I follow "Home" # behat_hooks::i_look_for_exceptions()
And I hover over today in the calendar # behat_hooks::i_look_for_exceptions()
And I should see "Today's event" # behat_hooks::i_look_for_exceptions()
@core_form
Feature: Using the activity grade form element
In order to ensure validation is provided to the teacher
As a teacher
I need to know why I can not add/edit values in the form element
Background: # C:\Apache24\htdocs\integration\lib\form\tests\behat\modgrade_validation.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
Scenario: Being able to change the grade type, scale and maximum grade when there are no grades # C:\Apache24\htdocs\integration\lib\form\tests\behat\modgrade_validation.feature:20
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "Scales" node in "Site administration > Grades" # behat_hooks::i_look_for_exceptions()
And I press "Add a new scale" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | ABCDEF |
| Scale | F,E,D,C,B,A |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Add a new scale" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Letter scale |
| Scale | Disappointing, Good, Very good, Excellent |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name |
| Forum type | Standard forum for general use |
| Description | Test forum description |
| Aggregate type | Average of ratings |
| scale[modgrade_type] | Point |
| scale[modgrade_point] | 100 |
| Group mode | No groups |
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
When I expand all fieldsets # behat_hooks::i_look_for_exceptions()
Then I should not see "Some grades have already been awarded, so the grade type" # behat_hooks::i_look_for_exceptions()
And I set the field "scale[modgrade_type]" to "Scale" # behat_hooks::i_look_for_exceptions()
And I set the field "scale[modgrade_scale]" to "ABCDEF" # behat_hooks::i_look_for_exceptions()
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I should not see "You cannot change the type, as grades already exist for this item" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I should not see "Some grades have already been awarded, so the grade type" # behat_hooks::i_look_for_exceptions()
And I set the field "scale[modgrade_scale]" to "Letter scale" # behat_hooks::i_look_for_exceptions()
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I should not see "You cannot change the scale, as grades already exist for this item" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I should not see "Some grades have already been awarded, so the grade type" # behat_hooks::i_look_for_exceptions()
And I set the field "scale[modgrade_type]" to "Point" # behat_hooks::i_look_for_exceptions()
And I set the field "Maximum grade" to "50" # behat_hooks::i_look_for_exceptions()
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I should not see "You must choose whether to rescale existing grades or not" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Attempting to change the scale when grades already exist in rating activity # C:\Apache24\htdocs\integration\lib\form\tests\behat\modgrade_validation.feature:68
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "Scales" node in "Site administration > Grades" # behat_hooks::i_look_for_exceptions()
And I press "Add a new scale" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | ABCDEF |
| Scale | F,E,D,C,B,A |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Add a new scale" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Letter scale |
| Scale | Disappointing, Good, Very good, Excellent |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name |
| Forum type | Standard forum for general use |
| Description | Test forum description |
| Aggregate type | Average of ratings |
| scale[modgrade_type] | Scale |
| scale[modgrade_scale] | ABCDEF |
| Group mode | No groups |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
And I press "Add a new discussion topic" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Subject | Discussion subject |
| Message | Discussion message |
And I press "Post to forum" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
And I follow "Discussion subject" # behat_hooks::i_look_for_exceptions()
And I set the field "rating" to "D" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
When I expand all fieldsets # behat_hooks::i_look_for_exceptions()
Then I should see "Some grades have already been awarded, so the grade type and scale cannot be changed" # behat_hooks::i_look_for_exceptions()
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I should not see "When selecting a ratings aggregate type you must also select" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And the field "Aggregate type" matches value "Average of ratings" # behat_hooks::i_look_for_exceptions()
And the field "scale[modgrade_type]" matches value "Scale" # behat_hooks::i_look_for_exceptions()
And the field "scale[modgrade_scale]" matches value "ABCDEF" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Attempting to change the scale when grades already exist in non-rating activity # C:\Apache24\htdocs\integration\lib\form\tests\behat\modgrade_validation.feature:121
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "Scales" node in "Site administration > Grades" # behat_hooks::i_look_for_exceptions()
And I press "Add a new scale" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | ABCDEF |
| Scale | F,E,D,C,B,A |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Add a new scale" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Letter scale |
| Scale | Disappointing, Good, Very good, Excellent |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment name |
| Description | Test assignment description |
| grade[modgrade_type] | Scale |
| grade[modgrade_scale] | ABCDEF |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I click on "Grade" "link" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the field "Grade" to "C" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Ok" # behat_hooks::i_look_for_exceptions()
And I follow "Edit settings" # behat_hooks::i_look_for_exceptions()
When I expand all fieldsets # behat_hooks::i_look_for_exceptions()
Then I should see "Some grades have already been awarded, so the grade type and scale cannot be changed" # behat_hooks::i_look_for_exceptions()
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And the field "grade[modgrade_type]" matches value "Scale" # behat_hooks::i_look_for_exceptions()
And the field "grade[modgrade_scale]" matches value "ABCDEF" # behat_hooks::i_look_for_exceptions()
Scenario: Attempting to change the maximum grade when ratings exist # C:\Apache24\htdocs\integration\lib\form\tests\behat\modgrade_validation.feature:160
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name |
| Forum type | Standard forum for general use |
| Description | Test forum description |
| Aggregate type | Average of ratings |
| scale[modgrade_type] | Point |
| scale[modgrade_point] | 100 |
| Group mode | No groups |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
And I press "Add a new discussion topic" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Subject | Discussion subject |
| Message | Discussion message |
And I press "Post to forum" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum name" # behat_hooks::i_look_for_exceptions()
And I follow "Discussion subject" # behat_hooks::i_look_for_exceptions()
And I set the field "rating" to "100" # behat_hooks::i_look_for_exceptions()
And I press "Rate" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
When I expand all fieldsets # behat_hooks::i_look_for_exceptions()
Then I should see "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." # behat_hooks::i_look_for_exceptions()
And I set the field "Maximum grade" to "50" # behat_hooks::i_look_for_exceptions()
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I should see "You cannot change the maximum grade when grades already exist for an activity with ratings" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Attempting to change the maximum grade when no rescaling option has been chosen # C:\Apache24\htdocs\integration\lib\form\tests\behat\modgrade_validation.feature:196
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment name |
| Description | Test assignment description |
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I click on "Grade" "link" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the field "Grade out of 100" to "50" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Ok" # behat_hooks::i_look_for_exceptions()
And I follow "Edit settings" # behat_hooks::i_look_for_exceptions()
When I expand all fieldsets # behat_hooks::i_look_for_exceptions()
Then I should see "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." # behat_hooks::i_look_for_exceptions()
@mod @mod_choice
Feature: Teacher can modify choices of the students
In order to have all students choices
As a teacher
I need to be able to make choice for studnets
Background: # C:\Apache24\htdocs\integration\mod\choice\tests\behat\modify_choice.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
| student3 | Student | 3 | student3@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | option |
| choice | Choice name | Test choice description | C1 | choice1 | Option 1, Option 2, Option 3 |
@javascript
Scenario: Delete students choice response as a teacher # C:\Apache24\htdocs\integration\mod\choice\tests\behat\modify_choice.feature:28
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I choose "Option 1" from "Choice name" choice activity # behat_hooks::i_look_for_exceptions()
Then I should see "Your selection: Option 1" # behat_hooks::i_look_for_exceptions()
And I should see "Your choice has been saved" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Choice name" # behat_hooks::i_look_for_exceptions()
And I click on "View 1 responses" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I click on "Student 1 Option 1" "checkbox" # behat_hooks::i_look_for_exceptions()
And I select "Delete" from the "With selected" singleselect # behat_hooks::i_look_for_exceptions()
And "Student 1 Option 1" "checkbox" should not exist # behat_hooks::i_look_for_exceptions()
And "Student 1 Not answered yet" "checkbox" should exist # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Teacher set answers of students who did not respond or change existing answers # C:\Apache24\htdocs\integration\mod\choice\tests\behat\modify_choice.feature:46
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I choose "Option 1" from "Choice name" choice activity # behat_hooks::i_look_for_exceptions()
Then I should see "Your selection: Option 1" # behat_hooks::i_look_for_exceptions()
And I should see "Your choice has been saved" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Choice name" # behat_hooks::i_look_for_exceptions()
And I click on "View 1 responses" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I click on "Student 1 Option 1" "checkbox" # behat_hooks::i_look_for_exceptions()
And I click on "Student 2 Not answered yet" "checkbox" # behat_hooks::i_look_for_exceptions()
And I click on "Student 3 Not answered yet" "checkbox" # behat_hooks::i_look_for_exceptions()
And I select "Choose: Option 2" from the "With selected" singleselect # behat_hooks::i_look_for_exceptions()
And "Student 1 Option 1" "checkbox" should not exist # behat_hooks::i_look_for_exceptions()
And "Student 2 Not answered yet" "checkbox" should not exist # behat_hooks::i_look_for_exceptions()
And "Student 3 Not answered yet" "checkbox" should not exist # behat_hooks::i_look_for_exceptions()
And "Student 1 Option 2" "checkbox" should exist # behat_hooks::i_look_for_exceptions()
And "Student 2 Option 2" "checkbox" should exist # behat_hooks::i_look_for_exceptions()
And "Student 3 Option 2" "checkbox" should exist # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Teacher can delete answers in the multiple answer choice # C:\Apache24\htdocs\integration\mod\choice\tests\behat\modify_choice.feature:70
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Choice name" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I set the field "Allow more than one choice to be selected" to "Yes" # behat_hooks::i_look_for_exceptions()
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I choose options "Option 1","Option 2" from "Choice name" choice activity # behat_hooks::i_look_for_exceptions()
And I should see "Your selection: Option 1; Option 2" # behat_hooks::i_look_for_exceptions()
And I should see "Your choice has been saved" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Choice name" # behat_hooks::i_look_for_exceptions()
And I click on "View 1 responses" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I click on "Student 1 Option 2" "checkbox" # behat_hooks::i_look_for_exceptions()
And I select "Delete" from the "With selected" singleselect # behat_hooks::i_look_for_exceptions()
And I click on "Student 1 Option 1" "checkbox" # behat_hooks::i_look_for_exceptions()
And I select "Choose: Option 3" from the "With selected" singleselect # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Choice name" # behat_hooks::i_look_for_exceptions()
And I should see "Your selection: Option 1; Option 3" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Teacher can manage answers on view page if the names are displayed # C:\Apache24\htdocs\integration\mod\choice\tests\behat\modify_choice.feature:100
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I choose "Option 1" from "Choice name" choice activity # behat_hooks::i_look_for_exceptions()
Then I should see "Your selection: Option 1" # behat_hooks::i_look_for_exceptions()
And I should see "Your choice has been saved" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Choice name" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Publish results | Always show results to students |
| Privacy of results | Publish full results, showing names and their choices |
| Show column for unanswered | Yes |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I click on "Student 1 Option 1" "checkbox" # behat_hooks::i_look_for_exceptions()
And I click on "Student 2 Not answered yet" "checkbox" # behat_hooks::i_look_for_exceptions()
And I select "Choose: Option 3" from the "With selected" singleselect # behat_hooks::i_look_for_exceptions()
And "Student 1 Option 1" "checkbox" should not exist # behat_hooks::i_look_for_exceptions()
And "Student 1 Option 3" "checkbox" should exist # behat_hooks::i_look_for_exceptions()
And "Student 2 Not answered yet" "checkbox" should not exist # behat_hooks::i_look_for_exceptions()
And "Student 2 Option 3" "checkbox" should exist # behat_hooks::i_look_for_exceptions()
And I click on "Student 1 Option 3" "checkbox" # behat_hooks::i_look_for_exceptions()
And I select "Delete" from the "With selected" singleselect # behat_hooks::i_look_for_exceptions()
And "Student 1 Option 3" "checkbox" should not exist # behat_hooks::i_look_for_exceptions()
And "Student 1 Not answered yet" "checkbox" should exist # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@core @core_course
Feature: Activities can be moved between sections
In order to rearrange my course contents
As a teacher
I need to move activities between sections
Background: # C:\Apache24\htdocs\integration\course\tests\behat\move_activities.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format | coursedisplay | numsections |
| Course 1 | C1 | topics | 0 | 5 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add the "Recent activity" block # behat_hooks::i_look_for_exceptions()
And I follow "Delete Recent activity block" # behat_hooks::i_look_for_exceptions()
And I press "Yes" # behat_hooks::i_look_for_exceptions()
And I follow "Configure Navigation block" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Visible | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name |
| Description | Test forum description |
Scenario: Move activities in a single page course with Javascript disabled # C:\Apache24\htdocs\integration\course\tests\behat\move_activities.feature:31
When I move "Test forum name" activity to section "2" # behat_hooks::i_look_for_exceptions()
Then I should see "Test forum name" in the "Topic 2" "section" # behat_hooks::i_look_for_exceptions()
And I should not see "Test forum name" in the "Topic 1" "section" # behat_hooks::i_look_for_exceptions()
Scenario: Move activities in the course home with Javascript disabled using paged mode # C:\Apache24\htdocs\integration\course\tests\behat\move_activities.feature:36
Given I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Course layout | Show one section per page |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
When I move "Test forum name" activity to section "2" # behat_hooks::i_look_for_exceptions()
Then I should see "Test forum name" in the "Topic 2" "section" # behat_hooks::i_look_for_exceptions()
And I should not see "Test forum name" in the "Topic 1" "section" # behat_hooks::i_look_for_exceptions()
Scenario: Move activities in a course section with Javascript disabled using paged mode # C:\Apache24\htdocs\integration\course\tests\behat\move_activities.feature:45
Given I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Course layout | Show one section per page |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Second forum name |
| Description | Second forum description |
And I follow "Topic 1" # behat_hooks::i_look_for_exceptions()
When I move "Second forum name" activity to section "1" # behat_hooks::i_look_for_exceptions()
Then "Second forum name" "link" should appear before "Test forum name" "link" # behat_hooks::i_look_for_exceptions()
@mod @mod_forum
Feature: A teacher can move discussions between forums
In order to move a discussion
As a teacher
I need to use the move discussion selector
Background: # C:\Apache24\htdocs\integration\mod\forum\tests\behat\move_discussion.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
Scenario: A teacher can move discussions # C:\Apache24\htdocs\integration\mod\forum\tests\behat\move_discussion.feature:20
Given the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | groupmode |
| forum | Test forum 1 | Test forum 2 | C1 | forum | 0 |
| forum | Test forum 2 | Test forum 1 | C1 | forum | 0 |
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum 1" # behat_hooks::i_look_for_exceptions()
And I add a new discussion to "Test forum 1" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Discussion 1 |
| Message | Test post message |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test forum 1" # behat_hooks::i_look_for_exceptions()
And I follow "Discussion 1" # behat_hooks::i_look_for_exceptions()
When I set the field "jump" to "Test forum 2" # behat_hooks::i_look_for_exceptions()
And I press "Move" # behat_hooks::i_look_for_exceptions()
Then I should see "This discussion has been moved to 'Test forum 2'." # behat_hooks::i_look_for_exceptions()
And I press "Move" # behat_hooks::i_look_for_exceptions()
And I should see "Discussion 1" # behat_hooks::i_look_for_exceptions()
@core @core_course
Feature: Sections can be moved
In order to rearrange my course contents
As a teacher
I need to move sections up and down
Background: # C:\Apache24\htdocs\integration\course\tests\behat\move_sections.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format | coursedisplay | numsections |
| Course 1 | C1 | topics | 0 | 5 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
Scenario: Move up and down a section with Javascript disabled in a single page course # C:\Apache24\htdocs\integration\course\tests\behat\move_sections.feature:21
Given I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name |
| Description | Test forum description |
When I move down section "1" # behat_hooks::i_look_for_exceptions()
Then I should see "Test forum name" in the "Topic 2" "section" # behat_hooks::i_look_for_exceptions()
And I move up section "2" # behat_hooks::i_look_for_exceptions()
And I should see "Test forum name" in the "Topic 1" "section" # behat_hooks::i_look_for_exceptions()
Scenario: Move up and down a section with Javascript disabled in the course home of a course using paged mode # C:\Apache24\htdocs\integration\course\tests\behat\move_sections.feature:30
Given I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Course layout | Show one section per page |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name |
| Description | Test forum description |
When I move down section "1" # behat_hooks::i_look_for_exceptions()
Then I should see "Test forum name" in the "Topic 2" "section" # behat_hooks::i_look_for_exceptions()
And I move up section "2" # behat_hooks::i_look_for_exceptions()
And I should see "Test forum name" in the "Topic 1" "section" # behat_hooks::i_look_for_exceptions()
Scenario: Sections can not be moved with Javascript disabled in a section page of a course using paged mode # C:\Apache24\htdocs\integration\course\tests\behat\move_sections.feature:43
Given I click on "Edit settings" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Course layout | Show one section per page |
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I add a "Forum" to section "2" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Test forum name |
| Description | Test forum description |
When I follow "Topic 2" # behat_hooks::i_look_for_exceptions()
Then "Topic 1" "section" should not exist # behat_hooks::i_look_for_exceptions()
And "Topic 3" "section" should not exist # behat_hooks::i_look_for_exceptions()
And "Move down" "link" should not exist # behat_hooks::i_look_for_exceptions()
And "Move up" "link" should not exist # behat_hooks::i_look_for_exceptions()
@mod @mod_feedback
Feature: Testing multichoice questions in feedback
In order to create feedbacks
As a teacher
I need to be able to create different types of multichoice questions
Background: # C:\Apache24\htdocs\integration\mod\feedback\tests\behat\multichoice.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname |
| teacher1 | Teacher | 1 |
| student1 | Student | 1 |
| student2 | Student | 2 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname |
| Course 1 | C1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | course | idnumber |
| feedback | Learning experience | C1 | feedback0 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Learning experience" # behat_hooks::i_look_for_exceptions()
And I click on "Edit questions" "link" in the "[role=main]" "css_element" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Non-rated single-answer multiple choice questions in feedback # C:\Apache24\htdocs\integration\mod\feedback\tests\behat\multichoice.feature:30
When I add a "Multiple choice" question to the feedback with: # behat_hooks::i_look_for_exceptions()
| Question | this is a multiple choice 1 |
| Label | multichoice1 |
| Multiple choice type | Multiple choice - single answer |
| Multiple choice values | option a\noption b\noption c |
And I add a "Label" question to the feedback with: # behat_hooks::i_look_for_exceptions()
| Contents | this is the first page of the feedback |
And I select "Add a page break" from the "Add question" singleselect # behat_hooks::i_look_for_exceptions()
And I add a "Multiple choice" question to the feedback with: # behat_hooks::i_look_for_exceptions()
| Question | this is a multiple choice 2 |
| Label | multichoice2 |
| Multiple choice type | Multiple choice - single answer |
| Multiple choice values | option d\noption e\noption f |
| Required | 1 |
And I add a "Label" question to the feedback with: # behat_hooks::i_look_for_exceptions()
| Contents | this is the second page of the feedback |
And I select "Add a page break" from the "Add question" singleselect # behat_hooks::i_look_for_exceptions()
And I add a "Multiple choice" question to the feedback with: # behat_hooks::i_look_for_exceptions()
| Question | this is a multiple choice 3 |
| Label | multichoice3 |
| Multiple choice type | Multiple choice - single answer |
| Multiple choice values | option g\noption h\noption i |
| Hide the "Not selected" option | Yes |
| Dependence item | multichoice2 |
| Dependence value | option d |
And I add a "Label" question to the feedback with: # behat_hooks::i_look_for_exceptions()
| Contents | this is the third page of the feedback |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Learning experience" # behat_hooks::i_look_for_exceptions()
And I follow "Answer the questions..." # behat_hooks::i_look_for_exceptions()
Then the following fields match these values: # behat_hooks::i_look_for_exceptions()
| Not selected | 1 |
| option a | 0 |
| option b | 0 |
| option c | 0 |
And "Previous page" "button" should not exist # behat_hooks::i_look_for_exceptions()
And "Submit your answers" "button" should not exist # behat_hooks::i_look_for_exceptions()
And I should see "this is the first page of the feedback" # behat_hooks::i_look_for_exceptions()
And I should not see "this is the second page of the feedback" # behat_hooks::i_look_for_exceptions()
And I should not see "this is the third page of the feedback" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Not selected" # behat_hooks::i_look_for_exceptions()
And the following fields match these values: # behat_hooks::i_look_for_exceptions()
| Not selected | 1 |
| option d | 0 |
| option e | 0 |
| option f | 0 |
And "Previous page" "button" should exist # behat_hooks::i_look_for_exceptions()
And "Submit your answers" "button" should not exist # behat_hooks::i_look_for_exceptions()
And I should not see "this is the first page of the feedback" # behat_hooks::i_look_for_exceptions()
And I should see "this is the second page of the feedback" # behat_hooks::i_look_for_exceptions()
And I should not see "this is the third page of the feedback" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Required" in the "form" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "this is the second page of the feedback" # behat_hooks::i_look_for_exceptions()
And I set the field "option e" to "1" # behat_hooks::i_look_for_exceptions()
And the following fields match these values: # behat_hooks::i_look_for_exceptions()
| Not selected | 0 |
| option d | 0 |
| option e | 1 |
| option f | 0 |
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "this is the third page of the feedback" # behat_hooks::i_look_for_exceptions()
And I should not see "this is a multiple choice 3" # behat_hooks::i_look_for_exceptions()
And I press "Previous page" # behat_hooks::i_look_for_exceptions()
And the following fields match these values: # behat_hooks::i_look_for_exceptions()
| Not selected | 0 |
| option d | 0 |
| option e | 1 |
| option f | 0 |
And I set the field "option d" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "this is a multiple choice 3" # behat_hooks::i_look_for_exceptions()
And I should see "this is the third page of the feedback" # behat_hooks::i_look_for_exceptions()
And I should not see "Not selected" # behat_hooks::i_look_for_exceptions()
And the following fields match these values: # behat_hooks::i_look_for_exceptions()
| option g | 0 |
| option h | 0 |
| option i | 0 |
And "Previous page" "button" should exist # behat_hooks::i_look_for_exceptions()
And "Next page" "button" should not exist # behat_hooks::i_look_for_exceptions()
And "Submit your answers" "button" should exist # behat_hooks::i_look_for_exceptions()
And I set the field "option i" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Submit your answers" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Learning experience" # behat_hooks::i_look_for_exceptions()
And I follow "Answer the questions..." # behat_hooks::i_look_for_exceptions()
And I set the field "option a" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I set the field "option d" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I set the field "option g" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Previous page" # behat_hooks::i_look_for_exceptions()
And I set the field "option f" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I press "Submit your answers" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Learning experience" # behat_hooks::i_look_for_exceptions()
And I click on "Analysis" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Submitted answers: 2" # behat_hooks::i_look_for_exceptions()
And I should see "Questions: 3" # behat_hooks::i_look_for_exceptions()
And I show chart data for the "multichoice1" feedback # behat_hooks::i_look_for_exceptions()
And I should see "1 (50.00 %)" in the "option a" "table_row" # behat_hooks::i_look_for_exceptions()
And I should not see "%" in the "option b" "table_row" # behat_hooks::i_look_for_exceptions()
And I should not see "%" in the "option c" "table_row" # behat_hooks::i_look_for_exceptions()
And I show chart data for the "multichoice2" feedback # behat_hooks::i_look_for_exceptions()
And I should see "1 (50.00 %)" in the "option d" "table_row" # behat_hooks::i_look_for_exceptions()
And I should not see "%" in the "option e" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "1 (50.00 %)" in the "option f" "table_row" # behat_hooks::i_look_for_exceptions()
And I show chart data for the "multichoice3" feedback # behat_hooks::i_look_for_exceptions()
And I should not see "%" in the "option g" "table_row" # behat_hooks::i_look_for_exceptions()
And I should not see "%" in the "option h" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "1 (100.00 %)" in the "option i" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "Edit questions" "link" in the "[role=main]" "css_element" # behat_hooks::i_look_for_exceptions()
And I open the action menu in "//div[contains(@class, 'feedback_itemlist') and contains(.,'multichoice1')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I choose "Edit question" in the open action menu # behat_hooks::i_look_for_exceptions()
And I set the field "Do not analyse empty submits" to "Yes" # behat_hooks::i_look_for_exceptions()
And I press "Save changes to question" # behat_hooks::i_look_for_exceptions()
And I click on "Analysis" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I show chart data for the "multichoice1" feedback # behat_hooks::i_look_for_exceptions()
And I should see "1 (100.00 %)" in the "option a" "table_row" # behat_hooks::i_look_for_exceptions()
And I should not see "%" in the "option b" "table_row" # behat_hooks::i_look_for_exceptions()
And I should not see "%" in the "option c" "table_row" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Non-rated multiple-answers multiple choice questions in feedback # C:\Apache24\htdocs\integration\mod\feedback\tests\behat\multichoice.feature:173
When I add a "Multiple choice" question to the feedback with: # behat_hooks::i_look_for_exceptions()
| Question | this is a multiple choice 1 |
| Label | multichoice1 |
| Multiple choice type | Multiple choice - multiple answers |
| Multiple choice values | option a\noption b\noption c |
And I add a "Label" question to the feedback with: # behat_hooks::i_look_for_exceptions()
| Contents | this is the first page of the feedback |
And I select "Add a page break" from the "Add question" singleselect # behat_hooks::i_look_for_exceptions()
And I add a "Multiple choice" question to the feedback with: # behat_hooks::i_look_for_exceptions()
| Question | this is a multiple choice 2 |
| Label | multichoice2 |
| Multiple choice type | Multiple choice - multiple answers |
| Multiple choice values | option d\noption e\noption f |
| Required | 1 |
And I add a "Label" question to the feedback with: # behat_hooks::i_look_for_exceptions()
| Contents | this is the second page of the feedback |
And I select "Add a page break" from the "Add question" singleselect # behat_hooks::i_look_for_exceptions()
And I add a "Multiple choice" question to the feedback with: # behat_hooks::i_look_for_exceptions()
| Question | this is a multiple choice 3 |
| Label | multichoice3 |
| Multiple choice type | Multiple choice - multiple answers |
| Multiple choice values | option g\noption h\noption i |
| Dependence item | multichoice2 |
| Dependence value | option d |
And I add a "Label" question to the feedback with: # behat_hooks::i_look_for_exceptions()
| Contents | this is the third page of the feedback |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Learning experience" # behat_hooks::i_look_for_exceptions()
And I follow "Answer the questions..." # behat_hooks::i_look_for_exceptions()
And I should not see "Not selected" # behat_hooks::i_look_for_exceptions()
And the following fields match these values: # behat_hooks::i_look_for_exceptions()
| option a | 0 |
| option b | 0 |
| option c | 0 |
And "Previous page" "button" should not exist # behat_hooks::i_look_for_exceptions()
And "Submit your answers" "button" should not exist # behat_hooks::i_look_for_exceptions()
And I should see "this is the first page of the feedback" # behat_hooks::i_look_for_exceptions()
And I should not see "this is the second page of the feedback" # behat_hooks::i_look_for_exceptions()
And I should not see "this is the third page of the feedback" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
Then I should not see "Not selected" # behat_hooks::i_look_for_exceptions()
And the following fields match these values: # behat_hooks::i_look_for_exceptions()
| option d | 0 |
| option e | 0 |
| option f | 0 |
And "Previous page" "button" should exist # behat_hooks::i_look_for_exceptions()
And "Submit your answers" "button" should not exist # behat_hooks::i_look_for_exceptions()
And I should not see "this is the first page of the feedback" # behat_hooks::i_look_for_exceptions()
And I should see "this is the second page of the feedback" # behat_hooks::i_look_for_exceptions()
And I should not see "this is the third page of the feedback" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Required" in the "form" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "this is the second page of the feedback" # behat_hooks::i_look_for_exceptions()
And I set the field "option e" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "option f" to "1" # behat_hooks::i_look_for_exceptions()
And the following fields match these values: # behat_hooks::i_look_for_exceptions()
| option d | 0 |
| option e | 1 |
| option f | 1 |
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "this is the third page of the feedback" # behat_hooks::i_look_for_exceptions()
And I should not see "this is a multiple choice 3" # behat_hooks::i_look_for_exceptions()
And I press "Previous page" # behat_hooks::i_look_for_exceptions()
And the following fields match these values: # behat_hooks::i_look_for_exceptions()
| option d | 0 |
| option e | 1 |
| option f | 1 |
And I set the field "option d" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "option e" to "0" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "this is a multiple choice 3" # behat_hooks::i_look_for_exceptions()
And I should see "this is the third page of the feedback" # behat_hooks::i_look_for_exceptions()
And the following fields match these values: # behat_hooks::i_look_for_exceptions()
| option g | 0 |
| option h | 0 |
| option i | 0 |
And "Previous page" "button" should exist # behat_hooks::i_look_for_exceptions()
And "Next page" "button" should not exist # behat_hooks::i_look_for_exceptions()
And "Submit your answers" "button" should exist # behat_hooks::i_look_for_exceptions()
And I set the field "option i" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Submit your answers" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Learning experience" # behat_hooks::i_look_for_exceptions()
And I follow "Answer the questions..." # behat_hooks::i_look_for_exceptions()
And I set the field "option a" to "1" # behat_hooks::i_look_for_exceptions()
And I set the field "option b" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I set the field "option d" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I set the field "option g" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Previous page" # behat_hooks::i_look_for_exceptions()
And I set the field "option d" to "0" # behat_hooks::i_look_for_exceptions()
And I set the field "option f" to "1" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I press "Submit your answers" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Learning experience" # behat_hooks::i_look_for_exceptions()
And I click on "Analysis" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Submitted answers: 2" # behat_hooks::i_look_for_exceptions()
And I should see "Questions: 3" # behat_hooks::i_look_for_exceptions()
And I show chart data for the "multichoice1" feedback # behat_hooks::i_look_for_exceptions()
And I should see "1 (50.00 %)" in the "option a" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "1 (50.00 %)" in the "option b" "table_row" # behat_hooks::i_look_for_exceptions()
And I should not see "%" in the "option c" "table_row" # behat_hooks::i_look_for_exceptions()
And I show chart data for the "multichoice2" feedback # behat_hooks::i_look_for_exceptions()
And I should see "1 (50.00 %)" in the "option d" "table_row" # behat_hooks::i_look_for_exceptions()
And I should not see "%" in the "option e" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "2 (100.00 %)" in the "option f" "table_row" # behat_hooks::i_look_for_exceptions()
And I show chart data for the "multichoice3" feedback # behat_hooks::i_look_for_exceptions()
And I should not see "%" in the "option g" "table_row" # behat_hooks::i_look_for_exceptions()
And I should not see "%" in the "option h" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "1 (100.00 %)" in the "option i" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "Edit questions" "link" in the "[role=main]" "css_element" # behat_hooks::i_look_for_exceptions()
And I open the action menu in "//div[contains(@class, 'feedback_itemlist') and contains(.,'multichoice1')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I choose "Edit question" in the open action menu # behat_hooks::i_look_for_exceptions()
And I set the field "Do not analyse empty submits" to "Yes" # behat_hooks::i_look_for_exceptions()
And I press "Save changes to question" # behat_hooks::i_look_for_exceptions()
And I click on "Analysis" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I show chart data for the "multichoice1" feedback # behat_hooks::i_look_for_exceptions()
And I should see "1 (100.00 %)" in the "option a" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "1 (100.00 %)" in the "option b" "table_row" # behat_hooks::i_look_for_exceptions()
And I should not see "%" in the "option c" "table_row" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Non-rated single-answer dropdown multiple choice questions in feedback # C:\Apache24\htdocs\integration\mod\feedback\tests\behat\multichoice.feature:317
When I add a "Multiple choice" question to the feedback with: # behat_hooks::i_look_for_exceptions()
| Question | this is a multiple choice 1 |
| Label | multichoice1 |
| Multiple choice type | Multiple choice - single answer allowed (dropdownlist) |
| Multiple choice values | option a\noption b\noption c |
And I add a "Label" question to the feedback with: # behat_hooks::i_look_for_exceptions()
| Contents | this is the first page of the feedback |
And I select "Add a page break" from the "Add question" singleselect # behat_hooks::i_look_for_exceptions()
And I add a "Multiple choice" question to the feedback with: # behat_hooks::i_look_for_exceptions()
| Question | this is a multiple choice 2 |
| Label | multichoice2 |
| Multiple choice type | Multiple choice - single answer allowed (dropdownlist) |
| Multiple choice values | option d\noption e\noption f |
| Required | 1 |
And I add a "Label" question to the feedback with: # behat_hooks::i_look_for_exceptions()
| Contents | this is the second page of the feedback |
And I select "Add a page break" from the "Add question" singleselect # behat_hooks::i_look_for_exceptions()
And I add a "Multiple choice" question to the feedback with: # behat_hooks::i_look_for_exceptions()
| Question | this is a multiple choice 3 |
| Label | multichoice3 |
| Multiple choice type | Multiple choice - single answer allowed (dropdownlist) |
| Multiple choice values | option g\noption h\noption i |
| Dependence item | multichoice2 |
| Dependence value | option d |
And I add a "Label" question to the feedback with: # behat_hooks::i_look_for_exceptions()
| Contents | this is the third page of the feedback |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Learning experience" # behat_hooks::i_look_for_exceptions()
And I follow "Answer the questions..." # behat_hooks::i_look_for_exceptions()
Then the following fields match these values: # behat_hooks::i_look_for_exceptions()
| this is a multiple choice 1 | 0 |
And "Previous page" "button" should not exist # behat_hooks::i_look_for_exceptions()
And "Submit your answers" "button" should not exist # behat_hooks::i_look_for_exceptions()
And I should see "this is the first page of the feedback" # behat_hooks::i_look_for_exceptions()
And I should not see "this is the second page of the feedback" # behat_hooks::i_look_for_exceptions()
And I should not see "this is the third page of the feedback" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And the following fields match these values: # behat_hooks::i_look_for_exceptions()
| this is a multiple choice 2 | 0 |
And "Previous page" "button" should exist # behat_hooks::i_look_for_exceptions()
And "Submit your answers" "button" should not exist # behat_hooks::i_look_for_exceptions()
And I should not see "this is the first page of the feedback" # behat_hooks::i_look_for_exceptions()
And I should see "this is the second page of the feedback" # behat_hooks::i_look_for_exceptions()
And I should not see "this is the third page of the feedback" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "Required" in the "form" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see "this is the second page of the feedback" # behat_hooks::i_look_for_exceptions()
And I set the field "this is a multiple choice 2" to "option e" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "this is the third page of the feedback" # behat_hooks::i_look_for_exceptions()
And I should not see "this is a multiple choice 3" # behat_hooks::i_look_for_exceptions()
And I press "Previous page" # behat_hooks::i_look_for_exceptions()
And the following fields match these values: # behat_hooks::i_look_for_exceptions()
| this is a multiple choice 2 | option e |
And I set the field "this is a multiple choice 2" to "option d" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I should see "this is the third page of the feedback" # behat_hooks::i_look_for_exceptions()
And the following fields match these values: # behat_hooks::i_look_for_exceptions()
| this is a multiple choice 3 | 0 |
And "Previous page" "button" should exist # behat_hooks::i_look_for_exceptions()
And "Next page" "button" should not exist # behat_hooks::i_look_for_exceptions()
And "Submit your answers" "button" should exist # behat_hooks::i_look_for_exceptions()
And I set the field "this is a multiple choice 3" to "option i" # behat_hooks::i_look_for_exceptions()
And I press "Submit your answers" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Learning experience" # behat_hooks::i_look_for_exceptions()
And I follow "Answer the questions..." # behat_hooks::i_look_for_exceptions()
And I set the field "this is a multiple choice 1" to "option a" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I set the field "this is a multiple choice 2" to "option d" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I set the field "this is a multiple choice 3" to "option g" # behat_hooks::i_look_for_exceptions()
And I press "Previous page" # behat_hooks::i_look_for_exceptions()
And I set the field "this is a multiple choice 2" to "option f" # behat_hooks::i_look_for_exceptions()
And I press "Next page" # behat_hooks::i_look_for_exceptions()
And I press "Submit your answers" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Learning experience" # behat_hooks::i_look_for_exceptions()
And I click on "Analysis" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Submitted answers: 2" # behat_hooks::i_look_for_exceptions()
And I should see "Questions: 3" # behat_hooks::i_look_for_exceptions()
And I show chart data for the "multichoice1" feedback # behat_hooks::i_look_for_exceptions()
And I should see "1 (50.00 %)" in the "option a" "table_row" # behat_hooks::i_look_for_exceptions()
And I should not see "%" in the "option b" "table_row" # behat_hooks::i_look_for_exceptions()
And I should not see "%" in the "option c" "table_row" # behat_hooks::i_look_for_exceptions()
And I show chart data for the "multichoice2" feedback # behat_hooks::i_look_for_exceptions()
And I should see "1 (50.00 %)" in the "option d" "table_row" # behat_hooks::i_look_for_exceptions()
And I should not see "%" in the "option e" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "1 (50.00 %)" in the "option f" "table_row" # behat_hooks::i_look_for_exceptions()
And I show chart data for the "multichoice3" feedback # behat_hooks::i_look_for_exceptions()
And I should not see "%" in the "option g" "table_row" # behat_hooks::i_look_for_exceptions()
And I should not see "%" in the "option h" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "1 (100.00 %)" in the "option i" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "Edit questions" "link" in the "[role=main]" "css_element" # behat_hooks::i_look_for_exceptions()
And I open the action menu in "//div[contains(@class, 'feedback_itemlist') and contains(.,'multichoice1')]" "xpath_element" # behat_hooks::i_look_for_exceptions()
And I choose "Edit question" in the open action menu # behat_hooks::i_look_for_exceptions()
And I set the field "Do not analyse empty submits" to "Yes" # behat_hooks::i_look_for_exceptions()
And I press "Save changes to question" # behat_hooks::i_look_for_exceptions()
And I click on "Analysis" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I show chart data for the "multichoice1" feedback # behat_hooks::i_look_for_exceptions()
And I should see "1 (100.00 %)" in the "option a" "table_row" # behat_hooks::i_look_for_exceptions()
And I should not see "%" in the "option b" "table_row" # behat_hooks::i_look_for_exceptions()
And I should not see "%" in the "option c" "table_row" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@block @block_html
Feature: Adding and configuring HTML blocks
In order to have one or multiple HTML blocks on a page
As admin
I need to be able to create, configure and change HTML blocks
Background: # C:\Apache24\htdocs\integration\blocks\html\tests\behat\multiple_instances.feature:7
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
When I click on "Turn editing on" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I add the "HTML" block # behat_hooks::i_look_for_exceptions()
Scenario: Other users can not see HTML block that has not been configured # C:\Apache24\htdocs\integration\blocks\html\tests\behat\multiple_instances.feature:13
Then "(new HTML block)" "block" should exist # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And "(new HTML block)" "block" should not exist # behat_hooks::i_look_for_exceptions()
And "block_html" "block" should not exist # behat_hooks::i_look_for_exceptions()
Scenario: Other users can see HTML block that has been configured even when it has no header # C:\Apache24\htdocs\integration\blocks\html\tests\behat\multiple_instances.feature:19
And I configure the "(new HTML block)" block # behat_hooks::i_look_for_exceptions()
And I set the field "Content" to "Static text without a header" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should not see "(new HTML block)" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I am on homepage # behat_hooks::i_look_for_exceptions()
And "block_html" "block" should exist # behat_hooks::i_look_for_exceptions()
And I should see "Static text without a header" in the "block_html" "block" # behat_hooks::i_look_for_exceptions()
And I should not see "(new HTML block)" # behat_hooks::i_look_for_exceptions()
Scenario: Adding multiple instances of HTML block on a page # C:\Apache24\htdocs\integration\blocks\html\tests\behat\multiple_instances.feature:30
And I configure the "block_html" block # behat_hooks::i_look_for_exceptions()
And I set the field "Block title" to "The HTML block header" # behat_hooks::i_look_for_exceptions()
And I set the field "Content" to "Static text with a header" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I add the "HTML" block # behat_hooks::i_look_for_exceptions()
And I configure the "(new HTML block)" block # behat_hooks::i_look_for_exceptions()
And I set the field "Block title" to "The second HTML block header" # behat_hooks::i_look_for_exceptions()
And I set the field "Content" to "Second block contents" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Then I should see "Static text with a header" in the "The HTML block header" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Second block contents" in the "The second HTML block header" "block" # behat_hooks::i_look_for_exceptions()
@mod @mod_choice
Feature: Multiple option choice response
In order to ask questions as a choice of multiple responses
As a teacher
I need to add choice activities to courses with multiple options enabled
Scenario: Complete a choice with multiple options enabled # C:\Apache24\htdocs\integration\mod\choice\tests\behat\multiple_options.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Choice" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Choice name | Choice name |
| Description | Choice Description |
| Allow more than one choice to be selected | Yes |
| option[0] | Option 1 |
| option[1] | Option 2 |
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I choose options "Option 1","Option 2" from "Choice name" choice activity # behat_hooks::i_look_for_exceptions()
Then I should see "Your selection: Option 1; Option 2" # behat_hooks::i_look_for_exceptions()
And I should see "Your choice has been saved" # behat_hooks::i_look_for_exceptions()
Scenario: Complete a choice with multiple options enabled and limited responses set # C:\Apache24\htdocs\integration\mod\choice\tests\behat\multiple_options.feature:35
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Choice" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Choice name | Choice name |
| Description | Choice Description |
| Allow more than one choice to be selected | Yes |
| Limit the number of responses allowed | 1 |
| option[0] | Option 1 |
| limit[0] | 1 |
| option[1] | Option 2 |
| limit[1] | 1 |
| option[2] | Option 3 |
| limit[2] | 1 |
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I choose options "Option 1","Option 2" from "Choice name" choice activity # behat_hooks::i_look_for_exceptions()
Then I should see "Your selection: Option 1; Option 2" # behat_hooks::i_look_for_exceptions()
And I should see "Your choice has been saved" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Choice name" # behat_hooks::i_look_for_exceptions()
And I should see "Option 1 (Full)" # behat_hooks::i_look_for_exceptions()
And I should see "Option 2 (Full)" # behat_hooks::i_look_for_exceptions()
And I should see "Option 3" # behat_hooks::i_look_for_exceptions()
And the "#choice_1" "css_element" should be disabled # behat_hooks::i_look_for_exceptions()
And the "#choice_2" "css_element" should be disabled # behat_hooks::i_look_for_exceptions()
And the "#choice_3" "css_element" should be enabled # behat_hooks::i_look_for_exceptions()
@mod @mod_forum
Feature: A user can view their posts and discussions
In order to ensure a user can view their posts and discussions
As a student
I need to view my post and discussions
Scenario: View the student's posts and discussions # C:\Apache24\htdocs\integration\mod\forum\tests\behat\my_forum_posts.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| student1 | C1 | student |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | groupmode |
| forum | Test forum name | Test forum | C1 | forum | 0 |
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I add a new discussion to "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Subject | Forum discussion 1 |
| Message | How awesome is this forum discussion? |
And I reply "Forum discussion 1" post from "Test forum name" forum with: # behat_hooks::i_look_for_exceptions()
| Message | Actually, I've seen better. |
When I follow "Profile" in the user menu # behat_hooks::i_look_for_exceptions()
And I follow "Forum posts" # behat_hooks::i_look_for_exceptions()
Then I should see "How awesome is this forum discussion?" # behat_hooks::i_look_for_exceptions()
And I should see "Actually, I've seen better." # behat_hooks::i_look_for_exceptions()
And I follow "Profile" in the user menu # behat_hooks::i_look_for_exceptions()
And I follow "Forum discussions" # behat_hooks::i_look_for_exceptions()
And I should see "How awesome is this forum discussion?" # behat_hooks::i_look_for_exceptions()
And I should not see "Actually, I've seen better." # behat_hooks::i_look_for_exceptions()
@mod @mod_choice
Feature: Test the display of the choice module on my home
In order to know my status in a choice activity
As a user
I need to see it in My dashboard.
Background: # C:\Apache24\htdocs\integration\mod\choice\tests\behat\my_home.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Choice" to section "1" # behat_hooks::i_look_for_exceptions()
And I expand all fieldsets # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Choice name | Test choice name |
| Description | Test choice description |
| timeopen[enabled] | 1 |
| timeclose[enabled] | 1 |
| timeclose[day] | 1 |
| timeclose[month] | January |
| timeclose[year] | 2030 |
| timeclose[hour] | 08 |
| timeclose[minute] | 00 |
| Allow choice to be updated | No |
| option[0] | Option 1 |
| option[1] | Option 2 |
And I press "Save and return to course" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: View my home as a student before answering the choice # C:\Apache24\htdocs\integration\mod\choice\tests\behat\my_home.feature:40
Given I log in as "student1" # behat_hooks::i_look_for_exceptions()
When I click on "Dashboard" "link" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
Then I should see "You have Choices that need attention" # behat_hooks::i_look_for_exceptions()
And I should see "Not answered yet" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: View my home as a student after answering the choice # C:\Apache24\htdocs\integration\mod\choice\tests\behat\my_home.feature:47
Given I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I choose "Option 1" from "Test choice name" choice activity # behat_hooks::i_look_for_exceptions()
And I should see "Your selection: Option 1" # behat_hooks::i_look_for_exceptions()
And I should see "Your choice has been saved" # behat_hooks::i_look_for_exceptions()
And "Save my choice" "button" should not exist # behat_hooks::i_look_for_exceptions()
When I click on "Dashboard" "link" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
Then I should not see "You have Choices that need attention" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: View my home as a teacher # C:\Apache24\htdocs\integration\mod\choice\tests\behat\my_home.feature:58
Given I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I choose "Option 1" from "Test choice name" choice activity # behat_hooks::i_look_for_exceptions()
And I should see "Your selection: Option 1" # behat_hooks::i_look_for_exceptions()
And I should see "Your choice has been saved" # behat_hooks::i_look_for_exceptions()
And "Save my choice" "button" should not exist # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I click on "Dashboard" "link" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
Then I should see "You have Choices that need attention" # behat_hooks::i_look_for_exceptions()
And I should see "View 1 responses" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@core @core_user
Feature: Both first name and surname are always available for every user
In order to easily identify and display users on Moodle pages
As any user
I need to rely on both first name and surname are always available
Scenario: Attempting to self-register as a new user with empty names # C:\Apache24\htdocs\integration\user\tests\behat\name_fields.feature:7
Given the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| registerauth | email |
| passwordpolicy | 0 |
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Log in" # behat_hooks::i_look_for_exceptions()
And I press "Create new account" # behat_hooks::i_look_for_exceptions()
When I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Username | mrwhitespace |
| Password | Gue$$m3ifY0uC&n |
| Email address | mrwhitespace@nas.ty |
| Email (again) | mrwhitespace@nas.ty |
And I set the field "First name" to " " # behat_hooks::i_look_for_exceptions()
And I set the field "Surname" to " " # behat_hooks::i_look_for_exceptions()
And I press "Create my new account" # behat_hooks::i_look_for_exceptions()
Then I should see "Missing given name" # behat_hooks::i_look_for_exceptions()
And I should see "Missing surname" # behat_hooks::i_look_for_exceptions()
Scenario: Attempting to change own names to whitespace # C:\Apache24\htdocs\integration\user\tests\behat\name_fields.feature:25
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| foobar | Foo | Bar | foo@bar.com |
And I log in as "foobar" # behat_hooks::i_look_for_exceptions()
And I follow "Profile" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
When I set the field "First name" to " " # behat_hooks::i_look_for_exceptions()
And I set the field "Surname" to " " # behat_hooks::i_look_for_exceptions()
And I click on "Update profile" "button" # behat_hooks::i_look_for_exceptions()
Then I should see "Missing given name" # behat_hooks::i_look_for_exceptions()
And I should see "Missing surname" # behat_hooks::i_look_for_exceptions()
Scenario: Attempting to change someone else's names to whitespace # C:\Apache24\htdocs\integration\user\tests\behat\name_fields.feature:38
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| foobar | Foo | Bar | foo@bar.com |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "Browse list of users" node in "Site administration > Users > Accounts" # behat_hooks::i_look_for_exceptions()
And I follow "Foo Bar" # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
When I set the field "First name" to " " # behat_hooks::i_look_for_exceptions()
And I set the field "Surname" to " " # behat_hooks::i_look_for_exceptions()
And I click on "Update profile" "button" # behat_hooks::i_look_for_exceptions()
Then I should see "Missing given name" # behat_hooks::i_look_for_exceptions()
And I should see "Missing surname" # behat_hooks::i_look_for_exceptions()
@tool @tool_behat
Feature: Transform steps arguments
In order to write tests with complex nasty arguments
As a tests writer
I need to apply some transformations to the steps arguments
Background: # C:\Apache24\htdocs\integration\admin\tool\behat\tests\behat\nasty_strings.feature:7
Given I am on site homepage # behat_hooks::i_look_for_exceptions()
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I follow "Preferences" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
Scenario: Use nasty strings on steps arguments # C:\Apache24\htdocs\integration\admin\tool\behat\tests\behat\nasty_strings.feature:16
When I set the field "Surname" to "$NASTYSTRING1" # behat_hooks::i_look_for_exceptions()
And I set the field "Description" to "$NASTYSTRING2" # behat_hooks::i_look_for_exceptions()
And I set the field "City/town" to "$NASTYSTRING3" # behat_hooks::i_look_for_exceptions()
And I press "Update profile" # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
Then I should not see "NASTYSTRING" # behat_hooks::i_look_for_exceptions()
And the field "Surname" matches value "$NASTYSTRING1" # behat_hooks::i_look_for_exceptions()
And the field "City/town" matches value "$NASTYSTRING3" # behat_hooks::i_look_for_exceptions()
Scenario: Use nasty strings on table nodes # C:\Apache24\htdocs\integration\admin\tool\behat\tests\behat\nasty_strings.feature:26
When I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Surname | $NASTYSTRING1 |
| Description | $NASTYSTRING2 |
| City/town | $NASTYSTRING3 |
And I press "Update profile" # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
Then I should not see "NASTYSTRING" # behat_hooks::i_look_for_exceptions()
And the field "Surname" matches value "$NASTYSTRING1" # behat_hooks::i_look_for_exceptions()
And the field "City/town" matches value "$NASTYSTRING3" # behat_hooks::i_look_for_exceptions()
Scenario: Use double quotes # C:\Apache24\htdocs\integration\admin\tool\behat\tests\behat\nasty_strings.feature:37
When I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| First name | va"lue1 |
| Description | va\"lue2 |
And I set the field "City/town" to "va\"lue3" # behat_hooks::i_look_for_exceptions()
And I press "Update profile" # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
Then I should not see "NASTYSTRING" # behat_hooks::i_look_for_exceptions()
And the field "First name" matches value "va\"lue1" # behat_hooks::i_look_for_exceptions()
And the field "Description" matches value "va\\"lue2" # behat_hooks::i_look_for_exceptions()
And the field "City/town" matches value "va\"lue3" # behat_hooks::i_look_for_exceptions()
Scenario: Nasty strings with other contents # C:\Apache24\htdocs\integration\admin\tool\behat\tests\behat\nasty_strings.feature:49
When I set the field "First name" to "My Firstname $NASTYSTRING1" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Surname | My Surname $NASTYSTRING2 |
And I press "Update profile" # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
Then I should not see "NASTYSTRING" # behat_hooks::i_look_for_exceptions()
And I should see "My Firstname" # behat_hooks::i_look_for_exceptions()
And I should see "My Surname" # behat_hooks::i_look_for_exceptions()
And the field "First name" matches value "My Firstname $NASTYSTRING1" # behat_hooks::i_look_for_exceptions()
And the field "Surname" matches value "My Surname $NASTYSTRING2" # behat_hooks::i_look_for_exceptions()
@core @core_course
Feature: Browse course list and return back from enrolment page
In order to navigate between course list consistently
As a user
I need to be able to return back from enrolment page
Background: # C:\Apache24\htdocs\integration\course\tests\behat\navigate_course_list.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| user1 | User | 1 | user1@example.com |
| user2 | User | 2 | user2@example.com |
And the following "categories" exist: # behat_hooks::i_look_for_exceptions()
| name | category | idnumber |
| Sample category | 0 | CAT1 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Sample course | C1 | 0 |
| Course 1 | COURSE1 | CAT1 |
Scenario: A user can return to the category page from enrolment page # C:\Apache24\htdocs\integration\course\tests\behat\navigate_course_list.feature:20
When I log in as "user2" # behat_hooks::i_look_for_exceptions()
And I click on "Courses" "link" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I follow "Miscellaneous" # behat_hooks::i_look_for_exceptions()
And I follow "Sample course" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
Then I should see "Courses" in the ".breadcrumb-nav" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "Courses" "link" in the ".breadcrumb-nav" "css_element" # behat_hooks::i_look_for_exceptions()
And I follow "Sample category" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should see "Sample category" in the ".breadcrumb-nav" "css_element" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: A user can return to the previous page from enrolment page by clicking navigation links # C:\Apache24\htdocs\integration\course\tests\behat\navigate_course_list.feature:34
When I log in as "user2" # behat_hooks::i_look_for_exceptions()
And I follow "Preferences" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I expand "Courses" node # behat_hooks::i_look_for_exceptions()
And I expand "Sample category" node # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
Then I should see "Edit profile" in the ".breadcrumb-nav" "css_element" # behat_hooks::i_look_for_exceptions()
Scenario: User can return to the choice activity from enrolment page # C:\Apache24\htdocs\integration\course\tests\behat\navigate_course_list.feature:44
Given the following "roles" exist: # behat_hooks::i_look_for_exceptions()
| name | shortname | description | archetype |
| Non-enrolled | custom1 | My custom role 1 | user |
And the following "role assigns" exist: # behat_hooks::i_look_for_exceptions()
| user | role | contextlevel | reference |
| user1 | custom1 | Course | C1 |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber |
| choice | Test choice | Test choice description | C1 | choice1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I set the following system permissions of "Non-enrolled" role: # behat_hooks::i_look_for_exceptions()
| capability | permission |
| moodle/course:view | Allow |
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "user1" # behat_hooks::i_look_for_exceptions()
And I click on "Courses" "link" in the "Navigation" "block" # behat_hooks::i_look_for_exceptions()
And I follow "Miscellaneous" # behat_hooks::i_look_for_exceptions()
And I follow "Sample course" # behat_hooks::i_look_for_exceptions()
And I follow "Test choice" # behat_hooks::i_look_for_exceptions()
And I should see "Sorry, only enrolled users are allowed to make choices." # behat_hooks::i_look_for_exceptions()
And I press "Enrol me in this course" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
Then I should see "Test choice" in the ".breadcrumb-nav" "css_element" # behat_hooks::i_look_for_exceptions()
@gradingform @gradingform_rubric @javascript
Feature: Rubrics can have levels with negative scores
In order to use and refine rubrics to grade students
As a teacher
I need to be able to penalise for very wrong submissions
Scenario: Using negative levels in rubrics # C:\Apache24\htdocs\integration\grade\grading\form\rubric\tests\behat\negative_points.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
| student3 | Student | 3 | student3@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
And the following "scales" exist: # behat_hooks::i_look_for_exceptions()
| name | scale |
| Test scale 1 | Disappointing, Good, Very good, Excellent |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | grade | advancedgradingmethod_submissions |
| assign | Test assignment 1 | Test | C1 | assign1 | 100 | rubric |
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I go to "Test assignment 1" advanced grading definition page # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Assignment 1 rubric |
| Description | Rubric test description |
And I define the following rubric: # behat_hooks::i_look_for_exceptions()
| Criterion 1 | Did not try | -11 | Level 12 | 25 | Level 13 | 40 | Level 14 | 50 |
| Criterion 2 | Very bad | -20 | Level 22 | 25 | Level 23 | 30 | | |
| Criterion 3 | Level 31 | 10 | Level 32 | 20 | | | | |
And I press "Save rubric and make it ready" # behat_hooks::i_look_for_exceptions()
And I go to "Student 1" "Test assignment 1" activity advanced grading page # behat_hooks::i_look_for_exceptions()
And I grade by filling the rubric with: # behat_hooks::i_look_for_exceptions()
| Criterion 1 | 25 | |
| Criterion 2 | 30 | |
| Criterion 3 | 10 | |
And I save the advanced grading form # behat_hooks::i_look_for_exceptions()
And I go to "Student 2" "Test assignment 1" activity advanced grading page # behat_hooks::i_look_for_exceptions()
And I grade by filling the rubric with: # behat_hooks::i_look_for_exceptions()
| Criterion 1 | 25 | |
| Criterion 2 | -20 | |
| Criterion 3 | 10 | |
And I save the advanced grading form # behat_hooks::i_look_for_exceptions()
And I go to "Student 3" "Test assignment 1" activity advanced grading page # behat_hooks::i_look_for_exceptions()
And I grade by filling the rubric with: # behat_hooks::i_look_for_exceptions()
| Criterion 1 | -11 | |
| Criterion 2 | -20 | |
| Criterion 3 | 10 | |
And I save the advanced grading form # behat_hooks::i_look_for_exceptions()
And I should see "65.00" in the "student1@example.com" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "15.00" in the "student2@example.com" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "0.00" in the "student3@example.com" "table_row" # behat_hooks::i_look_for_exceptions()
And I should not see "-" in the "student3@example.com" "table_row" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@mod @mod_forum
Feature: Posting to forums in a course with no groups behaves correctly
Background: # C:\Apache24\htdocs\integration\mod\forum\tests\behat\no_groups_in_course.feature:4
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | intro | course | idnumber | groupmode |
| forum | Standard forum | Standard forum description | C1 | nogroups | 0 |
| forum | Visible forum | Visible forum description | C1 | visgroups | 2 |
| forum | Separate forum | Separate forum description | C1 | sepgroups | 1 |
Scenario: Teachers can post in standard forum # C:\Apache24\htdocs\integration\mod\forum\tests\behat\no_groups_in_course.feature:22
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Standard forum" # behat_hooks::i_look_for_exceptions()
When I click on "Add a new discussion topic" "button" # behat_hooks::i_look_for_exceptions()
Then I should not see "Post a copy to all groups" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Subject | Teacher -> All participants |
| Message | Teacher -> All participants |
And I press "Post to forum" # behat_hooks::i_look_for_exceptions()
And I wait to be redirected # behat_hooks::i_look_for_exceptions()
And I should see "Teacher -> All participants" # behat_hooks::i_look_for_exceptions()
Scenario: Teachers can post in forum with separate groups # C:\Apache24\htdocs\integration\mod\forum\tests\behat\no_groups_in_course.feature:35
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Separate forum" # behat_hooks::i_look_for_exceptions()
When I click on "Add a new discussion topic" "button" # behat_hooks::i_look_for_exceptions()
Then I should not see "Post a copy to all groups" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Subject | Teacher -> All participants |
| Message | Teacher -> All participants |
And I press "Post to forum" # behat_hooks::i_look_for_exceptions()
And I wait to be redirected # behat_hooks::i_look_for_exceptions()
And I should see "Teacher -> All participants" # behat_hooks::i_look_for_exceptions()
Scenario: Teachers can post in forum with visible groups # C:\Apache24\htdocs\integration\mod\forum\tests\behat\no_groups_in_course.feature:48
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Visible forum" # behat_hooks::i_look_for_exceptions()
When I click on "Add a new discussion topic" "button" # behat_hooks::i_look_for_exceptions()
Then I should not see "Post a copy to all groups" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Subject | Teacher -> All participants |
| Message | Teacher -> All participants |
And I press "Post to forum" # behat_hooks::i_look_for_exceptions()
And I wait to be redirected # behat_hooks::i_look_for_exceptions()
And I should see "Teacher -> All participants" # behat_hooks::i_look_for_exceptions()
Scenario: Students can post in standard forum # C:\Apache24\htdocs\integration\mod\forum\tests\behat\no_groups_in_course.feature:61
Given I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Standard forum" # behat_hooks::i_look_for_exceptions()
When I click on "Add a new discussion topic" "button" # behat_hooks::i_look_for_exceptions()
Then I should not see "Post a copy to all groups" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Subject | Student -> All participants |
| Message | Student -> All participants |
And I press "Post to forum" # behat_hooks::i_look_for_exceptions()
And I wait to be redirected # behat_hooks::i_look_for_exceptions()
And I should see "Student -> All participants" # behat_hooks::i_look_for_exceptions()
Scenario: Students cannot post in forum with separate groups # C:\Apache24\htdocs\integration\mod\forum\tests\behat\no_groups_in_course.feature:74
Given I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
When I follow "Separate forum" # behat_hooks::i_look_for_exceptions()
Then I should see "You do not have permission to add a new discussion topic for all participants." # behat_hooks::i_look_for_exceptions()
And I should not see "Add a new discussion topic" # behat_hooks::i_look_for_exceptions()
Scenario: Teachers can post in forum with visible groups # C:\Apache24\htdocs\integration\mod\forum\tests\behat\no_groups_in_course.feature:81
Given I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
When I follow "Visible forum" # behat_hooks::i_look_for_exceptions()
Then I should see "You do not have permission to add a new discussion topic for all participants." # behat_hooks::i_look_for_exceptions()
And I should not see "Add a new discussion topic" # behat_hooks::i_look_for_exceptions()
@mod @mod_feedback
Feature: Non anonymous feedback
In order to collect feedbacks
As an teacher
I need to be able to create and collect feedbacks
Background: # C:\Apache24\htdocs\integration\mod\feedback\tests\behat\non_anonymous.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname |
| user1 | Username | 1 |
| user2 | Username | 2 |
| teacher | Teacher | 3 |
| manager | Manager | 4 |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname |
| Course 1 | C1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| user1 | C1 | student |
| user2 | C1 | student |
| teacher | C1 | editingteacher |
And the following "system role assigns" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| manager | Acceptance test site | manager |
And the following "activities" exist: # behat_hooks::i_look_for_exceptions()
| activity | name | course | idnumber | anonymous | publish_stats |
| feedback | Site feedback | Acceptance test site | feedback0 | 2 | 1 |
| feedback | Course feedback | C1 | feedback1 | 2 | 1 |
When I log in as "manager" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I navigate to "Site feedback" node in "Site pages" # behat_hooks::i_look_for_exceptions()
And I click on "Edit questions" "link" in the "[role=main]" "css_element" # behat_hooks::i_look_for_exceptions()
And I add a "Multiple choice" question to the feedback with: # behat_hooks::i_look_for_exceptions()
| Question | Do you like our site? |
| Label | multichoice2 |
| Multiple choice type | Multiple choice - single answer |
| Hide the "Not selected" option | Yes |
| Multiple choice values | Yes of course\nNot at all\nI don't know |
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Guests can see non anonymous feedback on front page but can not complete # C:\Apache24\htdocs\integration\mod\feedback\tests\behat\non_anonymous.feature:41
When I follow "Site feedback" # behat_hooks::i_look_for_exceptions()
Then I should not see "Answer the questions..." # behat_hooks::i_look_for_exceptions()
And I follow "Preview" # behat_hooks::i_look_for_exceptions()
And I should see "Do you like our site?" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
Scenario: Complete non anonymous feedback on the front page as an authenticated user # C:\Apache24\htdocs\integration\mod\feedback\tests\behat\non_anonymous.feature:48
And I log in as "user1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I navigate to "Site feedback" node in "Site pages" # behat_hooks::i_look_for_exceptions()
And I follow "Preview" # behat_hooks::i_look_for_exceptions()
And I should see "Do you like our site?" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I follow "Answer the questions..." # behat_hooks::i_look_for_exceptions()
And I should see "Do you like our site?" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Yes of course | 1 |
And I press "Submit your answers" # behat_hooks::i_look_for_exceptions()
And I should not see "Submitted answers" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Complete non anonymous feedback and view analysis on the front page as an authenticated user # C:\Apache24\htdocs\integration\mod\feedback\tests\behat\non_anonymous.feature:64
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I set the following system permissions of "Authenticated user on frontpage" role: # behat_hooks::i_look_for_exceptions()
| capability | permission |
| mod/feedback:viewanalysepage | Allow |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "user1" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
When I navigate to "Site feedback" node in "Site pages" # behat_hooks::i_look_for_exceptions()
And I follow "Answer the questions..." # behat_hooks::i_look_for_exceptions()
And I should see "Do you like our site?" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Yes of course | 1 |
And I press "Submit your answers" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "user2" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
When I navigate to "Site feedback" node in "Site pages" # behat_hooks::i_look_for_exceptions()
And I follow "Answer the questions..." # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Not at all | 1 |
And I press "Submit your answers" # behat_hooks::i_look_for_exceptions()
And I follow "Submitted answers" # behat_hooks::i_look_for_exceptions()
And I should see "Submitted answers: 2" # behat_hooks::i_look_for_exceptions()
And I should see "Questions: 1" # behat_hooks::i_look_for_exceptions()
And I show chart data for the "multichoice2" feedback # behat_hooks::i_look_for_exceptions()
And I should see "Do you like our site?" # behat_hooks::i_look_for_exceptions()
And I should see "1 (50.00 %)" in the "Yes of course" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "1 (50.00 %)" in the "Not at all" "table_row" # behat_hooks::i_look_for_exceptions()
And I should not see "Show responses" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "manager" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I navigate to "Site feedback" node in "Site pages" # behat_hooks::i_look_for_exceptions()
And I click on "Show responses" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Username" # behat_hooks::i_look_for_exceptions()
And I should see "Non anonymous entries (2)" # behat_hooks::i_look_for_exceptions()
And I should not see "Anonymous entries" # behat_hooks::i_look_for_exceptions()
And I click on "," "link" in the "Username 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "(Username 1)" # behat_hooks::i_look_for_exceptions()
And I should see "Yes of course" # behat_hooks::i_look_for_exceptions()
And I follow "Back" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Non anonymous feedback in a course # C:\Apache24\htdocs\integration\mod\feedback\tests\behat\non_anonymous.feature:110
When I log in as "teacher" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Course feedback" # behat_hooks::i_look_for_exceptions()
And I click on "Edit questions" "link" in the "[role=main]" "css_element" # behat_hooks::i_look_for_exceptions()
And I add a "Multiple choice" question to the feedback with: # behat_hooks::i_look_for_exceptions()
| Question | Do you like this course? |
| Label | multichoice1 |
| Multiple choice type | Multiple choice - single answer |
| Hide the "Not selected" option | Yes |
| Multiple choice values | Yes of course\nNot at all\nI don't know |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "user1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Course feedback" # behat_hooks::i_look_for_exceptions()
And I follow "Answer the questions..." # behat_hooks::i_look_for_exceptions()
And I should see "Do you like this course?" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Yes of course | 1 |
And I press "Submit your answers" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "user2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Course feedback" # behat_hooks::i_look_for_exceptions()
And I follow "Answer the questions..." # behat_hooks::i_look_for_exceptions()
And I should see "Do you like this course?" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Not at all | 1 |
And I press "Submit your answers" # behat_hooks::i_look_for_exceptions()
And I follow "Submitted answers" # behat_hooks::i_look_for_exceptions()
And I should see "Submitted answers: 2" # behat_hooks::i_look_for_exceptions()
And I should see "Questions: 1" # behat_hooks::i_look_for_exceptions()
And I show chart data for the "multichoice1" feedback # behat_hooks::i_look_for_exceptions()
And I should see "Do you like this course?" # behat_hooks::i_look_for_exceptions()
And I should see "1 (50.00 %)" in the "Yes of course" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "1 (50.00 %)" in the "Not at all" "table_row" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Course feedback" # behat_hooks::i_look_for_exceptions()
And I follow "Preview" # behat_hooks::i_look_for_exceptions()
And I should see "Do you like this course?" # behat_hooks::i_look_for_exceptions()
And I press "Continue" # behat_hooks::i_look_for_exceptions()
And I should not see "Answer the questions..." # behat_hooks::i_look_for_exceptions()
And I click on "Show responses" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Non anonymous entries (2)" # behat_hooks::i_look_for_exceptions()
And I should not see "Anonymous" # behat_hooks::i_look_for_exceptions()
And I click on "," "link" in the "Username 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "(Username 1)" # behat_hooks::i_look_for_exceptions()
And I should see "Yes of course" # behat_hooks::i_look_for_exceptions()
And I should not see "Prev" # behat_hooks::i_look_for_exceptions()
And I follow "Next" # behat_hooks::i_look_for_exceptions()
And I should see "(Username 2)" # behat_hooks::i_look_for_exceptions()
And I should not see "Next" # behat_hooks::i_look_for_exceptions()
And I should see "Prev" # behat_hooks::i_look_for_exceptions()
And I click on "Back" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I click on "Delete entry" "link" in the "Username 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I press "Yes" # behat_hooks::i_look_for_exceptions()
And I should see "Non anonymous entries (1)" # behat_hooks::i_look_for_exceptions()
And I should not see "Username 1" # behat_hooks::i_look_for_exceptions()
And I should see "Username 2" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
@message @message_popup
Feature: Notification popover preferences
In order to modify my notification preferences
As a user
I can navigate to the preferences page from the popover
Background: # C:\Apache24\htdocs\integration\message\output\popup\tests\behat\notification_popover_preferences.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| user1 | User | 1 | user1@example.com |
@javascript
Scenario: User navigates to preferences page # C:\Apache24\htdocs\integration\message\output\popup\tests\behat\notification_popover_preferences.feature:13
Given I log in as "user1" # behat_hooks::i_look_for_exceptions()
And I open the notification popover # behat_hooks::i_look_for_exceptions()
When I follow "Notification preferences" # behat_hooks::i_look_for_exceptions()
Then I should see "Notification preferences" # behat_hooks::i_look_for_exceptions()
@message @message_popup @javascript
Feature: Notification popover unread notifications
In order to be kept informed
As a user
I am notified about relevant events in Moodle
Background: # C:\Apache24\htdocs\integration\message\output\popup\tests\behat\notification_popover_unread.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| popup_provider_mod_assign_assign_notification_permitted | permitted | message |
| message_provider_mod_assign_assign_notification_loggedin | popup | message |
| message_provider_mod_assign_assign_notification_loggedoff | popup | message |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment name |
| Description | Submit your online text |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_file_enabled | 0 |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I press "Add submission" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Online text | I'm the student first submission |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Notification popover shows correct unread count # C:\Apache24\htdocs\integration\message\output\popup\tests\behat\notification_popover_unread.feature:46
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
Then I should see "1" in the "#nav-notification-popover-container [data-region='count-container']" "css_element" # behat_hooks::i_look_for_exceptions()
And I open the notification popover # behat_hooks::i_look_for_exceptions()
And I should see "You have submitted your assignment submission for Test assignment name" in the "#nav-notification-popover-container" "css_element" # behat_hooks::i_look_for_exceptions()
@_bug_phantomjs
Scenario: Clicking a notification marks it as read # C:\Apache24\htdocs\integration\message\output\popup\tests\behat\notification_popover_unread.feature:56
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I open the notification popover # behat_hooks::i_look_for_exceptions()
And I follow "You have submitted your assignment submission for Test assignment name" # behat_hooks::i_look_for_exceptions()
Then "[data-region='count-container']" "css_element" in the "#nav-notification-popover-container" "css_element" should not be visible # behat_hooks::i_look_for_exceptions()
Scenario: Mark all notifications as read # C:\Apache24\htdocs\integration\message\output\popup\tests\behat\notification_popover_unread.feature:65
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I open the notification popover # behat_hooks::i_look_for_exceptions()
And I click on "Mark all as read" "link" in the "#nav-notification-popover-container" "css_element" # behat_hooks::i_look_for_exceptions()
And I reload the page # behat_hooks::i_look_for_exceptions()
Then "[data-region='count-container']" "css_element" in the "#nav-notification-popover-container" "css_element" should not be visible # behat_hooks::i_look_for_exceptions()
@mod @mod_assign
Feature: In an assignment, students can add and edit text online
In order to complete my submissions online
As a student
I need to submit my assignment editing an online form
@javascript
Scenario: Submit a text online and edit the submission # C:\Apache24\htdocs\integration\mod\assign\tests\behat\online_submissions.feature:8
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment name |
| Description | Submit your online text |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_onlinetext_wordlimit_enabled | 1 |
| assignsubmission_onlinetext_wordlimit | 10 |
| assignsubmission_file_enabled | 0 |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
When I press "Add submission" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Online text | This is more than 10 words. 1 2 3 4 5 6 7 8 9 10. |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Please review your submission and try again." # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Online text | I'm the student first submission |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Submitted for grading" # behat_hooks::i_look_for_exceptions()
And I should see "I'm the student first submission" # behat_hooks::i_look_for_exceptions()
And I should see "Not graded" # behat_hooks::i_look_for_exceptions()
And I press "Edit submission" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Online text | I'm the student second submission |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
Then I should see "Submitted for grading" # behat_hooks::i_look_for_exceptions()
And I should see "I'm the student second submission" # behat_hooks::i_look_for_exceptions()
And I should not see "I'm the student first submission" # behat_hooks::i_look_for_exceptions()
@javascript
Scenario: Auto-draft save online text submission # C:\Apache24\htdocs\integration\mod\assign\tests\behat\online_submissions.feature:54
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
And the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| autosavefrequency | 1 | editor_atto |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment name |
| Description | Submit your online text |
| assignsubmission_onlinetext_enabled | 1 |
| assignsubmission_file_enabled | 0 |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
When I press "Add submission" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Online text | text submission |
And I wait "2" seconds # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
When I press "Add submission" # behat_hooks::i_look_for_exceptions()
Then I should see "text submission" in the "#id_onlinetext_editoreditable" "css_element" # behat_hooks::i_look_for_exceptions()
@editor @editor_atto @atto @atto_orderedlist @_bug_phantomjs
Feature: Atto ordered list button
To format text in Atto, I need to use the ordered list button.
@javascript
Scenario: Make a list from some text # C:\Apache24\htdocs\integration\lib\editor\atto\plugins\orderedlist\tests\behat\orderedlist.feature:6
Given I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I follow "Profile" in the user menu # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I set the field "Description" to "Have you heard the news everyone's talking
Life is good 'cause everything's awesome
" # behat_hooks::i_look_for_exceptions()
And I select the text in the "Description" Atto editor # behat_hooks::i_look_for_exceptions()
When I click on "Ordered list" "button" # behat_hooks::i_look_for_exceptions()
And I press "Update profile" # behat_hooks::i_look_for_exceptions()
And I follow "Preferences" in the user menu # behat_hooks::i_look_for_exceptions()
And I follow "Editor preferences" # behat_hooks::i_look_for_exceptions()
And I set the field "Text editor" to "Plain text area" # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I click on "Edit profile" "link" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
Then I should see "- Have you heard the news everyone's talking" # behat_hooks::i_look_for_exceptions()
@mod @mod_assign @core_outcome @javascript
Feature: Outcome grading
In order to give an outcome to my student
As a teacher
I need to grade a submission
Background: # C:\Apache24\htdocs\integration\mod\assign\tests\behat\outcome_grading.feature:7
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student0 | Student | 0 | student0@example.com |
| student1 | Student | 1 | student1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student0 | C1 | student |
| student1 | C1 | student |
And the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| enableoutcomes | 1 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I navigate to "Scales" node in "Site administration > Grades" # behat_hooks::i_look_for_exceptions()
And I press "Add a new scale" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Test Scale |
| Scale | Disappointing, Excellent, Good, Very good, Excellent |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I follow "Outcomes" # behat_hooks::i_look_for_exceptions()
And I press "Add a new outcome" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Full name | Outcome Test |
| Short name | OT |
| Scale | Test Scale |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Outcomes" node in "Course administration" # behat_hooks::i_look_for_exceptions()
And I set the field "Available standard outcomes" to "Outcome Test" # behat_hooks::i_look_for_exceptions()
And I click on "#add" "css_element" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
Scenario: Giving an outcome to a student # C:\Apache24\htdocs\integration\mod\assign\tests\behat\outcome_grading.feature:44
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment name |
| Description | Test assignment description |
| assignsubmission_onlinetext_enabled | 1 |
| Outcome Test | 1 |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I press "Add submission" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Online text | My online text |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I click on "Grade" "link" in the "Student 0" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Outcome Test: | Excellent |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Ok" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
Then I should see "Outcome Test: Excellent" in the "Student 0" "table_row" # behat_hooks::i_look_for_exceptions()
And I should not see "Outcome Test: Excellent" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
Scenario: Giving an outcome to a group submission # C:\Apache24\htdocs\integration\mod\assign\tests\behat\outcome_grading.feature:77
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| student2 | Student | 2 | student2@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| student2 | C1 | student |
And the following "groups" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| Group 1 | C1 | G1 |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I expand "Users" node # behat_hooks::i_look_for_exceptions()
And I follow "Groups" # behat_hooks::i_look_for_exceptions()
And I add "Student 0 (student0@example.com)" user to "Group 1" group members # behat_hooks::i_look_for_exceptions()
And I add "Student 1 (student1@example.com)" user to "Group 1" group members # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Assignment" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Assignment name | Test assignment name |
| Description | Test assignment description |
| assignsubmission_onlinetext_enabled | 1 |
| Students submit in groups | Yes |
| Group mode | No groups |
| Outcome Test | 1 |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I press "Add submission" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Online text | My online text |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I click on "Grade" "link" in the "Student 0" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Outcome Test: | Excellent |
| Apply grades and feedback to entire group | Yes |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Ok" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
Then I should see "Outcome Test: Excellent" in the "Student 0" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Outcome Test: Excellent" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I should not see "Outcome Test: Excellent" in the "Student 2" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "Grade" "link" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Outcome Test: | Disappointing |
| Apply grades and feedback to entire group | No |
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I press "Ok" # behat_hooks::i_look_for_exceptions()
And I click on "Edit settings" "link" # behat_hooks::i_look_for_exceptions()
And I follow "Test assignment name" # behat_hooks::i_look_for_exceptions()
And I click on "View all submissions" "link" in the "Administration" "block" # behat_hooks::i_look_for_exceptions()
And I should see "Outcome Test: Excellent" in the "Student 0" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Outcome Test: Disappointing" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I should not see "Outcome Test: Disappointing" in the "Student 0" "table_row" # behat_hooks::i_look_for_exceptions()
And I should not see "Outcome Test: Excellent" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I should not see "Outcome Test: Disappointing" in the "Student 2" "table_row" # behat_hooks::i_look_for_exceptions()
And I should not see "Outcome Test: Excellent" in the "Student 2" "table_row" # behat_hooks::i_look_for_exceptions()
@report @report_outline
Feature: View an outline report
In order to ensure the outline report works as expected
As a teacher
I need to log in as a teacher and view the outline report
Background: # C:\Apache24\htdocs\integration\report\outline\tests\behat\outline.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | format |
| Course 1 | C1 | topics |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
When I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Forum" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Forum name | Forum name |
| Description | Forum description |
And I add a "Book" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Name | Book name |
| Description | Book description |
Scenario: View the outline report when only the legacy log reader is enabled # C:\Apache24\htdocs\integration\report\outline\tests\behat\outline.feature:32
Given I navigate to "Manage log stores" node in "Site administration > Plugins > Logging" # behat_hooks::i_look_for_exceptions()
And I click on "Enable" "link" in the "Legacy log" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "Disable" "link" in the "Standard log" "table_row" # behat_hooks::i_look_for_exceptions()
And the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| loglegacy | 1 | logstore_legacy |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Forum name" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Book name" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Book name" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
When I navigate to "Activity report" node in "Course administration > Reports" # behat_hooks::i_look_for_exceptions()
Then I should see "2 by 2 users" in the "Book name" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "1 by 1 users" in the "Forum name" "table_row" # behat_hooks::i_look_for_exceptions()
Scenario: View the outline report when only the standard log reader is enabled # C:\Apache24\htdocs\integration\report\outline\tests\behat\outline.feature:55
Given I navigate to "Manage log stores" node in "Site administration > Plugins > Logging" # behat_hooks::i_look_for_exceptions()
And "Enable" "link" should exist in the "Legacy log" "table_row" # behat_hooks::i_look_for_exceptions()
And "Disable" "link" should exist in the "Standard log" "table_row" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Forum name" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Book name" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Book name" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
When I navigate to "Activity report" node in "Course administration > Reports" # behat_hooks::i_look_for_exceptions()
Then I should see "2 by 2 users" in the "Book name" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "1 by 1 users" in the "Forum name" "table_row" # behat_hooks::i_look_for_exceptions()
Scenario: View the outline report when both the standard and legacy log readers are enabled # C:\Apache24\htdocs\integration\report\outline\tests\behat\outline.feature:77
Given I navigate to "Manage log stores" node in "Site administration > Plugins > Logging" # behat_hooks::i_look_for_exceptions()
And I click on "Enable" "link" in the "Legacy log" "table_row" # behat_hooks::i_look_for_exceptions()
And "Disable" "link" should exist in the "Standard log" "table_row" # behat_hooks::i_look_for_exceptions()
And the following config values are set as admin: # behat_hooks::i_look_for_exceptions()
| loglegacy | 1 | logstore_legacy |
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Forum name" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Book name" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Book name" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
When I navigate to "Activity report" node in "Course administration > Reports" # behat_hooks::i_look_for_exceptions()
Then I should see "2 by 2 users" in the "Book name" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "1 by 1 users" in the "Forum name" "table_row" # behat_hooks::i_look_for_exceptions()
Scenario: View the outline report when no log reader is enabled # C:\Apache24\htdocs\integration\report\outline\tests\behat\outline.feature:100
Given I navigate to "Manage log stores" node in "Site administration > Plugins > Logging" # behat_hooks::i_look_for_exceptions()
And "Enable" "link" should exist in the "Legacy log" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "Disable" "link" in the "Standard log" "table_row" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
When I navigate to "Activity report" node in "Course administration > Reports" # behat_hooks::i_look_for_exceptions()
Then I should see "No log reader enabled" # behat_hooks::i_look_for_exceptions()
Scenario: Multiple views from a single user are identified as not distinct # C:\Apache24\htdocs\integration\report\outline\tests\behat\outline.feature:109
Given I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Forum name" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Forum name" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Forum name" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Activity report" node in "Course administration > Reports" # behat_hooks::i_look_for_exceptions()
Then I should see "3 by 1 users" in the "Forum name" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "-" in the "Book name" "table_row" # behat_hooks::i_look_for_exceptions()
Scenario: Multiple views from multiple users are identified as not distinct # C:\Apache24\htdocs\integration\report\outline\tests\behat\outline.feature:126
Given I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Forum name" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Forum name" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Forum name" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Forum name" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Forum name" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Forum name" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Activity report" node in "Course administration > Reports" # behat_hooks::i_look_for_exceptions()
Then I should see "6 by 2 users" in the "Forum name" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "-" in the "Book name" "table_row" # behat_hooks::i_look_for_exceptions()
Scenario: No views from any users # C:\Apache24\htdocs\integration\report\outline\tests\behat\outline.feature:152
Given I log out # behat_hooks::i_look_for_exceptions()
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Activity report" node in "Course administration > Reports" # behat_hooks::i_look_for_exceptions()
Then I should see "-" in the "Forum name" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "-" in the "Book name" "table_row" # behat_hooks::i_look_for_exceptions()
@core @core_group
Feature: Group overview
In order to view an overview of the groups
As a teacher
I need to visit the group overview page
Background: # C:\Apache24\htdocs\integration\group\tests\behat\overview.feature:7
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | groupmode |
| Course 1 | C1 | 0 | 1 |
And the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student0 | Student | 0 | student0@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
| student3 | Student | 3 | student3@example.com |
| student4 | Student | 4 | student4@example.com |
| student5 | Student | 5 | student5@example.com |
| student6 | Student | 6 | student6@example.com |
| student7 | Student | 7 | student7@example.com |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student0 | C1 | student |
| student1 | C1 | student |
| student2 | C1 | student |
| student3 | C1 | student |
| student4 | C1 | student |
| student5 | C1 | student |
| student6 | C1 | student |
| student7 | C1 | student |
And the following "groups" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| Group 1 | C1 | G1 |
| Group 2 | C1 | G2 |
| Group 3 | C1 | G3 |
| Group 4 | C1 | G4 |
And the following "group members" exist: # behat_hooks::i_look_for_exceptions()
| user | group |
| student0 | G1 |
| student1 | G1 |
| student2 | G2 |
| student3 | G3 |
| student4 | G3 |
| student5 | G4 |
And the following "groupings" exist: # behat_hooks::i_look_for_exceptions()
| name | course | idnumber |
| Grouping 1 | C1 | GG1 |
| Grouping 2 | C1 | GG2 |
And the following "grouping groups" exist: # behat_hooks::i_look_for_exceptions()
| grouping | group |
| GG1 | G1 |
| GG1 | G2 |
| GG2 | G2 |
| GG2 | G3 |
Scenario: Filter the overview in various different ways # C:\Apache24\htdocs\integration\group\tests\behat\overview.feature:58
Given I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I navigate to "Groups" node in "Course administration > Users" # behat_hooks::i_look_for_exceptions()
And I follow "Overview" # behat_hooks::i_look_for_exceptions()
When I select "All" from the "Grouping" singleselect # behat_hooks::i_look_for_exceptions()
And I select "All" from the "group" singleselect # behat_hooks::i_look_for_exceptions()
Then the group overview should include groups "Group 1, Group 2" in grouping "Grouping 1" # behat_hooks::i_look_for_exceptions()
And the group overview should include groups "Group 2,Group 3" in grouping "Grouping 2" # behat_hooks::i_look_for_exceptions()
And the group overview should include groups "Group 4" in grouping "[Not in a grouping]" # behat_hooks::i_look_for_exceptions()
And the group overview should include groups "No group" in grouping "[Not in a group]" # behat_hooks::i_look_for_exceptions()
And "Student 0" "text" should exist in the "Group 1" "table_row" # behat_hooks::i_look_for_exceptions()
And "Student 1" "text" should exist in the "Group 1" "table_row" # behat_hooks::i_look_for_exceptions()
And "Student 2" "text" should exist in the "Group 2" "table_row" # behat_hooks::i_look_for_exceptions()
And "Student 3" "text" should exist in the "Group 3" "table_row" # behat_hooks::i_look_for_exceptions()
And "Student 4" "text" should exist in the "Group 3" "table_row" # behat_hooks::i_look_for_exceptions()
And "Student 5" "text" should exist in the "Group 4" "table_row" # behat_hooks::i_look_for_exceptions()
And "Student 6" "text" should exist in the "No group" "table_row" # behat_hooks::i_look_for_exceptions()
And "Student 7" "text" should exist in the "No group" "table_row" # behat_hooks::i_look_for_exceptions()
And I select "Grouping 1" from the "Grouping" singleselect # behat_hooks::i_look_for_exceptions()
And I select "All" from the "group" singleselect # behat_hooks::i_look_for_exceptions()
And the group overview should include groups "Group 1, Group 2" in grouping "Grouping 1" # behat_hooks::i_look_for_exceptions()
And "Group 3" "table_row" should not exist # behat_hooks::i_look_for_exceptions()
And "No group" "table_row" should not exist # behat_hooks::i_look_for_exceptions()
And "Student 0" "text" should exist in the "Group 1" "table_row" # behat_hooks::i_look_for_exceptions()
And "Student 1" "text" should exist in the "Group 1" "table_row" # behat_hooks::i_look_for_exceptions()
And "Student 2" "text" should exist in the "Group 2" "table_row" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 3" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 4" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 5" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 6" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 7" # behat_hooks::i_look_for_exceptions()
And I select "Grouping 2" from the "Grouping" singleselect # behat_hooks::i_look_for_exceptions()
And I select "All" from the "group" singleselect # behat_hooks::i_look_for_exceptions()
And the group overview should include groups "Group 2, Group 3" in grouping "Grouping 2" # behat_hooks::i_look_for_exceptions()
And "Group 1" "table_row" should not exist # behat_hooks::i_look_for_exceptions()
And "No group" "table_row" should not exist # behat_hooks::i_look_for_exceptions()
And "Student 2" "text" should exist in the "Group 2" "table_row" # behat_hooks::i_look_for_exceptions()
And "Student 3" "text" should exist in the "Group 3" "table_row" # behat_hooks::i_look_for_exceptions()
And "Student 4" "text" should exist in the "Group 3" "table_row" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 0" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 1" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 5" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 6" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 7" # behat_hooks::i_look_for_exceptions()
And I select "No grouping" from the "Grouping" singleselect # behat_hooks::i_look_for_exceptions()
And I select "All" from the "group" singleselect # behat_hooks::i_look_for_exceptions()
And the group overview should include groups "Group 4" in grouping "[Not in a grouping]" # behat_hooks::i_look_for_exceptions()
And the group overview should include groups "No group" in grouping "[Not in a group]" # behat_hooks::i_look_for_exceptions()
And "Group 1" "table_row" should not exist # behat_hooks::i_look_for_exceptions()
And "Group 2" "table_row" should not exist # behat_hooks::i_look_for_exceptions()
And "Group 3" "table_row" should not exist # behat_hooks::i_look_for_exceptions()
And "Student 5" "text" should exist in the "Group 4" "table_row" # behat_hooks::i_look_for_exceptions()
And "Student 6" "text" should exist in the "No group" "table_row" # behat_hooks::i_look_for_exceptions()
And "Student 7" "text" should exist in the "No group" "table_row" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 0" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 1" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 2" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 3" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 4" # behat_hooks::i_look_for_exceptions()
And I select "All" from the "Grouping" singleselect # behat_hooks::i_look_for_exceptions()
And I select "Group 1" from the "group" singleselect # behat_hooks::i_look_for_exceptions()
And the group overview should include groups "Group 1" in grouping "Grouping 1" # behat_hooks::i_look_for_exceptions()
And "Group 2" "table_row" should not exist # behat_hooks::i_look_for_exceptions()
And "Group 3" "table_row" should not exist # behat_hooks::i_look_for_exceptions()
And "Group 4" "table_row" should not exist # behat_hooks::i_look_for_exceptions()
And "No group" "table_row" should not exist # behat_hooks::i_look_for_exceptions()
And "Student 0" "text" should exist in the "Group 1" "table_row" # behat_hooks::i_look_for_exceptions()
And "Student 1" "text" should exist in the "Group 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 2" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 3" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 4" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 5" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 6" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 7" # behat_hooks::i_look_for_exceptions()
And I select "All" from the "Grouping" singleselect # behat_hooks::i_look_for_exceptions()
And I select "Group 2" from the "group" singleselect # behat_hooks::i_look_for_exceptions()
And the group overview should include groups "Group 2" in grouping "Grouping 1" # behat_hooks::i_look_for_exceptions()
And the group overview should include groups "Group 2" in grouping "Grouping 2" # behat_hooks::i_look_for_exceptions()
And "Group 1" "table_row" should not exist # behat_hooks::i_look_for_exceptions()
And "Group 3" "table_row" should not exist # behat_hooks::i_look_for_exceptions()
And "Group 4" "table_row" should not exist # behat_hooks::i_look_for_exceptions()
And "No group" "table_row" should not exist # behat_hooks::i_look_for_exceptions()
And "Student 2" "text" should exist in the "Group 2" "table_row" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 0" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 1" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 3" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 4" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 5" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 6" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 7" # behat_hooks::i_look_for_exceptions()
And I select "All" from the "Grouping" singleselect # behat_hooks::i_look_for_exceptions()
And I select "No group" from the "group" singleselect # behat_hooks::i_look_for_exceptions()
And the group overview should include groups "No group" in grouping "[Not in a group]" # behat_hooks::i_look_for_exceptions()
And "Group 1" "table_row" should not exist # behat_hooks::i_look_for_exceptions()
And "Group 2" "table_row" should not exist # behat_hooks::i_look_for_exceptions()
And "Group 3" "table_row" should not exist # behat_hooks::i_look_for_exceptions()
And "Group 4" "table_row" should not exist # behat_hooks::i_look_for_exceptions()
And "Student 6" "text" should exist in the "No group" "table_row" # behat_hooks::i_look_for_exceptions()
And "Student 7" "text" should exist in the "No group" "table_row" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 0" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 1" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 2" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 3" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 4" # behat_hooks::i_look_for_exceptions()
And I should not see "Student 5" # behat_hooks::i_look_for_exceptions()
@core @core_filepicker @_file_upload
Feature: Overwrite file feature
In order to update an existing file
As a user
I need to pick the file with the same name and select to overwrite
@javascript @_bug_phantomjs
Scenario: Upload a file in filemanager and overwrite it # C:\Apache24\htdocs\integration\repository\tests\behat\overwrite_file.feature:8
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Terry | Teacher | teacher1@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
When I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Manage private files" # behat_hooks::i_look_for_exceptions()
And I upload "lib/tests/fixtures/empty.txt" file to "Files" filemanager # behat_hooks::i_look_for_exceptions()
Then I should see "1" elements in "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I upload and overwrite "lib/tests/fixtures/empty.txt" file to "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I should see "1" elements in "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I upload "lib/tests/fixtures/empty.txt" file to "Files" filemanager as: # behat_hooks::i_look_for_exceptions()
| Save as | empty_copy.txt |
And I should see "2" elements in "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I upload and overwrite "lib/tests/fixtures/empty.txt" file to "Files" filemanager as: # behat_hooks::i_look_for_exceptions()
| Save as | empty_copy.txt |
And I should see "2" elements in "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I press "Save changes" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Folder" to section "1" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| Name | Test folder |
| Description | Test folder description |
And I add "empty.txt" file from "Private files" to "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I should see "1" elements in "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I add and overwrite "empty.txt" file from "Private files" to "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I should see "1" elements in "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I add "empty.txt" file from "Private files" to "Files" filemanager as: # behat_hooks::i_look_for_exceptions()
| Save as | empty_copy.txt |
And I should see "2" elements in "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I add and overwrite "empty.txt" file from "Private files" to "Files" filemanager as: # behat_hooks::i_look_for_exceptions()
| Save as | empty_copy.txt |
And I should see "2" elements in "Files" filemanager # behat_hooks::i_look_for_exceptions()
And I press "Save and display" # behat_hooks::i_look_for_exceptions()
And I should see "empty.txt" # behat_hooks::i_look_for_exceptions()
And I should see "empty_copy.txt" # behat_hooks::i_look_for_exceptions()
@mod @mod_wiki
Feature: A history of each wiki page is available
In order to know how a wiki page evolved over the time and how changed what
As a user
I need to check the history of a wiki page
@javascript
Scenario: Wiki page edition history changes list # C:\Apache24\htdocs\integration\mod\wiki\tests\behat\page_history.feature:8
Given the following "users" exist: # behat_hooks::i_look_for_exceptions()
| username | firstname | lastname | email |
| teacher1 | Teacher | 1 | teacher1@example.com |
| student1 | Student | 1 | student1@example.com |
| student2 | Student | 2 | student2@example.com |
And the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And the following "course enrolments" exist: # behat_hooks::i_look_for_exceptions()
| user | course | role |
| teacher1 | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And I log in as "teacher1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I turn editing mode on # behat_hooks::i_look_for_exceptions()
And I add a "Wiki" to section "1" and I fill the form with: # behat_hooks::i_look_for_exceptions()
| Wiki name | Test wiki name |
| Description | Test wiki description |
| First page name | First page |
| Wiki mode | Collaborative wiki |
And I follow "Test wiki name" # behat_hooks::i_look_for_exceptions()
And I press "Create page" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| HTML format | First edition |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
When I log in as "student1" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test wiki name" # behat_hooks::i_look_for_exceptions()
And I follow "Edit" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| HTML format | Second edition |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I log out # behat_hooks::i_look_for_exceptions()
And I log in as "student2" # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
And I follow "Test wiki name" # behat_hooks::i_look_for_exceptions()
And I follow "Edit" # behat_hooks::i_look_for_exceptions()
And I set the following fields to these values: # behat_hooks::i_look_for_exceptions()
| HTML format | Third edition |
And I press "Save" # behat_hooks::i_look_for_exceptions()
And I follow "History" # behat_hooks::i_look_for_exceptions()
And "//*[@id='region-main']/descendant::table/descendant::tr[4]" "xpath_element" should exist # behat_hooks::i_look_for_exceptions()
And I click on "1" "link" in the "Teacher 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "First edition" # behat_hooks::i_look_for_exceptions()
And I should see "Teacher 1" # behat_hooks::i_look_for_exceptions()
And I follow "History" # behat_hooks::i_look_for_exceptions()
And I click on "2" "link" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Second edition" # behat_hooks::i_look_for_exceptions()
And I should see "Student 1" # behat_hooks::i_look_for_exceptions()
And I follow "History" # behat_hooks::i_look_for_exceptions()
And I click on "3" "link" in the "Student 2" "table_row" # behat_hooks::i_look_for_exceptions()
And I should see "Third edition" # behat_hooks::i_look_for_exceptions()
And I should see "Student 2" in the "region-main" "region" # behat_hooks::i_look_for_exceptions()
And I follow "History" # behat_hooks::i_look_for_exceptions()
And I click on "comparewith" "radio" in the "Student 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I click on "compare" "radio" in the "Teacher 1" "table_row" # behat_hooks::i_look_for_exceptions()
And I press "Compare selected" # behat_hooks::i_look_for_exceptions()
And I should see "Comparing version 1 with version 3" # behat_hooks::i_look_for_exceptions()
And I follow "Next" # behat_hooks::i_look_for_exceptions()
And I should see "Comparing version 2 with version 3" # behat_hooks::i_look_for_exceptions()
@core @core_course
Feature: Course paged mode
In order to split the course in parts
As a teacher
I need to display the course in a paged mode and navigate through the different sections
@javascript @_cross_browser
Scenario Outline: Weekly and topics course formats with Javascript enabled # C:\Apache24\htdocs\integration\course\tests\behat\paged_course_navigation.feature:8
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | format | coursedisplay | numsections |
| Course 1 | C1 | 0 | | 1 | 3 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then I click on "link" in the "section" # behat_hooks::i_look_for_exceptions()
And I follow "C1" # behat_hooks::i_look_for_exceptions()
And I click on "link" in the "section" # behat_hooks::i_look_for_exceptions()
And I follow "C1" # behat_hooks::i_look_for_exceptions()
And I click on "link" in the "section" # behat_hooks::i_look_for_exceptions()
And I should see in the "div.single-section" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see in the ".single-section span.mdl-right" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see in the ".single-section" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "link" in the ".single-section" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see in the "div.single-section" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see in the ".single-section span.mdl-left" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see in the ".single-section span.mdl-right" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "link" in the ".single-section" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see in the "div.single-section" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "link" in the ".single-section" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "link" in the ".single-section" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see in the "div.single-section" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see in the ".single-section span.mdl-left" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see in the ".single-section .section-navigation" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see in the ".single-section" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see in the ".single-section" "css_element" # behat_hooks::i_look_for_exceptions()
Examples:
| courseformat | section1 | section2 | section3 | prevunexistingsection | nextunexistingsection |
| topics | "Topic 1" | "Topic 2" | "Topic 3" | "Topic 0" | "Topic 4" |
| weeks | "1 January - 7 January" | "8 January - 14 January" | "15 January - 21 January" | "25 December - 31 December" | "22 January - 28 January" |
Scenario Outline: Weekly and topics course formats with Javascript disabled # C:\Apache24\htdocs\integration\course\tests\behat\paged_course_navigation.feature:42
Given the following "courses" exist: # behat_hooks::i_look_for_exceptions()
| fullname | shortname | category | format | coursedisplay | numsections |
| Course 1 | C1 | 0 | | 1 | 3 |
And I log in as "admin" # behat_hooks::i_look_for_exceptions()
And I am on site homepage # behat_hooks::i_look_for_exceptions()
And I follow "Course 1" # behat_hooks::i_look_for_exceptions()
Then I click on "link" in the "section" # behat_hooks::i_look_for_exceptions()
And I follow "C1" # behat_hooks::i_look_for_exceptions()
And I click on "link" in the "section" # behat_hooks::i_look_for_exceptions()
And I follow "C1" # behat_hooks::i_look_for_exceptions()
And I click on "link" in the "section" # behat_hooks::i_look_for_exceptions()
And I should see in the "div.single-section" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see in the ".single-section span.mdl-right" "css_element" # behat_hooks::i_look_for_exceptions()
And I should not see in the ".single-section" "css_element" # behat_hooks::i_look_for_exceptions()
And I click on "link" in the ".single-section" "css_element" # behat_hooks::i_look_for_exceptions()
And I should see