Skip to content

feat: new event to track LTI Launches via LTI Provider#36756

Merged
farhaanbukhsh merged 1 commit into
openedx:masterfrom
open-craft:kshitij/lti-launch-event
Aug 6, 2025
Merged

feat: new event to track LTI Launches via LTI Provider#36756
farhaanbukhsh merged 1 commit into
openedx:masterfrom
open-craft:kshitij/lti-launch-event

Conversation

@xitij2000

@xitij2000 xitij2000 commented May 20, 2025

Copy link
Copy Markdown
Contributor

Description

Triggers the new LTI_PROVIDER_LAUNCH_SUCCESS on successful launch as LTI provider.

The new event is added in: openedx/openedx-events#501

Supporting information

NA

Testing instructions

The easiest is to use the automated tests.

Here are the steps for manual testing:

  • Enable the LTI provider functionality by setting ENABLE_LTI_PROVIDER: true in features. You can do that with the following tutor snippet
     hooks.Filters.ENV_PATCHES.add_item(("lms-env-features", 'ENABLE_LTI_PROVIDER: true'))
  • We need an LTI embed URL to launch to. Here is one you can use for the demo course: http://local.openedx.io:8000/lti_provider/courses/course-v1:OpenedX+DemoX+DemoCourse/block-v1:OpenedX+DemoX+DemoCourse+type@sequential+block@4e1de5e13fc3422997fe246b40a43aa1
  • We will use the saLTIre testing tool for LTI.
    • Visit that site and click on "Security Model" from the sidebar.
    • Fill in the above launch URL
    • Create a new LTI consumer via http://local.openedx.io:8000/admin/lti_provider/lticonsumer/
    • You can either use the credentials from the tool here or copy over the consumer key and shared secret to the tool.
    • Click save.
  • You can launch using Connect, but to test the signal we need to have a handler registered.
  • You can create a simple signal handler as follows:
    from openedx_events.learning.signals import LTI_PROVIDER_LAUNCH_SUCCESS
    LTI_PROVIDER_LAUNCH_SUCCESS.connect(lambda launch_data, **kwargs: print(f"{launch_data=}"))
    This can be put in any file imported by the platform, so the signal handler gets registered.
  • Click connect and check the logs, you should see a record of the launch.

Deadline

"None"

Other information

A client would like to track LTI launches and would like to hook into the launch pipeline.

@openedx-webhooks openedx-webhooks added open-source-contribution PR author is not from Axim or 2U core contributor PR author is a Core Contributor (who may or may not have write access to this repo). labels May 20, 2025
@openedx-webhooks

openedx-webhooks commented May 20, 2025

Copy link
Copy Markdown

Thanks for the pull request, @xitij2000!

This repository is currently maintained by @openedx/wg-maintenance-edx-platform.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

Details
Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@github-project-automation github-project-automation Bot moved this to Needs Triage in Contributions May 20, 2025
@xitij2000 xitij2000 changed the title Kshitij/lti launch event feat: new event to track LTI Launches via LTI Provider May 22, 2025
@xitij2000 xitij2000 force-pushed the kshitij/lti-launch-event branch 3 times, most recently from edac976 to 2389ed3 Compare May 22, 2025 17:54
@mphilbrick211 mphilbrick211 moved this from Needs Triage to Waiting on Author in Contributions May 22, 2025
@xitij2000 xitij2000 marked this pull request as ready for review May 23, 2025 09:01

@tecoholic tecoholic 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.

@xitij2000 👍

NOTE: This requires merging openedx/openedx-events#501 and updating requirements file before merging.

@xitij2000

Copy link
Copy Markdown
Contributor Author

@farhaanbukhsh Could you have a look at this PR.

@xitij2000 xitij2000 force-pushed the kshitij/lti-launch-event branch from 36f51b8 to 926e0dc Compare August 2, 2025 06:38

@farhaanbukhsh farhaanbukhsh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I have added a few questions about the code.

Comment thread lms/djangoapps/lti_provider/views.py
Comment thread lms/djangoapps/lti_provider/views.py

@farhaanbukhsh farhaanbukhsh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

  • ✅ I tested this with the testing instructions
  • ✅ I read through the code
  • ❌ I checked for accessibility issues
  • ❌ Includes documentation

@farhaanbukhsh farhaanbukhsh merged commit 96ace71 into openedx:master Aug 6, 2025
49 checks passed
@farhaanbukhsh farhaanbukhsh deleted the kshitij/lti-launch-event branch August 6, 2025 10:55
@github-project-automation github-project-automation Bot moved this from Waiting on Author to Done in Contributions Aug 6, 2025
@edx-pipeline-bot

Copy link
Copy Markdown
Contributor

2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production.

@edx-pipeline-bot

Copy link
Copy Markdown
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

1 similar comment
@edx-pipeline-bot

Copy link
Copy Markdown
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

pdpinch pushed a commit to mitodl/edx-platform that referenced this pull request Aug 11, 2025
…nedx#36756)

* feat: add canvas integration support (#319) 

* feat: add canvas integration support

(cherry picked from commit fdb818a)

* feat: Send an LTI launch event for LTI Launches

(cherry picked from commit 2389ed3)

* temp: Upgrade openedx-events to unmerged version with LTI launch event

(cherry picked from commit eea4c60)

* fixup! feat: Send an LTI launch event for LTI Launches

---------

Co-authored-by: Arslan Ashraf <34372316+arslanashraf7@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core contributor PR author is a Core Contributor (who may or may not have write access to this repo). open-source-contribution PR author is not from Axim or 2U

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

6 participants