1 |
efrain |
1 |
@qtype @qtype_ordering
|
|
|
2 |
Feature: Test creating an Ordering question
|
|
|
3 |
As a teacher
|
|
|
4 |
In order to test my students
|
|
|
5 |
I need to be able to create an Ordering question
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname | email |
|
|
|
10 |
| teacher1 | T1 | Teacher1 | teacher1@moodle.com |
|
|
|
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 |
| teacher1 | C1 | editingteacher |
|
|
|
17 |
And I am on the "Course 1" "core_question > course question bank" page logged in as "teacher1"
|
|
|
18 |
|
|
|
19 |
@javascript
|
|
|
20 |
Scenario: Create an Ordering question with 6 draggable items
|
|
|
21 |
When I add a "Ordering" question filling the form with:
|
|
|
22 |
| Question name | Ordering-001 |
|
|
|
23 |
| Question text | Put the words in correct order. |
|
|
|
24 |
| General feedback | One two three four five six |
|
|
|
25 |
| id_answer_0 | one |
|
|
|
26 |
| id_answer_1 | two |
|
|
|
27 |
| id_answer_2 | three |
|
|
|
28 |
| id_answer_3 | four |
|
|
|
29 |
| id_answer_4 | five |
|
|
|
30 |
| id_answer_5 | six |
|
|
|
31 |
| For any correct response | Your answer is correct |
|
|
|
32 |
| For any partially correct response | Your answer is partially correct |
|
|
|
33 |
| For any incorrect response | Your answer is incorrect |
|
|
|
34 |
| Hint 1 | This is your first hint |
|
|
|
35 |
| Hint 2 | This is your second hint |
|
|
|
36 |
| hintoptions[0] | 1 |
|
|
|
37 |
| hintshownumcorrect[1] | 1 |
|
|
|
38 |
| shownumcorrect | 1 |
|
|
|
39 |
Then I should see "Ordering-001"
|
|
|
40 |
|
|
|
41 |
Scenario: Ordering questions are created with only the number of hints that are defined
|
|
|
42 |
Given the following config values are set as admin:
|
|
|
43 |
| behaviour | interactive | question_preview |
|
|
|
44 |
When I add a "Ordering" question filling the form with:
|
|
|
45 |
| Question name | Ordering with one hint |
|
|
|
46 |
| Question text | Put the words in correct order. |
|
|
|
47 |
| id_answer_0 | one |
|
|
|
48 |
| id_answer_1 | two |
|
|
|
49 |
| id_answer_2 | three |
|
|
|
50 |
| Hint 1 | This is the first and only hint. |
|
|
|
51 |
| hintoptions[0] | 1 |
|
|
|
52 |
And I should see "Ordering with one hint"
|
|
|
53 |
When I am on the "Ordering with one hint" "core_question > preview" page
|
|
|
54 |
Then I should see "Tries remaining: 2"
|