Bulk import groups and groupings to Moodle courses
Updated on: 23 April 2026
Use a CSV file to create groups and groupings in one or more Moodle courses.
This guide does not cover manual creation of groups and groupings or how to add users to them.
Overview
Using a CSV file, you can:
- create groups in a course
- create groupings in a course
- add groups to groupings in a course
- do each of the above across multiple courses in one upload
Prerequisite: You must have an editing role in a course to import groups and groupings into it.
Download the template
Download the CSV bulk import template (Excel) and use it as your starting point.
- The template contains a single sheet with three column headers.
- Column headers must remain in place for the import to work. Do not overwrite or delete them when filling in the file with your group and grouping data.
Prepare the file
Only fill in the columns you need to, depending on your needs.
groupname
- Enter the group names. For example: TUT01, LAB01.
- This column must be filled in.
groupingname
- Enter the grouping names. For example: TUTORIALS, LABS.
- Leave this column empty if you do not want to import groupings.
coursename
- Enter the short names of the courses. Go to Settings and select Course short name.
- Leave this column empty if you are importing to a single course. This column only applies if you are importing to multiple courses.
Once you have filled in the sheet with your data:
- Save the file (CSV UTF-8).
- Upload the CSV file to Moodle.
Upload the CSV
Before doing a bulk import, test with a small sample first. If a group or grouping listed in your CSV already exists in the course, it will be left unchanged and no duplicate will be created.
- If importing to:
- a single course, go to that course.
- multiple courses, go to any one of those courses.
- Open the block drawer, if needed.
- Go to the Administration block, then Users, then Groups, then Import groups.
- Use the file picker to select the CSV file and upload it.
Moodle documentation
For more information, refer to the Moodle documentation on groups and groupings.
Links to external sites and information
The University is not liable for external web content and may not be aware when this content is changed or removed.