Commit | Line | Data |
---|---|---|
9a0df45a | 1 | <?php |
9a0df45a | 2 | // This file is part of Moodle - http://moodle.org/ |
3 | // | |
4 | // Moodle is free software: you can redistribute it and/or modify | |
5 | // it under the terms of the GNU General Public License as published by | |
6 | // the Free Software Foundation, either version 3 of the License, or | |
7 | // (at your option) any later version. | |
8 | // | |
9 | // Moodle is distributed in the hope that it will be useful, | |
10 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | // GNU General Public License for more details. | |
13 | // | |
14 | // You should have received a copy of the GNU General Public License | |
15 | // along with Moodle. If not, see <http://www.gnu.org/licenses/>. | |
16 | ||
a0a07014 | 17 | |
9a0df45a | 18 | /** |
19 | * Core external functions and service definitions. | |
20 | * | |
39b90b51 EL |
21 | * The functions and services defined on this file are |
22 | * processed and registered into the Moodle DB after any | |
23 | * install or upgrade operation. All plugins support this. | |
24 | * | |
25 | * For more information, take a look to the documentation available: | |
26 | * - Webservices API: {@link http://docs.moodle.org/dev/Web_services_API} | |
27 | * - External API: {@link http://docs.moodle.org/dev/External_functions_API} | |
28 | * - Upgrade API: {@link http://docs.moodle.org/dev/Upgrade_API} | |
29 | * | |
a0a07014 JM |
30 | * @package core_webservice |
31 | * @category webservice | |
32 | * @copyright 2009 Petr Skodak | |
9a0df45a | 33 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later |
34 | */ | |
35 | ||
36 | $functions = array( | |
ef22c1b6 | 37 | |
38 | // === group related functions === | |
f5072177 | 39 | |
9a0df45a | 40 | 'moodle_group_create_groups' => array( |
5d1017e1 JM |
41 | 'classname' => 'core_group_external', |
42 | 'methodname' => 'create_groups', | |
43 | 'classpath' => 'group/externallib.php', | |
44 | 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_group_create_groups(). ', | |
45 | 'type' => 'write', | |
46 | 'capabilities'=> 'moodle/course:managegroups', | |
47 | ), | |
48 | ||
49 | 'core_group_create_groups' => array( | |
50 | 'classname' => 'core_group_external', | |
9a0df45a | 51 | 'methodname' => 'create_groups', |
52 | 'classpath' => 'group/externallib.php', | |
f5072177 | 53 | 'description' => 'Creates new groups.', |
54 | 'type' => 'write', | |
72f68b51 | 55 | 'capabilities'=> 'moodle/course:managegroups', |
9a0df45a | 56 | ), |
f5072177 | 57 | |
9a0df45a | 58 | 'moodle_group_get_groups' => array( |
5d1017e1 JM |
59 | 'classname' => 'core_group_external', |
60 | 'methodname' => 'get_groups', | |
61 | 'classpath' => 'group/externallib.php', | |
62 | 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_group_get_groups()', | |
63 | 'type' => 'read', | |
64 | 'capabilities'=> 'moodle/course:managegroups', | |
65 | ), | |
66 | ||
67 | 'core_group_get_groups' => array( | |
68 | 'classname' => 'core_group_external', | |
9a0df45a | 69 | 'methodname' => 'get_groups', |
70 | 'classpath' => 'group/externallib.php', | |
cfb99b75 | 71 | 'description' => 'Returns group details.', |
f5072177 | 72 | 'type' => 'read', |
72f68b51 | 73 | 'capabilities'=> 'moodle/course:managegroups', |
9a0df45a | 74 | ), |
246f6da2 | 75 | |
76 | 'moodle_group_get_course_groups' => array( | |
5d1017e1 JM |
77 | 'classname' => 'core_group_external', |
78 | 'methodname' => 'get_course_groups', | |
79 | 'classpath' => 'group/externallib.php', | |
80 | 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_group_get_course_groups()', | |
81 | 'type' => 'read', | |
82 | 'capabilities'=> 'moodle/course:managegroups', | |
83 | ), | |
84 | ||
85 | 'core_group_get_course_groups' => array( | |
86 | 'classname' => 'core_group_external', | |
246f6da2 | 87 | 'methodname' => 'get_course_groups', |
88 | 'classpath' => 'group/externallib.php', | |
89 | 'description' => 'Returns all groups in specified course.', | |
90 | 'type' => 'read', | |
72f68b51 | 91 | 'capabilities'=> 'moodle/course:managegroups', |
246f6da2 | 92 | ), |
2cb1ee78 | 93 | |
9a0df45a | 94 | 'moodle_group_delete_groups' => array( |
5d1017e1 JM |
95 | 'classname' => 'core_group_external', |
96 | 'methodname' => 'delete_groups', | |
97 | 'classpath' => 'group/externallib.php', | |
98 | 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_group_delete_groups()', | |
99 | 'type' => 'delete', | |
100 | 'capabilities'=> 'moodle/course:managegroups', | |
101 | ), | |
102 | ||
103 | 'core_group_delete_groups' => array( | |
104 | 'classname' => 'core_group_external', | |
9a0df45a | 105 | 'methodname' => 'delete_groups', |
106 | 'classpath' => 'group/externallib.php', | |
0f4e72de PS |
107 | 'description' => 'Deletes all specified groups.', |
108 | 'type' => 'delete', | |
72f68b51 | 109 | 'capabilities'=> 'moodle/course:managegroups', |
9a0df45a | 110 | ), |
c863dc38 | 111 | |
9a0df45a | 112 | 'moodle_group_get_groupmembers' => array( |
5d1017e1 JM |
113 | 'classname' => 'core_group_external', |
114 | 'methodname' => 'get_group_members', | |
115 | 'classpath' => 'group/externallib.php', | |
116 | 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_group_get_group_members()', | |
117 | 'type' => 'read', | |
118 | 'capabilities'=> 'moodle/course:managegroups', | |
119 | ), | |
120 | ||
121 | 'core_group_get_group_members' => array( | |
122 | 'classname' => 'core_group_external', | |
123 | 'methodname' => 'get_group_members', | |
9a0df45a | 124 | 'classpath' => 'group/externallib.php', |
0f4e72de PS |
125 | 'description' => 'Returns group members.', |
126 | 'type' => 'read', | |
72f68b51 | 127 | 'capabilities'=> 'moodle/course:managegroups', |
9a0df45a | 128 | ), |
4efa2483 | 129 | |
9a0df45a | 130 | 'moodle_group_add_groupmembers' => array( |
5d1017e1 JM |
131 | 'classname' => 'core_group_external', |
132 | 'methodname' => 'add_group_members', | |
133 | 'classpath' => 'group/externallib.php', | |
134 | 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_group_add_group_members()', | |
135 | 'type' => 'write', | |
136 | 'capabilities'=> 'moodle/course:managegroups', | |
137 | ), | |
138 | ||
139 | 'core_group_add_group_members' => array( | |
140 | 'classname' => 'core_group_external', | |
141 | 'methodname' => 'add_group_members', | |
9a0df45a | 142 | 'classpath' => 'group/externallib.php', |
0f4e72de PS |
143 | 'description' => 'Adds group members.', |
144 | 'type' => 'write', | |
72f68b51 | 145 | 'capabilities'=> 'moodle/course:managegroups', |
9a0df45a | 146 | ), |
147 | ||
148 | 'moodle_group_delete_groupmembers' => array( | |
5d1017e1 JM |
149 | 'classname' => 'core_group_external', |
150 | 'methodname' => 'delete_group_members', | |
9a0df45a | 151 | 'classpath' => 'group/externallib.php', |
5d1017e1 | 152 | 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_group_delete_group_members()', |
0f4e72de | 153 | 'type' => 'delete', |
72f68b51 | 154 | 'capabilities'=> 'moodle/course:managegroups', |
9a0df45a | 155 | ), |
72f68b51 | 156 | |
5d1017e1 JM |
157 | 'core_group_delete_group_members' => array( |
158 | 'classname' => 'core_group_external', | |
159 | 'methodname' => 'delete_group_members', | |
160 | 'classpath' => 'group/externallib.php', | |
161 | 'description' => 'Deletes group members.', | |
162 | 'type' => 'delete', | |
163 | 'capabilities'=> 'moodle/course:managegroups', | |
164 | ), | |
72f68b51 | 165 | |
166 | // === file related functions === | |
167 | ||
249c4f60 | 168 | 'moodle_file_get_files' => array( |
5d1017e1 JM |
169 | 'classname' => 'core_files_external', |
170 | 'methodname' => 'get_files', | |
171 | 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_files_get_files()', | |
172 | 'type' => 'read', | |
173 | 'classpath' => 'files/externallib.php', | |
174 | ), | |
175 | ||
176 | 'core_files_get_files' => array( | |
177 | 'classname' => 'core_files_external', | |
249c4f60 DC |
178 | 'methodname' => 'get_files', |
179 | 'description' => 'browse moodle files', | |
180 | 'type' => 'read', | |
181 | 'classpath' => 'files/externallib.php', | |
182 | ), | |
5d1017e1 | 183 | |
249c4f60 | 184 | 'moodle_file_upload' => array( |
5d1017e1 JM |
185 | 'classname' => 'core_files_external', |
186 | 'methodname' => 'upload', | |
187 | 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_files_upload()', | |
188 | 'type' => 'write', | |
189 | 'classpath' => 'files/externallib.php', | |
190 | ), | |
191 | ||
192 | 'core_files_upload' => array( | |
193 | 'classname' => 'core_files_external', | |
249c4f60 DC |
194 | 'methodname' => 'upload', |
195 | 'description' => 'upload a file to moodle', | |
196 | 'type' => 'write', | |
197 | 'classpath' => 'files/externallib.php', | |
198 | ), | |
4efa2483 | 199 | |
ef22c1b6 | 200 | // === user related functions === |
72f68b51 | 201 | |
ef22c1b6 | 202 | 'moodle_user_create_users' => array( |
5d1017e1 JM |
203 | 'classname' => 'core_user_external', |
204 | 'methodname' => 'create_users', | |
205 | 'classpath' => 'user/externallib.php', | |
206 | 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_user_create_users()', | |
207 | 'type' => 'write', | |
208 | 'capabilities'=> 'moodle/user:create', | |
209 | ), | |
210 | ||
211 | 'core_user_create_users' => array( | |
212 | 'classname' => 'core_user_external', | |
ef22c1b6 | 213 | 'methodname' => 'create_users', |
214 | 'classpath' => 'user/externallib.php', | |
fb79269b | 215 | 'description' => 'Create users.', |
216 | 'type' => 'write', | |
72f68b51 | 217 | 'capabilities'=> 'moodle/user:create', |
ef22c1b6 | 218 | ), |
219 | ||
fb79269b | 220 | 'moodle_user_get_users_by_id' => array( |
5d1017e1 JM |
221 | 'classname' => 'core_user_external', |
222 | 'methodname' => 'get_users_by_id', | |
223 | 'classpath' => 'user/externallib.php', | |
224 | 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_user_get_users_by_id()', | |
225 | 'type' => 'read', | |
226 | 'capabilities'=> 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update', | |
227 | ), | |
228 | ||
229 | 'core_user_get_users_by_id' => array( | |
230 | 'classname' => 'core_user_external', | |
fb79269b | 231 | 'methodname' => 'get_users_by_id', |
ef22c1b6 | 232 | 'classpath' => 'user/externallib.php', |
fb79269b | 233 | 'description' => 'Get users by id.', |
234 | 'type' => 'read', | |
b4c74367 | 235 | 'capabilities'=> 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update', |
ef22c1b6 | 236 | ), |
237 | ||
01479290 | 238 | 'moodle_user_get_users_by_courseid' => array( |
5d1017e1 JM |
239 | 'classname' => 'core_enrol_external', |
240 | 'methodname' => 'get_enrolled_users', | |
241 | 'classpath' => 'enrol/externallib.php', | |
242 | 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_enrol_get_enrolled_users()', | |
01479290 DC |
243 | 'type' => 'read', |
244 | 'capabilities'=> 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, moodle/site:accessallgroups', | |
245 | ), | |
246 | ||
ea4e96c2 | 247 | 'moodle_user_get_course_participants_by_id' => array( |
5d1017e1 JM |
248 | 'classname' => 'core_user_external', |
249 | 'methodname' => 'get_course_user_profiles', | |
ea4e96c2 | 250 | 'classpath' => 'user/externallib.php', |
5d1017e1 JM |
251 | 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_user_get_course_user_profiles()', |
252 | 'type' => 'read', | |
253 | 'capabilities'=> 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, moodle/site:accessallgroups', | |
254 | ), | |
255 | ||
256 | 'core_user_get_course_user_profiles' => array( | |
257 | 'classname' => 'core_user_external', | |
258 | 'methodname' => 'get_course_user_profiles', | |
259 | 'classpath' => 'user/externallib.php', | |
260 | 'description' => 'Get course user profiles (each of the profils matching a course id and a user id).', | |
ea4e96c2 DC |
261 | 'type' => 'read', |
262 | 'capabilities'=> 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, moodle/site:accessallgroups', | |
263 | ), | |
264 | ||
ef22c1b6 | 265 | 'moodle_user_delete_users' => array( |
5d1017e1 JM |
266 | 'classname' => 'core_user_external', |
267 | 'methodname' => 'delete_users', | |
268 | 'classpath' => 'user/externallib.php', | |
269 | 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_user_delete_users()', | |
270 | 'type' => 'write', | |
271 | 'capabilities'=> 'moodle/user:delete', | |
272 | ), | |
273 | ||
274 | 'core_user_delete_users' => array( | |
275 | 'classname' => 'core_user_external', | |
ef22c1b6 | 276 | 'methodname' => 'delete_users', |
277 | 'classpath' => 'user/externallib.php', | |
fb79269b | 278 | 'description' => 'Delete users.', |
279 | 'type' => 'write', | |
72f68b51 | 280 | 'capabilities'=> 'moodle/user:delete', |
ef22c1b6 | 281 | ), |
282 | ||
283 | 'moodle_user_update_users' => array( | |
5d1017e1 JM |
284 | 'classname' => 'core_user_external', |
285 | 'methodname' => 'update_users', | |
286 | 'classpath' => 'user/externallib.php', | |
287 | 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_user_update_users()', | |
288 | 'type' => 'write', | |
289 | 'capabilities'=> 'moodle/user:update', | |
290 | ), | |
291 | ||
292 | 'core_user_update_users' => array( | |
293 | 'classname' => 'core_user_external', | |
ef22c1b6 | 294 | 'methodname' => 'update_users', |
295 | 'classpath' => 'user/externallib.php', | |
fb79269b | 296 | 'description' => 'Update users.', |
297 | 'type' => 'write', | |
72f68b51 | 298 | 'capabilities'=> 'moodle/user:update', |
ef22c1b6 | 299 | ), |
e9b66095 | 300 | |
72f68b51 | 301 | // === enrol related functions === |
302 | ||
df997f84 PS |
303 | 'moodle_enrol_get_enrolled_users' => array( |
304 | 'classname' => 'moodle_enrol_external', | |
305 | 'methodname' => 'get_enrolled_users', | |
306 | 'classpath' => 'enrol/externallib.php', | |
5d1017e1 | 307 | 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. Please use core_enrol_get_enrolled_users() (previously known as moodle_user_get_users_by_courseid).', |
df997f84 | 308 | 'type' => 'read', |
72f68b51 | 309 | 'capabilities'=> 'moodle/site:viewparticipants, moodle/course:viewparticipants, |
310 | moodle/role:review, moodle/site:accessallgroups, moodle/course:enrolreview', | |
df997f84 | 311 | ), |
e6acc551 | 312 | |
5d1017e1 JM |
313 | 'core_enrol_get_enrolled_users' => array( |
314 | 'classname' => 'core_enrol_external', | |
315 | 'methodname' => 'get_enrolled_users', | |
316 | 'classpath' => 'enrol/externallib.php', | |
317 | 'description' => 'Get enrolled users by course id.', | |
318 | 'type' => 'read', | |
319 | 'capabilities'=> 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, moodle/site:accessallgroups', | |
320 | ), | |
df997f84 | 321 | |
3364dbb5 | 322 | 'moodle_enrol_get_users_courses' => array( |
5d1017e1 | 323 | 'classname' => 'core_enrol_external', |
3364dbb5 PS |
324 | 'methodname' => 'get_users_courses', |
325 | 'classpath' => 'enrol/externallib.php', | |
5d1017e1 | 326 | 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_enrol_get_users_courses()', |
3364dbb5 PS |
327 | 'type' => 'read', |
328 | 'capabilities'=> 'moodle/course:viewparticipants', | |
329 | ), | |
330 | ||
5d1017e1 JM |
331 | 'core_enrol_get_users_courses' => array( |
332 | 'classname' => 'core_enrol_external', | |
333 | 'methodname' => 'get_users_courses', | |
334 | 'classpath' => 'enrol/externallib.php', | |
335 | 'description' => 'Get the list of courses where a user is enrolled in', | |
336 | 'type' => 'read', | |
337 | 'capabilities'=> 'moodle/course:viewparticipants', | |
338 | ), | |
339 | ||
340 | // === Role related functions === | |
341 | ||
df997f84 | 342 | 'moodle_role_assign' => array( |
5d1017e1 JM |
343 | 'classname' => 'core_role_external', |
344 | 'methodname' => 'assign_roles', | |
345 | 'classpath' => 'enrol/externallib.php', | |
346 | 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_role_assign_role()', | |
347 | 'type' => 'write', | |
348 | 'capabilities'=> 'moodle/role:assign', | |
349 | ), | |
350 | ||
351 | 'core_role_assign_roles' => array( | |
352 | 'classname' => 'core_role_external', | |
353 | 'methodname' => 'assign_roles', | |
e9b66095 | 354 | 'classpath' => 'enrol/externallib.php', |
df997f84 | 355 | 'description' => 'Manual role assignments.', |
e9b66095 | 356 | 'type' => 'write', |
72f68b51 | 357 | 'capabilities'=> 'moodle/role:assign', |
e9b66095 | 358 | ), |
359 | ||
df997f84 | 360 | 'moodle_role_unassign' => array( |
5d1017e1 JM |
361 | 'classname' => 'core_role_external', |
362 | 'methodname' => 'unassign_roles', | |
363 | 'classpath' => 'enrol/externallib.php', | |
364 | 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_role_unassign_role()', | |
365 | 'type' => 'write', | |
366 | 'capabilities'=> 'moodle/role:assign', | |
367 | ), | |
368 | ||
369 | 'core_role_unassign_roles' => array( | |
370 | 'classname' => 'core_role_external', | |
371 | 'methodname' => 'unassign_roles', | |
e9b66095 | 372 | 'classpath' => 'enrol/externallib.php', |
df997f84 | 373 | 'description' => 'Manual role unassignments.', |
e9b66095 | 374 | 'type' => 'write', |
72f68b51 | 375 | 'capabilities'=> 'moodle/role:assign', |
e9b66095 | 376 | ), |
5b4a78e2 | 377 | |
6bb31e40 | 378 | // === course related functions === |
379 | ||
d4a246bc FS |
380 | 'core_course_get_categories' => array( |
381 | 'classname' => 'core_course_external', | |
382 | 'methodname' => 'get_categories', | |
383 | 'classpath' => 'course/externallib.php', | |
d4a17894 | 384 | 'description' => 'Return category details', |
d4a246bc | 385 | 'type' => 'read', |
d4a17894 | 386 | 'capabilities'=> 'moodle/category:viewhiddencategories', |
d4a246bc FS |
387 | ), |
388 | ||
f2229c68 FS |
389 | 'core_course_update_categories' => array( |
390 | 'classname' => 'core_course_external', | |
391 | 'methodname' => 'update_categories', | |
392 | 'classpath' => 'course/externallib.php', | |
393 | 'description' => 'Update categories', | |
394 | 'type' => 'write', | |
395 | 'capabilities'=> 'moodle:category/manage', | |
396 | ), | |
397 | ||
6bb31e40 | 398 | 'moodle_course_get_courses' => array( |
5d1017e1 JM |
399 | 'classname' => 'core_course_external', |
400 | 'methodname' => 'get_courses', | |
401 | 'classpath' => 'course/externallib.php', | |
402 | 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_course_get_courses()', | |
403 | 'type' => 'read', | |
404 | 'capabilities'=> 'moodle/course:view,moodle/course:update,moodle/course:viewhiddencourses', | |
405 | ), | |
406 | ||
407 | 'core_course_get_courses' => array( | |
408 | 'classname' => 'core_course_external', | |
6bb31e40 | 409 | 'methodname' => 'get_courses', |
410 | 'classpath' => 'course/externallib.php', | |
411 | 'description' => 'Return course details', | |
412 | 'type' => 'read', | |
413 | 'capabilities'=> 'moodle/course:view,moodle/course:update,moodle/course:viewhiddencourses', | |
414 | ), | |
415 | ||
416 | 'moodle_course_create_courses' => array( | |
5d1017e1 JM |
417 | 'classname' => 'core_course_external', |
418 | 'methodname' => 'create_courses', | |
419 | 'classpath' => 'course/externallib.php', | |
420 | 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_course_create_courses()', | |
421 | 'type' => 'write', | |
422 | 'capabilities'=> 'moodle/course:create,moodle/course:visibility', | |
423 | ), | |
424 | ||
425 | 'core_course_create_courses' => array( | |
426 | 'classname' => 'core_course_external', | |
6bb31e40 | 427 | 'methodname' => 'create_courses', |
428 | 'classpath' => 'course/externallib.php', | |
429 | 'description' => 'Create new courses', | |
430 | 'type' => 'write', | |
431 | 'capabilities'=> 'moodle/course:create,moodle/course:visibility', | |
432 | ), | |
433 | ||
ec0d6ea2 DC |
434 | 'core_course_get_contents' => array( |
435 | 'classname' => 'core_course_external', | |
436 | 'methodname' => 'get_course_contents', | |
437 | 'classpath' => 'course/externallib.php', | |
438 | 'description' => 'Get course contents', | |
439 | 'type' => 'read', | |
440 | 'capabilities'=> 'moodle/course:update,moodle/course:viewhiddencourses', | |
441 | ), | |
442 | ||
63a85dc7 JL |
443 | 'core_course_delete_courses' => array( |
444 | 'classname' => 'core_course_external', | |
445 | 'methodname' => 'delete_courses', | |
446 | 'classpath' => 'course/externallib.php', | |
447 | 'description' => 'Deletes all specified courses', | |
448 | 'type' => 'write', | |
449 | 'capabilities'=> 'moodle/course:delete', | |
450 | ), | |
451 | ||
479a5db1 FS |
452 | 'core_course_create_categories' => array( |
453 | 'classname' => 'core_course_external', | |
454 | 'methodname' => 'create_categories', | |
455 | 'classpath' => 'course/externallib.php', | |
456 | 'description' => 'Create course categories', | |
457 | 'type' => 'write', | |
458 | 'capabilities'=> 'moodle/category:manage', | |
459 | ), | |
2f951d86 FS |
460 | |
461 | 'core_course_delete_categories' => array( | |
462 | 'classname' => 'core_course_external', | |
463 | 'methodname' => 'delete_categories', | |
464 | 'classpath' => 'course/externallib.php', | |
465 | 'description' => 'Delete course categories', | |
466 | 'type' => 'write', | |
467 | 'capabilities'=> 'moodle/category:manage', | |
468 | ), | |
479a5db1 | 469 | |
a623b6b8 JM |
470 | // === message related functions === |
471 | ||
4de00da7 | 472 | 'moodle_message_send_instantmessages' => array( |
5d1017e1 JM |
473 | 'classname' => 'core_message_external', |
474 | 'methodname' => 'send_instant_messages', | |
475 | 'classpath' => 'message/externallib.php', | |
476 | 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_message_send_instant_messages()', | |
477 | 'type' => 'write', | |
478 | 'capabilities'=> 'moodle/site:sendmessage', | |
479 | ), | |
480 | ||
481 | 'core_message_send_instant_messages' => array( | |
482 | 'classname' => 'core_message_external', | |
483 | 'methodname' => 'send_instant_messages', | |
a623b6b8 | 484 | 'classpath' => 'message/externallib.php', |
4de00da7 | 485 | 'description' => 'Send instant messages', |
a623b6b8 JM |
486 | 'type' => 'write', |
487 | 'capabilities'=> 'moodle/site:sendmessage', | |
488 | ), | |
489 | ||
8d46dabb JM |
490 | // === notes related functions === |
491 | ||
492 | 'moodle_notes_create_notes' => array( | |
5d1017e1 JM |
493 | 'classname' => 'core_notes_external', |
494 | 'methodname' => 'create_notes', | |
495 | 'classpath' => 'notes/externallib.php', | |
496 | 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_notes_create_notes()', | |
497 | 'type' => 'write', | |
498 | 'capabilities'=> 'moodle/notes:manage', | |
499 | ), | |
500 | ||
501 | 'core_notes_create_notes' => array( | |
502 | 'classname' => 'core_notes_external', | |
8d46dabb JM |
503 | 'methodname' => 'create_notes', |
504 | 'classpath' => 'notes/externallib.php', | |
505 | 'description' => 'Create notes', | |
506 | 'type' => 'write', | |
507 | 'capabilities'=> 'moodle/notes:manage', | |
508 | ), | |
509 | ||
0bf486a6 JM |
510 | // === webservice related functions === |
511 | ||
512 | 'moodle_webservice_get_siteinfo' => array( | |
5d1017e1 JM |
513 | 'classname' => 'core_webservice_external', |
514 | 'methodname' => 'get_site_info', | |
515 | 'classpath' => 'webservice/externallib.php', | |
516 | 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_webservice_get_site_info()', | |
517 | 'type' => 'read', | |
518 | ), | |
519 | ||
520 | 'core_webservice_get_site_info' => array( | |
521 | 'classname' => 'core_webservice_external', | |
522 | 'methodname' => 'get_site_info', | |
0bf486a6 JM |
523 | 'classpath' => 'webservice/externallib.php', |
524 | 'description' => 'Return some site info / user info / list web service functions', | |
525 | 'type' => 'read', | |
526 | ), | |
527 | ||
9a0df45a | 528 | ); |
c1b65883 JM |
529 | |
530 | $services = array( | |
96e0194c SH |
531 | 'Moodle mobile web service' => array( |
532 | 'functions' => array ( | |
533 | 'moodle_enrol_get_users_courses', | |
534 | 'moodle_enrol_get_enrolled_users', | |
f2806b9a JM |
535 | 'moodle_user_get_users_by_id', |
536 | 'moodle_webservice_get_siteinfo', | |
537 | 'moodle_notes_create_notes', | |
ea4e96c2 | 538 | 'moodle_user_get_course_participants_by_id', |
01479290 | 539 | 'moodle_user_get_users_by_courseid', |
ec0d6ea2 DC |
540 | 'moodle_message_send_instantmessages', |
541 | 'core_course_get_contents'), | |
96e0194c SH |
542 | 'enabled' => 0, |
543 | 'restrictedusers' => 0, | |
af03513f JM |
544 | 'shortname' => MOODLE_OFFICIAL_MOBILE_SERVICE, |
545 | 'downloadfiles' => 1 | |
96e0194c SH |
546 | ), |
547 | ); |