Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-44763

Improve LTI Tool Matching During Common Cartridge Import

    XMLWordPrintable

    Details

    • 21 Status:
      Resolved
    • 20 status:
      Please Merge
    • Test Plan:
      Hide

      Register a global LTI tool for

      https://www.py4e.com/

      key: 12345

      secret: secret

      Import the attached cartridge into Lessons.

      Without this fix, go into Site-Mange -> External tools and you will see some tools with a title of the URL of the tool links.  Click on an LTI link and you will see a configuration screen.

      With this fix (in a different site) do the import and there will be no tools in  Site-Mange -> External tools and the LTI links will work right away.

      Show
      Register a global LTI tool for https://www.py4e.com/ key: 12345 secret: secret Import the attached cartridge into Lessons. Without this fix, go into Site-Mange -> External tools and you will see some tools with a title of the URL of the tool links.  Click on an LTI link and you will see a configuration screen. With this fix (in a different site) do the import and there will be no tools in  Site-Mange -> External tools and the LTI links will work right away.

      Description

      Currently when Lessons is importing a Common Cartridge it looks for a registered tool to match the incoming link to so that it has a key and secret.   If it cannot find a tool with the URL, it makes a new empty tool with no secret and connects the link to the tool - the tools cannot be launched - until they are clocked once and a secret is set for the newly created tool.

      The import code does remove the query string when looking for tools to avoid a crazy proliferation of new tools.

      This works but is less than ideal.   The URL matching should try a little harder to find a tool before giving up and making a new tool that is missing a secret.

      The way this will be done is

      • Look for a local tool with an exact match
      • Next we snip off the query string and check for a local tool
      • Next we look for a local tool that has a prefix match that at least includes protocol and host

      Then we go through the global tools following the same priority:

      • Look for a global tool with an exact match
      • Next we snip off the query string and check for a global tool
      • Next we look for a global tool that has a prefix match that at least includes protocol and host

      After all that if we can't find a matching tool, we punt and make a new tool without a secret (current behavior).

      The local comes first to allow for an override - but in general - the most common case is that there will be no per-site (i.e. local) tools installed in the site so they will just find globally installed tools.  And if you disallow per-site tool creation, then the fact that per-site tools are checked first does not matter.

       

        Gliffy Diagrams

          Zeplin

            Attachments

            1. py4e_export.imscc
              6 kB
            2. SAK-44763-Bad-Extra-Tools.png
              SAK-44763-Bad-Extra-Tools.png
              331 kB
            3. SAK-44763-Good-Global.png
              SAK-44763-Good-Global.png
              213 kB
            4. SAK-44763-Good-Launch.png
              SAK-44763-Good-Launch.png
              211 kB
            5. SAK-44763-Secret-Config.png
              SAK-44763-Secret-Config.png
              232 kB

              Activity

                People

                Assignee:
                csev Charles Severance
                Reporter:
                csev Charles Severance
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Git Integration