My problem: I am requesting an Assignment Object and also the Assignment Override Objects from the API and checking if the Override Object 'due_at' date is after the Assignment Object 'due_at' (hence, inferring an extension). The 'due_at' value in the Assignment Object is always set to that of the last Override Object, I would assume that the Assignment Object 'due_at' date would be the first 'Assign' date for the assignment.
My question: Is there any logic or reasoning as to which override the Assignment Object 'due_at' field will be set to?
Thank you in advance,
James.
James,
I was actually working on something overrides related when your message came in.
I had not noticed this before. I was working in the beta instance and didn't need the due date for the assignment, just the overrides. Strangely, in beta, the due_date is null. I went back to the production instance and found an assignment with overrides and verified what you're seeing. I have been using the due_date as the single due date for an early alert system and this is going to screw a bunch of stuff up.
I also double checked Canvas Data where the date is correct. That suggests that it is a bug. It definitely appears to be a change in the way things are handled, which should have been documented, but I don't remember seeing anything about it. It should be the date set for the "everyone else" when there is an override because that is the one entry that doesn't show up when you fetch the overrides. I'm pretty sure that when I started working on this a month ago that it was functioning correctly.
As a temporary work-around, if you use a query_parameter of all_dates=1 then you still get the wrong date for due_at, but you get a property called all_dates that has a "base" object with the correct date.
I would encourage you to file a ticket with Canvas Support and see what's going on. Please report back if you do.