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

Optional tool launch parameter tool_consumer_instance_name should not be set to null by default

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      Setup
      1. Expose your web server to the internet via ngrok. (Download ngrok and on a terminal enter "ngrok http 80 --region=au")
      2. Go to Site administration ► Plugins ► Authentication ► Manage authentication and enable LTI authentication.
      3. Go to Site administration ► Plugins ► Enrolments ► Manage enrol plugins and enable Publish as LTI tool.
      4. Go to Site administration ► Security ► HTTP security and tick Allow frame embedding. Save the changes.
      5. Create a course and an Page resource.
      6. Under Course administration, click "Published as LTI tools".
      7. Click Add.
      8. Under Tool to be published select the Page resource that you created.
      9. Click Add method.
      10. Back on the table of Published tools, copy the Cartridge URL of the published Page resource and paste it on your browser's address bar. Take note/copy of the "blti:launch_url" tag from the resulting XML document. We will use this later.
      Testing

      Note, the test from the certification suite that this test uses should end in a failure... just a different failure to the one we were seeing before

      1. Open another browser window and go to https://www.imsglobal.org/lti/cert/index.php (you will need login credentials for the certification suite site, ping me or John Okely for details)
      2. Scroll below the page and click Process for Tool Providers.
      3. Scroll below the page and click Go to Configuration.
      4. Under Tool Provider details, enter "Moodle" for Software being tested:.
      5. Enter "3.2" for Version:.
      6. Under Connection details, paste the launch URL into the Launch URL: field.
      7. Enter LTITestSuiteKey for Consumer key:
      8. Go to the {Published tools}} browser window and copy the Secret for the published Page resource and paste it into the Consumer secret: field in the certification suite browser window.
      9. Click Save settings.
      10. Scroll further down and click Go to Tests. You will land to Section 2: Invalid Launch Requests
      11. Click on First test. You will land to Test 2.1: No resource_link_id provided
      12. Click Run this test.
        • Note: If nothing happens, it could be that your browser is blocking scripts from running. If your moodle site is on http, make sure that the certification suite site is also run on http. If you're using Chrome, it might warn you about "unsafe scripts" and there will be a shield icon on the right side of the address bar. Click this and click on Load unsafe script.
      13. Confirm that you don't get a DB write error.
      14. Confirm that the iframe loads the Welcome to the LTI Tool Consumer Return URL page. In the return page, you should get the following error:
        • Error message: Debug error: Missing resource link ID.
      Show
      Setup Expose your web server to the internet via ngrok. (Download ngrok and on a terminal enter " ngrok http 80 --region=au ") Go to Site administration ► Plugins ► Authentication ► Manage authentication and enable LTI authentication. Go to Site administration ► Plugins ► Enrolments ► Manage enrol plugins and enable Publish as LTI tool . Go to Site administration ► Security ► HTTP security and tick Allow frame embedding . Save the changes. Create a course and an Page resource. Under Course administration, click " Published as LTI tools ". Click Add . Under Tool to be published select the Page resource that you created. Click Add method . Back on the table of Published tools, copy the Cartridge URL of the published Page resource and paste it on your browser's address bar. Take note/copy of the " blti:launch_url " tag from the resulting XML document. We will use this later. Testing Note, the test from the certification suite that this test uses should end in a failure... just a different failure to the one we were seeing before Open another browser window and go to https://www.imsglobal.org/lti/cert/index.php (you will need login credentials for the certification suite site, ping me or John Okely for details) Scroll below the page and click Process for Tool Providers . Scroll below the page and click Go to Configuration . Under Tool Provider details , enter " Moodle " for Software being tested: . Enter "3.2" for Version: . Under Connection details , paste the launch URL into the Launch URL: field. Enter LTITestSuiteKey for Consumer key: Go to the {Published tools}} browser window and copy the Secret for the published Page resource and paste it into the Consumer secret: field in the certification suite browser window. Click Save settings . Scroll further down and click Go to Tests . You will land to Section 2: Invalid Launch Requests Click on First test . You will land to Test 2.1: No resource_link_id provided Click Run this test . Note: If nothing happens, it could be that your browser is blocking scripts from running. If your moodle site is on http, make sure that the certification suite site is also run on http. If you're using Chrome, it might warn you about "unsafe scripts" and there will be a shield icon on the right side of the address bar. Click this and click on Load unsafe script . Confirm that you don't get a DB write error. Confirm that the iframe loads the Welcome to the LTI Tool Consumer Return URL page. In the return page, you should get the following error: Error message: Debug error: Missing resource link ID.
    • Affected Branches:
      MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_32_STABLE
    • Epic Link:
    • Pull Master Branch:
      MDL-56573-master

      Description

      While testing LTI 1 launches on LTI provider certification test suite, I found out that there are cases that the provider test suite is not passing the "tool_consumer_instance_name" parameter. Thanks to this, we discovered that the tool launch will throw a database error due to a not-null constraint for the consumer name.

      In short, the optional parameter "tool_consumer_instance_name" should not be set to null by default. We can either set this as an empty string or maybe a random string.

        Attachments

          Activity

            People

            Assignee:
            jpataleta Jun Pataleta
            Reporter:
            jpataleta Jun Pataleta
            Peer reviewer:
            John Okely
            Integrator:
            Andrew Nicols
            Tester:
            Rajesh Taneja
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              5/Dec/16