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

Site Info > Stealthed LTI tools are removed erroneously if there are no visible LTI tools present

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 12.7, 19.6, 20.3, 21.0, 22.0 [Tentative]
    • Fix Version/s: 21.1, 20.4, 22.0 [Tentative]
    • Component/s: Site Info
    • Labels:
      None
    • 21 Status:
      Verified
    • 20 status:
      Verified
    • Test Plan:
      Hide
      1. In a site that contains only stealthed LTI tool(s):
        1. Verify that adding another non-stealthed tool results in adding the desired tool, and does not remove the stealthed tool erroneously
      2. In a site that contains both stealthed and visible LTI tool(s):
        1. Verify that adding any other non-LTI tool does not remove any of the LTI tools
        2. Verify that removing any other non-LTI tool does not remove either of the LTI tools
        3. Verify that removing the visible LTI tool does not remove the stealthed LTI tool
      3. In a site that contains no LTI tools:
        1. Verify functionality works as expected (no LTI tools are removed for obvious reasons, and no LTI tools are added unless you tell it to do so)
      Show
      In a site that contains only stealthed LTI tool(s): Verify that adding another non-stealthed tool results in adding the desired tool, and does not remove the stealthed tool erroneously In a site that contains both stealthed and visible LTI tool(s): Verify that adding any other non-LTI tool does not remove any of the LTI tools Verify that removing any other non-LTI tool does not remove either of the LTI tools Verify that removing the visible LTI tool does not remove the stealthed LTI tool In a site that contains no LTI tools: Verify functionality works as expected (no LTI tools are removed for obvious reasons, and no LTI tools are added unless you tell it to do so)

      Description

      This is directly related to SAK-41201. If a site contains only stealthed LTI tool(s), they will be erroneously removed if the user goes through the Edit Tools process. The test plan in SAK-41201 only mentions testing in a site with both visible and stealthed LTI tools, and as such this issue was not discovered.

      The problem is that the algorithm introduced in SAK-41201 is only run if the ltiSelectedTools list is empty. However, this list only contains LTI tools that have been added in this operation. Therefore if no LTI tools are being added to the site, it never adds the stealthed LTI tools back into the list, and this means that they will be removed.

      The fix is to check not only if ltiSelectedTools is not empty, but also existingLtiIds:

      if (!ltiSelectedTools.isEmpty() || !existingLtiIds.isEmpty())
      ...
      ...
      ...
      

      In this way, the stealthed LTI tools are added back into the list if there are either existing LTI tools not being removed, or if there are LTI tools being added to the site.

        Gliffy Diagrams

          Zeplin

            Attachments

              Issue Links

                Activity

                  People

                  Assignee:
                  maintenanceteam Core Team
                  Reporter:
                  bjones86 Brian Jones
                  Votes:
                  0 Vote for this issue
                  Watchers:
                  5 Start watching this issue

                    Dates

                    Created:
                    Updated:
                    Resolved:

                      Git Integration