1 |
efrain |
1 |
@core @core_backup
|
|
|
2 |
Feature: Option to include groups and groupings when importing a course to another course
|
|
|
3 |
In order to import a course to another course with groups and groupings
|
|
|
4 |
As a teacher
|
|
|
5 |
I need an option to include groups and groupings when importing a course to another course
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "courses" exist:
|
|
|
9 |
| fullname | shortname |
|
|
|
10 |
| Course 1 | C1 |
|
|
|
11 |
| Course 2 | C2 |
|
|
|
12 |
And the following "users" exist:
|
|
|
13 |
| username | firstname | lastname | email |
|
|
|
14 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
|
|
15 |
And the following "course enrolments" exist:
|
|
|
16 |
| user | course | role |
|
|
|
17 |
| teacher1 | C1 | editingteacher |
|
|
|
18 |
| teacher1 | C2 | editingteacher |
|
|
|
19 |
And the following "groups" exist:
|
|
|
20 |
| name | description | course | idnumber |
|
|
|
21 |
| Group 1 | Group description | C1 | GROUP1 |
|
|
|
22 |
| Group 2 | Group description | C1 | GROUP2 |
|
|
|
23 |
And the following "groupings" exist:
|
|
|
24 |
| name | course | idnumber |
|
|
|
25 |
| Grouping 1 | C1 | GROUPING1 |
|
|
|
26 |
| Grouping 2 | C1 | GROUPING2 |
|
|
|
27 |
And I log in as "teacher1"
|
|
|
28 |
And I am on "Course 1" course homepage
|
|
|
29 |
|
|
|
30 |
Scenario: Include groups and groupings when importing a course to another course
|
|
|
31 |
Given I import "Course 1" course into "Course 2" course using this options:
|
|
|
32 |
| Initial | Include groups and groupings | 1 |
|
|
|
33 |
When I am on the "Course 2" "groups" page
|
|
|
34 |
Then I should see "Group 1"
|
|
|
35 |
And I should see "Group 2"
|
|
|
36 |
And I am on the "Course 2" "groupings" page
|
|
|
37 |
And I should see "Grouping 1"
|
|
|
38 |
And I should see "Grouping 2"
|
|
|
39 |
|
|
|
40 |
Scenario: Do not include groups and groupings when importing a course to another course
|
|
|
41 |
Given I import "Course 1" course into "Course 2" course using this options:
|
|
|
42 |
| Initial | Include groups and groupings | 0 |
|
|
|
43 |
When I am on the "Course 2" "groups" page
|
|
|
44 |
Then I should not see "Group 1"
|
|
|
45 |
And I should not see "Group 2"
|
|
|
46 |
And I am on the "Course 2" "groupings" page
|
|
|
47 |
And I should not see "Grouping 1"
|
|
|
48 |
And I should not see "Grouping 2"
|