AnsweredAssumed Answered

How do you limit group_ids in enrollments to current groups?

Question asked by Mike Marsh on Oct 25, 2018
Latest reply on Feb 25, 2019 by Stephen Vickers

I'm using groups within my courses with which I define git repositories. Using the API, I can fetch all of the enrollments with group_ids using include[]=group_ids. Unfortunately, this returns not just the current groups in which the student is signed up, but any previous groups the student had joined and then left. Is there a way to eliminate these no-longer-valid group IDs in the request? The only other option I see is to fetch all of the groups, and loop over them to fetch the memberships separately, which I'd rather not do, since it will add considerable processing time and network traffic.