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

Blank error notification when encountering error in external tool registration

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Go to Site administration ► Plugins ► Activity modules ► External tool ► Manage tools
      2. Set the Tool URL... to https://www.chemvantage.org/lti/ then click Add.
      3. After the processing, and an error is encountered:
        • Confirm that a proper error message notification is displayed.
      Adding a valid tool registration
      1. Download and run ngrok.

        ./ngrok http 80
        

      2. Try adding another tool registration: http://lti.tools/test/tp.php.
      3. Click Registration in the page loded in the iframe.
      4. Select options in the Enabled capabilities section.
      5. Select options in the Tool services section.
      6. Click Register tool
      7. After the processing:
        • Confirm that the external tool is successfully created.
        • Confirm that a proper success message notification is displayed.
      Show
      Go to Site administration ► Plugins ► Activity modules ► External tool ► Manage tools Set the Tool URL... to https://www.chemvantage.org/lti/ then click Add. After the processing, and an error is encountered: Confirm that a proper error message notification is displayed. Adding a valid tool registration Download and run ngrok. ./ngrok http 80 Try adding another tool registration: http://lti.tools/test/tp.php . Click Registration in the page loded in the iframe. Select options in the Enabled capabilities section. Select options in the Tool services section. Click Register tool After the processing: Confirm that the external tool is successfully created. Confirm that a proper success message notification is displayed.
    • Affected Branches:
      MOODLE_31_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE
    • Pull Master Branch:
      MDL-54879-master

      Description

      When performing external tool registration, some external tool providers seem not to be returning error messages according to the specs.

      In the case of ChemVantage, it returns error messages in the lti_msg attribute instead of the lti_errormsg. Thus, this renders the error notification as blank upon return. Though it is the responsibility of the provider to comply with the standards, I think that we should also be handle such scenario.

      To reproduce:

      1. Go to Site administration ► Plugins ► Activity modules ► External tool ► Manage tools
      2. Set the Tool URL... to https://www.chemvantage.org/lti/ then click Add.
      3. After the processing, and an error is encountered, the following is displayed:

      What I think we can do is:

      1. If lti_errormsg is not empty, set the error notification's message to the lti_errormsg's value.
      2. If lti_errormsg is empty, but lti_msg is not, set the error notification's message to the lti_msg's value.
      3. If both lti_errormsg and lti_msg are empty, show a generic error string.

        Attachments

          Activity

            People

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

              Dates

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