Fox
(Fox Danger Piacenti)
July 28, 2023, 6:46pm
1
Hi @team ! Ed has requested that we check internally for anyone who is willing and has contribution hours to look over one or more of these new pull requests on LTI functionality.
The link to the Slack thread is here for some background, and the pull requests are here:
openedx:master
← Pearson-Advance:kuipumu/lti_1p3_reusable_configuration
opened 10:34PM - 10 Jul 23 UTC
## Description
This PR adds compatibility for LTI 1.3 external configurations… to the LTI consumer XBlock. This change allow the XBlock to use values from the external LTI configuration when enabled and setup. This PR also includes a fix that adds validation to the external_config field on the LTI consumer XBlock and also improves the behavior of the JS that handles the visibility of configuration fields on the LTI consumer XBlock.
## Type of Change
- [x] Modify get_lti_1p3_launch_info function on api module.
- [x] Modify LtiConsumerXBlock validate_field_data method.
- [x] Modify LtiConfiguration get_lti_advantage_ags_mode method.
- [x] Modify LtiConfiguration get_lti_advantage_deep_linking_enabled method.
- [x] Modify LtiConfiguration get_lti_advantage_deep_linking_launch_url method.
- [x] Modify LtiConfiguration get_lti_advantage_nrps_enabled method.
- [x] Modify LtiConfiguration get_lti_1p3_redirect_uris method.
- [x] Modify LtiConfiguration _get_lti_1p3_consumer method.
- [x] Modify xblock_studio_view.js.
- [x] Include tests for all added and modified code.
## Testing
1. Install and configure openedx-ltistore (follow the setup steps from: https://github.com/openedx/xblock-lti-consumer/pull/239 and use the related PR: https://github.com/open-craft/openedx-ltistore/pull/2)
2. Create an IMS reference tool: https://lti-ri.imsglobal.org/lti/tools
3. Go to http://localhost:18000/admin/lti_store/externallticonfiguration/ and create a new external LTI 1.3 configuration.
4. Fill the "LTI 1.3 Private Key", "LTI 1.3 Client ID" and "LTI 1.3 Tool Keyset URL" or "LTI 1.3 Tool Public Key" field.
5. Create a course and add a LTI 1.3 consumer XBlock.
6. Set the consumer XBlock to user an external configuration and set the reusable configuration ID (follow the steps on how to get the filter key from: https://github.com/openedx/xblock-lti-consumer/pull/239)
7. Copy the keyset and access token URL from the XBlock preview back to the IMS reference tool previously created.
8. Go to the course a launch the XBlock.
9. The LTI 1.3 launch should be valid.
10. Repeat the test setting the OIDC, launch URL and deep linking URL on the XBlock and check if the values from the XBlock are being used instead of the values on the external configuration.
11. Check that the XBlock doesn't allow you to set the external configuration type without adding an external configuration ID.
open-craft:main
← Pearson-Advance:kuipumu/lti_1p3_reusable_configuration
opened 10:33PM - 10 Jul 23 UTC
## Description
This PR adds compatibility for LTI 1.3 external configuration … to the openedx-ltistore. This change adds missing fields required for LTI 1.3 external reusable configurations to work, also adds the lti_1p3_access_token_url and lti_1p3_keyset_url properties to the ExternalLtiConfiguration and the lti_1p3_access_token_url and lti_1p3_keyset_url values to the GetLtiConfigurations pipeline, these are required for the LTI consumer XBlock to show the correct keyset and access token URL to the course author.
## Type of Change
- [x] Add LTI 1.3 fields to ExternalLtiConfiguration model.
- [x] Add lti_1p3_access_token_url and lti_1p3_keyset_url properties to ExternalLtiConfiguration model.
- [x] Add lti_1p3_access_token_url and lti_1p3_keyset_url values to GetLtiConfigurations pipeline.
- [x] Include unit tests for all added and modified code.
## Testing
1. Install xblock-lti-consumer (Use the related PR: https://github.com/openedx/xblock-lti-consumer/pull/390)
2. Install and configure openedx-ltistore (follow the setup steps from: https://github.com/openedx/xblock-lti-consumer/pull/239 and use the PR related to this ticket)
3. Create an IMS reference tool: https://lti-ri.imsglobal.org/lti/tools
4. Go to http://localhost:18000/admin/lti_store/externallticonfiguration/ and create a new external LTI 1.3 configuration.
5. Fill the "LTI 1.3 Private Key", "LTI 1.3 Client ID" and "LTI 1.3 Tool Keyset URL" or "LTI 1.3 Tool Public Key" field.
6. Create a course and add a LTI 1.3 consumer XBlock.
7. Set the consumer XBlock to user an external configuration and set the reusable configuration ID (follow the steps on how to get the filter key from: https://github.com/openedx/xblock-lti-consumer/pull/239)
8. Copy the keyset and access token URL from the XBlock preview back to the IMS reference tool previously created.
9. Go to the course a launch the XBlock.
10. The LTI 1.3 launch should be valid.
openedx:master
← Pearson-Advance:kuipumu/ccx_lti_configuration_fix
opened 10:35PM - 10 Jul 23 UTC
## Description
This PR adds compatibility fix for CCXs and external reusable … configurations to the LTI consumer XBlock. This also includes changes to previously added fixes for CCXs using the LTI consumer XBlock. This changes allow the LTI consumer XBlock to sync values from the main CCX LTI configuration model to all of it's children CCX LTI configurations and vice versa.
## Type of Change
- [x] Remove previous CCX fixes.
- [x] Add model_to_dict function to utils module.
- [x] Add LtiConfiguration sync_configurations method.
- [x] Modify LtiConfiguration save method.
- [x] Include tests for all added and modified code.
## Testing
1. Create a course and add a LTI consumer XBlock.
2. Create a CCX of the previously created course.
3. Launch the CCX course unit with the LTI consumer XBlock.
4. Go to http://localhost:18000/admin/lti_consumer/lticonfiguration/.
5. Both the main LTI configuration and it's children CCX configuration should have the same values.
6. Update any value on the main LTI configuration.
7. Go to the children CCX LTI configuration.
8. The values from the main LTI configuration should be reflected.
9. Delete both LTI configurations.
10. Launch the CCX course unit with the LTI consumer XBlock.
11. Launch the course unit with the main LTI consumer XBlock.
12. Go back to the LTI configuration admin and search for both newly created configurations.
13. Both LTI configurations values should be synced.
openedx:master
← Pearson-Advance:kuipumu/lti_1p3_custom_parameters_fix
opened 10:36PM - 10 Jul 23 UTC
## Description
This PR adds a feature that allows the LTI consumer XBlock to … send custom parameters (including dynamic custom parameters) and extra claims to LTI 1.3 launches.
## Type of Change
- [x] Add LtiConsumerXBlock get_lti_1p3_custom_parameters method.
- [x] Modify LtiConsumerXBlock get_lti_1p3_launch_data method.
- [x] Include tests for all added and modified code.
## Testing:
2. Add LTI custom params template setting:
```
# Here we set the value to any module and function
# that can be imported and returns a str.
LTI_CUSTOM_PARAM_TEMPLATES = {
'test_param': 'django.utils.html:escape'
}
```
3. Add a LTI processors to XBLOCK_SETTINGS (Example: https://github.com/appsembler/tahoe-lti).
4. Create a course and add a LTI 1.3 consumer XBlock.
5. Add custom parameters to the XBlock settings.
```
["test=test", "test_param=${test_param}"]
```
6. Enable the "Send extra parameters" setting.
7. Go to the live course and execute an LTI 1.3 launch.
8. The custom parameters and extra claims should be present on the https://purl.imsglobal.org/spec/lti/claim/custom claim.
Reviewing these pull requests is not only helpful from a community perspective but also can help us with a larger project we’re hoping to start with Axim concerning LTI key centralization. Now that these PRs exist it’s likely they will need to be merged before we can begin.
If you’re up for the task, please reply to this thread and I can get a ticket created for you and update Ed. Thanks!
3 Likes
@Fox , yep, I can look into this in the next sprint. By the way, we have only two CCs for this XBlock.
@tecoholic , could you please add the Core group to the GitHub - open-craft/openedx-ltistore: A Django plugin app for Open edX Platform to store LTI Keys centrally repository?
3 Likes
Fox
(Fox Danger Piacenti)
July 31, 2023, 11:38am
3
Thank you! I’ve scheduled BB-7745 for you.
1 Like
tecoholic
(Arunmozhi)
August 1, 2023, 10:40am
4
@Agrendalath Done. Just noticed that only I had access. I didn’t know org repos were access restricted to the individuals creating them. Wow.
1 Like