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

LTI Error when adding a tool proxy where icon_info is not an array

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      Make your site publicly accessible

      1. Download ngrok https://ngrok.com/download
      2. Run ngrok ngrok http 80 --region=au
      3. Edit your config.php and set the wwwroot to use the ngrok provided url

      New functionality test master and 3.1

      1. Go back to Site administration ▶︎ Plugins ▶︎ Activity modules ▶︎ External tool ▶︎ Manage tools
      2. Log in to http://prototype.moodle.net/lti (details on login page)
      3. Go to "Workplace induction" course
      4. Click Shared as LTI tool in Course administration
      5. Copy the url in the Proxy URL column for one of the shared tools
      6. Paste the URL in the box and click add
      7. There should be a loading animation
      8. Click register
      9. There should be a loading animation
      10. Make sure you are given a list of capabilities
      11. Confirm the capabilites
      12. Make sure the tool type was added successfully. It should have a broken icon.
      13. Edit the type (click the cog) ensure the icon url is present. It will be a broken/nonexistant url. That is expected. It's a work in progress branch not part of this issue.

      Regression test master and 3.1

      1. Go back to Site administration ▶︎ Plugins ▶︎ Activity modules ▶︎ External tool ▶︎ Manage tools
      2. Paste http://lti.tools/test/tp.php in the box and click add
      3. There should be a loading animation
      4. Click on registration
      5. Select capabilities and press register
      6. There should be a loading animation
      7. Make sure you are given a list of capabilities
      8. Confirm the capabilites
      9. Make sure the tool type was added successfully. It should have an icon
      10. Edit the type (click the cog) ensure the icon url is present.

      New functionality 3.0

      1. Log in to http://prototype.moodle.net/lti (details on login page)
      2. Go to "Workplace induction" course
      3. Click Shared as LTI tool in Course administration
      4. Copy the url in the Proxy URL column for one of the shared tools
      5. On your moodle 3.0 instance go to Site administration / ▶︎ Plugins / ▶︎ Activity modules / ▶︎ LTI / ▶︎ Manage external tool registrations
      6. Click "Configure a new external tool registration"
      7. Paste the URL in the registration URL box
      8. Select all capabilities and services
      9. On the Manage external tool registrations click the tick next to the tool you just added
      10. Make sure you are given a list of capabilities
      11. Confirm the capabilites
      12. Go to Site administration / ▶︎ Plugins / ▶︎ Activity modules / ▶︎ LTI / ▶︎ Manage external tool types
      13. Go to pending
      14. Click the tick next to the tool
      15. Make sure the tool type was added successfully. It should have a broken icon.
      16. Edit the type (click the cog) ensure the icon url is present. It will be a broken/nonexistant url. That is expected. It's a work in progress branch not part of this issue.

      Regression test 3.0

      1. Go to Site administration / ▶︎ Plugins / ▶︎ Activity modules / ▶︎ LTI / ▶︎ Manage external tool registrations
      2. Click "Configure a new external tool registration"
      3. Paste http://lti.tools/test/tp.php in the registration URL box
      4. Select all capabilities and services
      5. On the Manage external tool registrations click the tick next to the tool you just added
      6. Select capabilities and press register
      7. There should be a loading animation
      8. Make sure you are given a list of capabilities
      9. Confirm the capabilites
      10. Make sure the tool type was added successfully. It should have an icon
      11. Edit the type (click the cog) ensure the icon url is present.
      Show
      Make your site publicly accessible Download ngrok https://ngrok.com/download Run ngrok ngrok http 80 --region=au Edit your config.php and set the wwwroot to use the ngrok provided url New functionality test master and 3.1 Go back to Site administration ▶︎ Plugins ▶︎ Activity modules ▶︎ External tool ▶︎ Manage tools Log in to http://prototype.moodle.net/lti (details on login page) Go to "Workplace induction" course Click Shared as LTI tool in Course administration Copy the url in the Proxy URL column for one of the shared tools Paste the URL in the box and click add There should be a loading animation Click register There should be a loading animation Make sure you are given a list of capabilities Confirm the capabilites Make sure the tool type was added successfully. It should have a broken icon. Edit the type (click the cog) ensure the icon url is present. It will be a broken/nonexistant url. That is expected. It's a work in progress branch not part of this issue. Regression test master and 3.1 Go back to Site administration ▶︎ Plugins ▶︎ Activity modules ▶︎ External tool ▶︎ Manage tools Paste http://lti.tools/test/tp.php in the box and click add There should be a loading animation Click on registration Select capabilities and press register There should be a loading animation Make sure you are given a list of capabilities Confirm the capabilites Make sure the tool type was added successfully. It should have an icon Edit the type (click the cog) ensure the icon url is present. New functionality 3.0 Log in to http://prototype.moodle.net/lti (details on login page) Go to "Workplace induction" course Click Shared as LTI tool in Course administration Copy the url in the Proxy URL column for one of the shared tools On your moodle 3.0 instance go to Site administration / ▶︎ Plugins / ▶︎ Activity modules / ▶︎ LTI / ▶︎ Manage external tool registrations Click "Configure a new external tool registration" Paste the URL in the registration URL box Select all capabilities and services On the Manage external tool registrations click the tick next to the tool you just added Make sure you are given a list of capabilities Confirm the capabilites Go to Site administration / ▶︎ Plugins / ▶︎ Activity modules / ▶︎ LTI / ▶︎ Manage external tool types Go to pending Click the tick next to the tool Make sure the tool type was added successfully. It should have a broken icon. Edit the type (click the cog) ensure the icon url is present. It will be a broken/nonexistant url. That is expected. It's a work in progress branch not part of this issue. Regression test 3.0 Go to Site administration / ▶︎ Plugins / ▶︎ Activity modules / ▶︎ LTI / ▶︎ Manage external tool registrations Click "Configure a new external tool registration" Paste http://lti.tools/test/tp.php in the registration URL box Select all capabilities and services On the Manage external tool registrations click the tick next to the tool you just added Select capabilities and press register There should be a loading animation Make sure you are given a list of capabilities Confirm the capabilites Make sure the tool type was added successfully. It should have an icon Edit the type (click the cog) ensure the icon url is present.
    • Affected Branches:
      MOODLE_30_STABLE, MOODLE_31_STABLE, MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_30_STABLE, MOODLE_31_STABLE
    • Epic Link:
    • Pull from Repository:
    • Pull Master Branch:
      MDL-55457-master

      Description

      According to the specification icon_info should be an object not an array.

      https://www.imsglobal.org/lti/model/mediatype/application/vnd/ims/lti/v2/toolproxy%2Bjson/index.html

      However since we've supported having it as array for so long and people may be using it that way, a simple check to see if it's an array or not should be enough

      See service/toolproxy/classes/local/resource/toolproxy.php execute()

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                12/Sep/16