| Línea 12... |
Línea 12... |
| 12 |
| username | firstname | lastname | email |
|
12 |
| username | firstname | lastname | email |
|
| 13 |
| teacher | Teacher | 1 | teacher@example.com |
|
13 |
| teacher | Teacher | 1 | teacher@example.com |
|
| 14 |
And the following "course enrolments" exist:
|
14 |
And the following "course enrolments" exist:
|
| 15 |
| user | course | role |
|
15 |
| user | course | role |
|
| 16 |
| teacher | C1 | editingteacher |
|
16 |
| teacher | C1 | editingteacher |
|
| 17 |
And the following "question categories" exist:
|
- |
|
| 18 |
| contextlevel | reference | name |
|
- |
|
| 19 |
| Course | C1 | Test questions |
|
- |
|
| 20 |
And the following "activities" exist:
|
17 |
And the following "activities" exist:
|
| 21 |
| activity | name | course | idnumber |
|
18 |
| activity | name | course | idnumber |
|
| 22 |
| quiz | Quiz 1 | C1 | quiz1 |
|
19 |
| quiz | Quiz 1 | C1 | quiz1 |
|
| - |
|
20 |
And the following "question categories" exist:
|
| - |
|
21 |
| contextlevel | reference | name |
|
| - |
|
22 |
| Activity module | quiz1 | Test questions |
|
| 23 |
And the following "questions" exist:
|
23 |
And the following "questions" exist:
|
| 24 |
| questioncategory | qtype | name | questiontext |
|
24 |
| questioncategory | qtype | name | questiontext |
|
| 25 |
| Test questions | truefalse | First question | Answer the first question |
|
25 |
| Test questions | truefalse | First question | Answer the first question |
|
| 26 |
| Test questions | truefalse | Other question | Answer the first question |
|
26 |
| Test questions | truefalse | Other question | Answer the first question |
|
| 27 |
And quiz "Quiz 1" contains the following questions:
|
27 |
And quiz "Quiz 1" contains the following questions:
|
| Línea 105... |
Línea 105... |
| 105 |
@javascript
|
105 |
@javascript
|
| 106 |
Scenario: Adding a question from question bank should have always latest in the version selection
|
106 |
Scenario: Adding a question from question bank should have always latest in the version selection
|
| 107 |
When I am on the "Quiz 1" "mod_quiz > Edit" page logged in as "teacher"
|
107 |
When I am on the "Quiz 1" "mod_quiz > Edit" page logged in as "teacher"
|
| 108 |
And I open the "Page 1" add to quiz menu
|
108 |
And I open the "Page 1" add to quiz menu
|
| 109 |
And I follow "from question bank"
|
109 |
And I follow "from question bank"
|
| - |
|
110 |
And I apply question bank filter "Category" with value "Test questions"
|
| 110 |
And I click on "Select" "checkbox" in the "Other question" "table_row"
|
111 |
And I click on "Select" "checkbox" in the "Other question" "table_row"
|
| 111 |
And I press "Add selected questions to the quiz"
|
112 |
And I press "Add selected questions to the quiz"
|
| 112 |
Then I should see "Other question" on quiz page "1"
|
113 |
Then I should see "Other question" on quiz page "1"
|
| 113 |
And the field "version" in the "Other question" "list_item" matches value "Always latest"
|
114 |
And the field "version" in the "Other question" "list_item" matches value "Always latest"
|
| Línea 116... |
Línea 117... |
| 116 |
Scenario: Adding a question where all available versions are drafts should display a helpful message.
|
117 |
Scenario: Adding a question where all available versions are drafts should display a helpful message.
|
| 117 |
Given quiz "Quiz 1" contains the following questions:
|
118 |
Given quiz "Quiz 1" contains the following questions:
|
| 118 |
| question | page |
|
119 |
| question | page |
|
| 119 |
| First question | 1 |
|
120 |
| First question | 1 |
|
| 120 |
And I am on the "Quiz 1" "mod_quiz > Question bank" page logged in as teacher
|
121 |
And I am on the "Quiz 1" "mod_quiz > Question bank" page logged in as teacher
|
| - |
|
122 |
And I apply question bank filter "Category" with value "Test questions"
|
| 121 |
And I set the field "question_status_dropdown" in the "First question" "table_row" to "Draft"
|
123 |
And I set the field "question_status_dropdown" in the "First question" "table_row" to "Draft"
|
| 122 |
When I am on the "Quiz 1" "mod_quiz > Edit" page
|
124 |
When I am on the "Quiz 1" "mod_quiz > Edit" page
|
| 123 |
Then I should see "This question is in draft status. To use it in the quiz, go to the question bank and change the status to ready."
|
125 |
Then I should see "This question is in draft status. To use it in the quiz, go to the question bank and change the status to ready."
|
| Línea 124... |
Línea 126... |
| 124 |
|
126 |
|