Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-45579

Duplicate group enrolment keys for the same course are allowed



    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.6.2, 2.7, 2.8
    • Fix Version/s: 2.6.4, 2.7.1
    • Component/s: Enrolments, Groups
    • Labels:


      Moodle allows teachers to create separate groups for the same course, but does not check for duplicate group enrollment keys. So when a student creates an account and enters this duplicate enrollment key, they will only be placed into the first group created using that key for the course.

      Steps to recreate issue:
      1. Log in with a teacher account
      2. Select the course
      3. Make sure the course settings have master enrollment key enabled and set.
      4. Create a new group (Group1) and set group enrollment key. Ex. "password"
      5. Log out and then log back in as a different teacher, select the same course and then repeat steps 3 and 4. except name the new group (Group2), but still use the same group enrollment key "password".
      6. Log out and log back in again, but this time as brand new student account.
      7. Select the course where the groups were setup and enter the enrollment key "password"
      8. The student will be enrolled in the course and grouped into Group1 only, not Group2.
      9. Similarly any number of new groups can be made using the same group enrollment key but different group names and no student will ever be able to be automatically enrolled into any group other than the first one created.

      Just like the username and email are checked against the database when creating a new account. Group enrollment keys should be checked against any other previously existing enrollment keys, so that duplicates may not be used.


          Issue Links



              • Votes:
                0 Vote for this issue
                5 Start watching this issue


                • Created:
                  Fix Release Date: