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

LTI Returnlink for CONTAINER_EMBED, CONTAINER_EMBED_NO_BLOCKS works not outside an iframe

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Testing instruction:

      • Add an ‘External Tool’ activity to the new course and configure it:
        • Use an arbitrary Tool-URL (does not have to exist)
        • Select as 'Launch Container' value 'Embedded'
        • Save and return to the course
      • Click the ‘External Tool’ activity and capture the network traffic of your browser. 
        •  Ensure that logs are kept in case of redirects, forwarding, and follow-up-calls of new pages
      • The “launch.php?.. “ should contain an "return_url"-Field that targets the ".../mod/lti/return.php"-file of your moodle instance (with some parameters)
      • take this url (replace "&" with "&") and use it as destination for a new tab in your browser.
      • You should now be forwarded to the course of the external tool activity.
      Show
      Testing instruction: Add an ‘External Tool’ activity to the new course and configure it: Use an arbitrary Tool-URL (does not have to exist) Select as 'Launch Container' value 'Embedded' Save and return to the course Click the ‘External Tool’ activity and capture the network traffic of your browser.   Ensure that logs are kept in case of redirects, forwarding, and follow-up-calls of new pages The “launch.php?.. “ should contain an "return_url"-Field that targets the ".../mod/lti/return.php"-file of your moodle instance (with some parameters) take this url (replace "&" with "&") and use it as destination for a new tab in your browser. You should now be forwarded to the course of the external tool activity.
    • Affected Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-60549-master

      Description

      Today browsers can move the content of an iframe into a browser tab or an separate browser window. Obviously, this is also possible with LTI-Tools that are opened in an iframe (i.e., LTI_LAUNCH_CONTAINER_EMBED, LTI_LAUNCH_CONTAINER_EMBED_NO_BLOCKS)

      In this case however, the return.php will not work as a java script is used that does not work anymore. In particular, the java script checks whether the current frame is not the '_top'-frame and only then changes the location of the '_top'-frame. In the case described above, however, the LTI-Tool is moved in another tab or windown and therefore is at the '_top'-level now. Accordingly the java script condition evaluates to false and no redirect happens, but a empty white page is shown instead.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                19/Mar/18