1 |
efrain |
1 |
@core @core_courseformat
|
|
|
2 |
Feature: Verify activity group mode interface.
|
|
|
3 |
In order to edit the course activity group mode
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to be able edit the group mode form the page course
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "course" exists:
|
|
|
9 |
| fullname | Course 1 |
|
|
|
10 |
| shortname | C1 |
|
|
|
11 |
| category | 0 |
|
|
|
12 |
| numsections | 3 |
|
|
|
13 |
And the following "groups" exist:
|
|
|
14 |
| name | course | idnumber |
|
|
|
15 |
| G1 | C1 | GI1 |
|
|
|
16 |
And the following "users" exist:
|
|
|
17 |
| username | firstname | lastname | email |
|
|
|
18 |
| teacher1 | Teacher | 1 | teacher1@example.com |
|
|
|
19 |
And the following "course enrolments" exist:
|
|
|
20 |
| user | course | role |
|
|
|
21 |
| teacher1 | C1 | editingteacher |
|
|
|
22 |
|
|
|
23 |
@javascript
|
|
|
24 |
Scenario: Teacher can see the group mode badges in both edit and no edit mode
|
|
|
25 |
Given the following "activities" exist:
|
|
|
26 |
| activity | name | intro | course | idnumber | section | groupmode |
|
|
|
27 |
| forum | Activity sample 1 | Test forum description | C1 | sample1 | 1 | 0 |
|
|
|
28 |
| forum | Activity sample 2 | Test forum description | C1 | sample2 | 1 | 1 |
|
|
|
29 |
| forum | Activity sample 3 | Test forum description | C1 | sample3 | 1 | 2 |
|
|
|
30 |
And I am on the "C1" "Course" page logged in as "teacher1"
|
|
|
31 |
When I turn editing mode on
|
|
|
32 |
Then "Visible groups" "icon" should not exist in the "Activity sample 1" "activity"
|
|
|
33 |
And "Separate groups" "icon" should not exist in the "Activity sample 1" "activity"
|
|
|
34 |
And "Visible groups" "icon" should not exist in the "Activity sample 2" "activity"
|
|
|
35 |
And "Separate groups" "icon" should exist in the "Activity sample 2" "activity"
|
|
|
36 |
And "Visible groups" "icon" should exist in the "Activity sample 3" "activity"
|
|
|
37 |
And "Separate groups" "icon" should not exist in the "Activity sample 3" "activity"
|
|
|
38 |
And I turn editing mode off
|
|
|
39 |
And "Visible groups" "icon" should not exist in the "Activity sample 1" "activity"
|
|
|
40 |
And "Separate groups" "icon" should not exist in the "Activity sample 1" "activity"
|
|
|
41 |
And "Visible groups" "icon" should not exist in the "Activity sample 2" "activity"
|
|
|
42 |
And "Separate groups" "icon" should exist in the "Activity sample 2" "activity"
|
|
|
43 |
And "Visible groups" "icon" should exist in the "Activity sample 3" "activity"
|
|
|
44 |
And "Separate groups" "icon" should not exist in the "Activity sample 3" "activity"
|
|
|
45 |
|
|
|
46 |
@javascript
|
|
|
47 |
Scenario: Teacher can edit the group mode using the activity group mode badge
|
|
|
48 |
Given the following "activities" exist:
|
|
|
49 |
| activity | name | intro | course | idnumber | section | groupmode |
|
|
|
50 |
| forum | Activity sample | Test forum description | C1 | sample | 1 | 1 |
|
|
|
51 |
And I am on the "C1" "Course" page logged in as "teacher1"
|
|
|
52 |
And I turn editing mode on
|
|
|
53 |
And I click on "Separate groups" "icon" in the "Activity sample" "core_courseformat > Activity groupmode"
|
|
|
54 |
And I click on "Visible groups" "link" in the "Activity sample" "core_courseformat > Activity groupmode"
|
|
|
55 |
And "Separate groups" "icon" should not exist in the "Activity sample" "core_courseformat > Activity groupmode"
|
|
|
56 |
And "Visible groups" "icon" should exist in the "Activity sample" "core_courseformat > Activity groupmode"
|
|
|
57 |
When I click on "Visible groups" "icon" in the "Activity sample" "core_courseformat > Activity groupmode"
|
|
|
58 |
And I click on "Separate groups" "link" in the "Activity sample" "core_courseformat > Activity groupmode"
|
|
|
59 |
And "Visible groups" "icon" should not exist in the "Activity sample" "core_courseformat > Activity groupmode"
|
|
|
60 |
And "Separate groups" "icon" should exist in the "Activity sample" "core_courseformat > Activity groupmode"
|
|
|
61 |
Then I click on "Separate groups" "icon" in the "Activity sample" "core_courseformat > Activity groupmode"
|
|
|
62 |
And I click on "No groups" "link" in the "Activity sample" "core_courseformat > Activity groupmode"
|
|
|
63 |
And "Separate groups" "icon" should not exist in the "Activity sample" "core_courseformat > Activity groupmode"
|
|
|
64 |
And "Visible groups" "icon" should not exist in the "Activity sample" "core_courseformat > Activity groupmode"
|
|
|
65 |
And I open "Activity sample" actions menu
|
|
|
66 |
And I click on "No groups" "icon" in the "Activity sample" "core_courseformat > Activity groupmode"
|
|
|
67 |
And I click on "Separate groups" "link" in the "Activity sample" "core_courseformat > Activity groupmode"
|
|
|
68 |
And "Separate groups" "icon" should exist in the "Activity sample" "core_courseformat > Activity groupmode"
|
|
|
69 |
|
|
|
70 |
@javascript
|
|
|
71 |
Scenario: Teacher can edit the group mode using the activity action menu
|
|
|
72 |
Given the following "activities" exist:
|
|
|
73 |
| activity | name | intro | course | idnumber | section | groupmode |
|
|
|
74 |
| forum | Activity sample | Test forum description | C1 | sample | 1 | 1 |
|
|
|
75 |
And I am on the "C1" "Course" page logged in as "teacher1"
|
|
|
76 |
And I turn editing mode on
|
|
|
77 |
And I open "Activity sample" actions menu
|
|
|
78 |
And I choose "Group mode > Visible groups" in the open action menu
|
|
|
79 |
And "Separate groups" "icon" should not exist in the "Activity sample" "core_courseformat > Activity groupmode"
|
|
|
80 |
And "Visible groups" "icon" should exist in the "Activity sample" "core_courseformat > Activity groupmode"
|
|
|
81 |
When I open "Activity sample" actions menu
|
|
|
82 |
And I choose "Group mode > Separate groups" in the open action menu
|
|
|
83 |
And "Visible groups" "icon" should not exist in the "Activity sample" "core_courseformat > Activity groupmode"
|
|
|
84 |
And "Separate groups" "icon" should exist in the "Activity sample" "core_courseformat > Activity groupmode"
|
|
|
85 |
Then I open "Activity sample" actions menu
|
|
|
86 |
And I choose "Group mode > No groups" in the open action menu
|
|
|
87 |
And "Separate groups" "icon" should not exist in the "Activity sample" "core_courseformat > Activity groupmode"
|
|
|
88 |
And "Visible groups" "icon" should not exist in the "Activity sample" "core_courseformat > Activity groupmode"
|
|
|
89 |
And I open "Activity sample" actions menu
|
|
|
90 |
And I choose "Group mode > Separate groups" in the open action menu
|
|
|
91 |
And "Separate groups" "icon" should exist in the "Activity sample" "core_courseformat > Activity groupmode"
|
|
|
92 |
|
|
|
93 |
@javascript
|
|
|
94 |
Scenario: Teacher cannot see Group mode submenu for an activity when group mode has been forced
|
|
|
95 |
Given the following "course" exists:
|
|
|
96 |
| fullname | Course 2 |
|
|
|
97 |
| shortname | C2 |
|
|
|
98 |
| category | 0 |
|
|
|
99 |
| numsections | 3 |
|
|
|
100 |
| groupmode | 1 |
|
|
|
101 |
| groupmodeforce | 1 |
|
|
|
102 |
And the following "course enrolments" exist:
|
|
|
103 |
| user | course | role |
|
|
|
104 |
| teacher1 | C2 | editingteacher |
|
|
|
105 |
And the following "activities" exist:
|
|
|
106 |
| activity | name | intro | course | idnumber | section |
|
|
|
107 |
| forum | Activity sample | Test forum description | C2 | sample | 1 |
|
|
|
108 |
And I am on the "C2" "Course" page logged in as "teacher1"
|
|
|
109 |
And I turn editing mode on
|
|
|
110 |
When I open "Activity sample" actions menu
|
|
|
111 |
Then "Group mode" "link" should not exist in the "Activity sample" "activity"
|
|
|
112 |
And "Separate groups" "button" should not exist in the "Activity sample" "core_courseformat > Activity groupmode"
|