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

Validate_parameters should return an array without the optional parameter on update operation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: Web Services
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      When a ws client calls update_users(), the validate_parameters function will return all optional attributs with their default values (even if the ws client send an object without any optional attribut).
      This implies that if a ws client wants to update a user, the ws client must retrieve the user with all his optional values first. Then the ws client must send the complete user object in the update_users() call (with the optional attributs set to the previously retrieved values, if these values are the same).
      If the ws client doesn't send a full user object, the missing optional attributs will be overwritten by their default in the description.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jerome Jérôme Mouneyrac
              Reporter:
              jerome Jérôme Mouneyrac
              Tester:
              Nobody
              Participants:
              Component watchers:
              Juan Leyva, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                24/Nov/10