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

Add iframe support to DeepLinkResource #112

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

cmurtaugh
Copy link
Contributor

@cmurtaugh cmurtaugh commented Feb 14, 2023

This PR modifies the DeepLinkResource class to add support for the iframe property as described in the LTI 1.3 spec. When set, this property indicates to the platform that the resource content can be embedded in a platform page using an iframe.

Usage:

    resource = DeepLinkResource()
    resource.set_url("https://my.tool/launch")\
        .set_custom_params({'my_param': my_param})\
        .set_title('My Resource')
        .set_iframe({"height": 400, "width": 800})

This PR also adjust some test settings in tox.ini and tox.yml in order to fix failing tests.

Closes #111.

@cmurtaugh
Copy link
Contributor Author

@dmitry-viskov -- any chance you could take a look at this? Thanks!

@hmoffatt
Copy link
Contributor

hmoffatt commented Feb 27, 2023

The spec allows a deep linking response of type link (rather than ltiResourceLink) to have an iframe field with a URL (string) field as well as width/height, so technically the t.Mapping[str, int] type isn't correct. See https://www.imsglobal.org/spec/lti-dl/v2p0#link

It would be preferable to take the unrelated pylint/workflow changes to another PR.

@dmitry-viskov
Copy link
Owner

hi @cmurtaugh .
Thanks for your effort!
I'll try to find time to review PR in the nearest future.

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.

Deep Link ltiResourceLink response type should support iframe property
3 participants