Where are the fields like group1 and cohort1 stored in database

Where are the fields like group1 and cohort1 stored in database

by Derek Keats -
Number of replies: 2

Hi all,

Hope you don't mind the intrusion. I am experimenting with Moodle, and am still fairly new at it.  I have racked my brains to find this out, but when you add a bunch of users from a CSV file, you can add fields group1, cohort1 and these are presumably associated with a course. Which table is this in in the databse?

Much appreciate if someone can help with this.


Kind regards
Derek

Average of ratings: -
In reply to Derek Keats

Re: Where are the fields like group1 and cohort1 stored in database

by Neill Magill -
Picture of Core developers Picture of Peer reviewers Picture of Plugin developers

For groups you probably want to look at the 'groups' and 'group_members' tables (they will have your configured prefix in front, i.e. 'mdl_groups'); you will be able to find the course from the 'groups' table.

Cohorts will be 'cohort' and 'cohort_members'. To find the courses the cohort is related to you will also need to use through the enrolment table 'enrol'

In reply to Neill Magill

Re: Where are the fields like group1 and cohort1 stored in database

by Derek Keats -

Thank you @neill. That is exactly what I was looking for. It should have been obvious, but I had not though of that!

Regards
Derek