Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store LTI1.3 context_memberships_url in LMSCourse when available #6606

Merged
merged 2 commits into from
Aug 27, 2024

Conversation

marcospri
Copy link
Member

@marcospri marcospri commented Aug 27, 2024

For:

Store the url of the LTI1.3 context membership service.

This will allow us to call it outside the scope of a launch. It will also, more immediately, give us a good indication of for how many courses we receive this information at the moment.

Testing

The service URL gets recorded in the LMSCourse table:

select * from lms_course where lti_context_memberships_url is not null

@marcospri marcospri changed the base branch from membership_url_migration to membership_url_model August 27, 2024 09:07
@marcospri marcospri changed the title Membership url code Store LTI1.3 context_memberships_url in LMSCourse when available Aug 27, 2024
@marcospri marcospri requested a review from acelaya August 27, 2024 09:12
@marcospri marcospri marked this pull request as ready for review August 27, 2024 09:12
@@ -75,8 +76,7 @@ def get_from_launch(self, product_family: Family, lti_params) -> Course:
historical_course = self._get_copied_from_course(lti_params)

return self.upsert_course(
context_id=lti_params["context_id"],
name=lti_params["context_title"],
lti_params=lti_params,
Copy link
Member Author

Choose a reason for hiding this comment

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

Pass the full LTIParams here instead of just special casing title and id.

):
get_by_context_id.return_value = None

course = svc.get_from_launch(
Product.Family.CANVAS,
Copy link
Member Author

Choose a reason for hiding this comment

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

Using a common fixture in a few of the existing tests

Base automatically changed from membership_url_model to main August 27, 2024 10:19
Make v13 a dict in all cases to simplify access when accessing LTI1.3
properties.
Store LTI1.3 context_memberships_url in LMSCourse when available.

This will allow us to comunicate with the service outside the launch
context.

See: https://www.imsglobal.org/spec/lti-nrps/v2p0#lti-1-3-integration
@marcospri marcospri merged commit 8f8de6c into main Aug 27, 2024
9 checks passed
@marcospri marcospri deleted the membership_url_code branch August 27, 2024 10:32
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