weekly release 3.2dev
[moodle.git] / webservice / upgrade.txt
CommitLineData
106c55fb
DW
1This files describes API changes in /webservice/*
2information provided here is intended especially for developers.
3
4This information is intended for authors of webservices, not people writing webservice clients.
5
89823b1a
JL
6=== 3.2 ===
7
8* webservice->get_external_functions now returns the external function list ordered by name ASC.
ff092320
JL
9* The filearea optional parameter has been removed from webservice/upload.php.
10 Since Moodle 3.1 all the uploads go to the draft area.
af8b948e 11* external_format_text() function: component, filearea and itemid are now optional parameters.
833be5e4
JL
12 In some contexts those parameteres are not necessary because is not required to do a file rewrite via
13 file_rewrite_pluginfile_urls.
43695b6a 14* External function get_site_info now returns the site course ID. This new field is marked as VALUE_OPTIONAL for backwards compatibility.
89823b1a 15
638f751a
JP
16=== 3.1 ===
17
633e2643
DP
18* The xmlrpc backend has changed, Zend_XmlRpc has been dropped and there might be slight differences in
19 responses. Fault strings that were generated by Zend_XmlRpc_XXX_Exception exceptions (i.e. 'Method
20 "[methodname]" does not exist') are no longer used which may display a different error message depending
21 on the string returned by the getMessage() method of the thrown exception.
8e2707b9 22* The xmlrpc server is no longer enabled when the Mobile service is activated.
13ae7db2 23* Support for the AMF protocol has been dropped completely.
b5e6ec44 24* As Zend Framework has been removed, the webservice_zend_* classes have also been removed.
f23e9b6b
CB
25* Zend_SOAP has been dropped. The native PHP SoapClient and SoapServer classes are now being used instead. WSDL is now
26 generated by the new class webservice_soap_wsdl. For fault strings, a different error message might be shown depending
27 on the string returned by the getMessage() method of the thrown exception.
28* With Zend_SOAP dropped, moodle_zend_soap_server is now also deprecated.
29* As mentioned in the 2.9 notes, deprecated web service functions have now been removed.
ad1bfe6a
CB
30* Since our new XML-RPC server implementation does not support introspection, it is critical that all clients send
31 parameters in the correct order.
ff092320
JL
32* File uploading to the user private file area via the webservice/upload.php script is not supported anymore.
33 Only uploads to the draft area are allowed.
13ae7db2 34
6ee188b1
DM
35=== 3.0 ===
36
37* WS protocols webservice/myprotocol:use capabilities were defined with a high riskbitmask value
38 when the fact that a user has that capability does not imply any risk, but other capabilities
39 that the user may have do. If your ws protocol does not imply and risk by itself, you can remove the
40 riskbitmask from your $capabilities array in webservice/myprotocol/db/access.php
9748791b
JL
41* New function for formatting external strings: external_format_strings, it should be used as a replacement of format_string in
42 external functions.
43 All the occurrences of format_strings have been replaced with this new function.
6ee188b1 44
3c1aa6fd
DM
45=== 2.9 ===
46
47* The deprecated functions can not be added to services anymore and
48 a debugging message for developers is triggered when viewing an existing
49 services using them. It is recommended to replace calls to the deprecated
50 functions for calls to the proposed replacements. If you are using a moodle
51 mobile app fork, it is recommended to update your customisations on top of
52 the latest moodle mobile app version.
53
54 The web services functions that will be finally deprecated in the next
55 moodle version are:
56 - moodle_course_create_courses
57 - moodle_course_get_courses
58 - moodle_enrol_get_enrolled_users
59 - moodle_enrol_get_users_courses
60 - moodle_enrol_manual_enrol_users
61 - moodle_file_get_files
62 - moodle_file_upload
63 - moodle_group_add_groupmembers
64 - moodle_group_create_groups
65 - moodle_group_delete_groupmembers
66 - moodle_group_delete_groups
67 - moodle_group_get_course_groups
68 - moodle_group_get_groupmembers
69 - moodle_group_get_groups
70 - moodle_message_send_instantmessages
71 - moodle_notes_create_notes
72 - moodle_role_assign
73 - moodle_role_unassign
74 - moodle_user_create_users
75 - moodle_user_delete_users
76 - moodle_user_get_course_participants_by_id
77 - moodle_user_get_users_by_courseid
78 - moodle_user_get_users_by_id
79 - moodle_user_update_users
80 - core_grade_get_definitions
81 - core_user_get_users_by_id
82 - moodle_webservice_get_siteinfo
83
6d28e2cf
JL
84* External function core_webservice_external::get_site_info now returns additional optional fields:
85 - advancedfeatures: Array listing Moodle advanced features and if enabled or not.
86 - usercanmanageownfiles: Whether the my files option is disabled.
87 - userquota: User storage quota.
88 - usermaxuploadfilesize: Files upload size limit.
89
3c1aa6fd 90
e5d48aad
91=== 2.7 ===
92
93* All webservice server.php and simpleserver.php scripts must define('WS_SERVER', true)
94 before including config.php file.
95
96
106c55fb
DW
97=== 2.6 ===
98
99* webservice/upload.php
100Accepts 2 new post parameters to allow uploading of files to a users draft area.
101 - filearea should be either 'private' (default) or 'draft'
102 - itemid unused if the filearea is 'private', for 'draft' it can be the id of a previously
103 created draft area - or 0 which will generate a new draft area for the files.
104