Commit 68cc9068 authored by Andrew Nicols's avatar Andrew Nicols
Browse files

Merge branch 'MDL-74744-master' of https://github.com/andelacruz/moodle

parents eb7131f0 8db6d451
...@@ -20,9 +20,10 @@ Feature: Forms manipulation ...@@ -20,9 +20,10 @@ Feature: Forms manipulation
Given the following "courses" exist: Given the following "courses" exist:
| fullname | shortname | category | | fullname | shortname | category |
| Course 1 | C1 | 0 | | Course 1 | C1 | 0 |
And I log in as "admin" And the following "activities" exist:
And I am on "Course 1" course homepage with editing mode on | activity | course | section | name |
And I add a "Quiz" to section "1" | 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 When I expand all fieldsets
Then I should see "Close the quiz" Then I should see "Close the quiz"
And I should see "Group mode" And I should see "Group mode"
......
...@@ -19,14 +19,13 @@ Feature: Backup user data ...@@ -19,14 +19,13 @@ Feature: Backup user data
And the following config values are set as admin: And the following config values are set as admin:
| coursebinenable | 1 | tool_recyclebin | | coursebinenable | 1 | tool_recyclebin |
| autohide | 0 | 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 @javascript
Scenario: Delete and restore a quiz with user data Scenario: Delete and restore a quiz with user data
Given I log in as "teacher1" Given I am on the "Quiz 1" "quiz activity" page logged 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 |
And I add a "True/False" question to the "Quiz 1" quiz with: And I add a "True/False" question to the "Quiz 1" quiz with:
| Question name | TF1 | | Question name | TF1 |
| Question text | First question | | Question text | First question |
...@@ -41,6 +40,8 @@ Feature: Backup user data ...@@ -41,6 +40,8 @@ Feature: Backup user data
| Correct answer | False | | Correct answer | False |
| Feedback for the response 'True'. | So you think it is true | | Feedback for the response 'True'. | So you think it is true |
| Feedback for the response 'False'. | So you think it is false | | 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 And I log out
When I am on the "Quiz 1" "quiz activity" page logged in as student1 When I am on the "Quiz 1" "quiz activity" page logged in as student1
And I press "Attempt quiz" And I press "Attempt quiz"
......
...@@ -5,11 +5,12 @@ Feature: Safe Exam Browser settings in quiz edit form ...@@ -5,11 +5,12 @@ Feature: Safe Exam Browser settings in quiz edit form
Given the following "courses" exist: Given the following "courses" exist:
| fullname | shortname | | fullname | shortname |
| Course 1 | C1 | | Course 1 | C1 |
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". Scenario: Quiz setting "Require the use of Safe Exam Browser" has all types, except "Use an existing template".
When I log in as "admin" When I am on the "Quiz 1" "quiz activity editing" page logged in as admin
And I am on "Course 1" course homepage with editing mode on
And I add a "Quiz" to section "1"
And I expand all fieldsets 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 – Configure manually"
And the "Require the use of Safe Exam Browser" select box should not contain "Yes – Use an existing template" And the "Require the use of Safe Exam Browser" select box should not contain "Yes – Use an existing template"
...@@ -21,9 +22,7 @@ Feature: Safe Exam Browser settings in quiz edit form ...@@ -21,9 +22,7 @@ Feature: Safe Exam Browser settings in quiz edit form
Given the following "quizaccess_seb > seb templates" exist: Given the following "quizaccess_seb > seb templates" exist:
| name | | name |
| Template 1 | | Template 1 |
And I log in as "admin" When I am on the "Quiz 1" "quiz activity editing" page logged in as admin
And I am on "Course 1" course homepage with editing mode on
When I add a "Quiz" to section "1"
And I expand all fieldsets 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 – Configure manually"
And the "Require the use of Safe Exam Browser" select box should contain "Yes – Use an existing template" And the "Require the use of Safe Exam Browser" select box should contain "Yes – Use an existing template"
...@@ -63,9 +62,7 @@ Feature: Safe Exam Browser settings in quiz edit form ...@@ -63,9 +62,7 @@ Feature: Safe Exam Browser settings in quiz edit form
Given the following "quizaccess_seb > seb templates" exist: Given the following "quizaccess_seb > seb templates" exist:
| name | | name |
| Template 1 | | Template 1 |
And I log in as "admin" And I am on the "Quiz 1" "quiz activity editing" page logged in as admin
And I am on "Course 1" course homepage with editing mode on
When I add a "Quiz" to section "1"
And I expand all fieldsets And I expand all fieldsets
And I set the field "Require the use of Safe Exam Browser" to "No" 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" Then I should not see "Upload Safe Exam Browser config file"
...@@ -97,9 +94,7 @@ Feature: Safe Exam Browser settings in quiz edit form ...@@ -97,9 +94,7 @@ Feature: Safe Exam Browser settings in quiz edit form
Given the following "quizaccess_seb > seb templates" exist: Given the following "quizaccess_seb > seb templates" exist:
| name | | name |
| Template 1 | | Template 1 |
And I log in as "admin" And I am on the "Quiz 1" "quiz activity editing" page logged in as admin
And I am on "Course 1" course homepage with editing mode on
When I add a "Quiz" to section "1"
And I expand all fieldsets And I expand all fieldsets
And I set the field "Require the use of Safe Exam Browser" to "Yes – Use SEB client config" 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" Then I should see "Show Safe Exam Browser download button"
...@@ -131,9 +126,7 @@ Feature: Safe Exam Browser settings in quiz edit form ...@@ -131,9 +126,7 @@ Feature: Safe Exam Browser settings in quiz edit form
Given the following "quizaccess_seb > seb templates" exist: Given the following "quizaccess_seb > seb templates" exist:
| name | | name |
| Template 1 | | Template 1 |
And I log in as "admin" And I am on the "Quiz 1" "quiz activity editing" page logged in as admin
And I am on "Course 1" course homepage with editing mode on
When I add a "Quiz" to section "1"
And I expand all fieldsets And I expand all fieldsets
And I set the field "Require the use of Safe Exam Browser" to "Yes – Upload my own config" 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" Then I should see "Upload Safe Exam Browser config file"
...@@ -165,9 +158,7 @@ Feature: Safe Exam Browser settings in quiz edit form ...@@ -165,9 +158,7 @@ Feature: Safe Exam Browser settings in quiz edit form
Given the following "quizaccess_seb > seb templates" exist: Given the following "quizaccess_seb > seb templates" exist:
| name | | name |
| Template 1 | | Template 1 |
And I log in as "admin" And I am on the "Quiz 1" "quiz activity editing" page logged in as admin
And I am on "Course 1" course homepage with editing mode on
When I add a "Quiz" to section "1"
And I expand all fieldsets And I expand all fieldsets
And I set the field "Require the use of Safe Exam Browser" to "Yes – Use an existing template" 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" Then I should see "Safe Exam Browser config template"
...@@ -201,9 +192,7 @@ Feature: Safe Exam Browser settings in quiz edit form ...@@ -201,9 +192,7 @@ Feature: Safe Exam Browser settings in quiz edit form
Given the following "quizaccess_seb > seb templates" exist: Given the following "quizaccess_seb > seb templates" exist:
| name | | name |
| Template 1 | | Template 1 |
And I log in as "admin" And I am on the "Quiz 1" "quiz activity editing" page logged in as admin
And I am on "Course 1" course homepage with editing mode on
When I add a "Quiz" to section "1"
And I expand all fieldsets And I expand all fieldsets
And I set the field "Require the use of Safe Exam Browser" to "Yes – Configure manually" 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" Then I should see "Show Safe Exam Browser download button"
......
...@@ -18,14 +18,14 @@ Feature: Settings form fields disabled if not required ...@@ -18,14 +18,14 @@ Feature: Settings form fields disabled if not required
| teacher | C1 | editingteacher | | teacher | C1 | editingteacher |
| student1 | C1 | student | | student1 | C1 | student |
| student2 | C1 | student | | student2 | C1 | student |
And the following "activities" exist:
| activity | course | section | name |
| quiz | C1 | 1 | Test quiz 1 |
@javascript @javascript
Scenario: Depending on the number of attempts, different form fields are disabled. Scenario: Depending on the number of attempts, different form fields are disabled.
When I log in as "teacher" When I am on the "Test quiz 1" "quiz activity editing" page logged in as teacher
And I am on "Course 1" course homepage with editing mode on
And I add a "Quiz" to section "1"
And I expand all fieldsets And I expand all fieldsets
And I set the field "Name" to "Test quiz"
And I set the field "Attempts allowed" to "1" And I set the field "Attempts allowed" to "1"
Then the "Grading method" "field" should be disabled Then the "Grading method" "field" should be disabled
And the "Each attempt builds on the last" "field" should be disabled And the "Each attempt builds on the last" "field" should be disabled
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment