Skip to content

Update Canvas and Gradescope integrations to handle late due dates for extensions#272

Open
cycomachead wants to merge 11 commits intomainfrom
update-canvas-and-gradescope-integrations-to-handle-late-due-dates-for-extensions-hWNcq7Kk6T7H
Open

Update Canvas and Gradescope integrations to handle late due dates for extensions#272
cycomachead wants to merge 11 commits intomainfrom
update-canvas-and-gradescope-integrations-to-handle-late-due-dates-for-extensions-hWNcq7Kk6T7H

Conversation

@cycomachead
Copy link
Contributor

The integrations for Canvas and Gradescope need updating. They need to set the late due date field when posting an extension.

  • If the original assignment has no late due date, leave it empty
  • otherwise shift the original late due date by the same delta as new due date.

Create new course setting, true by default, and add a script to back fill all old courses called "Extend Late Due Date Automatically"

  • if this setting is off, AND the late due date is present on the original assignment then ensure the NEW late due date is the later of the original late due date and the approved extended due date. (i.e. make sure the new late due date is at least the same as or later than the new extended due date.)

Please add tests and suggest refactoring as necessary


Superconductor Ticket Implementation | App Preview

cycomachead and others added 9 commits February 4, 2026 21:49
Updated LMS integrations to automatically manage late due dates (lock dates) when provisioning extensions. Added a new course setting to control whether late due dates shift by the extension delta or remain at the later of the original late date and the new due date.

- Added `extend_late_due_date` to course settings with a UI toggle
- Implemented late due date calculation logic in the Request model
- Updated CanvasFacade to use `close_date` (lock_at)
- Updated GradescopeFacade to use `late_due_date` (hard_due_date)
- Added database migration and backfill rake task for existing courses
- Added comprehensive unit tests for models and facades

Co-authored-by: Claude Code <noreply@anthropic.com>
…-handle-late-due-dates-for-extensions-hWNcq7Kk6T7H

* main:
  gitignore
  improved GS user copy
  Bump sentry-rails from 6.2.0 to 6.3.0
  Gradescope note
  Bump puma from 7.1.0 to 7.2.0
  Allow overriding PORT
  Add a /help redirect, move some routes around
  Bump pg from 1.6.2 to 1.6.3
  Bump bootsnap from 1.20.1 to 1.21.1
'value' => new_due_date
}
# Use the late due date for hard_due_date (Gradescope API field) if provided, otherwise fall back to the due date
late_due_date = new_late_due_date || new_due_date
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually tricker than I thought because we might want to leave it off if it's originally off.


ActiveRecord::Schema[7.2].define(version: 2025_10_01_192900) do
ActiveRecord::Schema[7.2].define(version: 2026_02_02_000001) do
create_schema "hypershield"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if this is an issue. :/

cycomachead and others added 2 commits February 11, 2026 18:51
Introduce `AssignmentDateCalculator` to centralize due date and late
due date logic. This ensures that late due dates are only set on
external services if they exist on the original assignment, and
correctly handles course settings for shifting or capping dates.

- Update Canvas and Gradescope facades to accept nil late due dates
- Delegate date calculation in `Request` model to the new service
- Add comprehensive tests for the new calculator and update existing
  facade and model specs to reflect the refactored logic

Co-authored-by: Claude Code <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant