MDL-70153 qtype_essay: Add behat test for attachments max size
[moodle.git] / question / type / ddimageortext / tests / behat / backup_and_restore.feature
CommitLineData
096b0405 1@qtype @qtype_ddimageortext
42865c84
TH
2Feature: Test duplicating a quiz containing a drag and drop onto image question
3 As a teacher
4 In order re-use my courses containing drag and drop onto image questions
5 I need to be able to backup and restore them
6
7 Background:
8 And the following "courses" exist:
9 | fullname | shortname | category |
10 | Course 1 | C1 | 0 |
11 And the following "question categories" exist:
12 | contextlevel | reference | name |
13 | Course | C1 | Test questions |
14 And the following "questions" exist:
15 | questioncategory | qtype | name | template |
16 | Test questions | ddimageortext | Drag onto image | xsection |
17 And the following "activities" exist:
18 | activity | name | course | idnumber |
19 | quiz | Test quiz | C1 | quiz1 |
20 And quiz "Test quiz" contains the following questions:
21 | Drag onto image | 1 |
22 And I log in as "admin"
fdeeaff9 23 And I am on "Course 1" course homepage
42865c84
TH
24
25 @javascript
26 Scenario: Backup and restore a course containing a drag and drop onto image question
27 When I backup "Course 1" course using this options:
28 | Confirmation | Filename | test_backup.mbz |
29 And I restore "test_backup.mbz" backup into a new course using this options:
30 | Schema | Course name | Course 2 |
02fda279 31 And I navigate to "Question bank" in current page administration
9c14b28d 32 And I choose "Edit question" action for "Drag onto image" in the question bank
42865c84
TH
33 Then the following fields match these values:
34 | Question name | Drag onto image |
35 | General feedback | <p>More information about the major features of the Earth's surface can be found in Block 3, Section 6.2.</p> |
36 | Default mark | 1 |
37 | Shuffle | 0 |
38 | id_drags_0_dragitemtype | Draggable text |
39 | id_drags_0_draggroup | 1 |
40 | id_draglabel_0 | island<br/>arc |
41 | id_drags_1_dragitemtype | Draggable text |
42 | id_drags_1_draggroup | 1 |
43 | id_draglabel_1 | mid-ocean<br/>ridge |
44 | id_drags_2_dragitemtype | Draggable text |
45 | id_drags_2_draggroup | 1 |
46 | id_draglabel_2 | abyssal<br/>plain |
47 | id_drags_3_dragitemtype | Draggable text |
48 | id_drags_3_draggroup | 1 |
49 | id_draglabel_3 | continental<br/>rise |
50 | id_drags_4_dragitemtype | Draggable text |
51 | id_drags_4_draggroup | 1 |
52 | id_draglabel_4 | ocean<br/>trench |
53 | id_drags_5_dragitemtype | Draggable text |
54 | id_drags_5_draggroup | 1 |
55 | id_draglabel_5 | continental<br/>slope |
56 | id_drags_6_dragitemtype | Draggable text |
57 | id_drags_6_draggroup | 1 |
58 | id_draglabel_6 | mountain<br/>belt |
59 | id_drags_7_dragitemtype | Draggable text |
60 | id_drags_7_draggroup | 1 |
61 | id_draglabel_7 | continental<br/>shelf |
62 | id_drops_0_xleft | 53 |
63 | id_drops_0_ytop | 17 |
64 | id_drops_0_choice | 7. mountainbelt |
65 | id_drops_1_xleft | 172 |
66 | id_drops_1_ytop | 2 |
67 | id_drops_1_choice | 8. continentalshelf |
68 | id_drops_2_xleft | 363 |
69 | id_drops_2_ytop | 31 |
70 | id_drops_2_choice | 5. oceantrench |
71 | id_drops_3_xleft | 440 |
72 | id_drops_3_ytop | 13 |
73 | id_drops_3_choice | 3. abyssalplain |
74 | id_drops_4_xleft | 115 |
75 | id_drops_4_ytop | 74 |
76 | id_drops_4_choice | 6. continentalslope |
77 | id_drops_5_xleft | 210 |
78 | id_drops_5_ytop | 94 |
79 | id_drops_5_choice | 4. continentalrise |
80 | id_drops_6_xleft | 310 |
81 | id_drops_6_ytop | 87 |
82 | id_drops_6_choice | 1. islandarc |
83 | id_drops_7_xleft | 479 |
84 | id_drops_7_ytop | 84 |
85 | id_drops_7_choice | 2. mid-oceanridge |
86 | For any correct response | Well done! |
87 | For any partially correct response | Parts, but only parts, of your response are correct. |
88 | id_shownumcorrect | 1 |
89 | For any incorrect response | That is not right at all. |
90 | Penalty for each incorrect try | 0.3333333 |
91 | Hint 1 | Incorrect placements will be removed. |
92 | id_hintclearwrong_0 | 1 |
93 | id_hintshownumcorrect_0 | 1 |
94 | id_hintclearwrong_1 | 0 |
95 | id_hintshownumcorrect_1 | 1 |
96 | Hint 3 | Incorrect placements will be removed. |
97 | id_hintclearwrong_2 | 1 |
98 | id_hintshownumcorrect_2 | 1 |
99 | id_hintclearwrong_3 | 0 |
100 | id_hintshownumcorrect_3 | 1 |