on-demand release 2.3dev
[moodle.git] / lib / db / services.php
CommitLineData
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
7ce23590
JL
166 'core_group_create_groupings' => array(
167 'classname' => 'core_group_external',
168 'methodname' => 'create_groupings',
169 'classpath' => 'group/externallib.php',
170 'description' => 'Creates new groupings',
171 'type' => 'write',
172 ),
173
174 'core_group_update_groupings' => array(
175 'classname' => 'core_group_external',
176 'methodname' => 'update_groupings',
177 'classpath' => 'group/externallib.php',
178 'description' => 'Updates existing groupings',
179 'type' => 'write',
180 ),
181
182 'core_group_get_groupings' => array(
183 'classname' => 'core_group_external',
184 'methodname' => 'get_groupings',
185 'classpath' => 'group/externallib.php',
186 'description' => 'Returns groupings details.',
187 'type' => 'read',
188 ),
189
190 'core_group_get_course_groupings' => array(
67aa60f9
JL
191 'classname' => 'core_group_external',
192 'methodname' => 'get_course_groupings',
193 'classpath' => 'group/externallib.php',
194 'description' => 'Returns all groupings in specified course.',
195 'type' => 'read',
7ce23590
JL
196 ),
197
198 'core_group_delete_groupings' => array(
67aa60f9
JL
199 'classname' => 'core_group_external',
200 'methodname' => 'delete_groupings',
201 'classpath' => 'group/externallib.php',
202 'description' => 'Deletes all specified groupings.',
203 'type' => 'write',
7ce23590
JL
204 ),
205
206 'core_group_assign_grouping' => array(
67aa60f9
JL
207 'classname' => 'core_group_external',
208 'methodname' => 'assign_grouping',
209 'classpath' => 'group/externallib.php',
210 'description' => 'Assing groups from groupings',
211 'type' => 'write',
7ce23590
JL
212 ),
213
214 'core_group_unassign_grouping' => array(
67aa60f9
JL
215 'classname' => 'core_group_external',
216 'methodname' => 'unassign_grouping',
217 'classpath' => 'group/externallib.php',
218 'description' => 'Unassing groups from groupings',
219 'type' => 'write',
7ce23590
JL
220 ),
221
72f68b51 222 // === file related functions ===
223
249c4f60 224 'moodle_file_get_files' => array(
5d1017e1
JM
225 'classname' => 'core_files_external',
226 'methodname' => 'get_files',
227 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_files_get_files()',
228 'type' => 'read',
229 'classpath' => 'files/externallib.php',
230 ),
231
232 'core_files_get_files' => array(
233 'classname' => 'core_files_external',
249c4f60
DC
234 'methodname' => 'get_files',
235 'description' => 'browse moodle files',
236 'type' => 'read',
237 'classpath' => 'files/externallib.php',
238 ),
5d1017e1 239
249c4f60 240 'moodle_file_upload' => array(
5d1017e1
JM
241 'classname' => 'core_files_external',
242 'methodname' => 'upload',
243 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_files_upload()',
244 'type' => 'write',
245 'classpath' => 'files/externallib.php',
246 ),
247
248 'core_files_upload' => array(
249 'classname' => 'core_files_external',
249c4f60
DC
250 'methodname' => 'upload',
251 'description' => 'upload a file to moodle',
252 'type' => 'write',
253 'classpath' => 'files/externallib.php',
254 ),
4efa2483 255
ef22c1b6 256 // === user related functions ===
72f68b51 257
ef22c1b6 258 'moodle_user_create_users' => array(
5d1017e1
JM
259 'classname' => 'core_user_external',
260 'methodname' => 'create_users',
261 'classpath' => 'user/externallib.php',
262 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_user_create_users()',
263 'type' => 'write',
264 'capabilities'=> 'moodle/user:create',
265 ),
266
267 'core_user_create_users' => array(
268 'classname' => 'core_user_external',
ef22c1b6 269 'methodname' => 'create_users',
270 'classpath' => 'user/externallib.php',
fb79269b 271 'description' => 'Create users.',
272 'type' => 'write',
72f68b51 273 'capabilities'=> 'moodle/user:create',
ef22c1b6 274 ),
275
fb79269b 276 'moodle_user_get_users_by_id' => array(
5d1017e1
JM
277 'classname' => 'core_user_external',
278 'methodname' => 'get_users_by_id',
279 'classpath' => 'user/externallib.php',
280 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_user_get_users_by_id()',
281 'type' => 'read',
282 'capabilities'=> 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update',
283 ),
284
285 'core_user_get_users_by_id' => array(
286 'classname' => 'core_user_external',
fb79269b 287 'methodname' => 'get_users_by_id',
ef22c1b6 288 'classpath' => 'user/externallib.php',
fb79269b 289 'description' => 'Get users by id.',
290 'type' => 'read',
b4c74367 291 'capabilities'=> 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update',
ef22c1b6 292 ),
293
01479290 294 'moodle_user_get_users_by_courseid' => array(
5d1017e1
JM
295 'classname' => 'core_enrol_external',
296 'methodname' => 'get_enrolled_users',
297 'classpath' => 'enrol/externallib.php',
298 '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
299 'type' => 'read',
300 'capabilities'=> 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, moodle/site:accessallgroups',
301 ),
302
ea4e96c2 303 'moodle_user_get_course_participants_by_id' => array(
5d1017e1
JM
304 'classname' => 'core_user_external',
305 'methodname' => 'get_course_user_profiles',
ea4e96c2 306 'classpath' => 'user/externallib.php',
5d1017e1
JM
307 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_user_get_course_user_profiles()',
308 'type' => 'read',
309 'capabilities'=> 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, moodle/site:accessallgroups',
310 ),
311
312 'core_user_get_course_user_profiles' => array(
313 'classname' => 'core_user_external',
314 'methodname' => 'get_course_user_profiles',
315 'classpath' => 'user/externallib.php',
316 'description' => 'Get course user profiles (each of the profils matching a course id and a user id).',
ea4e96c2
DC
317 'type' => 'read',
318 'capabilities'=> 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, moodle/site:accessallgroups',
319 ),
320
ef22c1b6 321 'moodle_user_delete_users' => array(
5d1017e1
JM
322 'classname' => 'core_user_external',
323 'methodname' => 'delete_users',
324 'classpath' => 'user/externallib.php',
325 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_user_delete_users()',
326 'type' => 'write',
327 'capabilities'=> 'moodle/user:delete',
328 ),
329
330 'core_user_delete_users' => array(
331 'classname' => 'core_user_external',
ef22c1b6 332 'methodname' => 'delete_users',
333 'classpath' => 'user/externallib.php',
fb79269b 334 'description' => 'Delete users.',
335 'type' => 'write',
72f68b51 336 'capabilities'=> 'moodle/user:delete',
ef22c1b6 337 ),
338
339 'moodle_user_update_users' => array(
5d1017e1
JM
340 'classname' => 'core_user_external',
341 'methodname' => 'update_users',
342 'classpath' => 'user/externallib.php',
343 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_user_update_users()',
344 'type' => 'write',
345 'capabilities'=> 'moodle/user:update',
346 ),
347
348 'core_user_update_users' => array(
349 'classname' => 'core_user_external',
ef22c1b6 350 'methodname' => 'update_users',
351 'classpath' => 'user/externallib.php',
fb79269b 352 'description' => 'Update users.',
353 'type' => 'write',
72f68b51 354 'capabilities'=> 'moodle/user:update',
ef22c1b6 355 ),
e9b66095 356
72f68b51 357 // === enrol related functions ===
358
df997f84
PS
359 'moodle_enrol_get_enrolled_users' => array(
360 'classname' => 'moodle_enrol_external',
361 'methodname' => 'get_enrolled_users',
362 'classpath' => 'enrol/externallib.php',
5d1017e1 363 '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 364 'type' => 'read',
72f68b51 365 'capabilities'=> 'moodle/site:viewparticipants, moodle/course:viewparticipants,
366 moodle/role:review, moodle/site:accessallgroups, moodle/course:enrolreview',
df997f84 367 ),
e6acc551 368
5d1017e1
JM
369 'core_enrol_get_enrolled_users' => array(
370 'classname' => 'core_enrol_external',
371 'methodname' => 'get_enrolled_users',
372 'classpath' => 'enrol/externallib.php',
373 'description' => 'Get enrolled users by course id.',
374 'type' => 'read',
375 'capabilities'=> 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, moodle/site:accessallgroups',
376 ),
df997f84 377
3364dbb5 378 'moodle_enrol_get_users_courses' => array(
5d1017e1 379 'classname' => 'core_enrol_external',
3364dbb5
PS
380 'methodname' => 'get_users_courses',
381 'classpath' => 'enrol/externallib.php',
5d1017e1 382 '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
383 'type' => 'read',
384 'capabilities'=> 'moodle/course:viewparticipants',
385 ),
386
5d1017e1
JM
387 'core_enrol_get_users_courses' => array(
388 'classname' => 'core_enrol_external',
389 'methodname' => 'get_users_courses',
390 'classpath' => 'enrol/externallib.php',
391 'description' => 'Get the list of courses where a user is enrolled in',
392 'type' => 'read',
393 'capabilities'=> 'moodle/course:viewparticipants',
394 ),
395
396 // === Role related functions ===
397
df997f84 398 'moodle_role_assign' => array(
5d1017e1
JM
399 'classname' => 'core_role_external',
400 'methodname' => 'assign_roles',
401 'classpath' => 'enrol/externallib.php',
402 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_role_assign_role()',
403 'type' => 'write',
404 'capabilities'=> 'moodle/role:assign',
405 ),
406
407 'core_role_assign_roles' => array(
408 'classname' => 'core_role_external',
409 'methodname' => 'assign_roles',
e9b66095 410 'classpath' => 'enrol/externallib.php',
df997f84 411 'description' => 'Manual role assignments.',
e9b66095 412 'type' => 'write',
72f68b51 413 'capabilities'=> 'moodle/role:assign',
e9b66095 414 ),
415
df997f84 416 'moodle_role_unassign' => array(
5d1017e1
JM
417 'classname' => 'core_role_external',
418 'methodname' => 'unassign_roles',
419 'classpath' => 'enrol/externallib.php',
420 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_role_unassign_role()',
421 'type' => 'write',
422 'capabilities'=> 'moodle/role:assign',
423 ),
424
425 'core_role_unassign_roles' => array(
426 'classname' => 'core_role_external',
427 'methodname' => 'unassign_roles',
e9b66095 428 'classpath' => 'enrol/externallib.php',
df997f84 429 'description' => 'Manual role unassignments.',
e9b66095 430 'type' => 'write',
72f68b51 431 'capabilities'=> 'moodle/role:assign',
e9b66095 432 ),
5b4a78e2 433
6bb31e40 434 // === course related functions ===
435
3ec163dd 436 'core_course_get_contents' => array(
d4a246bc 437 'classname' => 'core_course_external',
3ec163dd 438 'methodname' => 'get_course_contents',
d4a246bc 439 'classpath' => 'course/externallib.php',
3ec163dd 440 'description' => 'Get course contents',
d4a246bc 441 'type' => 'read',
3ec163dd 442 'capabilities'=> 'moodle/course:update,moodle/course:viewhiddencourses',
f2229c68 443 ),
d6ebe011 444
6bb31e40 445 'moodle_course_get_courses' => array(
5d1017e1
JM
446 'classname' => 'core_course_external',
447 'methodname' => 'get_courses',
448 'classpath' => 'course/externallib.php',
449 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_course_get_courses()',
450 'type' => 'read',
451 'capabilities'=> 'moodle/course:view,moodle/course:update,moodle/course:viewhiddencourses',
452 ),
453
454 'core_course_get_courses' => array(
455 'classname' => 'core_course_external',
6bb31e40 456 'methodname' => 'get_courses',
457 'classpath' => 'course/externallib.php',
458 'description' => 'Return course details',
459 'type' => 'read',
460 'capabilities'=> 'moodle/course:view,moodle/course:update,moodle/course:viewhiddencourses',
461 ),
462
463 'moodle_course_create_courses' => array(
5d1017e1
JM
464 'classname' => 'core_course_external',
465 'methodname' => 'create_courses',
466 'classpath' => 'course/externallib.php',
467 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_course_create_courses()',
468 'type' => 'write',
469 'capabilities'=> 'moodle/course:create,moodle/course:visibility',
470 ),
471
472 'core_course_create_courses' => array(
473 'classname' => 'core_course_external',
6bb31e40 474 'methodname' => 'create_courses',
475 'classpath' => 'course/externallib.php',
476 'description' => 'Create new courses',
477 'type' => 'write',
478 'capabilities'=> 'moodle/course:create,moodle/course:visibility',
479 ),
480
63a85dc7
JL
481 'core_course_delete_courses' => array(
482 'classname' => 'core_course_external',
483 'methodname' => 'delete_courses',
484 'classpath' => 'course/externallib.php',
485 'description' => 'Deletes all specified courses',
486 'type' => 'write',
487 'capabilities'=> 'moodle/course:delete',
488 ),
489
3dc1d76e
JL
490 'core_course_duplicate_course' => array(
491 'classname' => 'core_course_external',
492 'methodname' => 'duplicate_course',
493 'classpath' => 'course/externallib.php',
494 'description' => 'Duplicate an existing course (creating a new one) without user data',
495 'type' => 'write',
496 'capabilities'=> 'moodle/backup:backupcourse,moodle/restore:restorecourse,moodle/course:create',
497 ),
498
3ec163dd
EL
499 // === course category related functions ===
500
501 'core_course_get_categories' => array(
502 'classname' => 'core_course_external',
503 'methodname' => 'get_categories',
504 'classpath' => 'course/externallib.php',
505 'description' => 'Return category details',
506 'type' => 'read',
507 'capabilities'=> 'moodle/category:viewhiddencategories',
508 ),
509
479a5db1
FS
510 'core_course_create_categories' => array(
511 'classname' => 'core_course_external',
512 'methodname' => 'create_categories',
513 'classpath' => 'course/externallib.php',
514 'description' => 'Create course categories',
515 'type' => 'write',
516 'capabilities'=> 'moodle/category:manage',
517 ),
d6ebe011 518
3ec163dd
EL
519 'core_course_update_categories' => array(
520 'classname' => 'core_course_external',
521 'methodname' => 'update_categories',
522 'classpath' => 'course/externallib.php',
523 'description' => 'Update categories',
524 'type' => 'write',
525 'capabilities'=> 'moodle:category/manage',
526 ),
527
2f951d86
FS
528 'core_course_delete_categories' => array(
529 'classname' => 'core_course_external',
530 'methodname' => 'delete_categories',
531 'classpath' => 'course/externallib.php',
532 'description' => 'Delete course categories',
533 'type' => 'write',
534 'capabilities'=> 'moodle/category:manage',
535 ),
479a5db1 536
a623b6b8
JM
537 // === message related functions ===
538
4de00da7 539 'moodle_message_send_instantmessages' => array(
5d1017e1
JM
540 'classname' => 'core_message_external',
541 'methodname' => 'send_instant_messages',
542 'classpath' => 'message/externallib.php',
543 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_message_send_instant_messages()',
544 'type' => 'write',
545 'capabilities'=> 'moodle/site:sendmessage',
546 ),
547
548 'core_message_send_instant_messages' => array(
549 'classname' => 'core_message_external',
550 'methodname' => 'send_instant_messages',
a623b6b8 551 'classpath' => 'message/externallib.php',
4de00da7 552 'description' => 'Send instant messages',
a623b6b8
JM
553 'type' => 'write',
554 'capabilities'=> 'moodle/site:sendmessage',
555 ),
556
8d46dabb
JM
557 // === notes related functions ===
558
559 'moodle_notes_create_notes' => array(
5d1017e1
JM
560 'classname' => 'core_notes_external',
561 'methodname' => 'create_notes',
562 'classpath' => 'notes/externallib.php',
563 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_notes_create_notes()',
564 'type' => 'write',
565 'capabilities'=> 'moodle/notes:manage',
566 ),
567
568 'core_notes_create_notes' => array(
569 'classname' => 'core_notes_external',
8d46dabb
JM
570 'methodname' => 'create_notes',
571 'classpath' => 'notes/externallib.php',
572 'description' => 'Create notes',
573 'type' => 'write',
574 'capabilities'=> 'moodle/notes:manage',
575 ),
576
0bf486a6
JM
577 // === webservice related functions ===
578
579 'moodle_webservice_get_siteinfo' => array(
5d1017e1
JM
580 'classname' => 'core_webservice_external',
581 'methodname' => 'get_site_info',
582 'classpath' => 'webservice/externallib.php',
583 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_webservice_get_site_info()',
584 'type' => 'read',
585 ),
586
587 'core_webservice_get_site_info' => array(
588 'classname' => 'core_webservice_external',
589 'methodname' => 'get_site_info',
0bf486a6
JM
590 'classpath' => 'webservice/externallib.php',
591 'description' => 'Return some site info / user info / list web service functions',
592 'type' => 'read',
593 ),
594
9a0df45a 595);
c1b65883
JM
596
597$services = array(
96e0194c
SH
598 'Moodle mobile web service' => array(
599 'functions' => array (
600 'moodle_enrol_get_users_courses',
601 'moodle_enrol_get_enrolled_users',
f2806b9a
JM
602 'moodle_user_get_users_by_id',
603 'moodle_webservice_get_siteinfo',
604 'moodle_notes_create_notes',
ea4e96c2 605 'moodle_user_get_course_participants_by_id',
01479290 606 'moodle_user_get_users_by_courseid',
ec0d6ea2
DC
607 'moodle_message_send_instantmessages',
608 'core_course_get_contents'),
96e0194c
SH
609 'enabled' => 0,
610 'restrictedusers' => 0,
af03513f
JM
611 'shortname' => MOODLE_OFFICIAL_MOBILE_SERVICE,
612 'downloadfiles' => 1
96e0194c
SH
613 ),
614);