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

Cohort sync ignores enrolment method status in courses

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.7.9, 2.8.9, 2.9.3, 2.9.7, 3.0.5, 3.1.1
    • Fix Version/s: 3.1.4, 3.2.1
    • Component/s: Cohorts, Enrolments
    • Labels:
    • Testing Instructions:
      Hide
      1. Visit 'Site administration' > 'Users' > 'Cohorts'.
      2. Create a new cohort at the system context.
      3. Create a new course.
      4. In the course visit the enrolment methods.
      5. Add 'Cohort sync' as an enrolment method and select the cohort you created earlier.
      6. Visit 'Site administration' > 'Users' > 'Cohorts'.
      7. Assign a couple of people into the cohort.
      8. Confirm the users in the cohort are now enrolled in the course.
      9. In the course visit the enrolment methods.
      10. Set the status of the enrolment instance to inactive.
      11. Add a couple more learners to the original cohort.
      12. Confirm the new users in the cohort are not added into the course.
      13. Re-enable the enrolment instance and new users should now be enrolled.
      Show
      Visit 'Site administration' > 'Users' > 'Cohorts'. Create a new cohort at the system context. Create a new course. In the course visit the enrolment methods. Add 'Cohort sync' as an enrolment method and select the cohort you created earlier. Visit 'Site administration' > 'Users' > 'Cohorts'. Assign a couple of people into the cohort. Confirm the users in the cohort are now enrolled in the course. In the course visit the enrolment methods. Set the status of the enrolment instance to inactive. Add a couple more learners to the original cohort. Confirm the new users in the cohort are not added into the course. Re-enable the enrolment instance and new users should now be enrolled.
    • Affected Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_29_STABLE, MOODLE_30_STABLE, MOODLE_31_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE, MOODLE_32_STABLE
    • Pull Master Branch:
      MDL-52098_master

      Description

      Cohort sync ignores the enrolment method status if is set to disabled.

      If a cohort enrolment method is disabled either by clicking the eye or going into the settings and setting Active to no has no effect on cohort sync. Any users added to the cohort after the enrolment method has been disabled are still added to the course.

      Steps to replicate. Set up two courses and one cohort. Add a cohort enrolment method to each course linked to the cohort. Enrol one user to test to make sure they are added to both courses. Disable the enrolment method in one course and add a second user. They will still be enrolled in both courses.

      Deleting the enrolment method is not a suitable workaround as this deletes all the records and data for the existing users.

      Current workaround is to set the role they are allocated to None. They are still enrolled in the course but since they have no role they can do nothing. Not ideal but does help.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                9/Jan/17