This test requires a course in which self-enrolment is allowed and for which an enrolment key has been set and 'Use group enrolment keys' is set to Yes.
- Log in as a teacher, access a course and follow the groups link either via the gear menu or the Administration block (depending upon your theme).
- Create a group and set a group enrolment key.
- Log in as user1 (not yet enrolled in the course) and enrol in the course by supplying the course enrolment key.
- Log in as user2 (not yet enrolled in the course) and enrol in the course by supplying the group enrolment key.
- Log in as the teacher again, access the participants page and check that user2 is a member of the group whereas user1 is not.
This test may be run on http://qa.moodle.net/ by creating a group in the Activity examples course then logging in as student6 and student7 (both with password 'test').