User Assignments Returning All Course Assignments

Jump to solution
DOGutierrez
Community Explorer

I have some code that I have used for a while now which gathers information on students' weekly academic progress. Lately - roughly a month or so ago - I started to notice a problem in that code.

I use this line of python to get a list of the assignments for a given user:

assignments = user.get_assignments(course_id, include = 'all_dates')

In the past, this worked perfectly, returning a paginated list of all of the assignments that the user was assigned to. 

However, when this method is used with certain courses (but not all!), instead of only returning the assignments which are assigned to that user, it returns all assignments. 

I have double-checked to make sure that the assignments are assigned to the correct course sections, and that students are not in multiple sections, but I can't figure out what is causing this to happen. 

Any insight at all is much appreciated. 

Labels (1)
0 Likes
1 Solution
themidiman
Community Champion

Be as it may, it might help to file a case to see if Instructure Engineering does or does not see the get request for the assignment list endpoint returning all the assignments (assigned or not) for the entire course for a particular student as a bug in the API itself. Once that is vetted, you may find that your original approach could be successful. You could point them to this discussion thread in the community.

View solution in original post