1 |
efrain |
1 |
@qtype @qtype_multichoice
|
|
|
2 |
Feature: Test editing a Multiple choice question
|
|
|
3 |
As a teacher
|
|
|
4 |
In order to be able to update my Multiple choice question
|
|
|
5 |
I need to edit them
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username |
|
|
|
10 |
| teacher |
|
|
|
11 |
And the following "courses" exist:
|
|
|
12 |
| fullname | shortname | category |
|
|
|
13 |
| Course 1 | C1 | 0 |
|
|
|
14 |
And the following "course enrolments" exist:
|
|
|
15 |
| user | course | role |
|
|
|
16 |
| teacher | C1 | editingteacher |
|
|
|
17 |
And the following "question categories" exist:
|
|
|
18 |
| contextlevel | reference | name |
|
|
|
19 |
| Course | C1 | Test questions |
|
|
|
20 |
And the following "questions" exist:
|
|
|
21 |
| questioncategory | qtype | name | template |
|
|
|
22 |
| Test questions | multichoice | Multiple choice for editing | two_of_four |
|
|
|
23 |
| Test questions | multichoice | Single choice for editing | one_of_four |
|
|
|
24 |
|
|
|
25 |
Scenario: Edit a Multiple choice question with multiple response (checkboxes)
|
|
|
26 |
When I am on the "Multiple choice for editing" "core_question > edit" page logged in as teacher
|
|
|
27 |
And I set the following fields to these values:
|
|
|
28 |
| Question name | |
|
|
|
29 |
And I press "id_submitbutton"
|
|
|
30 |
And I should see "You must supply a value here."
|
|
|
31 |
And I set the following fields to these values:
|
|
|
32 |
| Question name | Edited Multiple choice name |
|
|
|
33 |
And I press "id_submitbutton"
|
|
|
34 |
Then I should see "Edited Multiple choice name"
|
|
|
35 |
|
|
|
36 |
Scenario: Edit a Multiple choice question with single response (radio buttons)
|
|
|
37 |
When I am on the "Single choice for editing" "core_question > edit" page logged in as teacher
|
|
|
38 |
And I set the following fields to these values:
|
|
|
39 |
| Question name | Edited Single choice name |
|
|
|
40 |
And I press "id_submitbutton"
|
|
|
41 |
Then I should see "Edited Single choice name"
|