1 |
efrain |
1 |
@qtype @qtype_ddwtos
|
|
|
2 |
Feature: Test creating a drag and drop into text question
|
|
|
3 |
As a teacher
|
|
|
4 |
In order to test my students
|
|
|
5 |
I need to be able to create drag and drop into text questions
|
|
|
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 |
|
|
|
18 |
@javascript
|
|
|
19 |
Scenario: Create a drag and drop into text question
|
|
|
20 |
When I am on the "Course 1" "core_question > course question bank" page logged in as teacher
|
|
|
21 |
And I add a "Drag and drop into text" question filling the form with:
|
|
|
22 |
| Question name | Drag and drop into text 001 |
|
|
|
23 |
| Question text | The [[1]] [[2]] on the [[3]]. |
|
|
|
24 |
| General feedback | The cat sat on the mat. |
|
|
|
25 |
| id_shuffleanswers | 1 |
|
|
|
26 |
| id_choices_0_answer | cat |
|
|
|
27 |
| id_choices_1_answer | sat |
|
|
|
28 |
| id_choices_2_answer | mat |
|
|
|
29 |
| id_choices_3_answer | dog |
|
|
|
30 |
| id_choices_4_answer | table |
|
|
|
31 |
| Penalty for each incorrect try | 20% |
|
|
|
32 |
| Hint 1 | First hint |
|
|
|
33 |
| Hint 2 | Second hint |
|
|
|
34 |
Then I should see "Drag and drop into text 001"
|
|
|
35 |
# Checking that the next new question form displays user preferences settings.
|
|
|
36 |
And I press "Create a new question ..."
|
|
|
37 |
And I set the field "item_qtype_ddwtos" to "1"
|
|
|
38 |
And I click on "Add" "button" in the "Choose a question type to add" "dialogue"
|
|
|
39 |
And the following fields match these values:
|
|
|
40 |
| id_shuffleanswers | 1 |
|
|
|
41 |
| Penalty for each incorrect try | 20% |
|
|
|
42 |
|
|
|
43 |
Scenario: Cannot create a drag and drop into text question when making the unsolvable questions
|
|
|
44 |
When I am on the "Course 1" "core_question > course question bank" page logged in as teacher
|
|
|
45 |
And I add a "Drag and drop into text" question filling the form with:
|
|
|
46 |
| Question name | Drag and drop into text 001 |
|
|
|
47 |
| Question text | The [[1]] [[2]] on the [[1]]. |
|
|
|
48 |
| General feedback | The cat sat on the cat. |
|
|
|
49 |
| id_shuffleanswers | 1 |
|
|
|
50 |
| id_choices_0_answer | cat |
|
|
|
51 |
| id_choices_1_answer | goes through |
|
|
|
52 |
| id_choices_2_answer | mat |
|
|
|
53 |
| id_choices_3_answer | dog |
|
|
|
54 |
| id_choices_4_answer | table |
|
|
|
55 |
| Penalty for each incorrect try | 20% |
|
|
|
56 |
| Hint 1 | First hint |
|
|
|
57 |
| Hint 2 | Second hint |
|
|
|
58 |
Then I should see "Choice [[1]] has been used more than once without being set to \"Unlimited\". Please recheck this question."
|