1 @ou @ou_vle @qtype @qtype_ddimageortext
2 Feature: Test creating a drag and drop onto image question
4 In order to test my students
5 I need to be able to create drag and drop onto image questions
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 |
14 And the following "course enrolments" exist:
15 | user | course | role |
16 | teacher1 | C1 | editingteacher |
17 And I log in as "teacher1"
18 And I follow "Course 1"
19 And I navigate to "Question bank" node in "Course administration"
22 Scenario: Create a drag and drop onto image question
23 When I press "Create a new question ..."
24 And I set the field "Drag and drop onto image" to "1"
26 And I set the field "Question name" to "Drag and drop onto image 001"
27 And I set the field "Question text" to "Identify the features in this cross-section."
28 And I set the field "General feedback" to "The locations are now labelled on the diagram below."
29 And I upload "question/type/ddimageortext/tests/fixtures/oceanfloorbase.jpg" file to "Background image" filemanager
32 And I follow "Draggable items"
33 And I press "Blanks for 3 more draggable items"
35 And I set the field "id_drags_0_dragitemtype" to "Draggable text"
36 And I set the field "id_draglabel_0" to "island<br/>arc"
38 And I set the field "id_drags_1_dragitemtype" to "Draggable text"
39 And I set the field "id_draglabel_1" to "mid-ocean<br/>ridge"
41 And I set the field "id_drags_2_dragitemtype" to "Draggable text"
42 And I set the field "id_draglabel_2" to "abyssal<br/>plain"
44 And I set the field "id_drags_3_dragitemtype" to "Draggable text"
45 And I set the field "id_draglabel_3" to "continental<br/>rise"
47 And I set the field "id_drags_4_dragitemtype" to "Draggable text"
48 And I set the field "id_draglabel_4" to "ocean<br/>trench"
50 And I set the field "id_drags_5_dragitemtype" to "Draggable text"
51 And I set the field "id_draglabel_5" to "continental<br/>slope"
53 And I set the field "id_drags_6_dragitemtype" to "Draggable text"
54 And I set the field "id_draglabel_6" to "mountain<br/>belt"
56 And I set the field "id_drags_7_dragitemtype" to "Draggable text"
57 And I set the field "id_draglabel_7" to "continental<br/>shelf"
60 And I follow "Drop zones"
61 And I press "Blanks for 3 more drop zones"
63 And I set the field "id_drops_0_xleft" to "53"
64 And I set the field "id_drops_0_ytop" to "17"
65 And I set the field "id_drops_0_choice" to "7"
67 And I set the field "id_drops_1_xleft" to "172"
68 And I set the field "id_drops_1_ytop" to "2"
69 And I set the field "id_drops_1_choice" to "8"
71 And I set the field "id_drops_2_xleft" to "363"
72 And I set the field "id_drops_2_ytop" to "31"
73 And I set the field "id_drops_2_choice" to "5"
75 And I set the field "id_drops_3_xleft" to "440"
76 And I set the field "id_drops_3_ytop" to "13"
77 And I set the field "id_drops_3_choice" to "3"
79 And I set the field "id_drops_4_xleft" to "115"
80 And I set the field "id_drops_4_ytop" to "74"
81 And I set the field "id_drops_4_choice" to "6"
83 And I set the field "id_drops_5_xleft" to "210"
84 And I set the field "id_drops_5_ytop" to "94"
85 And I set the field "id_drops_5_choice" to "4"
87 And I set the field "id_drops_6_xleft" to "310"
88 And I set the field "id_drops_6_ytop" to "87"
89 And I set the field "id_drops_6_choice" to "1"
91 And I set the field "id_drops_7_xleft" to "479"
92 And I set the field "id_drops_7_ytop" to "84"
93 And I set the field "id_drops_7_choice" to "2"
95 And I press "id_submitbutton"
96 Then I should see "Drag and drop onto image 001"