Groups & Members What Tables get updated

Groups & Members What Tables get updated

by Mark Fellowes -
Number of replies: 5

Hi Team
Can you tell me what tables in Moodle get updated when you go into Manage Groups. Select the Group Name, then Add / Remove a Student from the group.

Ie Mdl_New_Customers, Mdl_New_Courses, etc...

I am trying to export (create) a csv file which has the following fields:-

username, firstname, lastname, email, course1, group1

The download option in USERS under admin exports a file but it does not download the Course1, Group1, Course2, Group2... fields so I need to join the tables to get the info.

Silly thing is that the upload a file has these optional fields you can populate.

Average of ratings: -
In reply to Mark Fellowes

Re: Groups & Members What Tables get updated

by Randy Thornton -
Picture of Documentation writers
Groups are defined in the mdl_groups table, and who is a member of which group is defined in the mdl_groups_members table. Take a look at this query to see how to get that data: https://docs.moodle.org/310/en/ad-hoc_contributed_reports#Groups_in_course_with_member_list
Average of ratings: Useful (1)
In reply to Randy Thornton

Re: Groups & Members What Tables get updated

by Mark Fellowes -
Hi Randy..
Thank you very much for this link.. some powerful queries.
I'm after a query that will give me a list of Groups(Teachers) with what students(Members) are assigned to them. Grouped by the Groups(Teachers).
Are you able to point me in the right direction.
In reply to Mark Fellowes

Re: Groups & Members What Tables get updated

by Randy Thornton -
Picture of Documentation writers
Sure, the way I do this is to use of the various queries on the ad-hoc page the show me all the users enrolled in a course with their roles. There are several there that show students and teachers. Just use one to get a basic list of who is enrolled in what role. Then I add in the groups to that as another column, where the group belong to that course. So a very simple report would do something like show username, role, group. Then sort it by group.