Skip to content
Snippets Groups Projects
  1. Jun 27, 2023
  2. Feb 07, 2023
  3. Aug 22, 2022
    • Michael Roytman's avatar
      Merge pull request #278 from openedx/mroytman/MST-1585-LtiError-user_id-LTI-1.1-launch · 682c90ee
      Michael Roytman authored
      Handle LtiError Error During LTI 1.1 Launch When Calling user_id for Unauthenticated User
      682c90ee
    • michaelroytman's avatar
      feat: handle 500 errors that occur when user is unauthenticated during LTI 1.1 launch · e52699f3
      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.
      e52699f3
  4. Aug 19, 2022
  5. Aug 18, 2022
  6. Aug 17, 2022
    • Arunmozhi's avatar
      feat: Decouple LTI 1.3 from LTI Consumer XBlock functionality · ec43c30d
      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
      ec43c30d
  7. Aug 16, 2022
  8. Aug 03, 2022
  9. Aug 02, 2022
    • michaelroytman's avatar
      fix: missing exception details in logs · 161282e6
      michaelroytman authored
      The error handler in LtiConsumerXBlock.lti_1p3_launch_callback logs a warning when a select set of exceptions are handled. That log does not contain useful information about the nature of the exception, because the exceptions were not being instantiated with error messages. The try...catch is a large block that contains code that can raise a multitude of errors, so these changes will enable better debugging.
      
      This commit:
      * adds helpful messages to the raised exceptions.
      * adds the "exc_info=True" argument to include the stack trace of the handled exception.
      * adds ValueError and TypeError to the list of handled exceptions, because the code can raise exceptions of these types.
      161282e6
    • edX requirements bot's avatar
      2b62f415
  10. Jul 27, 2022
  11. Jul 22, 2022
    • Michael Roytman's avatar
      Merge pull request #268 from openedx/mroytman/MST-1540-debugging-logs · d6069241
      Michael Roytman authored
      test: add debugging log statements for user_id LtiError
      d6069241
    • michaelroytman's avatar
      test: add debugging log statements for user_id LtiError · 617d8781
      michaelroytman authored
      This commit adds supplemental logging to diagnose the bug reported in MST-1540: https://2u-internal.atlassian.net/browse/MST-1540. The bug is that learners are encountering the LtiError when trying to do an LTI launch. The learners appear to be authenticated, so this error should not occur. The bug is not easily reproducible in production or development, so this supplemental logging is added to help understand the user's state when the error is raised.
      
      The current hypothesis is that user is temporarily represented by the AnonymousUser in the request that is made when doing the LTI launch, despite the user otherwise being authenticated. Logging in Splunk suggests that this is the case, because logs are of the following form, "2022-07-22 15:10:14,214 ERROR 5067 [django.request] [user None] [ip <ip>] log.py:224 - Internal Server Error: /courses/<course_key>/xblock/<usage_key>/handler/lti_launch_handler", where the "user" is "None". This logging should prove or disprove this hypothesis and provide direction about where else to look.
      
      This logging should be removed once MST-1540 is resolved.
      617d8781
    • Michael Roytman's avatar
      Merge pull request #266 from openedx/mroytman/MST-1467-fix-edit-menu-bugs · dcd5135c
      Michael Roytman authored
      fix: hidden lti_version and 1.3 fields in edit view and incorrect menu behavior in Javascript
      dcd5135c
    • michaelroytman's avatar
      fix: hidden lti_version and 1.3 fields in edit view and incorrect menu behavior in Javascript · 34003401
      michaelroytman authored
      This commit fixes three bugs.
      
      1. The first bug is that the lti_version field is inappropriately hidden in the Studio author view edit menu when the selected config_type is database.
      
      2. The second bug is that the editable_fields property of the LtiConsumerXBlock is inappropriately excluding LTI 1.3 fields when the config_type is database. The editable_fields property should include LTI 1.3 fields even when the config_type is database, because the Javascript defined in xblock_studio_view.js may want to show these fields if the user selects a different config_type in the menu. We want to support a dynamic edit menu, so these fields must be considered editable by the XBlock in order for the Javascript to be able to manipulate them.
      
      3. The third bug is in inconsistent rendering of the Studio author view edit menu. Depending on the order in which a user selects lti_version, config_type, or lti_1p3_tool_key_mode, different sets of fields are displayed, due to the overlapping sets of rules that govern what fields should be hidden or shown for a given field selection. This commit corrects this inconsistent rendering by first showing all fields and then gradually hiding fields depending on the sets of rules, for each change to the fields.
      34003401
  12. Jul 18, 2022
    • Michael Roytman's avatar
      Merge pull request #260 from openedx/mroytman/MST-1467-lti-django-configuration · 5a823654
      Michael Roytman authored
      feat: Add core LTI 1.3  and LTI Advantage configuration to LTIConfiguration model and support xBlock using the database
      5a823654
    • michaelroytman's avatar
      feat: Add core LTI 1.3 and Advantage configuration to LTIConfiguration model · d5e98141
      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.
      d5e98141
  13. Jul 11, 2022
  14. Jul 05, 2022
  15. Jun 27, 2022
  16. Jun 22, 2022
  17. Jun 09, 2022
  18. Jun 08, 2022
  19. Jun 02, 2022
  20. May 23, 2022
  21. May 11, 2022
  22. May 09, 2022
  23. May 02, 2022
Loading