2 Feature: An activity module instance with questions in its context can be deleted
3 In order to delete an activity module from the course
5 I need to be able to delete the activity even if it has questions created in its context
8 Given the following "users" exist:
9 | username | firstname | lastname | email |
10 | teacher1 | Teacher | 1 | teacher1@example.com |
11 And the following "courses" exist:
12 | fullname | shortname | format |
13 | Course 1 | C1 | weeks |
14 And the following "course enrolments" exist:
15 | user | course | role |
16 | teacher1 | C1 | editingteacher |
19 Scenario: Synchronously deleting a quiz with existing questions in its context
20 Given the following config values are set as admin:
21 | coursebinenable | 0 | tool_recyclebin |
22 And I log in as "teacher1"
23 And I am on "Course 1" course homepage with editing mode on
24 And I add a "Quiz" to section "1" and I fill the form with:
25 | Name | Test quiz Q001 |
26 And I add a "True/False" question to the "Test quiz" quiz with:
27 | Category | Default for Test quiz Q001 |
28 | Question name | Test used question to be deleted |
29 | Question text | Write about whatever you want |
30 And I am on "Course 1" course homepage
31 When I delete "Test quiz Q001" activity
32 Then I should not see "Test quiz Q001"