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

amf web services need to accept params and return values of proper type

    XMLWordPrintable

    Details

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

      Description

      We have the proper type as described in the external lib function descriptions. But external lib does not return values of the types described in the function descriptions. This is OK for PHP which is loosely typed but need some processing to correct types before serializing values and returning them to Flash via the amf web service.

      In the patch attached to MDL-20808 I have added to the dynamically created service class calls to the external_api static function validate_parameters. This as well as validating the return value also casts it to the correct type.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jamiesensei Jamie Pratt
              Reporter:
              jamiesensei Jamie Pratt
              Tester:
              Nobody
              Participants:
              Component watchers:
              Juan Leyva, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: