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

Custom parameter substitution variables using $COURSE broken

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      To be tested in Moodle 3.5 and master.

      Prerequisites
      1. You need the test tool provider site to be able to communicate with your Moodle instance. You can use ngrok for this.
      Test

      On a remote 'consumer' Moodle system:

      1. Find/create a course with a non-empty value for the Course summary.
      2. Enter the course as a Teacher
      3. Turn editing on
      4. Use the "Add an activity or resource" link to add an External tool
      5. Enter an Activity name
      6. Enter a Tool URL of "https://lti.tools/saltire/tp"
      7. Enter a value of "desc=$Context.longDescription" inside the Custom parameters field (under "Show more ...")
      8. Click on "Save and display".
      9. Ignore the failed verification message, click on "Message Parameters" and look for the custom_desc entry
      10. Expected result: Check that the custom_desc parameter value is the course summary (text only).
      11. Important: Before the fix the value will be empty (and a PHP error will be generated), after the fix the value will be the course description (course summary).

       

      Show
      To be tested   in Moodle 3.5 and master. Prerequisites You need the test tool provider site to be able to communicate with your Moodle instance. You can use ngrok for this. Test On a remote 'consumer' Moodle system: Find/create a course with a non-empty value for the Course summary. Enter the course as a Teacher Turn editing on Use the "Add an activity or resource" link to add an External tool Enter an Activity name Enter a Tool URL of "https://lti.tools/saltire/tp" Enter a value of "desc=$Context.longDescription" inside the Custom parameters field (under "Show more ...") Click on "Save and display". Ignore the failed verification message, click on "Message Parameters" and look for the custom_desc entry Expected result:  Check that the custom_desc parameter value is the course summary (text only). Important : Before the fix the value will be empty (and a PHP error will be generated), after the fix the value will be the course description (course summary).  
    • Workaround:
      Hide

      None.

      Show
      None.
    • Affected Branches:
      MOODLE_35_STABLE
    • Fixed Branches:
      MOODLE_35_STABLE
    • Pull 3.5 Branch:
    • Pull Master Branch:

      Description

      A capability using the $COURSE variable is not being parsed because it has been removed from the global statement in the lti_parse_custom_parameter method.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                10/Sep/18

                Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 45 minutes
                45m