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

Ajax service should clean the return values of the external functions

XMLWordPrintable

    • MOODLE_29_STABLE
    • MOODLE_31_STABLE
    • MDL-51700-master
    • Hide
      1. Navigate through the template library, and confirm that it works as it used to (view templates, filter templates, etc...)
      2. Edit the file admin/tool/templatelibrary/classes/external.php
      3. Change the return structure of list_templates_returns, and set it to PARAM_INT
      4. Confirm that when you try to list templates you get "Invalid response value detected"
      Show
      Navigate through the template library, and confirm that it works as it used to (view templates, filter templates, etc...) Edit the file admin/tool/templatelibrary/classes/external.php Change the return structure of list_templates_returns , and set it to PARAM_INT Confirm that when you try to list templates you get "Invalid response value detected"

      I noticed that because my Javascript was strictly checking for an int but the return value was a string. I could fix my external function but it seems appropriate to force Ajax to clean the value, just the same way REST does it.

            fred Frédéric Massart
            fred Frédéric Massart
            Damyon Wiese Damyon Wiese
            Dan Poltawski Dan Poltawski
            Dan Poltawski Dan Poltawski
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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