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

Warning when launching a tool containing custom parameters

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • 4.2.6, 4.3
    • LTI External tool
    • MOODLE_402_STABLE, MOODLE_403_STABLE

      Originally reported in MDL-80646, but turns out to be a bug in stables too, so I'm splitting it out to this issue.

      To replicate:

      1. In 4.2 (not 4.3 and newer because you can't create instances like this any more there), go to a course
      2. Click to add a new "External tool" activity
      3. Set the Tool URL to "http://example.com"
      4. Set the following in custom params:

        param=test
        param2=test2
        

      5. Now, save and launch the tool (open the activity)
        Expected: No warnings flash on the view
        Actual: You'll see briefly a warning message or messages (as below) flash on the view, before the tool loads example.com (at which point the warning are no longer visible).

        Warning: Attempt to read property "ltiversion" on null in /moodle/next_development/www/mod/lti/locallib.php on line 1988 

      The culprit is this code. When a tool is configured manually, at the activity instance level, there is no 'ltiversion' property on the tool object. We should fix this to remove the warning. Whilst the bug cannot be easily seen in 4.3, the method still has the same problem there, and should be fixed there too.

        1. MDL-80654.png
          29 kB
          Kim Jared Lucas

            Unassigned Unassigned
            jaked Jake Dallimore
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.