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

LTI new window code fix (from MDL-69275)

    XMLWordPrintable

Details

    • MOODLE_400_STABLE
    • MDL-77004-400
    • Hide
      1. Create an external tool instance in the course, making sure to set "Launch container" to "New window"
        Tip: You can just set the Tool URL to something like "https://example.com" for this test. We don't need the actual tool to verify the behaviour.
      2. Copy the link to this activity (mod/lti/view...) and add it as a link (via Atto/Tiny) to a label resource (or whatever we're calling that now in 4.1+)
      3. Click the link in the label you just added.
      4. Verify you see the example.com URL open in a new tab/window
      5. Close the new tab/window.
      6. Verify you see the mod/lti/view.php page open and see a message saying "Your activity has opened in a new window"
      Show
      Create an external tool instance in the course, making sure to set "Launch container" to "New window" Tip: You can just set the Tool URL to something like "https://example.com" for this test. We don't need the actual tool to verify the behaviour. Copy the link to this activity (mod/lti/view...) and add it as a link (via Atto/Tiny) to a label resource (or whatever we're calling that now in 4.1+) Click the link in the label you just added. Verify you see the example.com URL open in a new tab/window Close the new tab/window. Verify you see the mod/lti/view.php page open and see a message saying "Your activity has opened in a new window"

    Description

      Basically, you should be able to copy links to mod/lti/view.php and use them anywhere on the site and have the "Open in new window" launch mode work properly. This IS the case now on 4.1 and beyond, thanks to a fix to mod/lti/view.php contained in MDL-69275. We should just backport that to other branches in this issue.

      To replicate:
      1. Create an external tool instance in the course, making sure to set "Launch container" to "New window"
      2. Launch this (you'll see a new window launch and that's normal - that's not the bug yet)
      3. Now, copy the link to this activity (mod/lti/view....) and add it as a link (via Atto/Tiny) to a label resource (or whatever we're calling that now in 4.1+)
      4. Now, click the link in the label you just added:
      In 4.1: This now correctly still opens the tool in a new window (you'll see the activity page open with "the tool opened in a new window" or something like that.
      In 4.0 and older: This will open the tool in an embedded view, which is wrong.

      Attachments

        Issue Links

          Activity

            People

              jaked Jake Dallimore
              jaked Jake Dallimore
              Jake Dallimore, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 10 minutes
                  10m