feat: decouple xblock and lti config to fix copy-paste#606
feat: decouple xblock and lti config to fix copy-paste#606navinkarkera wants to merge 13 commits intoopenedx:masterfrom
Conversation
|
Thanks for the pull request, @navinkarkera! This repository is currently maintained by 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 approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo 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:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. 🔘 Update the status of your PRYour PR is currently marked as a draft. After completing the steps above, update its status by clicking "Ready for Review", or removing "WIP" from the title, as appropriate. 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:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
e3bfbcc to
a8b4ea1
Compare
|
@feanil @rpenido @Faraz32123 This is not completely ready yet but I want you guys to be aware of these changes. Kindly go through the description and the changes and let me know your thoughts. @ayub02 Please find the instructions and sandbox details in the description. Please try and test all LTI features and let me know if you face any difficulties. |
|
Hi @navinkarkera! Thank you for the PR! I did a quick check through the code, and it is looking good, but I have one doubt: |
|
@rpenido There are some problems that I can think of with that approach:
We can probably overcome above issues but it will take a lot more time to implement. However another problem is that the decoupling of LTI config and xblock was done to allow launching LTI outside of xblock context, see https://github.com/openedx/xblock-lti-consumer/blob/master/docs/decisions/0007-lti-launch-decoupling.rst. So removing LTI config table would undo the decision. |
Also make location optional and required only when config type is set to xblock.
Description:
Decouples config ID and xblock usage_key such that the same configuration can be used by more than one xblock.
config_idfield to LTI xblock so that copy-paste works, when a lti xblock with config id is pasted it just creates a new link entry in the new table pointing to the existing lti configuration.Related to: #594
Concerns:
We need to extensively test this PR with all LTI features including proctoring, deep linking, scoring etc. The existing architecture tightly couples config_id and location, and this resulted in urls with config_id that only link to a single xblock, however this PR decouples config_id and xblocks resulting in multiple xblocks being related to a single config_id. I have tried to narrow down to single xblock using
resource_link_idwherever possible but defaulted to first instance of link entry in cases where it is not possible (In theory this should work as the linked configuration will be correct in any case).Questions/Suggestions:
Configuration Typefield, as this change should be same in database as well as xblock to make sure that it works properly.Problem: We cannot update the configuration in database as it is shared between original and the copy.
Possible solution: When the author changes
config_type, we create a new configuration entry for this xblock with a new config_id.Test instructions: