| Línea 5... |
Línea 5... |
| 5 |
Background:
|
5 |
Background:
|
| 6 |
Given the following "courses" exist:
|
6 |
Given the following "courses" exist:
|
| 7 |
| fullname | shortname | category |
|
7 |
| fullname | shortname | category |
|
| 8 |
| Course 1 | C1 | 0 |
|
8 |
| Course 1 | C1 | 0 |
|
| 9 |
And the following "activities" exist:
|
9 |
And the following "activities" exist:
|
| 10 |
| activity | name | course | idnumber |
|
10 |
| activity | name | intro | course | idnumber |
|
| 11 |
| quiz | Test quiz | C1 | quiz1 |
|
11 |
| quiz | Test quiz | | C1 | quiz1 |
|
| - |
|
12 |
| qbank | Qbank 1 | Question bank 1 | C1 | qbank1 |
|
| - |
|
13 |
| qbank | Qbank 2 | Question bank 2 | C1 | qbank2 |
|
| 12 |
And the following "question categories" exist:
|
14 |
And the following "question categories" exist:
|
| 13 |
| contextlevel | reference | name |
|
15 |
| contextlevel | reference | name |
|
| 14 |
| Course | C1 | Test questions |
|
16 |
| Activity module | quiz1 | Test questions |
|
| - |
|
17 |
| Activity module | qbank1 | Share questions |
|
| - |
|
18 |
| Activity module | qbank2 | Share questions 2 |
|
| 15 |
And the following "questions" exist:
|
19 |
And the following "questions" exist:
|
| 16 |
| questioncategory | qtype | name | questiontext |
|
20 |
| questioncategory | qtype | name | questiontext |
|
| 17 |
| Test questions | truefalse | First question | Answer the first question |
|
21 |
| Default for Test quiz | truefalse | First question | Answer the first question |
|
| - |
|
22 |
| Default for Qbank 1 | essay | Test question to be edited | Write about whatever you want |
|
| Línea 18... |
Línea 23... |
| 18 |
|
23 |
|
| 19 |
Scenario: Enable/disable question history column from the base view
|
24 |
Scenario: Enable/disable question history column from the base view
|
| 20 |
Given I log in as "admin"
|
25 |
Given I log in as "admin"
|
| 21 |
When I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
26 |
When I navigate to "Plugins > Question bank plugins > Manage question bank plugins" in site administration
|
| Línea 40... |
Línea 45... |
| 40 |
And the "History" action should not exist for the "First question" question in the question bank
|
45 |
And the "History" action should not exist for the "First question" question in the question bank
|
| Línea 41... |
Línea 46... |
| 41 |
|
46 |
|
| 42 |
@javascript
|
47 |
@javascript
|
| 43 |
Scenario: Viewing history for a question in a non-default category
|
48 |
Scenario: Viewing history for a question in a non-default category
|
| 44 |
Given the following "question categories" exist:
|
49 |
Given the following "question categories" exist:
|
| 45 |
| contextlevel | reference | name |
|
50 |
| contextlevel | reference | name |
|
| 46 |
| Course | C1 | Test questions 2 |
|
51 |
| Activity module | quiz1 | Test questions 2 |
|
| 47 |
And the following "questions" exist:
|
52 |
And the following "questions" exist:
|
| 48 |
| questioncategory | qtype | name | questiontext |
|
53 |
| questioncategory | qtype | name | questiontext |
|
| 49 |
| Test questions 2 | truefalse | Second question | Answer the second question |
|
54 |
| Test questions 2 | truefalse | Second question | Answer the second question |
|
| 50 |
And I am on the "Test quiz" "mod_quiz > question bank" page logged in as "admin"
|
55 |
And I am on the "Test quiz" "mod_quiz > question bank" page logged in as "admin"
|
| Línea 53... |
Línea 58... |
| 53 |
Then I should see "Question history"
|
58 |
Then I should see "Question history"
|
| 54 |
And "Filter 1" "fieldset" should not exist
|
59 |
And "Filter 1" "fieldset" should not exist
|
| 55 |
And I should see "Second question"
|
60 |
And I should see "Second question"
|
| 56 |
And "Second question" "table_row" should exist
|
61 |
And "Second question" "table_row" should exist
|
| Línea -... |
Línea 62... |
| - |
|
62 |
|
| - |
|
63 |
Scenario: Viewing history for a Question in a Subcategory
|
| - |
|
64 |
Given the following "question categories" exist:
|
| - |
|
65 |
| contextlevel | reference | name |
|
| - |
|
66 |
| Activity module | quiz1 | Questions Category 1 |
|
| - |
|
67 |
And the following "question categories" exist:
|
| - |
|
68 |
| contextlevel | reference | name | questioncategory |
|
| - |
|
69 |
| Activity module | quiz1 | Subcategory 1 | Questions Category 1 |
|
| - |
|
70 |
And the following "questions" exist:
|
| - |
|
71 |
| questioncategory | qtype | name | questiontext |
|
| - |
|
72 |
| Subcategory 1 | truefalse | First question (v1) | Question version 1 |
|
| - |
|
73 |
When I am on the "Test quiz" "mod_quiz > question categories" page logged in as "admin"
|
| - |
|
74 |
And I should see "Subcategory 1"
|
| - |
|
75 |
And I click on "Subcategory 1" "link"
|
| - |
|
76 |
Then I should see "First question (v1)"
|
| - |
|
77 |
And I choose "Edit question" action for "First question (v1)" in the question bank
|
| - |
|
78 |
And I set the following fields to these values:
|
| - |
|
79 |
| Question name | First question (v2) |
|
| - |
|
80 |
| Question text | Question version 2 |
|
| - |
|
81 |
And I press "id_submitbutton"
|
| - |
|
82 |
And I choose "History" action for "First question (v2)" in the question bank
|
| - |
|
83 |
And "First question (v1)" "table_row" should exist
|
| - |
|
84 |
And "First question (v2)" "table_row" should exist
|
| 57 |
|
85 |
|
| 58 |
@javascript
|
86 |
@javascript
|
| 59 |
Scenario: Delete question from the history using Edit question menu
|
87 |
Scenario: Delete question from the history using Edit question menu
|
| 60 |
Given I am on the "Test quiz" "mod_quiz > question bank" page logged in as "admin"
|
88 |
Given I am on the "Test quiz" "mod_quiz > question bank" page logged in as "admin"
|
| 61 |
And I choose "History" action for "First question" in the question bank
|
89 |
And I choose "History" action for "First question" in the question bank
|
| Línea 64... |
Línea 92... |
| 64 |
And I should not see "First question"
|
92 |
And I should not see "First question"
|
| 65 |
Then I should see "All versions of this question have been deleted."
|
93 |
Then I should see "All versions of this question have been deleted."
|
| 66 |
And I click on "Continue" "button"
|
94 |
And I click on "Continue" "button"
|
| 67 |
And I should see "Question bank"
|
95 |
And I should see "Question bank"
|
| 68 |
And I should not see "First question"
|
96 |
And I should not see "First question"
|
| - |
|
97 |
|
| - |
|
98 |
Scenario: Resetting the columns in the question history view will return it to its default setting.
|
| - |
|
99 |
Given the following "user preferences" exist:
|
| - |
|
100 |
| user | preference | value |
|
| - |
|
101 |
| admin | qbank_columnsortorder_hiddencols | qbank_usage\question_last_used_column-question_last_used_column |
|
| - |
|
102 |
And the following "questions" exist:
|
| - |
|
103 |
| questioncategory | qtype | name | questiontext |
|
| - |
|
104 |
| Default for Test quiz | truefalse | Second question | Answer the second question |
|
| - |
|
105 |
When I am on the "Test quiz" "mod_quiz > question bank" page logged in as "admin"
|
| - |
|
106 |
And "Last used" "qbank_columnsortorder > column header" should not exist
|
| - |
|
107 |
Then I should see "First question"
|
| - |
|
108 |
And I should see "Second question"
|
| - |
|
109 |
And I choose "History" action for "First question" in the question bank
|
| - |
|
110 |
And "First question" "table_row" should exist
|
| - |
|
111 |
And "Second question" "table_row" should not exist
|
| - |
|
112 |
And "Last used" "qbank_columnsortorder > column header" should not exist
|
| - |
|
113 |
And I follow "Reset columns"
|
| - |
|
114 |
And "Last used" "qbank_columnsortorder > column header" should exist
|
| - |
|
115 |
And "First question" "table_row" should exist
|
| - |
|
116 |
And "Second question" "table_row" should not exist
|
| - |
|
117 |
|
| - |
|
118 |
Scenario: Go History page in edit question page.
|
| - |
|
119 |
Given I am on the "Test quiz" "mod_quiz > question bank" page logged in as "admin"
|
| - |
|
120 |
When I choose "Edit question" action for "First question" in the question bank
|
| - |
|
121 |
And I click on "History" "link"
|
| - |
|
122 |
Then I should see "First question"
|
| - |
|
123 |
And I follow "Close"
|
| - |
|
124 |
And the following fields match these values:
|
| - |
|
125 |
| Question text | Answer the first question |
|