Línea 12... |
Línea 12... |
12 |
| fullname | shortname | format |
|
12 |
| fullname | shortname | format |
|
13 |
| Course 1 | C1 | weeks |
|
13 |
| Course 1 | C1 | weeks |
|
14 |
And the following "course enrolments" exist:
|
14 |
And the following "course enrolments" exist:
|
15 |
| user | course | role |
|
15 |
| user | course | role |
|
16 |
| teacher1 | C1 | editingteacher |
|
16 |
| teacher1 | C1 | editingteacher |
|
- |
|
17 |
And the following "activities" exist:
|
- |
|
18 |
| activity | name | intro | course | idnumber |
|
- |
|
19 |
| qbank | Qbank 1 | Question bank 1 | C1 | qbank1 |
|
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 | essay | Test question to be deleted | Write about whatever you want |
|
25 |
| Test questions | essay | Test question to be deleted | Write about whatever you want |
|
23 |
And I am on the "Course 1" "core_question > course question bank" page logged in as "teacher1"
|
26 |
And I am on the "Qbank 1" "core_question > question bank" page logged in as "teacher1"
|
- |
|
27 |
And I apply question bank filter "Category" with value "Test questions"
|
Línea 24... |
Línea 28... |
24 |
|
28 |
|
25 |
@javascript
|
29 |
@javascript
|
26 |
Scenario: A question not used anywhere can really be deleted
|
30 |
Scenario: A question not used anywhere can really be deleted
|
27 |
When I choose "Delete" action for "Test question to be deleted" in the question bank
|
31 |
When I choose "Delete" action for "Test question to be deleted" in the question bank
|
28 |
And I press "Delete"
|
32 |
And I press "Delete"
|
29 |
And I apply question bank filter "Show hidden questions" with value "Yes"
|
33 |
And I apply question bank filter "Show hidden questions" with value "Yes"
|
Línea -... |
Línea 34... |
- |
|
34 |
Then I should not see "Test question to be deleted"
|
30 |
Then I should not see "Test question to be deleted"
|
35 |
|
31 |
|
36 |
@javascript
|
32 |
Scenario: Deleting a question can be cancelled
|
37 |
Scenario: Deleting a question can be cancelled
|
33 |
When I choose "Delete" action for "Test question to be deleted" in the question bank
|
38 |
When I choose "Delete" action for "Test question to be deleted" in the question bank
|
Línea 47... |
Línea 52... |
47 |
| name | Test used question to be deleted |
|
52 |
| name | Test used question to be deleted |
|
48 |
| questiontext | Write about whatever you want |
|
53 |
| questiontext | Write about whatever you want |
|
49 |
And quiz "Test quiz" contains the following questions:
|
54 |
And quiz "Test quiz" contains the following questions:
|
50 |
| question | page | requireprevious |
|
55 |
| question | page | requireprevious |
|
51 |
| Test used question to be deleted | 1 | 0 |
|
56 |
| Test used question to be deleted | 1 | 0 |
|
52 |
When I am on the "Course 1" "core_question > course question bank" page
|
57 |
When I am on the "Qbank 1" "core_question > question bank" page
|
- |
|
58 |
And I apply question bank filter "Category" with value "Test questions"
|
53 |
And I choose "Delete" action for "Test used question to be deleted" in the question bank
|
59 |
And I choose "Delete" action for "Test used question to be deleted" in the question bank
|
54 |
And I should see "This will delete the following question and all its versions:"
|
60 |
And I should see "This will delete the following question and all its versions:"
|
55 |
And I should see "* Denotes questions which can't be deleted because they are in use. Instead, they will be hidden in the question bank unless you set 'Show hidden questions' to 'Yes'."
|
61 |
And I should see "* Denotes questions which can't be deleted because they are in use. Instead, they will be hidden in the question bank unless you set 'Show hidden questions' to 'Yes'."
|
56 |
And I press "Delete"
|
62 |
And I press "Delete"
|
57 |
Then I should not see "Test used question to be deleted"
|
63 |
Then I should not see "Test used question to be deleted"
|
Línea 72... |
Línea 78... |
72 |
And I apply question bank filter "Show hidden questions" with value "Yes"
|
78 |
And I apply question bank filter "Show hidden questions" with value "Yes"
|
73 |
Then I should not see "Broken question"
|
79 |
Then I should not see "Broken question"
|
Línea 74... |
Línea 80... |
74 |
|
80 |
|
75 |
@javascript
|
81 |
@javascript
|
76 |
Scenario: Delete question has multiple versions in question bank page
|
- |
|
77 |
Given I am on the "Course 1" "core_question > course question bank" page logged in as "teacher1"
|
82 |
Scenario: Delete question has multiple versions in question bank page
|
78 |
When the following "core_question > updated questions" exist:
|
83 |
When the following "core_question > updated questions" exist:
|
79 |
| questioncategory | question | questiontext |
|
84 |
| questioncategory | question | questiontext |
|
80 |
| Test questions | Test question to be deleted | Test question to be deleted version 2 |
|
85 |
| Test questions | Test question to be deleted | Test question to be deleted version 2 |
|
81 |
And I choose "Delete" action for "Test question to be deleted" in the question bank
|
86 |
And I choose "Delete" action for "Test question to be deleted" in the question bank
|