LTI date updates - #1342
Open
ascholerChemeketa wants to merge 5 commits into
Open
Conversation
added 5 commits
August 3, 2026 16:55
…start and end set
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates LTI 1.3 integration to support additional date fields (availability start/end) via custom launch parameters and deep-link resource payloads, along with a small UI visibility-mode precedence change and some HTTPS detection adjustments.
Changes:
- Add LTI custom-claim helpers and propagate custom params through the LTI 1.3 launch flow to update
visible_on/hidden_on. - Extend deep-link resource serialization to include
available.startDateTime/available.endDateTimeand format stored UTC datetimes for outbound LTI messages. - Adjust assignment visibility-mode precedence when both schedule dates are present, and expand HTTPS detection for proxied FastAPI requests.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| sample.env | Updates wording around SERVER_PROTOCOL guidance. |
| components/rsptx/lti1p3/pylti1p3/message_launch.py | Adds helpers to read LTI custom claim params from the JWT payload. |
| components/rsptx/lti1p3/pylti1p3/deep_link_resource.py | Adds available start/end datetime fields to deep-link resource serialization. |
| components/rsptx/lti1p3/pylti1p3/contrib/fastapi/request.py | Treats x-forwarded-proto as HTTPS for secure-request detection. |
| components/rsptx/auth/session.py | Changes how “production/HTTPS” is detected for cookie flags. |
| bases/rsptx/assignment_server_api/assignment_builder/src/components/routes/AssignmentBuilder/components/edit/visibilityMode.ts | Makes scheduled_period take precedence when both schedule dates exist. |
| bases/rsptx/assignment_server_api/assignment_builder/src/components/routes/AssignmentBuilder/components/edit/visibilityMode.spec.ts | Updates test expectation to match the new precedence. |
| bases/rsptx/admin_server_api/routers/lti1p3.py | Adds LTI datetime parse/format helpers; updates assignment date syncing and deep-link creation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| def set_cookie(self, response, token): | ||
| production = settings.server_config == "production" | ||
| production = settings.server_protocol.startswith("https://") |
Comment on lines
+67
to
+70
| is_https = ( | ||
| request_obj.url.scheme.lower() == "https" | ||
| or request_obj.headers.get("x-forwarded-proto", "").lower() == "https" | ||
| ) |
Comment on lines
+611
to
+621
| try: | ||
| availability_datetime = parse_lti_datetime_as_utc( | ||
| custom_params.get(custom_param) | ||
| ) | ||
| except Exception: | ||
| # just ignore bad dates, could be missing, bad format, etc | ||
| continue | ||
|
|
||
| if availability_datetime != getattr(assign, assignment_field): | ||
| setattr(assign, assignment_field, availability_datetime) | ||
| updated = True |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements changes proposed in Discord.
Maybe wait another day or two to see if anyone has strong opinions. Posting now to see what the review bot says.