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

core_user_get_users_by_id throwing error on timezones greater than or equal to UTC+10

XMLWordPrintable

    • MySQL
    • MOODLE_23_STABLE
    • Hide

      1. Change a user's timezone to UTC+10
      2. Make an API request to core_user_get_users_by_id, including the user's ID number in the request.

      Expected result: An XML response with the user's details

      What actually happens: An exception is returned

      Show
      1. Change a user's timezone to UTC+10 2. Make an API request to core_user_get_users_by_id, including the user's ID number in the request. Expected result: An XML response with the user's details What actually happens: An exception is returned

      When requesting a user's details via the core_user_get_users_by_id function Moodle throws an exception if the user's timezone is UTC+10 or higher. Setting the user's timezone to a lower value or Server's local time makes the API function work again. I have tested this in an empty Moodle 2.3.2 setup, so I do not believe it's configuration related.

      The error returned is the following:

      <?xml version="1.0" encoding="UTF-8" ?>
      <EXCEPTION class="invalid_response_exception">
      <ERRORCODE>invalidresponse</ERRORCODE>
      <MESSAGE>Invalid response value detected</MESSAGE>
      <DEBUGINFO>timezone => Invalid response value detected: Invalid external api response: the value is "10.0", the server was expecting "timezone" type</DEBUGINFO>
      </EXCEPTION>

      Please let me know if you require further information.

            jerome Jérôme Mouneyrac
            kparo Kristoffer Paro
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

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