Merge branch 'MDL-31859' of git://github.com/Lightwork-Marking/moodle
[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 ===
b6b6c7ac
PC
358
359 'core_enrol_get_enrolled_users_with_capability' => array(
360 'classname' => 'core_enrol_external',
361 'methodname' => 'get_enrolled_users_with_capability',
362 'classpath' => 'enrol/externallib.php',
363 'description' => 'For each course and capability specified, return a list of the users that are enrolled in the course
364 and have that capability',
365 'type' => 'read',
366 ),
72f68b51 367
df997f84
PS
368 'moodle_enrol_get_enrolled_users' => array(
369 'classname' => 'moodle_enrol_external',
370 'methodname' => 'get_enrolled_users',
371 'classpath' => 'enrol/externallib.php',
5d1017e1 372 '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 373 'type' => 'read',
72f68b51 374 'capabilities'=> 'moodle/site:viewparticipants, moodle/course:viewparticipants,
375 moodle/role:review, moodle/site:accessallgroups, moodle/course:enrolreview',
df997f84 376 ),
e6acc551 377
5d1017e1
JM
378 'core_enrol_get_enrolled_users' => array(
379 'classname' => 'core_enrol_external',
380 'methodname' => 'get_enrolled_users',
381 'classpath' => 'enrol/externallib.php',
382 'description' => 'Get enrolled users by course id.',
383 'type' => 'read',
384 'capabilities'=> 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, moodle/site:accessallgroups',
385 ),
df997f84 386
3364dbb5 387 'moodle_enrol_get_users_courses' => array(
5d1017e1 388 'classname' => 'core_enrol_external',
3364dbb5
PS
389 'methodname' => 'get_users_courses',
390 'classpath' => 'enrol/externallib.php',
5d1017e1 391 '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
392 'type' => 'read',
393 'capabilities'=> 'moodle/course:viewparticipants',
394 ),
395
5d1017e1
JM
396 'core_enrol_get_users_courses' => array(
397 'classname' => 'core_enrol_external',
398 'methodname' => 'get_users_courses',
399 'classpath' => 'enrol/externallib.php',
400 'description' => 'Get the list of courses where a user is enrolled in',
401 'type' => 'read',
402 'capabilities'=> 'moodle/course:viewparticipants',
403 ),
404
405 // === Role related functions ===
406
df997f84 407 'moodle_role_assign' => array(
5d1017e1
JM
408 'classname' => 'core_role_external',
409 'methodname' => 'assign_roles',
410 'classpath' => 'enrol/externallib.php',
411 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_role_assign_role()',
412 'type' => 'write',
413 'capabilities'=> 'moodle/role:assign',
414 ),
415
416 'core_role_assign_roles' => array(
417 'classname' => 'core_role_external',
418 'methodname' => 'assign_roles',
e9b66095 419 'classpath' => 'enrol/externallib.php',
df997f84 420 'description' => 'Manual role assignments.',
e9b66095 421 'type' => 'write',
72f68b51 422 'capabilities'=> 'moodle/role:assign',
e9b66095 423 ),
424
df997f84 425 'moodle_role_unassign' => array(
5d1017e1
JM
426 'classname' => 'core_role_external',
427 'methodname' => 'unassign_roles',
428 'classpath' => 'enrol/externallib.php',
429 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_role_unassign_role()',
430 'type' => 'write',
431 'capabilities'=> 'moodle/role:assign',
432 ),
433
434 'core_role_unassign_roles' => array(
435 'classname' => 'core_role_external',
436 'methodname' => 'unassign_roles',
e9b66095 437 'classpath' => 'enrol/externallib.php',
df997f84 438 'description' => 'Manual role unassignments.',
e9b66095 439 'type' => 'write',
72f68b51 440 'capabilities'=> 'moodle/role:assign',
e9b66095 441 ),
5b4a78e2 442
6bb31e40 443 // === course related functions ===
444
3ec163dd 445 'core_course_get_contents' => array(
d4a246bc 446 'classname' => 'core_course_external',
3ec163dd 447 'methodname' => 'get_course_contents',
d4a246bc 448 'classpath' => 'course/externallib.php',
3ec163dd 449 'description' => 'Get course contents',
d4a246bc 450 'type' => 'read',
3ec163dd 451 'capabilities'=> 'moodle/course:update,moodle/course:viewhiddencourses',
f2229c68 452 ),
d6ebe011 453
6bb31e40 454 'moodle_course_get_courses' => array(
5d1017e1
JM
455 'classname' => 'core_course_external',
456 'methodname' => 'get_courses',
457 'classpath' => 'course/externallib.php',
458 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_course_get_courses()',
459 'type' => 'read',
460 'capabilities'=> 'moodle/course:view,moodle/course:update,moodle/course:viewhiddencourses',
461 ),
462
463 'core_course_get_courses' => array(
464 'classname' => 'core_course_external',
6bb31e40 465 'methodname' => 'get_courses',
466 'classpath' => 'course/externallib.php',
467 'description' => 'Return course details',
468 'type' => 'read',
469 'capabilities'=> 'moodle/course:view,moodle/course:update,moodle/course:viewhiddencourses',
470 ),
471
472 'moodle_course_create_courses' => array(
5d1017e1
JM
473 'classname' => 'core_course_external',
474 'methodname' => 'create_courses',
475 'classpath' => 'course/externallib.php',
476 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_course_create_courses()',
477 'type' => 'write',
478 'capabilities'=> 'moodle/course:create,moodle/course:visibility',
479 ),
480
481 'core_course_create_courses' => array(
482 'classname' => 'core_course_external',
6bb31e40 483 'methodname' => 'create_courses',
484 'classpath' => 'course/externallib.php',
485 'description' => 'Create new courses',
486 'type' => 'write',
487 'capabilities'=> 'moodle/course:create,moodle/course:visibility',
488 ),
489
63a85dc7
JL
490 'core_course_delete_courses' => array(
491 'classname' => 'core_course_external',
492 'methodname' => 'delete_courses',
493 'classpath' => 'course/externallib.php',
494 'description' => 'Deletes all specified courses',
495 'type' => 'write',
496 'capabilities'=> 'moodle/course:delete',
497 ),
498
3dc1d76e
JL
499 'core_course_duplicate_course' => array(
500 'classname' => 'core_course_external',
501 'methodname' => 'duplicate_course',
502 'classpath' => 'course/externallib.php',
503 'description' => 'Duplicate an existing course (creating a new one) without user data',
504 'type' => 'write',
505 'capabilities'=> 'moodle/backup:backupcourse,moodle/restore:restorecourse,moodle/course:create',
506 ),
507
3ec163dd
EL
508 // === course category related functions ===
509
510 'core_course_get_categories' => array(
511 'classname' => 'core_course_external',
512 'methodname' => 'get_categories',
513 'classpath' => 'course/externallib.php',
514 'description' => 'Return category details',
515 'type' => 'read',
516 'capabilities'=> 'moodle/category:viewhiddencategories',
517 ),
518
479a5db1
FS
519 'core_course_create_categories' => array(
520 'classname' => 'core_course_external',
521 'methodname' => 'create_categories',
522 'classpath' => 'course/externallib.php',
523 'description' => 'Create course categories',
524 'type' => 'write',
525 'capabilities'=> 'moodle/category:manage',
526 ),
d6ebe011 527
3ec163dd
EL
528 'core_course_update_categories' => array(
529 'classname' => 'core_course_external',
530 'methodname' => 'update_categories',
531 'classpath' => 'course/externallib.php',
532 'description' => 'Update categories',
533 'type' => 'write',
afe27edc 534 'capabilities'=> 'moodle/category:manage',
3ec163dd
EL
535 ),
536
2f951d86
FS
537 'core_course_delete_categories' => array(
538 'classname' => 'core_course_external',
539 'methodname' => 'delete_categories',
540 'classpath' => 'course/externallib.php',
541 'description' => 'Delete course categories',
542 'type' => 'write',
543 'capabilities'=> 'moodle/category:manage',
544 ),
479a5db1 545
8430d87b
JL
546 'core_course_import_course' => array(
547 'classname' => 'core_course_external',
548 'methodname' => 'import_course',
549 'classpath' => 'course/externallib.php',
550 'description' => 'Import course data from a course into another course. Does not include any user data.',
551 'type' => 'write',
552 'capabilities'=> 'moodle/backup:backuptargetimport, moodle/restore:restoretargetimport',
553 ),
554
a623b6b8
JM
555 // === message related functions ===
556
4de00da7 557 'moodle_message_send_instantmessages' => array(
5d1017e1
JM
558 'classname' => 'core_message_external',
559 'methodname' => 'send_instant_messages',
560 'classpath' => 'message/externallib.php',
561 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_message_send_instant_messages()',
562 'type' => 'write',
563 'capabilities'=> 'moodle/site:sendmessage',
564 ),
565
566 'core_message_send_instant_messages' => array(
567 'classname' => 'core_message_external',
568 'methodname' => 'send_instant_messages',
a623b6b8 569 'classpath' => 'message/externallib.php',
4de00da7 570 'description' => 'Send instant messages',
a623b6b8
JM
571 'type' => 'write',
572 'capabilities'=> 'moodle/site:sendmessage',
573 ),
574
8d46dabb
JM
575 // === notes related functions ===
576
577 'moodle_notes_create_notes' => array(
5d1017e1
JM
578 'classname' => 'core_notes_external',
579 'methodname' => 'create_notes',
580 'classpath' => 'notes/externallib.php',
581 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_notes_create_notes()',
582 'type' => 'write',
583 'capabilities'=> 'moodle/notes:manage',
584 ),
585
586 'core_notes_create_notes' => array(
587 'classname' => 'core_notes_external',
8d46dabb
JM
588 'methodname' => 'create_notes',
589 'classpath' => 'notes/externallib.php',
590 'description' => 'Create notes',
591 'type' => 'write',
592 'capabilities'=> 'moodle/notes:manage',
593 ),
594
0bf486a6
JM
595 // === webservice related functions ===
596
597 'moodle_webservice_get_siteinfo' => array(
5d1017e1
JM
598 'classname' => 'core_webservice_external',
599 'methodname' => 'get_site_info',
600 'classpath' => 'webservice/externallib.php',
601 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_webservice_get_site_info()',
602 'type' => 'read',
603 ),
604
605 'core_webservice_get_site_info' => array(
606 'classname' => 'core_webservice_external',
607 'methodname' => 'get_site_info',
0bf486a6
JM
608 'classpath' => 'webservice/externallib.php',
609 'description' => 'Return some site info / user info / list web service functions',
610 'type' => 'read',
611 ),
612
9a0df45a 613);
c1b65883
JM
614
615$services = array(
96e0194c
SH
616 'Moodle mobile web service' => array(
617 'functions' => array (
618 'moodle_enrol_get_users_courses',
619 'moodle_enrol_get_enrolled_users',
f2806b9a
JM
620 'moodle_user_get_users_by_id',
621 'moodle_webservice_get_siteinfo',
622 'moodle_notes_create_notes',
ea4e96c2 623 'moodle_user_get_course_participants_by_id',
01479290 624 'moodle_user_get_users_by_courseid',
ec0d6ea2
DC
625 'moodle_message_send_instantmessages',
626 'core_course_get_contents'),
96e0194c
SH
627 'enabled' => 0,
628 'restrictedusers' => 0,
af03513f
JM
629 'shortname' => MOODLE_OFFICIAL_MOBILE_SERVICE,
630 'downloadfiles' => 1
96e0194c
SH
631 ),
632);