Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

Web services API Changes: Difference between revisions

From MoodleDocs
No edit summary
m (Text replacement - "<code php>" to "<syntaxhighlight lang="php">")
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{Moodle_2.5}}
{{Moodle_2.5}}
{{obsolete}}
Please, check the upgrade.txt files in the different Moodle subsystem and plugins for API changes.


This page lists all API changes that happened in Moodle web service API. When this page has been created, Moodle 2.5 work was already started for a while. So take in consideration that this listing will be exhaustive starting from 2.6. This list focus on existing functions (modified/deprecated). For the list of newly added function, see the [[Web services Roadmap]].
This page lists all API changes that happened in Moodle web service API. When this page has been created, Moodle 2.5 work was already started for a while. So take in consideration that this listing will be exhaustive starting from 2.6. This list focus on existing functions (modified/deprecated). For the list of newly added function, see the [[Web services Roadmap]].
Line 7: Line 10:
Added optional parameter:  
Added optional parameter:  
<br/>
<br/>
<code php>
<syntaxhighlight lang="php">
'returngroups' => new external_value(PARAM_BOOL, 'return associated groups', VALUE_DEFAULT, 0)
'returngroups' => new external_value(PARAM_BOOL, 'return associated groups', VALUE_DEFAULT, 0)
</code>
</syntaxhighlight>
<br/>
<br/>
Added optional return value:
Added optional return value:
<br/>
<br/>
<code php>
<syntaxhighlight lang="php">
'groups' => new external_multiple_structure(
'groups' => new external_multiple_structure(
   new external_single_structure(
   new external_single_structure(
Line 25: Line 28:
   )
   )
),
),
</code>
</syntaxhighlight>
 
* MDL-30070 - Get, create, delete, block, unblock, search contacts.


= See also =
= See also =
Line 34: Line 39:


[[Category:Web Services]]
[[Category:Web Services]]
[[Category:API]]

Revision as of 20:37, 14 July 2021

Moodle 2.5


Warning: This page is no longer in use. The information contained on the page should NOT be seen as relevant or reliable.


Please, check the upgrade.txt files in the different Moodle subsystem and plugins for API changes.

This page lists all API changes that happened in Moodle web service API. When this page has been created, Moodle 2.5 work was already started for a while. So take in consideration that this listing will be exhaustive starting from 2.6. This list focus on existing functions (modified/deprecated). For the list of newly added function, see the Web services Roadmap.

2.4 to 2.5

  • MDL-36541 - get_groupings can now return groups related to the grouping.

Added optional parameter:

'returngroups' => new external_value(PARAM_BOOL, 'return associated groups', VALUE_DEFAULT, 0)


Added optional return value:

'groups' => new external_multiple_structure(
  new external_single_structure(
    array(
      'id' => new external_value(PARAM_INT, 'group record id'),
      'courseid' => new external_value(PARAM_INT, 'id of course'),
      'name' => new external_value(PARAM_TEXT, 'multilang compatible name, course unique'),
      'description' => new external_value(PARAM_RAW, 'group description text'),
      'descriptionformat' => new external_format_value('description'),
      'enrolmentkey' => new external_value(PARAM_RAW, 'group enrol secret phrase')
  )
),
  • MDL-30070 - Get, create, delete, block, unblock, search contacts.

See also