- Oct 13, 2022
-
-
michaelroytman authored
Purpose ------- The purpose of these changes is to decouple the LTI 1.3 launch from the LtiConsumerXBlock. It is in accordance with the ADR "0007 Decouple LTI 1.3 Launch from XBlock and edX Platform", which is currently under review. The pull request for the ADR is here: https://github.com/openedx/xblock-lti-consumer/pull/281. The general premise of these changes is to shift the responsibility of defining key launch claims to users of the library. Such claims include user ID, user role, resource link ID, etc. Prior to this change, this context was defined directly in the launch view by referencing XBlock fields and functions, thereby tying the LTI 1.3 launch to the XBlock. By shifting the responsibility out of the view, we will be able to genericize the launch and make it functional in more contexts than just the XBlock and the XBlock runtime. In short, the key launch claims are encoded in an instance of a data class Lti1p3LaunchData. Users of the library will instantiate this class with necessary launch data to it and pass the instance to various methods of the Python API to communicate the data to the library. Please see the aforementioned ADR for more details about this decoupling strategy. Note that the majority of these changes affect only the basic LTI 1.3 launch. There have largely been no changes to LTI 1.3 Advantage Services. The one exception is the Deep Linking content launch endpoint. This is because this launch is implemented in the basic LTI 1.3 launch, and it was necessary to make the same changes to the deep linking content launch to ensure that it works properly. Otherwise, LTI 1.3 Advantage Services are out of scope of these changes. Change Summary for Developers ----------------------------- Below is a summary of changes contained in this pull request. * added an Lti1p3LaunchData data class * added caching for Lti1p3LaunchData to limit data sent in request query or form parameters * BREAKING CHANGE: modified Python API methods to take Lti1p3LaunchData as a required argument ** get_lti_1p3_launch_info ** get_lti_1p3_launch_start_url ** get_lti_1p3_content_url * replaced references to LtiConsumerXBlock.location with Lti1p3LaunchData.config_id * removed definition of key LTI 1.3 claims from the launch_gate_endpoint and instantiated Lti1p3LaunchData from within the LtiConsumerXBlock instead * added a required launch_data_key request query parameter to the deep_linking_content_endpoint and refactored associated templates and template tags to pass this parameter in the request to the view Change Summary for Course Staff and Instructors ----------------------------------------------- The only changes relevant for course staff and instructors is that the access token and keyset URLs displayed in Studio have changed in format. The old format was: Access Token URL: https://courses.edx.org/api/lti_consumer/v1/token/block-v1:edX+999+2022Q3+type@lti_consumer+block@714c10a5e4df452da9d058788acb56be Keyset URL: https://courses.edx.org/api/lti_consumer/v1/public_keysets/block-v1:edX+999+2022Q3+type@lti_consumer+block@714c10a5e4df452da9d058788acb56be The new format is: Access Token URL: https://courses.edx.org/api/lti_consumer/v1/token/c3f6af60-dbf2-4f85-8974-4ff870068d43 Keyset URL: https://courses.edx.org/api/lti_consumer/v1/public_keysets/c3f6af60-dbf2-4f85-8974-4ff870068d43 The difference is in the slug at the end of the URL. In the old format, the slug was the UsageKey of the XBlock associated with the LTI integration. In the new format, the slug is the config_id of the LtiConfiguration associated with the LTI integration. This is an iterative step toward decoupling the access_token_endpoint and the public_keyset_endpoint views from the XBlock location field. The XBlock location field appears as the usage_key parameter to both views. We cannot simply remove the usage_key parameter from the views, because existing LTI 1.3 integrations may have been created using the old format, and we need to maintain backwards compatibility. This change, however, prevents new integrations from being created that are coupled to the XBlock. In the future, we may address integrations that use the old format to fully decouple the XBlock from the views. Testing ------- Unit tests were added for all changes. In addition, manual testing was performed using the instructions in the documents listed below. * https://github.com/openedx/xblock-lti-consumer#lti-13 * https://openedx.atlassian.net/wiki/spaces/COMM/pages/1858601008/How+to+run+the+LTI+Validation+test Resources --------- JIRA: MST-1603: https://2u-internal.atlassian.net/browse/MST-1603 BREAKING CHANGE
-
- Oct 03, 2022
-
-
edX requirements bot authored
* chore: Updating Python Requirements * fix: update is_valid arg Co-authored-by:
Alie Langston <alangsto@wellesley.edu>
-
- Aug 22, 2022
-
-
michaelroytman authored
In the LTI 1.1 launch handler, we set the user context, including the user_id. We do this by calling to the LMS's DjangoXBlockUserService to get information about the user. Sometimes, the user is unauthenticated. Sometimes, this is because the user is a web crawler. Other times, the user is a real user, but we do not know why the user is unauthenticated. We have some theories, but we have been unable to confirm them. Regardless, we should not surface a 500 error to the user. This commit adds handling for the LtiError that is raised when a user is unauthenticated during an LTI 1.1 launch. It catches the LtiError and renders an error page. The error page that was used for LTI 1.3 launches, formerly named "lti_1p3_launch_error.html", has been renamed to "lti_launch_error.html" to reflect the fact that it is used for both LTI 1.1 and 1.3 launches. It was modified to remove the reference to the version of LTI used by the XBlock; these details are unnecessary for a learner, and removing them allows us to reuse a single template for both LTI versions.
-
- Aug 17, 2022
-
-
Arunmozhi authored
Move XBlock endpoints to Django models and implement backwards compatible views. Relevant commits: * refactor: move LTI 1.3 access token endpoint to plugin view * refactor: remove the xblock handler and add tests to api view * refactor: move the lti_1p3_launch_callback logic to the django view * feat: adds access token view for backward compatibility * refactor: make launch urls use config_id when block is missing * refactor: remove launch_callback_handler from XBlock
-
- Jul 18, 2022
-
-
michaelroytman authored
This commit adds additional core LTI 1.3 and LTI Advantage variables to the LTIConfiguration model. The additional core LTI 1.3 variables are lti_1p3_oidc_url, lti_1p3_launch_url, lti_1p3_tool_public_key, and lti_1p3_tool_keyset_url. The additional LTI Advantage variables are lti_advantage_enable_nrps, lti_advantage_deep_linking_enabled, lti_advantage_deep_linking_launch_url, and lti_advantage_ags_mode. This commit also adds a configuration type to the LtiConsumerXBlock to support the storage of these LTI variables on the LTIConfiguration model (i.e. the database) instead of the xBlock itself. Changes that allow the use of this configuration option are behind the lti_consumer.enable_database_config CourseWaffleFlag.
-
- Jun 27, 2022
-
-
Zachary Hancock authored
* feat: add event tracking to lti launch * style: move tracking fn to new file * fix: add missed track call to LTI1.3 * feat: release tasks
-
- May 23, 2022
-
-
Eugene Dyudyunov authored
Rename toggle_warnings to toggle_warning for consistency with setting_warning.
-
- May 11, 2022
-
-
Eugene Dyudyunov authored
This update caused by removing support for the LegacyWaffle* classes. See https://github.com/openedx/public-engineering/issues/28 for details.
-
- May 09, 2022
-
-
Arunmozhi authored
This adds support for loading LTI 1.1 configurations from external sources using openedx-filters. It allows the users to select the configuration provided by the filter and configure the component without explicitly entering any details.
-
- Mar 18, 2022
-
-
Giovanni Cimolin da Silva authored
Signed-off-by:
Giovanni Cimolin da Silva <giovannicimolin@gmail.com>
-
- Feb 01, 2022
-
-
Simon Chen authored
-
- Jan 31, 2022
-
-
Mohammad Ahtasham ul Hassan authored
-
- Jan 18, 2022
-
-
Mohammad Ahtasham ul Hassan authored
-
- Oct 06, 2021
-
-
Jawayria authored
-
- Jul 01, 2021
-
-
Kshitij Sobti authored
refactor: Rename CourseEditLTIFieldsEnabledFlag to CourseAllowPIISharingInLTIFlag and use it for LTI1.3 This commit renames the CourseEditLTIFieldsEnabledFlag to CourseAllowPIISharingInLTIFlag since the aim is to expand its scope to all LTI-related PII sharing. It also removes the current LTI1.3 waffle flag for PII sharing.
-
- Jun 14, 2021
-
-
Kshitij Sobti authored
This moves the CourseEditLTIFieldsEnabledFlag from edx-platform to this repo. This allows using the flag from both lms and studio.
-
- Jun 09, 2021
-
-
Giovanni Cimolin da Silva authored
This removes feature flags that were in place for development, but aren't needed in production. * feat: set LTI 1.3 support enabled by default * feat: Improve settings wording * chore: Update translation files * chore: Version bump * quality: Fix pylint errors and improve waffleflag documentation * doc: Add changes to changelog * feat: Remove LTI 1.3 flags and enable services by default * doc: Update NRPS ADR * doc: Fix typo * Update README.rst Co-authored-by:
Ned Batchelder <ned@nedbatchelder.com> * Update README.rst Co-authored-by:
Ned Batchelder <ned@nedbatchelder.com> * Update setup.py Co-authored-by:
Ned Batchelder <ned@nedbatchelder.com> Co-authored-by:
Ned Batchelder <ned@nedbatchelder.com>
-
- Jun 03, 2021
-
-
Shimul Chowdhury authored
This depends on a new API in edx-platform: get_course_members
-
- Apr 13, 2021
-
-
Giovanni Cimolin da Silva authored
This commit re-enables the programmatic grades support on LTI AGS. This allows complex tools to manage grades on their own. The default value keeps the old behavior (declarative mode).
-
- Apr 09, 2021
-
-
stvn authored
Fall-back to the old path. Once the LMS has fully switched over to this new path [1], we can remove the legacy (LMS) import support here. - [1] https://github.com/edx/edx-platform/pull/27289
-
- Mar 18, 2021
-
-
Giovanni Cimolin da Silva authored
* Improve content presentation and add multiple content display support This commit: * Improves LTI content presentation handling, and correctly displays LTI DL content in the LMS * Adds support for presenting multiple DL content items on the same block * Addressing review comments * Nits * Improve test and fix issue [BD-24][TNL-8072]
-
- Mar 03, 2021
-
-
Giovanni Cimolin da Silva authored
* Improve logging and error message presentation * Add full deep linking content data on studio * Internationalize LTI 1.3 templates * Add translation tooling Signed-off-by:
Giovanni Cimolin da Silva <giovannicimolin@gmail.com> * Update translations * Address review comments * Additional logging improvements * Address review comments, fix test Signed-off-by:
Giovanni Cimolin da Silva <giovannicimolin@gmail.com>
-
- Feb 16, 2021
-
-
Shimul Chowdhury authored
Fix broken tests Add serializer for `link` content type
-
Shimul Chowdhury authored
-
- Jan 29, 2021
-
-
Giovanni Cimolin da Silva authored
This implements the endpoint that LTI tools use to return the deep linking configuration to the LMS, along with the `ltiResourceLink` type to allow testing with demo tool. Signed-off-by:
Giovanni Cimolin da Silva <giovannicimolin@gmail.com>
-
- Jan 21, 2021
-
-
edX requirements bot authored
-
- Jan 15, 2021
-
-
Kshitij Sobti authored
-
- Nov 20, 2020
-
-
Ned Batchelder authored
-
Shimul Chowdhury authored
[BD-24] [TNL-7661] [BB-3172] LTI Improvements - Use declarative grading model on XBlock launch (#116) * create default LineItem, WIP grade save * add score to django admin * WIP: find user and save grade to xblock * boolean pragramatic grade interaction flag and optional params in enable_ags method * Submit grades using grade signals * lineitem urls should be optional * lineitem is now readonly in declarative method * test grade_submit called properly * quality issue * raise LTIError * moved listener to signal.py, refactored models.py, added due and start date, updated tests. * use load_block_as_anonymous_user and remove load_block, refactor tests * refactor test to fix quality issue * make lineitems_url required * refactor tests, accept_grades_past_due on check * test accept_grades_past_due * add comma to last items * refactor get_lti_ags_lineitems_url * make sure crum returns user and not None * nitpicks & use maximum score when given score is larger than maximum * fix docstring of load_block_as_anonymous_user
-
- Nov 12, 2020
-
-
Giovanni Cimolin da Silva authored
* Move LTI 1.3 Key management to model This: - Removes the need to load the modulestore on every public keyset endpoint call. - Simplifies the block structure and parent method overrides. - Removes private key, client id and related parameters from XBlock fields It also includes a migration from the data stored in the block to the model. * Cleanup unused test helpers * Version bump * Addressing review comments
-
- Nov 10, 2020
-
-
Giovanni Cimolin da Silva authored
-
- Oct 23, 2020
-
-
Patrick Cockwell authored
* BD-24 Implement LTI AGS Score Publish Service and Results Service * Address PR comments and add more validation * Address PR comments * Add tests; Fix error with scoreMaximum; Fix quality issues; Adjust user_id results url slightly * Add permissions tests and address other PR comments * Fix quality test * Address PR comments
-
- Oct 05, 2020
-
-
Giovanni Cimolin da Silva authored
* Add initial version of LineItem Implementation Signed-off-by:
Giovanni Cimolin da Silva <giovannicimolin@gmail.com> * Adding tests * Add LTI tests and fix quality isses * Quality nit * Add missing requirement, upgrade * Squash migrations * Fix merge conflicts * Addressing review comments
-
- Sep 29, 2020
-
-
Giovanni Cimolin da Silva authored
* Add django url testing support * Add tests to django views, implement compat layer * Addressing review comments * Improve tests and test descriptions * Nit
-
- Sep 22, 2020
-
-
Giovanni Cimolin da Silva authored
* Implement extensions and view support for LTI * Add missing iss to token * Add missing requirement, upgrade requirements * Improving comment * Add missing exception statement * Update lti_consumer/lti_1p3/tests/extensions/rest_framework/test_authentication.py Co-authored-by:
Ned Batchelder <ned@nedbatchelder.com> Co-authored-by:
Ned Batchelder <ned@nedbatchelder.com>
-
- Sep 04, 2020
-
-
Ned Batchelder authored
-
- Jun 25, 2020
-
-
Giovanni Cimolin da Silva authored
This commit adds support for the LTI 1.3 Access token endpoint, as detailed in the IMS Security Framework. The token is generated using the consumer's private key (stored in the XBlock) after validating the message sent by the LTI Tool using it's public key. Signed-off-by:
Giovanni Cimolin da Silva <giovannicimolin@gmail.com>
-
Giovanni Cimolin da Silva authored
Features: Implement LTI 1.3 launch support. Add LTI 1.3 passthrough views as LMS plugins.
-