Return to your course front page and click on Groups in the Administration block.
Select the group you want to edit and press the Show members for group button; listing group members enables the Edit group settings button.
Press the Edit group settings button.
Specify a group enrollment key. This can be anything you like. To reveal the key you have just typed (so you can read it) ensure the Unmask setting is ticked. It's useful in a school situation to have this as the name of the class for any course e.g. 9A, 9B, etc.
5. Press the Save changes button and you're done.
We've just specified an enrollment key for the group. This means that I can give a student the group enrollment key and when they come to enroll, they use the group key (rather than the course key) to get on the course. This not only registers them on the course but also automatically adds them to the right group. Note that you will also need to specify a course...