General developer forum

Where are the fields like group1 and cohort1 stored in database

 
Picture of Derek Keats
Where are the fields like group1 and cohort1 stored in database
 

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: -
Picture of Neill Magill
Re: Where are the fields like group1 and cohort1 stored in database
Core developersParticularly helpful MoodlersPlugin 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'

 
Average of ratings: -
Picture of Derek Keats
Re: Where are the fields like group1 and cohort1 stored in database
 

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

 
Average of ratings: -