1 |
efrain |
1 |
@mod @mod_quiz
|
|
|
2 |
Feature: Display of information before starting a quiz
|
|
|
3 |
As a student
|
|
|
4 |
In order to start a quiz with confidence
|
|
|
5 |
I need information about the quiz settings before I start an attempt
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname | email |
|
|
|
10 |
| student | Student | One | student@example.com |
|
|
|
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 |
| student | C1 | student |
|
|
|
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 | questiontext |
|
|
|
22 |
| Test questions | truefalse | TF1 | Text of the first question |
|
|
|
23 |
|
|
|
24 |
Scenario: Check the pass grade is displayed
|
|
|
25 |
Given the following "activities" exist:
|
|
|
26 |
| activity | name | intro | course | idnumber | gradepass |
|
|
|
27 |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | 60.00 |
|
|
|
28 |
And quiz "Quiz 1" contains the following questions:
|
|
|
29 |
| question | page |
|
|
|
30 |
| TF1 | 1 |
|
|
|
31 |
When I am on the "Quiz 1" "mod_quiz > View" page logged in as "student"
|
|
|
32 |
Then I should see "Grade to pass: 60.00 out of 100.00"
|
|
|
33 |
|
|
|
34 |
Scenario: Check the pass grade is displayed with custom decimal separator
|
|
|
35 |
Given the following "language customisations" exist:
|
|
|
36 |
| component | stringid | value |
|
|
|
37 |
| core_langconfig | decsep | # |
|
|
|
38 |
And the following "activities" exist:
|
|
|
39 |
| activity | name | intro | course | idnumber | gradepass |
|
|
|
40 |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | 60#00 |
|
|
|
41 |
And quiz "Quiz 1" contains the following questions:
|
|
|
42 |
| question | page |
|
|
|
43 |
| TF1 | 1 |
|
|
|
44 |
When I am on the "Quiz 1" "mod_quiz > View" page logged in as "student"
|
|
|
45 |
Then I should see "Grade to pass: 60#00 out of 100#00"
|
|
|
46 |
|
|
|
47 |
Scenario: Check the pass grade is not displayed if not set
|
|
|
48 |
Given the following "activities" exist:
|
|
|
49 |
| activity | name | intro | course | idnumber | gradepass |
|
|
|
50 |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | |
|
|
|
51 |
And quiz "Quiz 1" contains the following questions:
|
|
|
52 |
| question | page |
|
|
|
53 |
| TF1 | 1 |
|
|
|
54 |
When I am on the "Quiz 1" "mod_quiz > View" page logged in as "student"
|
|
|
55 |
Then I should not see "Grade to pass: 0.00"
|