1441 |
ariadna |
1 |
@mod @mod_quiz
|
|
|
2 |
Feature: Blocks can be displayed on quiz attempt pages
|
|
|
3 |
In order to see blocks on quiz attempt pages
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to be able to set blocks display settings for quiz
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username |
|
|
|
10 |
| student |
|
|
|
11 |
And the following "courses" exist:
|
|
|
12 |
| fullname | shortname |
|
|
|
13 |
| Course 1 | C1 |
|
|
|
14 |
And the following "course enrolments" exist:
|
|
|
15 |
| user | course | role |
|
|
|
16 |
| student | C1 | student |
|
|
|
17 |
|
|
|
18 |
Scenario Outline: Blocks display on quiz attempt pages can be toggled
|
|
|
19 |
Given the following "activities" exist:
|
|
|
20 |
| activity | course | name | idnumber | showblocks |
|
|
|
21 |
| quiz | C1 | Quiz 1 | q1 | <blockdisplay> |
|
|
|
22 |
And the following "question categories" exist:
|
|
|
23 |
| contextlevel | reference | name |
|
|
|
24 |
| Activity module | q1 | Test questions |
|
|
|
25 |
And the following "questions" exist:
|
|
|
26 |
| questioncategory | qtype | name |
|
|
|
27 |
| Test questions | truefalse | TF1 |
|
|
|
28 |
And quiz "Quiz 1" contains the following questions:
|
|
|
29 |
| question | page |
|
|
|
30 |
| TF1 | 1 |
|
|
|
31 |
And the following "blocks" exist:
|
|
|
32 |
| blockname | contextlevel | reference | pagetypepattern | defaultregion |
|
|
|
33 |
| comments | Activity module | q1 | mod-quiz-attempt | side-pre |
|
|
|
34 |
When I am on the "Quiz 1" "quiz activity" page logged in as student
|
|
|
35 |
And I press "Attempt quiz"
|
|
|
36 |
Then "Comments" "block" <blockvisibility> exist
|
|
|
37 |
|
|
|
38 |
Examples:
|
|
|
39 |
| blockdisplay | blockvisibility |
|
|
|
40 |
| 1 | should |
|
|
|
41 |
| 0 | should not |
|