Línea 6... |
Línea 6... |
6 |
|
6 |
|
7 |
Background:
|
7 |
Background:
|
8 |
Given the following "users" exist:
|
8 |
Given the following "users" exist:
|
9 |
| username | firstname | lastname | email |
|
9 |
| username | firstname | lastname | email |
|
- |
|
10 |
| teacher1 | T1 | Teacher1 | teacher1@example.com |
|
10 |
| teacher1 | T1 | Teacher1 | teacher1@example.com |
|
11 |
| student1 | S1 | Student1 | student1@example.com |
|
11 |
And the following "courses" exist:
|
12 |
And the following "courses" exist:
|
12 |
| fullname | shortname | category |
|
13 |
| fullname | shortname | category |
|
13 |
| Course 1 | C1 | 0 |
|
14 |
| Course 1 | C1 | 0 |
|
14 |
And the following "course enrolments" exist:
|
15 |
And the following "course enrolments" exist:
|
15 |
| user | course | role |
|
16 |
| user | course | role |
|
- |
|
17 |
| teacher1 | C1 | editingteacher |
|
16 |
| teacher1 | C1 | editingteacher |
|
18 |
| student1 | C1 | student |
|
17 |
And the following "activities" exist:
|
19 |
And the following "activities" exist:
|
18 |
| activity | name | intro | course | idnumber |
|
20 |
| activity | name | course | idnumber | questionsperpage | navmethod |
|
19 |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 |
|
- |
|
- |
|
21 |
| quiz | Quiz 1 | C1 | quiz1 | 0 | sequential |
|
- |
|
22 |
And the following "questions" exist:
|
- |
|
23 |
| questioncategory | qtype | name | questiontext |
|
- |
|
24 |
| Default for Quiz 1 | truefalse | 1 | Question1 text |
|
- |
|
25 |
| Default for Quiz 1 | truefalse | 2 | Question2 text |
|
- |
|
26 |
| Default for Quiz 1 | truefalse | 3 | Question3 text |
|
- |
|
27 |
| Default for Quiz 1 | truefalse | 4 | Question4 text |
|
- |
|
28 |
| Default for Quiz 1 | truefalse | 5 | Question5 text |
|
- |
|
29 |
| Default for Quiz 1 | truefalse | 6 | Question6 text |
|
- |
|
30 |
| Default for Quiz 1 | truefalse | 7 | Question7 text |
|
- |
|
31 |
| Default for Quiz 1 | truefalse | 8 | Question8 text |
|
- |
|
32 |
| Default for Quiz 1 | truefalse | 9 | Question9 text |
|
- |
|
33 |
| Default for Quiz 1 | truefalse | 10 | Question10 text |
|
20 |
|
34 |
And quiz "Quiz 1" contains the following questions:
|
- |
|
35 |
| question | page |
|
- |
|
36 |
| 1 | 1 |
|
- |
|
37 |
| 2 | 1 |
|
- |
|
38 |
| 3 | 1 |
|
- |
|
39 |
| 4 | 1 |
|
- |
|
40 |
| 5 | 1 |
|
- |
|
41 |
| 6 | 1 |
|
- |
|
42 |
| 7 | 1 |
|
- |
|
43 |
| 8 | 1 |
|
21 |
When I log in as "teacher1"
|
44 |
| 9 | 1 |
|
Línea 22... |
Línea 45... |
22 |
And I am on the "Quiz 1" "mod_quiz > Edit" page
|
45 |
And I am on the "Quiz 1" "mod_quiz > Edit" page logged in as teacher1
|
23 |
|
46 |
|
24 |
@javascript
|
- |
|
25 |
Scenario: Repaginate questions with N question(s) per page as well as clicking
|
- |
|
26 |
on "add page break" or "Remove page break" icons to repaginate in any desired format.
|
- |
|
27 |
|
- |
|
28 |
# Add the first Essay question.
|
- |
|
29 |
And I open the action menu in ".page-add-actions" "css_element"
|
- |
|
30 |
And I follow "a new question"
|
- |
|
31 |
And I set the field "item_qtype_essay" to "1"
|
- |
|
32 |
And I press "submitbutton"
|
- |
|
33 |
Then I should see "Adding an Essay question"
|
- |
|
34 |
And I set the field "Question name" to "Essay 01 new"
|
- |
|
35 |
And I set the field "Question text" to "Please write 100 words about Essay 01"
|
- |
|
36 |
And I press "id_submitbutton"
|
- |
|
37 |
Then I should see "Essay 01 new" on quiz page "1"
|
- |
|
38 |
|
- |
|
39 |
# Add the second Essay question.
|
- |
|
40 |
And I open the action menu in ".page-add-actions" "css_element"
|
- |
|
41 |
And I follow "a new question"
|
- |
|
42 |
And I set the field "item_qtype_essay" to "1"
|
- |
|
43 |
And I press "submitbutton"
|
- |
|
44 |
Then I should see "Adding an Essay question"
|
- |
|
45 |
And I set the field "Question name" to "Essay 02 new"
|
- |
|
46 |
And I set the field "Question text" to "Please write 200 words about Essay 02"
|
- |
|
47 |
And I press "id_submitbutton"
|
- |
|
48 |
Then I should see "Essay 01 new" on quiz page "1"
|
- |
|
49 |
And I should see "Essay 02 new" on quiz page "1"
|
47 |
@javascript
|
- |
|
48 |
Scenario: Repaginate questions using "add page break" or "Remove page break" icons
|
- |
|
49 |
# Start repaginating.
|
- |
|
50 |
When I click on the "Add" page break icon after question "Question1 text"
|
- |
|
51 |
# Confirm that only Question 1 is on quiz page 1.
|
50 |
|
52 |
Then I should see "Question1 text" on quiz page "1"
|
51 |
# Start repaginating.
|
- |
|
- |
|
53 |
# Confirm that Question 2 ~ Question 9 are on quiz page 2.
|
- |
|
54 |
And I should see "Question2 text" on quiz page "2"
|
- |
|
55 |
And I should see "Question3 text" on quiz page "2"
|
52 |
And I should not see "Page 2"
|
56 |
And I should see "Question4 text" on quiz page "2"
|
- |
|
57 |
And I should see "Question5 text" on quiz page "2"
|
53 |
|
58 |
And I should see "Question6 text" on quiz page "2"
|
54 |
When I click on the "Add" page break icon after question "Essay 01 new"
|
59 |
And I should see "Question7 text" on quiz page "2"
|
55 |
And I should see "Essay 01 new" on quiz page "1"
|
60 |
And I should see "Question8 text" on quiz page "2"
|
56 |
And I should see "Essay 02 new" on quiz page "2"
|
61 |
And I should see "Question9 text" on quiz page "2"
|
- |
|
62 |
|
- |
|
63 |
When I click on the "Remove" page break icon after question "Question1 text"
|
57 |
|
64 |
# Confirm that all questions are on quiz page 1.
|
58 |
When I click on the "Remove" page break icon after question "Essay 01 new"
|
65 |
Then I should see "Question1 text" on quiz page "1"
|
- |
|
66 |
And I should see "Question2 text" on quiz page "1"
|
- |
|
67 |
And I should see "Question3 text" on quiz page "1"
|
- |
|
68 |
And I should see "Question4 text" on quiz page "1"
|
- |
|
69 |
And I should see "Question5 text" on quiz page "1"
|
- |
|
70 |
And I should see "Question6 text" on quiz page "1"
|
- |
|
71 |
And I should see "Question7 text" on quiz page "1"
|
- |
|
72 |
And I should see "Question8 text" on quiz page "1"
|
59 |
And I should see "Essay 01 new" on quiz page "1"
|
73 |
And I should see "Question9 text" on quiz page "1"
|
60 |
And I should see "Essay 02 new" on quiz page "1"
|
74 |
# Confirm that there is no second page.
|
61 |
And I should not see "Page 2"
|
75 |
And I should not see "Page 2" in the "region-main" "region"
|
62 |
|
76 |
|
63 |
# Add the third Essay question.
|
77 |
# Add a question.
|
- |
|
78 |
And I open the "last" add to quiz menu
|
- |
|
79 |
And I choose "from question bank" in the open action menu
|
64 |
And I open the action menu in ".page-add-actions" "css_element"
|
80 |
When I click on "Add to quiz" "link" in the "Question10 text" "table_row"
|
65 |
And I follow "a new question"
|
81 |
# Confirm that all questions are on quiz page 1.
|
66 |
And I set the field "item_qtype_essay" to "1"
|
82 |
Then I should see "Question1 text" on quiz page "1"
|
67 |
And I press "submitbutton"
|
83 |
And I should see "Question2 text" on quiz page "1"
|
68 |
Then I should see "Adding an Essay question"
|
84 |
And I should see "Question3 text" on quiz page "1"
|
69 |
And I set the field "Question name" to "Essay 03 new"
|
85 |
And I should see "Question4 text" on quiz page "1"
|
70 |
And I set the field "Question text" to "Please write 200 words about Essay 03"
|
86 |
And I should see "Question5 text" on quiz page "1"
|
71 |
And I press "id_submitbutton"
|
87 |
And I should see "Question6 text" on quiz page "1"
|
72 |
Then I should see "Essay 01 new" on quiz page "1"
|
88 |
And I should see "Question7 text" on quiz page "1"
|
73 |
And I should see "Essay 02 new" on quiz page "1"
|
89 |
And I should see "Question8 text" on quiz page "1"
|
- |
|
90 |
And I should see "Question9 text" on quiz page "1"
|
74 |
And I should see "Essay 03 new" on quiz page "1"
|
91 |
And I should see "Question10 text" on quiz page "1"
|
75 |
And I should not see "Page 2"
|
92 |
# Confirm that there is no second page.
|
76 |
And I should not see "Page 3"
|
93 |
And I should not see "Page 2" in the "region-main" "region"
|
- |
|
94 |
|
77 |
|
95 |
When I click on the "Add" page break icon after question "Question2 text"
|
78 |
When I click on the "Add" page break icon after question "Essay 02 new"
|
96 |
# Confirm that Question 1 and Question 2 are on quiz page 1.
|
- |
|
97 |
Then I should see "Question1 text" on quiz page "1"
|
79 |
And I should see "Essay 01 new" on quiz page "1"
|
98 |
And I should see "Question2 text" on quiz page "1"
|
- |
|
99 |
# Confirm that Question 3 ~ Question 10 are on quiz page 2.
|
- |
|
100 |
And I should see "Question3 text" on quiz page "2"
|
- |
|
101 |
And I should see "Question4 text" on quiz page "2"
|
- |
|
102 |
And I should see "Question5 text" on quiz page "2"
|
- |
|
103 |
And I should see "Question6 text" on quiz page "2"
|
- |
|
104 |
And I should see "Question7 text" on quiz page "2"
|
- |
|
105 |
And I should see "Question8 text" on quiz page "2"
|
- |
|
106 |
And I should see "Question9 text" on quiz page "2"
|
80 |
And I should see "Essay 02 new" on quiz page "1"
|
107 |
And I should see "Question10 text" on quiz page "2"
|
81 |
And I should see "Essay 03 new" on quiz page "2"
|
108 |
# Confirm that there is no third page.
|
82 |
And I should not see "Page 3"
|
109 |
And I should not see "Page 3" in the "region-main" "region"
|
- |
|
110 |
|
83 |
|
111 |
When I click on the "Add" page break icon after question "Question1 text"
|
- |
|
112 |
# Confirm that only Question 1 is on quiz page 1.
|
84 |
When I click on the "Add" page break icon after question "Essay 01 new"
|
113 |
Then I should see "Question1 text" on quiz page "1"
|
- |
|
114 |
# Confirm that only Question 2 is on quiz page 2.
|
85 |
And I should see "Essay 01 new" on quiz page "1"
|
115 |
And I should see "Question2 text" on quiz page "2"
|
- |
|
116 |
# Confirm that Question 3 ~ Question 10 are on quiz page 3.
|
- |
|
117 |
And I should see "Question3 text" on quiz page "3"
|
- |
|
118 |
And I should see "Question4 text" on quiz page "3"
|
- |
|
119 |
And I should see "Question5 text" on quiz page "3"
|
- |
|
120 |
And I should see "Question6 text" on quiz page "3"
|
- |
|
121 |
And I should see "Question7 text" on quiz page "3"
|
- |
|
122 |
And I should see "Question8 text" on quiz page "3"
|
86 |
And I should see "Essay 02 new" on quiz page "2"
|
123 |
And I should see "Question9 text" on quiz page "3"
|
87 |
And I should see "Essay 03 new" on quiz page "3"
|
124 |
And I should see "Question10 text" on quiz page "3"
|
- |
|
125 |
|
88 |
|
126 |
When I click on the "Remove" page break icon after question "Question2 text"
|
- |
|
127 |
# Confirm that only Question 1 is on quiz page 1.
|
89 |
When I click on the "Remove" page break icon after question "Essay 02 new"
|
128 |
Then I should see "Question1 text" on quiz page "1"
|
90 |
And I should see "Essay 01 new" on quiz page "1"
|
129 |
# Confirm that Question 2 ~ Question 10 are on quiz page 2.
|
- |
|
130 |
And I should see "Question2 text" on quiz page "2"
|
- |
|
131 |
And I should see "Question3 text" on quiz page "2"
|
- |
|
132 |
And I should see "Question4 text" on quiz page "2"
|
- |
|
133 |
And I should see "Question5 text" on quiz page "2"
|
- |
|
134 |
And I should see "Question6 text" on quiz page "2"
|
- |
|
135 |
And I should see "Question7 text" on quiz page "2"
|
- |
|
136 |
And I should see "Question8 text" on quiz page "2"
|
- |
|
137 |
And I should see "Question9 text" on quiz page "2"
|
91 |
And I should see "Essay 02 new" on quiz page "2"
|
138 |
And I should see "Question10 text" on quiz page "2"
|
92 |
And I should see "Essay 03 new" on quiz page "2"
|
139 |
# Confirm that there is no third page.
|
93 |
And I should not see "Page 3"
|
140 |
And I should not see "Page 3" in the "region-main" "region"
|
- |
|
141 |
|
- |
|
142 |
When I click on the "Remove" page break icon after question "Question1 text"
|
- |
|
143 |
# Confirm that all questions are on quiz page 1.
|
- |
|
144 |
Then I should see "Question1 text" on quiz page "1"
|
- |
|
145 |
And I should see "Question2 text" on quiz page "1"
|
94 |
|
146 |
And I should see "Question3 text" on quiz page "1"
|
95 |
When I click on the "Remove" page break icon after question "Essay 01 new"
|
147 |
And I should see "Question4 text" on quiz page "1"
|
96 |
And I should see "Essay 01 new" on quiz page "1"
|
148 |
And I should see "Question5 text" on quiz page "1"
|
97 |
And I should see "Essay 02 new" on quiz page "1"
|
149 |
And I should see "Question6 text" on quiz page "1"
|
98 |
And I should see "Essay 03 new" on quiz page "1"
|
150 |
And I should see "Question7 text" on quiz page "1"
|
- |
|
151 |
And I should see "Question8 text" on quiz page "1"
|
- |
|
152 |
And I should see "Question9 text" on quiz page "1"
|
- |
|
153 |
And I should see "Question10 text" on quiz page "1"
|
Línea 99... |
Línea 154... |
99 |
And I should not see "Page 2"
|
154 |
# Confirm that there is no second page.
|
100 |
And I should not see "Page 3"
|
155 |
And I should not see "Page 2" in the "region-main" "region"
|
101 |
|
156 |
|
102 |
# Repaginate one question per page.
|
157 |
# Repaginate to 1 question per page.
|
103 |
When I press "Repaginate"
|
158 |
When I press "Repaginate"
|
104 |
And I set the field "menuquestionsperpage" to "1"
|
159 |
And I set the field "menuquestionsperpage" to "1"
|
105 |
And I click on "Go" "button" in the "Repaginate" "dialogue"
|
160 |
And I click on "Go" "button" in the "Repaginate" "dialogue"
|
106 |
Then I should see "Essay 01 new" on quiz page "1"
|
- |
|
107 |
And I should see "Essay 02 new" on quiz page "2"
|
- |
|
108 |
And I should see "Essay 03 new" on quiz page "3"
|
- |
|
109 |
|
161 |
# Confirm there is only 1 question per page - maximum of 10 pages.
|
110 |
# Add the forth Essay question in a new page (Page 4).
|
- |
|
111 |
When I open the "Page 3" add to quiz menu
|
- |
|
112 |
And I choose "a new question" in the open action menu
|
162 |
Then I should see "Question1 text" on quiz page "1"
|
113 |
And I set the field "item_qtype_essay" to "1"
|
- |
|
114 |
And I press "submitbutton"
|
- |
|
115 |
Then I should see "Adding an Essay question"
|
- |
|
116 |
When I set the field "Question name" to "Essay 04 new"
|
163 |
And I should see "Question2 text" on quiz page "2"
|
117 |
And I set the field "Question text" to "Please write 300 words about Essay 04"
|
164 |
And I should see "Question3 text" on quiz page "3"
|
118 |
And I press "id_submitbutton"
|
165 |
And I should see "Question4 text" on quiz page "4"
|
119 |
Then I should see "Essay 01 new" on quiz page "1"
|
166 |
And I should see "Question5 text" on quiz page "5"
|
120 |
And I should see "Essay 02 new" on quiz page "2"
|
- |
|
121 |
And I should see "Essay 03 new" on quiz page "3"
|
- |
|
122 |
And I should see "Essay 04 new" on quiz page "3"
|
167 |
And I should see "Question6 text" on quiz page "6"
|
123 |
|
168 |
And I should see "Question7 text" on quiz page "7"
|
124 |
When I click on the "Add" page break icon after question "Essay 03 new"
|
169 |
And I should see "Question8 text" on quiz page "8"
|
125 |
And I should see "Essay 01 new" on quiz page "1"
|
170 |
And I should see "Question9 text" on quiz page "9"
|
Línea 126... |
Línea 171... |
126 |
And I should see "Essay 02 new" on quiz page "2"
|
171 |
And I should see "Question10 text" on quiz page "10"
|
127 |
And I should see "Essay 03 new" on quiz page "3"
|
172 |
# Confirm that there is no eleventh page.
|
128 |
And I should see "Essay 04 new" on quiz page "4"
|
173 |
And I should not see "Page 11" in the "region-main" "region"
|
129 |
|
174 |
|
- |
|
175 |
# Repaginate to 2 questions per page.
|
130 |
# Repaginate with 2 questions per page.
|
176 |
When I press "Repaginate"
|
- |
|
177 |
And I set the field "menuquestionsperpage" to "2"
|
- |
|
178 |
And I click on "Go" "button" in the "Repaginate" "dialogue"
|
- |
|
179 |
# Confirm there are only 2 questions per page - maximum of 5 pages.
|
- |
|
180 |
Then I should see "Question1 text" on quiz page "1"
|
- |
|
181 |
And I should see "Question2 text" on quiz page "1"
|
- |
|
182 |
And I should see "Question3 text" on quiz page "2"
|
- |
|
183 |
And I should see "Question4 text" on quiz page "2"
|
- |
|
184 |
And I should see "Question5 text" on quiz page "3"
|
- |
|
185 |
And I should see "Question6 text" on quiz page "3"
|
- |
|
186 |
And I should see "Question7 text" on quiz page "4"
|
- |
|
187 |
And I should see "Question8 text" on quiz page "4"
|
- |
|
188 |
And I should see "Question9 text" on quiz page "5"
|
- |
|
189 |
And I should see "Question10 text" on quiz page "5"
|
- |
|
190 |
# Confirm that there is no sixth page.
|
- |
|
191 |
And I should not see "Page 6" in the "region-main" "region"
|
131 |
When I press "Repaginate"
|
192 |
|
132 |
And I set the field "menuquestionsperpage" to "2"
|
193 |
When I click on the "Add" page break icon after question "Question9 text"
|
133 |
And I click on "Go" "button" in the "Repaginate" "dialogue"
|
194 |
# Confirm there are only 2 questions per page until Question 8.
|
- |
|
195 |
Then I should see "Question1 text" on quiz page "1"
|
- |
|
196 |
And I should see "Question2 text" on quiz page "1"
|
- |
|
197 |
And I should see "Question3 text" on quiz page "2"
|
- |
|
198 |
And I should see "Question4 text" on quiz page "2"
|
- |
|
199 |
And I should see "Question5 text" on quiz page "3"
|
- |
|
200 |
And I should see "Question6 text" on quiz page "3"
|
- |
|
201 |
And I should see "Question7 text" on quiz page "4"
|
- |
|
202 |
And I should see "Question8 text" on quiz page "4"
|
Línea 134... |
Línea 203... |
134 |
Then I should see "Essay 01 new" on quiz page "1"
|
203 |
# Confirm only Question 9 is on quiz page 5.
|
135 |
And I should see "Essay 02 new" on quiz page "1"
|
204 |
And I should see "Question9 text" on quiz page "5"
|
136 |
And I should see "Essay 03 new" on quiz page "2"
|
205 |
# Confirm Question 10 is now on quiz page 6.
|
137 |
And I should see "Essay 04 new" on quiz page "2"
|
206 |
And I should see "Question10 text" on quiz page "6"
|
- |
|
207 |
|
138 |
|
208 |
# Repaginate with unlimited questions per page (All questions on Page 1).
|
139 |
# Repaginate with unlimited questions per page (All questions on Page 1).
|
209 |
When I press "Repaginate"
|
140 |
When I press "Repaginate"
|
210 |
And I set the field "menuquestionsperpage" to "Unlimited"
|
141 |
And I set the field "menuquestionsperpage" to "Unlimited"
|
211 |
And I click on "Go" "button" in the "Repaginate" "dialogue"
|
- |
|
212 |
# Confirm all questions are on page 1.
|
- |
|
213 |
Then I should see "Question1 text" on quiz page "1"
|
- |
|
214 |
And I should see "Question2 text" on quiz page "1"
|
- |
|
215 |
And I should see "Question3 text" on quiz page "1"
|
- |
|
216 |
And I should see "Question4 text" on quiz page "1"
|
- |
|
217 |
And I should see "Question5 text" on quiz page "1"
|
- |
|
218 |
And I should see "Question6 text" on quiz page "1"
|
- |
|
219 |
And I should see "Question7 text" on quiz page "1"
|
- |
|
220 |
And I should see "Question8 text" on quiz page "1"
|
- |
|
221 |
And I should see "Question9 text" on quiz page "1"
|
- |
|
222 |
And I should see "Question10 text" on quiz page "1"
|
- |
|
223 |
# Confirm that there is no second page.
|
- |
|
224 |
And I should not see "Page 2" in the "region-main" "region"
|
- |
|
225 |
|
- |
|
226 |
@javascript
|
- |
|
227 |
Scenario: Teacher can repaginate questions using the move icon
|
- |
|
228 |
# Add page breaks.
|
- |
|
229 |
Given I click on the "Add" page break icon after question "Question3 text"
|
- |
|
230 |
And I click on the "Add" page break icon after question "Question7 text"
|
- |
|
231 |
# Move Question 6 after Question 3 using the move icon.
|
- |
|
232 |
When I move "Question6 text" to "After Question 3" in the quiz by clicking the move icon
|
- |
|
233 |
# Confirm that Question 6 moved to page 1 after Question 3.
|
- |
|
234 |
Then I should see "Question1 text" on quiz page "1"
|
- |
|
235 |
And I should see "Question2 text" on quiz page "1"
|
- |
|
236 |
And I should see "Question3 text" on quiz page "1"
|
- |
|
237 |
And I should see "Question6 text" on quiz page "1"
|
- |
|
238 |
# Confirm that Question 4, 5 and 7 remain on page 2.
|
- |
|
239 |
And I should see "Question4 text" on quiz page "2"
|
- |
|
240 |
And I should see "Question5 text" on quiz page "2"
|
- |
|
241 |
And I should see "Question7 text" on quiz page "2"
|
- |
|
242 |
# Confirm that Question 8 and 9 remain on page 3.
|
- |
|
243 |
And I should see "Question8 text" on quiz page "3"
|
- |
|
244 |
And I should see "Question9 text" on quiz page "3"
|
- |
|
245 |
# Move Question 7 and 1 after Question 9 using the move icon.
|
- |
|
246 |
When I move "Question7 text" to "After Question 9" in the quiz by clicking the move icon
|
- |
|
247 |
And I move "Question1 text" to "After Question 9" in the quiz by clicking the move icon
|
- |
|
248 |
# Confirm that Question 2, 3 and 6 remain on page 1.
|
- |
|
249 |
Then I should see "Question2 text" on quiz page "1"
|
- |
|
250 |
And I should see "Question3 text" on quiz page "1"
|
- |
|
251 |
And I should see "Question6 text" on quiz page "1"
|
- |
|
252 |
# Confirm that Question 4 and 5 remain on page 2.
|
- |
|
253 |
And I should see "Question4 text" on quiz page "2"
|
- |
|
254 |
And I should see "Question5 text" on quiz page "2"
|
- |
|
255 |
# Confirm that Question 8 and 9 remain on page 3.
|
- |
|
256 |
And I should see "Question8 text" on quiz page "3"
|
- |
|
257 |
And I should see "Question9 text" on quiz page "3"
|
- |
|
258 |
# Confirm that Question 7 and 1 moved to page 3 after Question 9.
|
- |
|
259 |
And I should see "Question7 text" on quiz page "3"
|
- |
|
260 |
And I should see "Question1 text" on quiz page "3"
|
- |
|
261 |
|
- |
|
262 |
@javascript
|
- |
|
263 |
Scenario: Quiz questions are displayed on specified page when previewed and attempted
|
- |
|
264 |
# Add page breaks.
|
- |
|
265 |
Given I click on the "Add" page break icon after question "Question3 text"
|
- |
|
266 |
And I click on the "Add" page break icon after question "Question7 text"
|
- |
|
267 |
# Move Question 1 after Question 9 .
|
- |
|
268 |
And I move "Question1 text" to "After Question 9" in the quiz by clicking the move icon
|
- |
|
269 |
And I am on the "Quiz 1" "quiz activity" page
|
- |
|
270 |
When I press "Preview quiz"
|
- |
|
271 |
# Confirm the questions displayed per page when quiz is previewed.
|
- |
|
272 |
Then I should see "Question2 text"
|
- |
|
273 |
And I should see "Question3 text"
|
- |
|
274 |
And I press "Next page"
|
- |
|
275 |
And I should see "Question4 text"
|
- |
|
276 |
And I should see "Question5 text"
|
- |
|
277 |
And I should see "Question6 text"
|
- |
|
278 |
And I should see "Question7 text"
|
- |
|
279 |
And I press "Next page"
|
- |
|
280 |
And I should see "Question8 text"
|
- |
|
281 |
And I should see "Question9 text"
|
- |
|
282 |
And I should see "Question1 text"
|
- |
|
283 |
When I am on the "Quiz 1" "quiz activity" page logged in as student1
|
- |
|
284 |
# Confirm the questions displayed per page when quiz is attempted.
|
- |
|
285 |
And I press "Attempt quiz"
|
- |
|
286 |
Then I should see "Question2 text"
|
- |
|
287 |
And I should see "Question3 text"
|
- |
|
288 |
And I press "Next page"
|
- |
|
289 |
And I should see "Question4 text"
|
- |
|
290 |
And I should see "Question5 text"
|
- |
|
291 |
And I should see "Question6 text"
|