Repository navigation
Remove extensions that a moved deadline has left behind - #624
kaiiiichen wants to merge 2 commits into
Conversation
An LMS keeps using a student's override even after the assignment's own deadline moves past it, which leaves that student with an earlier deadline than the rest of the class. - Remove these overrides on every assignment sync, including ones from earlier deadline changes, and show the results on the course page - Refuse to approve a request that is not later than the current deadline - Validate new requested dates on the server - Show the current deadline and never show negative extension days - Add rake tasks to report and repair affected courses When a deadline moves past an extension, the student returns to the class deadline rather than keeping the original difference, and sync changes the LMS automatically. Only overrides matching a date Flextensions approved are removed. Fixes berkeley-cdss#620
Exercises the real approval and sync code against a Canvas sandbox: moves the test assignments' deadlines past approved extensions, then checks what Canvas applies to each student. Refuses to run against production Canvas. Refs berkeley-cdss#620
|
✅ @kaiiiichen — Superconductor finished — View implementation | App Preview Standing by for instructions. |
|
This is a lot. I think this makes sense as a problem — though I am not sure assignment sync should actually be the process to adjust extensions. I think automatically pushing extensions forward is definitely too much for most faculty and it diminishes the purpose of an extension in general. It seems to me a warning and a removal process does make sense but then we need to track that this has happened. -- Michael BallFrom my iPhonehttps://mball.coContinuing Lecturer UC Berkeley EECS | Travel Advisor Fora On Nov 5, 2026, at 3:32 PM, superconductor-for-github[bot] ***@***.***> wrote:superconductor-for-github[bot] left a comment (berkeley-cdss/flextensions#624)
✅ @kaiiiichen — Superconductor finished — View implementation | App Preview
Standing by for instructions.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Thanks, Michael. To make sure we're on the same page: today, a student with an extension can end up with an earlier deadline than the class. In the issue's example #620, they stay on Nov 6 while everyone else has Nov 20. Removing the extension only returns them to Nov 20, but I understand if you'd rather have staff make that call. I'll take the automatic changes out of sync and split this into two PRs:
Two questions for the second PR:
|
General Info
Fixes #620
Changes
Canvas and Gradescope keep using a student's override even after the assignment's own deadline moves past it. A student with a 1-day extension to Nov 6 stays on Nov 6 when the class moves to Nov 20, so they end up with an earlier deadline than everyone else. I confirmed this on Gradescope. Canvas's source shows the same rule, but I haven't reproduced it in a live course.
Two decisions to review
1. The student returns to the class deadline (Nov 20), not the original difference (Nov 21).
The override is removed rather than moved. Keeping the 1-day difference would give the student time that staff didn't approve for the new deadline. Without an override, the student also follows any later deadline changes. If they still need more time, they can submit a new request, and the form counts days from the new deadline.
2. Assignment sync changes the LMS automatically, rather than flagging students for staff.
This only moves a student's deadline later, up to the class deadline, so waiting for staff to act would just leave them with the wrong date for longer. To keep it safe:
Known trade-off: a removed override doesn't come back. If a deadline moves Nov 5 → Nov 20 → Nov 5, Flextensions shows the student's approved Nov 6, but the LMS uses Nov 5. I expect this to be rare, so I documented it rather than handling it.
Please say if you'd prefer something different on either of these.
What changed
StaleExtensionRemoverruns on every assignment sync, not only when a date changes. That means the next sync also repairs courses that moved a deadline before this change. Requests aren't modified, so they remain a record of what was approved.student_identifier,extension_due_dates, andremove_extensionto the facades, anddeleteto the Gradescope client.extensions:report_stalelists affected courses andextensions:repair_stalequeues their syncs.Not in this PR
Assignment#current_due_date_for, and it needs the same comparison with the class deadline.Testing
The results below are from this branch, rebased on
main:I also broke 12 key pieces of the logic one at a time to confirm that tests fail, and checked seven affected pages in headless Chrome with axe.
None of this has run against a real LMS. The specs stub LMS calls, including HTTP-level stubs for both facades.
Needs someone with LMS access
I'm not on course staff, so I can't test these myself. @cycomachead, could you help before this is merged?
AddExtensionprops. If not, their extension is skipped without any warning, which leaves them in today's state. This is the main risk.DELETEon an extension'sdeletePathremoves it. If it doesn't, the sync detects that the extension is still there and warns on the course page.extensions:report_stale, review the list, then runextensions:repair_stale.I also noticed that
utils/canvas_sandbox/setup_test_course.rbandutils/create_canvas_courses.rbuse Faraday's JSON response middleware, which fails withjson3.1.0 andfaraday2.14.3. The new script avoids this. If the test assignments need resetting,setup_test_course.rbwill hit it.Documentation
docs/instructors.md: moving a deadlinedocs/students.md: what Extended Due Date showsdocs/updates.md: release notedocs/developers.md: the repair tasksutils/canvas_sandbox/README.md: the sandbox scriptChecklist