TA Masquerading as a Student? (Assignment Due Date Overrides)

Jump to solution
michael_ball
Community Novice

Recently, we started using the Assignment Overrides feature, which is really handy! But this presents a big problem when trying to query students submissions!

Right now, I am querying .../students/submissions/ with an array of assignments, and "include[]=assignment".

The `due_at` property for an assignment, is now no longer accurate for the account making the API request.

This line is in the live docs:

due_at (datetime, optional😞 the due date for the assignment. returns null if not present. NOTE: If this assignment has assignment overrides, this field will be the due date as it applies to the user requesting information from the API.,

What I get back (as a TA in a course) appears to be the latest time the assignment is due at, any not the time that applies for "everyone else".

I tried to masquerade as a student to see if I could get their due time, I get an error saying "invalid as_user_id".

(This presumably, makes some sense because I wouldn't have masquerading perms for all of my campus' data...)

However, it leaves a quandary: How do I get the time that an assignment is due for that student? The assignment overrides API only lists the students who have an override, and not the general case...but returning the assignment data, don't return the general case either... Smiley Sad

Thanks for any help!

Labels (1)
1 Solution
michael_ball
Community Novice
Author

So, it appears that making a direct request to /assignments/:id/ gives me the following useful parameters:

- all_dates (list the overrides)

- override_assignment_dates (if false, doesn't do the "calculations" mentioned in the NOTE above)

- include[]=overrides

However, since I'm making a request to /submissions I can't seem to pass those parameters to include[]=assignment.

So I guess, I have a potential work around, but it involves going from 1 API Call, to 1 per assignment... That's not really fun. 😕

View solution in original post