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

Default exception handler in error log when adding a published LTI tool

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      On a Moodle 3.1+ site (SITE A)
      1. Enable the LTI authentication plugin. (Site administration ► Plugins ► Authentication ► Manage authentication)
      2. Then go to Site administration ► Plugins ► Enrolments ► Manage enrol plugins and enable Publish as LTI tool
      3. Create a course. Optionally, add some activities.
      4. Under Course administration, click Enrolment methods
      5. Under Add a method select Publish as LTI tool.
      6. Enter a Custom instance name
      7. Under Tool to be published select Course
      8. Click Add method.
      9. Under Course administration, click Published as LTI tools. Take note of the launch URL and secret to be used later.
      On another Moodle 3.1+ site (SITE B)
      1. Open a terminal
      2. Tail your web server's error log.
        e.g.:

        tail -f /var/log/apache2/error.log
        

      3. Log in as admin.
      4. Go to Site administration ► Plugins ► Activity modules ► External tool ► Manage tools
      5. Click configure a tool manually.
        (We can't really paste the launch URL into the Tool URL... field since our provider doesn't seem to support this yet, so we have to do manual configuration.)
      6. Enter a Tool name.
      7. Enter the launch URL of the course in SITE A in Tool base URL/cartridge URL.
      8. Enter the shared secret.
      9. Click Save changes.
      10. Check the terminal output.
        • Confirm that there is no error log about the missing required param.
      Show
      On a Moodle 3.1+ site (SITE A) Enable the LTI authentication plugin. (Site administration ► Plugins ► Authentication ► Manage authentication) Then go to Site administration ► Plugins ► Enrolments ► Manage enrol plugins and enable Publish as LTI tool Create a course. Optionally, add some activities. Under Course administration, click Enrolment methods Under Add a method select Publish as LTI tool . Enter a Custom instance name Under Tool to be published select Course Click Add method . Under Course administration, click Published as LTI tools . Take note of the launch URL and secret to be used later. On another Moodle 3.1+ site (SITE B) Open a terminal Tail your web server's error log. e.g.: tail -f /var/log/apache2/error.log Log in as admin. Go to Site administration ► Plugins ► Activity modules ► External tool ► Manage tools Click configure a tool manually . (We can't really paste the launch URL into the Tool URL... field since our provider doesn't seem to support this yet, so we have to do manual configuration.) Enter a Tool name . Enter the launch URL of the course in SITE A in Tool base URL/cartridge URL . Enter the shared secret. Click Save changes . Check the terminal output. Confirm that there is no error log about the missing required param.
    • Affected Branches:
      MOODLE_31_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE
    • Pull Master Branch:
      MDL-55323-master

      Description

      To reproduce:

      On a Moodle 3.1+ site (SITE A)
      1. Enable the LTI authentication plugin. (Site administration ► Plugins ► Authentication ► Manage authentication)
      2. Then go to Site administration ► Plugins ► Enrolments ► Manage enrol plugins and enable Publish as LTI tool
      3. Create a course. Optionally, add some activities.
      4. Under Course administration, click Enrolment methods
      5. Under Add a method select Publish as LTI tool.
      6. Enter a Custom instance name
      7. Under Tool to be published select Course
      8. Click Add method.
      9. Under Course administration, click Published as LTI tools. Take note of the launch URL and secret to be used later.
      On another Moodle 3.1+ site (SITE B)
      1. Log in as admin.
      2. Go to Site administration ► Plugins ► Activity modules ► External tool ► Manage tools
      3. Click configure a tool manually.
      4. Enter a Tool name.
      5. Enter the launch URL of the course in SITE A in Tool base URL/cartridge URL.
      6. Enter the shared secret.
      7. Click Save changes
      8. Check your web server's error log (e.g. /var/log/apache2/error.log)
      9. Expected:
        • There should be no error log shown.
      10. Actual:
        • The following error logs are being shown:

          Default exception handler: A required parameter (context_id) was missing Debug:
          Error code: missingparam

          • line 495 of /lib/setuplib.php: moodle_exception thrown
          • line 552 of /lib/moodlelib.php: call to print_error()
          • line 30 of /enrol/lti/tool.php: call to required_param()

        Attachments

          Activity

            People

            Assignee:
            jpataleta Jun Pataleta
            Reporter:
            jpataleta Jun Pataleta
            Peer reviewer:
            Mark Nelson
            Integrator:
            Dan Poltawski
            Tester:
            John Okely
            Participants:
            Component watchers:
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

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