1 |
efrain |
1 |
@qtype @qtype_multichoice
|
|
|
2 |
Feature: Preview a Multiple choice question
|
|
|
3 |
As a teacher
|
|
|
4 |
In order to check my Multiple choice questions will work for students
|
|
|
5 |
I need to preview 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 | Multi-choice-001 | two_of_four |
|
|
|
23 |
| Test questions | multichoice | Multi-choice-002 | one_of_four |
|
|
|
24 |
|
|
|
25 |
@javascript @_switch_window
|
|
|
26 |
Scenario: Preview a Multiple choice question and submit a partially correct response.
|
|
|
27 |
When I am on the "Multi-choice-001" "core_question > preview" page logged in as teacher
|
|
|
28 |
And I expand all fieldsets
|
|
|
29 |
And I set the field "How questions behave" to "Immediate feedback"
|
|
|
30 |
And I press "Save preview options and start again"
|
|
|
31 |
And I click on "One" "qtype_multichoice > Answer"
|
|
|
32 |
And I click on "Two" "qtype_multichoice > Answer"
|
|
|
33 |
And I press "Check"
|
|
|
34 |
Then I should see "One is odd"
|
|
|
35 |
And I should see "Two is even"
|
|
|
36 |
And I should see "Mark 0.50 out of 1.00"
|
|
|
37 |
And I should see "Parts, but only parts, of your response are correct."
|
|
|
38 |
|
|
|
39 |
@javascript @_switch_window
|
|
|
40 |
Scenario: Preview a Multiple choice question and submit a correct response.
|
|
|
41 |
When I am on the "Multi-choice-001" "core_question > preview" page logged in as teacher
|
|
|
42 |
And I expand all fieldsets
|
|
|
43 |
And I set the field "How questions behave" to "Immediate feedback"
|
|
|
44 |
And I press "Save preview options and start again"
|
|
|
45 |
And I click on "One" "qtype_multichoice > Answer"
|
|
|
46 |
And I click on "Three" "qtype_multichoice > Answer"
|
|
|
47 |
And I press "Check"
|
|
|
48 |
Then I should see "One is odd"
|
|
|
49 |
And I should see "Three is odd"
|
|
|
50 |
And I should see "Mark 1.00 out of 1.00"
|
|
|
51 |
And I should see "Well done!"
|
|
|
52 |
And I should see "The odd numbers are One and Three."
|
|
|
53 |
And I should see "The correct answers are: One, Three"
|
|
|
54 |
|
|
|
55 |
@javascript @_switch_window
|
|
|
56 |
Scenario: Preview a Multiple choice question and submit a correct response.
|
|
|
57 |
When I am on the "Multi-choice-002" "core_question > preview" page logged in as teacher
|
|
|
58 |
And I expand all fieldsets
|
|
|
59 |
And I set the field "How questions behave" to "Immediate feedback"
|
|
|
60 |
And I press "Save preview options and start again"
|
|
|
61 |
And I click on "One" "qtype_multichoice > Answer"
|
|
|
62 |
And I press "Check"
|
|
|
63 |
Then I should see "The oddest number is One."
|
|
|
64 |
And I should see "Mark 1.00 out of 1.00"
|
|
|
65 |
And I should see "Well done!"
|
|
|
66 |
And I should see "The correct answer is: One"
|
|
|
67 |
|
|
|
68 |
@javascript @_switch_window
|
|
|
69 |
Scenario: Preview a multiple choice question (single response) and clear a previous selected option.
|
|
|
70 |
When I am on the "Multi-choice-002" "core_question > preview" page logged in as teacher
|
|
|
71 |
And I expand all fieldsets
|
|
|
72 |
And I set the field "How questions behave" to "Immediate feedback"
|
|
|
73 |
And I press "Save preview options and start again"
|
|
|
74 |
And I click on "One" "qtype_multichoice > Answer"
|
|
|
75 |
Then I should see "Clear my choice"
|
|
|
76 |
And I click on "Clear my choice" "text"
|
|
|
77 |
And I should not see "Clear my choice"
|