Let me preface by saying that now I realize that the way I created these groups is incorrect and I'm working on solving that, using the Moodle API instead. However, I have a problem with the already created groups that are already being used so I would like to "fix" this in the meantime.
Problem: the administrator account can't see the groups created by my own script, but can see the groups created from within Moodle.
Reason: I created these groups (the ones that the admin can't see) with a script that adds records directly to the mdl_groups table and adds students to those groups by adding records to mdl_group_members table (again, I know this isn't the correct way to go about this).
If I add a user with a teacher role to any of those groups, that user can actually see the groups in Moodle with no problem (in the gradebook, reports, etc). However, the admin account can't see them.
So my question: is there any other record in the database that I need to add or modify so the admin can actually see those groups? I've been looking everywhere and I can't find any other table where groupid is used, but there must be something somewhere since these groups aren't showing for the admin. I've also looked into the groups_create_group() function in the Moodle source code but I can't figure this out.
Any help with this would be MUCH appreciated since would allow me to fix the already created groups. From now on I will be using the API to create them so I figure this problem won't happen.