Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-74906

Adding multiple LTI activities via content selection is failing silently when global search is enabled

    XMLWordPrintable

Details

    • MOODLE_311_STABLE, MOODLE_400_STABLE
    • MOODLE_311_STABLE, MOODLE_400_STABLE
    • MDL-74906-311
    • MDL-74906-400
    • MDL-74906-master
    • Hide

      Prerequisites

      1. Your site need to be available publicly over HTTPS. Use something like ngrok to do this.

      Testing multiple content items with global search enabled

      1. In a new site, log in as admin
      2. Enable global search via Site admin > Advanced features > Enable global search (make sure to save)
      3. Go to Site admin > Plugins > External tool > Manage tools
      4. Register a new LTI Advantage tool using the URL below (just paste it into the text field and click "Add LTI Advantage):
        https://robotest.theedtech.dev/register
      5. Edit the tool card once you see it.
      6. Set "Tool configuration usage" to "Show in activity chooser and as a preconfigured tool"
      7. Save
      8. Activate the pre-configured tool using the button on the tool card.
      9. Create a course and turn editing on
      10. Click to add a new activity or resource in an empty section
      11. Select "Robotest" from the activity chooser
      12. On the module edit form, select "Select content"
      13. Click to return multiple content items when prompted (there are notes next to each option)
      14. Verify you see a summary page describing the 2 activities to be created
      15. Click "Save and return to course"
      16. Verify you see the two activities from Robotest in the relevant section
      Show
      Prerequisites Your site need to be available publicly over HTTPS. Use something like ngrok to do this. Testing multiple content items with global search enabled In a new site, log in as admin Enable global search via Site admin > Advanced features > Enable global search (make sure to save) Go to Site admin > Plugins > External tool > Manage tools Register a new LTI Advantage tool using the URL below (just paste it into the text field and click "Add LTI Advantage): https://robotest.theedtech.dev/register Edit the tool card once you see it. Set "Tool configuration usage" to "Show in activity chooser and as a preconfigured tool" Save Activate the pre-configured tool using the button on the tool card. Create a course and turn editing on Click to add a new activity or resource in an empty section Select "Robotest" from the activity chooser On the module edit form, select "Select content" Click to return multiple content items when prompted (there are notes next to each option) Verify you see a summary page describing the 2 activities to be created Click "Save and return to course" Verify you see the two activities from Robotest in the relevant section

    Description

      Good day team.

      This bug was very hard to chase down, but it has been confirmed in several systems, in versions 3.10.6 and 3.11.7.

      Summary of the bug

      When adding multiple LTI activities at once (in one batch, so to speak), the operation silently fails, and none of the LTI activities are added.

      There is a major caveat though. This bug only occurs when the Global search feature is enabled (it can be found by going to 'Site administration -> Advanced features').

      Steps to reproduce

      1. Go to a Moodle site with a configured LTI integration. The LTI tool should be configured to appear in the Activity chooser.
      2. Make sure that 'Global search' is enabled in 'Site administration -> Advanced features'.
      3. Create a course.
      4. Turn editing mode on in the course.
      5. Add an activity, choose the LTI tool.
      6. Click on 'Select content'.
      7. In the LTI tool interface, select 2 or more activities and add them.
      8. Follow the instructions specific to the LTI tool to add the activities and then click on 'Save and return to course'.

      Observed behavior

      There are no activities added to the course.

      Expected behavior

      The activities from the LTI tool should be added, as many as you selected in step 7.

      Video showcase

      The following 56 seconds video shows the steps to reproduce and the observed behavior:

      Screen Recording 2022-06-02 at 5.10.51 PM.mov

      For devs

      The great advantage of this problem, is that it can be replicated in a local development environment. For that, create two Moodle servers: a regular server, and an LTI tool. Follow the instructions in https://docs.moodle.org/400/en/Publish_as_LTI_tool to configure the two servers to communicate with each other. Two sites running on localhost is fine.

      Attachments

        1. MDL-74906_master_1.png
          MDL-74906_master_1.png
          86 kB
        2. MDL-74906_master_2.png
          MDL-74906_master_2.png
          99 kB
        3. MDL-74906_v311_1.png
          MDL-74906_v311_1.png
          88 kB
        4. MDL-74906_v311_2.png
          MDL-74906_v311_2.png
          104 kB
        5. MDL-74906_v400_1.png
          MDL-74906_v400_1.png
          87 kB
        6. MDL-74906_v400_2.png
          MDL-74906_v400_2.png
          97 kB
        7. Screen Recording 2022-06-02 at 5.10.51 PM.mov
          39.45 MB

        Activity

          People

            jaked Jake Dallimore
            julian.tovar Julian Tovar
            Mathew May Mathew May
            Jun Pataleta Jun Pataleta
            Angelia Dela Cruz Angelia Dela Cruz
            Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
            Votes:
            1 Vote for this issue
            Watchers:
            10 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              11/Jul/22

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours
                3h