1 |
efrain |
1 |
@qtype @qtype_ddimageortext
|
|
|
2 |
Feature: Test editing a drag and drop onto image questions
|
|
|
3 |
As a teacher
|
|
|
4 |
In order to be able to update my drag and drop onto image questions
|
|
|
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 | ddimageortext | Drag onto image | xsection |
|
|
|
23 |
|
|
|
24 |
@javascript
|
|
|
25 |
Scenario: Edit a drag and drop onto image question
|
|
|
26 |
When I am on the "Drag onto image" "core_question > edit" page logged in as teacher
|
|
|
27 |
And I set the following fields to these values:
|
|
|
28 |
| Question name | Edited question name |
|
|
|
29 |
And I press "id_submitbutton"
|
|
|
30 |
Then I should see "Edited question name"
|
|
|
31 |
|
|
|
32 |
Scenario: Edit a drag and drop onto image question and verify penalty works as expected
|
|
|
33 |
When I am on the "Drag onto image" "core_question > edit" page logged in as teacher
|
|
|
34 |
Then the following fields match these values:
|
|
|
35 |
| Question name | Drag onto image |
|
|
|
36 |
| Penalty for each incorrect try | 33.33333% |
|
|
|
37 |
| Penalty for each incorrect try | 0.3333333 |
|
|
|
38 |
|
|
|
39 |
Scenario: Edit a drag and drop onto image question and verify penalty works as expected with custom decimal separator
|
|
|
40 |
Given the following "language customisations" exist:
|
|
|
41 |
| component | stringid | value |
|
|
|
42 |
| core_langconfig | decsep | # |
|
|
|
43 |
When I am on the "Drag onto image" "core_question > edit" page logged in as teacher
|
|
|
44 |
Then the following fields match these values:
|
|
|
45 |
| Question name | Drag onto image |
|
|
|
46 |
| Penalty for each incorrect try | 33#33333% |
|
|
|
47 |
| Penalty for each incorrect try | 0.3333333 |
|