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

fix: Custom parameters validation #412

Conversation

kuipumu
Copy link
Contributor

@kuipumu kuipumu commented Sep 27, 2023

Description

This PR adds a fix to the validation of the LTI consumer XBlock custom parameters field. The previously merged PR #392 introduced a bug that broke backwards compatible with custom parameters such has: ["next=something?repo=https://github.com/org/repo?folder=/home/user&branch=main"]. This issue was raised on #410.

Type of Change

  • Modify CUSTOM_PARAMETER_REGEX constant.
  • Include tests for all modified code.

Testing:

  1. Create a course and add a LTI consumer XBlock.
  2. Add custom parameters to the XBlock settings.
["next=something?repo=https://github.com/org/repo?folder=/home/user&branch=main"] 
  1. Go to the live course and execute an LTI launch.
  2. The custom parameters should be present on the LTI launch data.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Sep 27, 2023
@openedx-webhooks
Copy link

openedx-webhooks commented Sep 27, 2023

Thanks for the pull request, @kuipumu! 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:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

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
Copy link

codecov bot commented Sep 27, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (07a8c26) 97.84% compared to head (dbc0590) 97.84%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #412   +/-   ##
=======================================
  Coverage   97.84%   97.84%           
=======================================
  Files          77       77           
  Lines        6696     6696           
=======================================
  Hits         6552     6552           
  Misses        144      144           
Flag Coverage Δ
unittests 97.84% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@alangsto alangsto left a comment

Choose a reason for hiding this comment

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

This looks good, thank you!

@alangsto
Copy link
Contributor

@kuipumu would you mind updating the version in https://github.com/openedx/xblock-lti-consumer/blob/master/lti_consumer/__init__.py? Thank you!

@kuipumu
Copy link
Contributor Author

kuipumu commented Sep 27, 2023

@alangsto Sure, just added a commit with an update to init and CHANGELOG.rst

@mphilbrick211
Copy link

Hi @alangsto! Are you able to merge this if it's good-to-go?

Copy link
Contributor

@alangsto alangsto left a comment

Choose a reason for hiding this comment

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

Looks great, thank you!

@mphilbrick211
Copy link

@kuipumu Hi there! Would you mind resolving the branch conflicts that have popped up?

@alangsto - is this something you can merge for us? Thanks!

@kuipumu kuipumu force-pushed the kuipumu/custom_parameters_validation_fix branch from 0be421a to dbc0590 Compare November 17, 2023 05:12
@kuipumu
Copy link
Contributor Author

kuipumu commented Nov 17, 2023

@mphilbrick211 I resolved the conflicts and updated the version and changelog.

@mphilbrick211
Copy link

Thanks, @kuipumu! @alangsto this look ready for merge. Thanks!

@alangsto alangsto merged commit 62e2a79 into openedx:master Nov 20, 2023
7 checks passed
@openedx-webhooks
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

4 participants