openedx / xblock-lti-consumer

GNU Affero General Public License v3.0
28 stars 84 forks source link

[FC-0009] feat: For LTI 1.1, show a warning in Studio if lti_id is not right #378

Closed bradenmacdonald closed 1 year ago

bradenmacdonald commented 1 year ago

This adds a new warning in Studio for LTI 1.1/1.2 consumer components if the specified lti_id is not valid for the current course. It doesn't block you from setting an invalid ID, in case you're setting the ID first in the XBlock, then later in Advanced Settings.

Screenshot 2023-05-31 at 8 44 04 PM

Private-ref: MNG-3638

openedx-webhooks commented 1 year ago

Thanks for the pull request, @bradenmacdonald! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (f247cfc) 97.74% compared to head (9abedc9) 97.75%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #378 +/- ## ======================================= Coverage 97.74% 97.75% ======================================= Files 77 77 Lines 6353 6371 +18 ======================================= + Hits 6210 6228 +18 Misses 143 143 ``` | Flag | Coverage Δ | | |---|---|---| | unittests | `97.75% <100.00%> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openedx#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://app.codecov.io/gh/openedx/xblock-lti-consumer/pull/378?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openedx) | Coverage Δ | | |---|---|---| | [lti\_consumer/lti\_xblock.py](https://app.codecov.io/gh/openedx/xblock-lti-consumer/pull/378?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openedx#diff-bHRpX2NvbnN1bWVyL2x0aV94YmxvY2sucHk=) | `96.48% <100.00%> (+0.05%)` | :arrow_up: | | [lti\_consumer/tests/unit/test\_lti\_xblock.py](https://app.codecov.io/gh/openedx/xblock-lti-consumer/pull/378?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=openedx#diff-bHRpX2NvbnN1bWVyL3Rlc3RzL3VuaXQvdGVzdF9sdGlfeGJsb2NrLnB5) | `99.22% <100.00%> (+<0.01%)` | :arrow_up: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

Agrendalath commented 1 year ago

@bradenmacdonald, it's unrelated to this PR, but I noticed a race condition when there are multiple LTI Consumer XBlocks in a single unit. The first block has a correct LTI ID, and the second one has an incorrect one. I didn't change anything between these screenshots - I only refreshed the page.

The first refresh
The second refresh

Should we open a new issue?

bradenmacdonald commented 1 year ago

@Agrendalath Thanks for the review! I see you're a CC here, so is this good to merge now?

Should we open a new issue?

Looks like we should to me, yep. Thanks for noticing that.

openedx-webhooks commented 1 year ago

@bradenmacdonald 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.