<img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid=5003644&amp;fmt=gif">
Skip to content
English - Australia
  • There are no suggestions because the search field is empty.

How to report on Cohort Managers

This is a guide on how to pull a report to identify a user and the cohorts they are assigned to as a cohort manager.

SELECT ac_tenancies.name as "Tenancy Name", mdl_user.username as "Cohort Manager", ac_cohorts.name as "Managed Cohort" FROM mdl_user
INNER JOIN ac_cohort_managers ON mdl_user.id = ac_cohort_managers.user_id
INNER JOIN ac_cohorts ON ac_cohorts.id = ac_cohort_managers.cohort_id
INNER JOIN ac_tenancies ON ac_cohorts.tenancyid = ac_tenancies.id
WHERE mdl_user.id IN (SELECT userid FROM ac_user_tenancy WHERE tenancyid IN (3, 5))
AND ac_cohorts.tenancyid IN (3,5)

Change out the tenancy ID as required.