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

Allow to document exporter properties (so the Web Service API documentation display it)

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Edit the competency/classes/external/template_exporter.php file
      2. In function define_other_properties() add a new attribute description to: 'duedateformatted' so it will look like:

        'duedateformatted' => array(
            'type' => PARAM_RAW,
            'description' => 'The due date formatted'
        ),
        

      3. In the browser go to yourmoodle/admin/webservice/documentation.php
      4. Expand the core_competency_list_templates Web Service
      5. Check that in the Response section, the field duedateformatted is now displaying the description you just added
      Show
      Edit the competency/classes/external/template_exporter.php file In function define_other_properties() add a new attribute description to: 'duedateformatted' so it will look like: 'duedateformatted' => array( 'type' => PARAM_RAW, 'description' => 'The due date formatted' ), In the browser go to yourmoodle/admin/webservice/documentation.php Expand the core_competency_list_templates Web Service Check that in the Response section, the field duedateformatted is now displaying the description you just added
    • Affected Branches:
      MOODLE_33_STABLE
    • Fixed Branches:
      MOODLE_33_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-57846-master

      Description

      Right now if you check the auto-generated Web Service API Documentation in Moodle instead seeing a description for each property (parameter) you see the property name.

      With this small change, it is possible to document properties only in the exporter.

      I didn't change it in the persistent but maybe we could consider it for another issue (please note that you actually can do the description attirubte in the persistent right now and it should work but is not documented or tested).

        Attachments

          Activity

            People

            Assignee:
            jleyva Juan Leyva
            Reporter:
            jleyva Juan Leyva
            Peer reviewer:
            Damyon Wiese
            Integrator:
            Eloy Lafuente (stronk7)
            Tester:
            Simey Lameze
            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:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              15/May/17