Commit | Line | Data |
---|---|---|
106c55fb DW |
1 | This files describes API changes in /webservice/* |
2 | information provided here is intended especially for developers. | |
3 | ||
4 | This information is intended for authors of webservices, not people writing webservice clients. | |
5 | ||
6ee188b1 DM |
6 | === 3.0 === |
7 | ||
8 | * WS protocols webservice/myprotocol:use capabilities were defined with a high riskbitmask value | |
9 | when the fact that a user has that capability does not imply any risk, but other capabilities | |
10 | that the user may have do. If your ws protocol does not imply and risk by itself, you can remove the | |
11 | riskbitmask from your $capabilities array in webservice/myprotocol/db/access.php | |
9748791b JL |
12 | * New function for formatting external strings: external_format_strings, it should be used as a replacement of format_string in |
13 | external functions. | |
14 | All the occurrences of format_strings have been replaced with this new function. | |
6ee188b1 | 15 | |
3c1aa6fd DM |
16 | === 2.9 === |
17 | ||
18 | * The deprecated functions can not be added to services anymore and | |
19 | a debugging message for developers is triggered when viewing an existing | |
20 | services using them. It is recommended to replace calls to the deprecated | |
21 | functions for calls to the proposed replacements. If you are using a moodle | |
22 | mobile app fork, it is recommended to update your customisations on top of | |
23 | the latest moodle mobile app version. | |
24 | ||
25 | The web services functions that will be finally deprecated in the next | |
26 | moodle version are: | |
27 | - moodle_course_create_courses | |
28 | - moodle_course_get_courses | |
29 | - moodle_enrol_get_enrolled_users | |
30 | - moodle_enrol_get_users_courses | |
31 | - moodle_enrol_manual_enrol_users | |
32 | - moodle_file_get_files | |
33 | - moodle_file_upload | |
34 | - moodle_group_add_groupmembers | |
35 | - moodle_group_create_groups | |
36 | - moodle_group_delete_groupmembers | |
37 | - moodle_group_delete_groups | |
38 | - moodle_group_get_course_groups | |
39 | - moodle_group_get_groupmembers | |
40 | - moodle_group_get_groups | |
41 | - moodle_message_send_instantmessages | |
42 | - moodle_notes_create_notes | |
43 | - moodle_role_assign | |
44 | - moodle_role_unassign | |
45 | - moodle_user_create_users | |
46 | - moodle_user_delete_users | |
47 | - moodle_user_get_course_participants_by_id | |
48 | - moodle_user_get_users_by_courseid | |
49 | - moodle_user_get_users_by_id | |
50 | - moodle_user_update_users | |
51 | - core_grade_get_definitions | |
52 | - core_user_get_users_by_id | |
53 | - moodle_webservice_get_siteinfo | |
54 | ||
6d28e2cf JL |
55 | * External function core_webservice_external::get_site_info now returns additional optional fields: |
56 | - advancedfeatures: Array listing Moodle advanced features and if enabled or not. | |
57 | - usercanmanageownfiles: Whether the my files option is disabled. | |
58 | - userquota: User storage quota. | |
59 | - usermaxuploadfilesize: Files upload size limit. | |
60 | ||
3c1aa6fd | 61 | |
e5d48aad PŠ |
62 | === 2.7 === |
63 | ||
64 | * All webservice server.php and simpleserver.php scripts must define('WS_SERVER', true) | |
65 | before including config.php file. | |
66 | ||
67 | ||
106c55fb DW |
68 | === 2.6 === |
69 | ||
70 | * webservice/upload.php | |
71 | Accepts 2 new post parameters to allow uploading of files to a users draft area. | |
72 | - filearea should be either 'private' (default) or 'draft' | |
73 | - itemid unused if the filearea is 'private', for 'draft' it can be the id of a previously | |
74 | created draft area - or 0 which will generate a new draft area for the files. | |
75 |