Skip to content

LTI date updates - #1342

Open
ascholerChemeketa wants to merge 5 commits into
RunestoneInteractive:mainfrom
ascholerChemeketa:lti-date-updates
Open

LTI date updates#1342
ascholerChemeketa wants to merge 5 commits into
RunestoneInteractive:mainfrom
ascholerChemeketa:lti-date-updates

Conversation

@ascholerChemeketa

Copy link
Copy Markdown
Contributor

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.

Copilot AI review requested due to automatic review settings August 4, 2026 00:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.endDateTime and 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
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.

2 participants