Skip to content

Commit

Permalink
Merge branch 'MDL-74744-311' of https://github.com/andelacruz/moodle
Browse files Browse the repository at this point in the history
…into MOODLE_311_STABLE
  • Loading branch information
andrewnicols committed Jun 30, 2022
2 parents ce8237d + ca14e2d commit ef6a03e
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 22 deletions.
7 changes: 4 additions & 3 deletions admin/tool/behat/tests/behat/manipulate_forms.feature
Expand Up @@ -20,9 +20,10 @@ Feature: Forms manipulation
Given the following "courses" exist:
| fullname | shortname | category |
| Course 1 | C1 | 0 |
And I log in as "admin"
And I am on "Course 1" course homepage with editing mode on
And I add a "Quiz" to section "1"
And the following "activities" exist:
| activity | course | section | name |
| quiz | C1 | 1 | Quiz 1 |
And I am on the "Quiz 1" "quiz activity editing" page logged in as admin
When I expand all fieldsets
Then I should see "Close the quiz"
And I should see "Group mode"
Expand Down
11 changes: 6 additions & 5 deletions admin/tool/recyclebin/tests/behat/backup_user_data.feature
Expand Up @@ -19,14 +19,13 @@ Feature: Backup user data
And the following config values are set as admin:
| coursebinenable | 1 | tool_recyclebin |
| autohide | 0 | tool_recyclebin |
And the following "activities" exist:
| activity | course | section | name | intro |
| quiz | C1 | 1 | Quiz 1 | Test quiz description |

@javascript
Scenario: Delete and restore a quiz with user data
Given I log in as "teacher1"
And I am on "Course 1" course homepage with editing mode on
And I add a "Quiz" to section "1" and I fill the form with:
| Name | Quiz 1 |
| Description | Test quiz description |
Given I am on the "Quiz 1" "quiz activity" page logged in as teacher1
And I add a "True/False" question to the "Quiz 1" quiz with:
| Question name | TF1 |
| Question text | First question |
Expand All @@ -41,6 +40,8 @@ Feature: Backup user data
| 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 set the field "maxgrade" to "10.0"
And I press "savechanges"
And I log out
When I am on the "Quiz 1" "quiz activity" page logged in as student1
And I press "Attempt quiz now"
Expand Down
20 changes: 10 additions & 10 deletions mod/quiz/accessrule/seb/tests/behat/edit_form.feature
Expand Up @@ -5,12 +5,12 @@ Feature: Safe Exam Browser settings in quiz edit form
Given the following "courses" exist:
| fullname | shortname |
| Course 1 | C1 |
And I log in as "admin"
And I am on "Course 1" course homepage
And I turn editing mode on
And the following "activities" exist:
| activity | course | section | name |
| quiz | C1 | 1 | Quiz 1 |

Scenario: Quiz setting "Require the use of Safe Exam Browser" has all types, except "Use an existing template".
When I add a "Quiz" to section "1"
When I am on the "Quiz 1" "quiz activity editing" page logged in as admin
And I expand all fieldsets
And the "Require the use of Safe Exam Browser" select box should contain "Yes – Configure manually"
And the "Require the use of Safe Exam Browser" select box should not contain "Yes – Use an existing template"
Expand All @@ -22,7 +22,7 @@ Feature: Safe Exam Browser settings in quiz edit form
Given the following "quizaccess_seb > seb templates" exist:
| name |
| Template 1 |
When I add a "Quiz" to section "1"
When I am on the "Quiz 1" "quiz activity editing" page logged in as admin
And I expand all fieldsets
And the "Require the use of Safe Exam Browser" select box should contain "Yes – Configure manually"
And the "Require the use of Safe Exam Browser" select box should contain "Yes – Use an existing template"
Expand All @@ -34,7 +34,7 @@ Feature: Safe Exam Browser settings in quiz edit form
Given the following "quizaccess_seb > seb templates" exist:
| name |
| Template 1 |
When I add a "Quiz" to section "1"
When I am on the "Quiz 1" "quiz activity editing" page logged in as admin
And I expand all fieldsets
And I set the field "Require the use of Safe Exam Browser" to "No"
Then I should not see "Upload Safe Exam Browser config file"
Expand Down Expand Up @@ -66,7 +66,7 @@ Feature: Safe Exam Browser settings in quiz edit form
Given the following "quizaccess_seb > seb templates" exist:
| name |
| Template 1 |
When I add a "Quiz" to section "1"
And I am on the "Quiz 1" "quiz activity editing" page logged in as admin
And I expand all fieldsets
And I set the field "Require the use of Safe Exam Browser" to "Yes – Use SEB client config"
Then I should see "Show Safe Exam Browser download button"
Expand Down Expand Up @@ -98,7 +98,7 @@ Feature: Safe Exam Browser settings in quiz edit form
Given the following "quizaccess_seb > seb templates" exist:
| name |
| Template 1 |
When I add a "Quiz" to section "1"
And I am on the "Quiz 1" "quiz activity editing" page logged in as admin
And I expand all fieldsets
And I set the field "Require the use of Safe Exam Browser" to "Yes – Upload my own config"
Then I should see "Upload Safe Exam Browser config file"
Expand Down Expand Up @@ -130,7 +130,7 @@ Feature: Safe Exam Browser settings in quiz edit form
Given the following "quizaccess_seb > seb templates" exist:
| name |
| Template 1 |
When I add a "Quiz" to section "1"
And I am on the "Quiz 1" "quiz activity editing" page logged in as admin
And I expand all fieldsets
And I set the field "Require the use of Safe Exam Browser" to "Yes – Use an existing template"
Then I should see "Safe Exam Browser config template"
Expand Down Expand Up @@ -164,7 +164,7 @@ Feature: Safe Exam Browser settings in quiz edit form
Given the following "quizaccess_seb > seb templates" exist:
| name |
| Template 1 |
When I add a "Quiz" to section "1"
And I am on the "Quiz 1" "quiz activity editing" page logged in as admin
And I expand all fieldsets
And I set the field "Require the use of Safe Exam Browser" to "Yes – Configure manually"
Then I should see "Show Safe Exam Browser download button"
Expand Down
8 changes: 4 additions & 4 deletions mod/quiz/tests/behat/settings_form_fields_disableif.feature
Expand Up @@ -18,14 +18,14 @@ Feature: Settings form fields disabled if not required
| teacher | C1 | editingteacher |
| student1 | C1 | student |
| student2 | C1 | student |
And the following "activities" exist:
| activity | course | section | name |
| quiz | C1 | 1 | Test quiz 1 |

@javascript
Scenario: Depending on the number of attempts, different form fields are disabled.
When I log in as "teacher"
And I am on "Course 1" course homepage with editing mode on
And I add a "Quiz" to section "1"
When I am on the "Test quiz 1" "quiz activity editing" page logged in as teacher
And I expand all fieldsets
And I set the field "Name" to "Test quiz"
And I set the field "Attempts allowed" to "1"
Then the "Grading method" "field" should be disabled
And the "Each attempt builds on the last" "field" should be disabled
Expand Down

0 comments on commit ef6a03e

Please sign in to comment.