Bulk Adding Users to Groups (with CSV Import)

Why use it?

The ‘import enrolls’ feature provides a quick way to manually add participants to a course and assign participants to groups. Its particularly useful for courses requiring custom groups that aren’t included in the automatic enrollments from LFY.

If you would prefer to have users choose their own groups, consider the Group Choice activity instead.

Prerequisites

  1. Permissions:

    • You must have editing rights for the course or its parent category (e.g., Manager or Teacher (Editor) role).

  2. Participants:

    • Students must already have an active Moodle account.
      Accounts are created automatically during the bulk enrollment process or when users log in for the first time.

  3. CSV File:

    • Prepare a properly formatted .csv file containing the email addresses of the participants and the groups they should be assigned to (see Step 1).

Step 1: Create a csv file

  1. Required Format:

    • Column 1: Must be labeled email and contain the students' email addresses.

    • Column 2: Optional, labeled group1, for the primary group assignment.

    • Additional Groups: Add columns labeled group2, group3, etc., if needed. Students will be enrolled in all listed groups.

  2. Notes:

    • Groups do not need to exist beforehand. Moodle can create them during the upload.

    • Save the file as a .csv file (e.g., File > Save As > CSV in Excel).

email

group1

group2

email

group1

group2

student1@email.com

Seminar A

Project 1

student2@email.com

Seminar B

Project 2

student3@email.com

Seminar A

Project 2

Step 2: Upload the csv file

  1. Navigate to the Course:

    • Go to the Moodle course where you want to add participants and groups.

  2. Access the Import Tool:

    • Click the Participants tab in the course menu.

    • From the dropdown menu, select Import enrolls.

image-20241122-105241.png

 

  1. Configure Settings:

    • User Field: Set to Email address.

    • Role: Select the role to assign (e.g., student). If users are already enrolled, this role will be added to their existing roles.

    • Group Options:

      • Assign to Groups: Set to Yes.

      • Group Source: Choose Use file data to enroll users in the groups listed in your file.

      • Create Groups: Set to Yes if groups don’t already exist and should be created automatically.

  2. Upload the File:

    • Drag and drop the CSV file into the Import File box or select it using the file picker.

    • Click Import.

 

image-20241122-102529.png

 

Step 3: Confirm enrolments

  • Review the Upload Summary:

    • If you see a message like Line 1: Unable to parse the line contents 'email,group1', it can be ignored (it refers to the header row).

    • Any other errors should be noted and resolved (e.g., incorrect email addresses).

  • Finalize the Import:

    • Click Continue to complete the process.

  • Verify Groups and Participants:

    • Moodle will redirect you to the Groups page, showing the newly created groups.

    • Return to the Participants tab to confirm all users are enrolled in the correct roles and groups.

Trouble shooting common issues

  • Error During Import:

    • Ensure the User Field is set to Email address.

    • Verify that the file is saved in .csv format with the correct column headings (email, group1, etc.).

  • Users Not Added:

    • Confirm that the email addresses match active Moodle accounts.

    • Users without Moodle accounts must log in at least once before they can be added via this method.

  • Groups Not Created:

    • Ensure the Create Groups setting is enabled during the upload.

    • Verify that group names in the CSV file follow any specific naming conventions used in your Moodle system.

 

These pages are created by the LSE Digital Education Team and licensed under a Creative Commons Attribution-ShareAlike 4.0 International License CC BY-SA 4.0