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