Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Cohorts & Audiences are commonly used to enrol users in courses, via the Cohort/Audience sync enrolment method. To identify the Cohorts/Audiences that have been used to enrol learners in course you can use the following query to create a derived table. 


select c.id as cohortid, cm.userid as userid, e.courseid as courseid, c.name as cohort
FROM mdl_cohort c
JOIN mdl_cohort_members cm ON (cm.cohortid = c.id)
JOIN mdl_enrol e ON (e.customint1 = c.id)


  • No labels