Línea 9... |
Línea 9... |
9 |
| username | firstname | lastname | email |
|
9 |
| username | firstname | lastname | email |
|
10 |
| student | Student | One | student@example.com |
|
10 |
| student | Student | One | student@example.com |
|
11 |
And the following "courses" exist:
|
11 |
And the following "courses" exist:
|
12 |
| fullname | shortname | category |
|
12 |
| fullname | shortname | category |
|
13 |
| Course 1 | C1 | 0 |
|
13 |
| Course 1 | C1 | 0 |
|
- |
|
14 |
And the following "activities" exist:
|
- |
|
15 |
| activity | name | intro | course | idnumber |
|
- |
|
16 |
| qbank | Qbank 1 | Question bank 1 | C1 | qbank1 |
|
14 |
And the following "course enrolments" exist:
|
17 |
And the following "course enrolments" exist:
|
15 |
| user | course | role |
|
18 |
| user | course | role |
|
16 |
| student | C1 | student |
|
19 |
| student | C1 | student |
|
17 |
And the following "question categories" exist:
|
20 |
And the following "question categories" exist:
|
18 |
| contextlevel | reference | name |
|
21 |
| contextlevel | reference | name |
|
19 |
| Course | C1 | Test questions |
|
22 |
| Activity module | qbank1 | Test questions |
|
20 |
And the following "questions" exist:
|
23 |
And the following "questions" exist:
|
21 |
| questioncategory | qtype | name | questiontext |
|
24 |
| questioncategory | qtype | name | questiontext |
|
22 |
| Test questions | truefalse | TF1 | Text of the first question |
|
25 |
| Test questions | truefalse | TF1 | Text of the first question |
|
Línea 23... |
Línea 26... |
23 |
|
26 |
|
Línea 102... |
Línea 105... |
102 |
And I should see "The password entered was incorrect"
|
105 |
And I should see "The password entered was incorrect"
|
103 |
And I set the field "Quiz password" to "Frog"
|
106 |
And I set the field "Quiz password" to "Frog"
|
104 |
And I press "Cancel"
|
107 |
And I press "Cancel"
|
105 |
Then I should see "Quiz 1 description"
|
108 |
Then I should see "Quiz 1 description"
|
106 |
And "Attempt quiz" "button" should be visible
|
109 |
And "Attempt quiz" "button" should be visible
|
- |
|
110 |
|
- |
|
111 |
@javascript
|
- |
|
112 |
Scenario: Quiz attempt page reloads upon navigating back using the browser's back button
|
- |
|
113 |
Given the following "activities" exist:
|
- |
|
114 |
| activity | name | intro | course | idnumber | timelimit |
|
- |
|
115 |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | 3600 |
|
- |
|
116 |
And quiz "Quiz 1" contains the following questions:
|
- |
|
117 |
| question | page |
|
- |
|
118 |
| TF1 | 1 |
|
- |
|
119 |
When I am on the "Quiz 1" "mod_quiz > View" page logged in as "student"
|
- |
|
120 |
And I press "Attempt quiz"
|
- |
|
121 |
And I should see "Your attempt will have a time limit of 1 hour. When you " in the "Start attempt" "dialogue"
|
- |
|
122 |
And I start watching to see if a new page loads
|
- |
|
123 |
And I click on "Start attempt" "button" in the "Start attempt" "dialogue"
|
- |
|
124 |
And I press the "back" button in the browser
|
- |
|
125 |
Then a new page should have loaded since I started watching
|
- |
|
126 |
And I should see "Continue your attempt"
|
- |
|
127 |
|
- |
|
128 |
@javascript
|
- |
|
129 |
Scenario: Start a quiz with pre-created attempts
|
- |
|
130 |
Given the following config values are set as admin:
|
- |
|
131 |
| precreateperiod | 1 | quiz |
|
- |
|
132 |
Given the following "activities" exist:
|
- |
|
133 |
| activity | name | intro | course | idnumber | timeopen | timelimit | quizpassword | attempts |
|
- |
|
134 |
| quiz | Quiz 1 | Quiz 1 description | C1 | quiz1 | ## now ## | 3600 | Frog | 1 |
|
- |
|
135 |
And quiz "Quiz 1" contains the following questions:
|
- |
|
136 |
| question | page |
|
- |
|
137 |
| TF1 | 1 |
|
- |
|
138 |
And quiz "Quiz 1" has pre-created attempts
|
- |
|
139 |
When I am on the "Quiz 1" "mod_quiz > View" page logged in as "student"
|
- |
|
140 |
And I press "Attempt quiz"
|
- |
|
141 |
And I set the field "Quiz password" to "Frog"
|
- |
|
142 |
And I press "Start attempt"
|
- |
|
143 |
Then I should see "Text of the first question"
|