Grouping is a way of forming groups within the course so that they can do the same tasks.
Create a grouping:
Go to Groups under the Participants menu and select the Groupings tab from the opening view.
Click Create grouping.
Enter a name and description (optional) for your grouping and click Save Changes.
From the groupings view, click on the head icon to add the desired groups to the grouping.
Select the groups you want to add or remove from your grouping.
You can create as many groupings as you need in the same way.
Using groupings
In the activity settings, go to the Common module settings, select Separate groups as the group mode and the grouping you want to use.