1 |
efrain |
1 |
@mod @mod_forum
|
|
|
2 |
Feature: Posting to groups in a separate group discussion when restricted to groupings
|
|
|
3 |
In order to post to groups in a forum with separate groups and groupings
|
|
|
4 |
As a teacher
|
|
|
5 |
I need to have groups configured to post to a group
|
|
|
6 |
|
|
|
7 |
Background:
|
|
|
8 |
Given the following "users" exist:
|
|
|
9 |
| username | firstname | lastname | email |
|
|
|
10 |
| teacher1 | teacher1 | teacher1 | teacher1@example.com |
|
|
|
11 |
| teacher2 | teacher2 | teacher2 | teacher2@example.com |
|
|
|
12 |
And the following "courses" exist:
|
|
|
13 |
| fullname | shortname | category |
|
|
|
14 |
| Course 1 | C1 | 0 |
|
|
|
15 |
And the following "course enrolments" exist:
|
|
|
16 |
| user | course | role |
|
|
|
17 |
| teacher1 | C1 | editingteacher |
|
|
|
18 |
| teacher2 | C1 | teacher |
|
|
|
19 |
And the following "groups" exist:
|
|
|
20 |
| name | course | idnumber |
|
|
|
21 |
| G1G1 | C1 | G1G1 |
|
|
|
22 |
| G1G2 | C1 | G1G2 |
|
|
|
23 |
| G2G1 | C1 | G2G1 |
|
|
|
24 |
And the following "groupings" exist:
|
|
|
25 |
| name | course | idnumber |
|
|
|
26 |
| G1 | C1 | G1 |
|
|
|
27 |
| G2 | C1 | G2 |
|
|
|
28 |
And the following "group members" exist:
|
|
|
29 |
| user | group |
|
|
|
30 |
| teacher1 | G1G1 |
|
|
|
31 |
| teacher1 | G1G2 |
|
|
|
32 |
| teacher1 | G2G1 |
|
|
|
33 |
| teacher2 | G1G1 |
|
|
|
34 |
| teacher2 | G1G2 |
|
|
|
35 |
| teacher2 | G2G1 |
|
|
|
36 |
And the following "grouping groups" exist:
|
|
|
37 |
| grouping | group |
|
|
|
38 |
| G1 | G1G1 |
|
|
|
39 |
| G1 | G1G2 |
|
|
|
40 |
| G2 | G2G1 |
|
|
|
41 |
And the following "activities" exist:
|
|
|
42 |
| activity | course | idnumber | name | intro | type | section | groupmode | grouping |
|
|
|
43 |
| forum | C1 | 00001 | Multiple groups forum | Standard forum description | general | 1 | 1 | G1 |
|
|
|
44 |
| forum | C1 | 00001 | Single groups forum | Standard forum description | general | 1 | 1 | G2 |
|
|
|
45 |
|
|
|
46 |
Scenario: Teacher with accessallgroups can post in all groups
|
|
|
47 |
Given I am on the "Multiple groups forum" "forum activity" page logged in as teacher1
|
|
|
48 |
When I click on "Add discussion topic" "link"
|
|
|
49 |
And I click on "Advanced" "button"
|
|
|
50 |
Then the "Group" select box should contain "All participants"
|
|
|
51 |
And the "Group" select box should contain "G1G1"
|
|
|
52 |
And the "Group" select box should contain "G1G2"
|
|
|
53 |
And I am on "Course 1" course homepage
|
|
|
54 |
And I follow "Single groups forum"
|
|
|
55 |
And I click on "Add discussion topic" "link"
|
|
|
56 |
And I click on "Advanced" "button"
|
|
|
57 |
And the "Group" select box should contain "All participants"
|
|
|
58 |
And the "Group" select box should contain "G2G1"
|
|
|
59 |
And I should not see "Post a copy to all groups"
|
|
|
60 |
|
|
|
61 |
Scenario: Teacher in all groups but without accessallgroups can post in either group but not to All Participants
|
|
|
62 |
Given I am on the "Multiple groups forum" "forum activity" page logged in as teacher2
|
|
|
63 |
When I click on "Add discussion topic" "link"
|
|
|
64 |
And I click on "Advanced" "button"
|
|
|
65 |
Then the "Group" select box should not contain "All participants"
|
|
|
66 |
And the "Group" select box should contain "G1G1"
|
|
|
67 |
And the "Group" select box should contain "G1G2"
|
|
|
68 |
And I am on "Course 1" course homepage
|
|
|
69 |
And I follow "Single groups forum"
|
|
|
70 |
And I click on "Add discussion topic" "link"
|
|
|
71 |
And I click on "Advanced" "button"
|
|
|
72 |
And I should see "G2G1"
|
|
|
73 |
And "Group" "select" should not exist
|