MDL-51629 mod_survey: New WS mod_survey_get_surveys_by_courses
[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
088645e2
AB
38 // Cohort related functions.
39
40 'core_cohort_create_cohorts' => array(
41 'classname' => 'core_cohort_external',
42 'methodname' => 'create_cohorts',
43 'classpath' => 'cohort/externallib.php',
44 'description' => 'Creates new cohorts.',
45 'type' => 'write',
46 'capabilities'=> 'moodle/cohort:manage',
47 ),
48
49 'core_cohort_delete_cohorts' => array(
50 'classname' => 'core_cohort_external',
51 'methodname' => 'delete_cohorts',
52 'classpath' => 'cohort/externallib.php',
53 'description' => 'Deletes all specified cohorts.',
54 'type' => 'delete',
55 'capabilities'=> 'moodle/cohort:manage',
56 ),
57
58 'core_cohort_get_cohorts' => array(
59 'classname' => 'core_cohort_external',
60 'methodname' => 'get_cohorts',
61 'classpath' => 'cohort/externallib.php',
62 'description' => 'Returns cohort details.',
63 'type' => 'read',
64 'capabilities'=> 'moodle/cohort:view',
65 ),
66
67 'core_cohort_update_cohorts' => array(
68 'classname' => 'core_cohort_external',
69 'methodname' => 'update_cohorts',
70 'classpath' => 'cohort/externallib.php',
71 'description' => 'Updates existing cohorts.',
72 'type' => 'write',
73 'capabilities'=> 'moodle/cohort:manage',
74 ),
75
76 'core_cohort_add_cohort_members' => array(
77 'classname' => 'core_cohort_external',
78 'methodname' => 'add_cohort_members',
79 'classpath' => 'cohort/externallib.php',
80 'description' => 'Adds cohort members.',
81 'type' => 'write',
82 'capabilities'=> 'moodle/cohort:assign',
83 ),
84
85 'core_cohort_delete_cohort_members' => array(
86 'classname' => 'core_cohort_external',
87 'methodname' => 'delete_cohort_members',
88 'classpath' => 'cohort/externallib.php',
89 'description' => 'Deletes cohort members.',
90 'type' => 'delete',
91 'capabilities'=> 'moodle/cohort:assign',
92 ),
93
94 'core_cohort_get_cohort_members' => array(
95 'classname' => 'core_cohort_external',
96 'methodname' => 'get_cohort_members',
97 'classpath' => 'cohort/externallib.php',
98 'description' => 'Returns cohort members.',
99 'type' => 'read',
100 'capabilities'=> 'moodle/cohort:view',
101 ),
604afeff 102
be985416
CC
103 // Comments related functions.
104
105 'core_comment_get_comments' => array(
e77a0f36
JL
106 'classname' => 'core_comment_external',
107 'methodname' => 'get_comments',
108 'description' => 'Returns comments.',
109 'type' => 'read',
110 'capabilities' => 'moodle/comment:view',
111 ),
112
198e802f 113 // Grade related functions.
d3549931 114
198e802f
JL
115 'core_grades_get_grades' => array(
116 'classname' => 'core_grades_external',
117 'methodname' => 'get_grades',
a0095e5a
JL
118 'description' => 'Returns student course total grade and grades for activities.
119 This function does not return category or manual items.
120 This function is suitable for managers or teachers not students.',
198e802f 121 'type' => 'read',
a0095e5a 122 'capabilities' => 'moodle/grade:view, moodle/grade:viewall, moodle/grade:viewhidden',
d3549931
AD
123 ),
124
198e802f
JL
125 'core_grades_update_grades' => array(
126 'classname' => 'core_grades_external',
127 'methodname' => 'update_grades',
198e802f
JL
128 'description' => 'Update a grade item and associated student grades.',
129 'type' => 'write',
130 'capabilities' => '',
d3549931 131 ),
088645e2 132
ef22c1b6 133 // === group related functions ===
f5072177 134
9a0df45a 135 'moodle_group_create_groups' => array(
3c1aa6fd 136 'classname' => 'moodle_group_external',
5d1017e1
JM
137 'methodname' => 'create_groups',
138 'classpath' => 'group/externallib.php',
3c1aa6fd 139 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_group_create_groups(). ',
5d1017e1
JM
140 'type' => 'write',
141 'capabilities'=> 'moodle/course:managegroups',
142 ),
143
144 'core_group_create_groups' => array(
145 'classname' => 'core_group_external',
9a0df45a 146 'methodname' => 'create_groups',
147 'classpath' => 'group/externallib.php',
f5072177 148 'description' => 'Creates new groups.',
149 'type' => 'write',
72f68b51 150 'capabilities'=> 'moodle/course:managegroups',
9a0df45a 151 ),
f5072177 152
9a0df45a 153 'moodle_group_get_groups' => array(
3c1aa6fd 154 'classname' => 'moodle_group_external',
5d1017e1
JM
155 'methodname' => 'get_groups',
156 'classpath' => 'group/externallib.php',
3c1aa6fd 157 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_group_get_groups()',
5d1017e1
JM
158 'type' => 'read',
159 'capabilities'=> 'moodle/course:managegroups',
160 ),
161
162 'core_group_get_groups' => array(
163 'classname' => 'core_group_external',
9a0df45a 164 'methodname' => 'get_groups',
165 'classpath' => 'group/externallib.php',
cfb99b75 166 'description' => 'Returns group details.',
f5072177 167 'type' => 'read',
72f68b51 168 'capabilities'=> 'moodle/course:managegroups',
9a0df45a 169 ),
246f6da2 170
171 'moodle_group_get_course_groups' => array(
3c1aa6fd 172 'classname' => 'moodle_group_external',
5d1017e1
JM
173 'methodname' => 'get_course_groups',
174 'classpath' => 'group/externallib.php',
3c1aa6fd 175 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_group_get_course_groups()',
5d1017e1
JM
176 'type' => 'read',
177 'capabilities'=> 'moodle/course:managegroups',
178 ),
179
180 'core_group_get_course_groups' => array(
181 'classname' => 'core_group_external',
246f6da2 182 'methodname' => 'get_course_groups',
183 'classpath' => 'group/externallib.php',
184 'description' => 'Returns all groups in specified course.',
185 'type' => 'read',
72f68b51 186 'capabilities'=> 'moodle/course:managegroups',
246f6da2 187 ),
2cb1ee78 188
9a0df45a 189 'moodle_group_delete_groups' => array(
3c1aa6fd 190 'classname' => 'moodle_group_external',
5d1017e1
JM
191 'methodname' => 'delete_groups',
192 'classpath' => 'group/externallib.php',
3c1aa6fd 193 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_group_delete_groups()',
5d1017e1
JM
194 'type' => 'delete',
195 'capabilities'=> 'moodle/course:managegroups',
196 ),
197
198 'core_group_delete_groups' => array(
199 'classname' => 'core_group_external',
9a0df45a 200 'methodname' => 'delete_groups',
201 'classpath' => 'group/externallib.php',
0f4e72de
PS
202 'description' => 'Deletes all specified groups.',
203 'type' => 'delete',
72f68b51 204 'capabilities'=> 'moodle/course:managegroups',
9a0df45a 205 ),
c863dc38 206
9a0df45a 207 'moodle_group_get_groupmembers' => array(
3c1aa6fd
DM
208 'classname' => 'moodle_group_external',
209 'methodname' => 'get_groupmembers',
5d1017e1 210 'classpath' => 'group/externallib.php',
3c1aa6fd 211 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_group_get_group_members()',
5d1017e1
JM
212 'type' => 'read',
213 'capabilities'=> 'moodle/course:managegroups',
214 ),
215
216 'core_group_get_group_members' => array(
217 'classname' => 'core_group_external',
218 'methodname' => 'get_group_members',
9a0df45a 219 'classpath' => 'group/externallib.php',
0f4e72de
PS
220 'description' => 'Returns group members.',
221 'type' => 'read',
72f68b51 222 'capabilities'=> 'moodle/course:managegroups',
9a0df45a 223 ),
4efa2483 224
9a0df45a 225 'moodle_group_add_groupmembers' => array(
3c1aa6fd
DM
226 'classname' => 'moodle_group_external',
227 'methodname' => 'add_groupmembers',
5d1017e1 228 'classpath' => 'group/externallib.php',
3c1aa6fd 229 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_group_add_group_members()',
5d1017e1
JM
230 'type' => 'write',
231 'capabilities'=> 'moodle/course:managegroups',
232 ),
233
234 'core_group_add_group_members' => array(
235 'classname' => 'core_group_external',
236 'methodname' => 'add_group_members',
9a0df45a 237 'classpath' => 'group/externallib.php',
0f4e72de
PS
238 'description' => 'Adds group members.',
239 'type' => 'write',
72f68b51 240 'capabilities'=> 'moodle/course:managegroups',
9a0df45a 241 ),
242
243 'moodle_group_delete_groupmembers' => array(
3c1aa6fd
DM
244 'classname' => 'moodle_group_external',
245 'methodname' => 'delete_groupmembers',
9a0df45a 246 'classpath' => 'group/externallib.php',
3c1aa6fd 247 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_group_delete_group_members()',
0f4e72de 248 'type' => 'delete',
72f68b51 249 'capabilities'=> 'moodle/course:managegroups',
9a0df45a 250 ),
72f68b51 251
5d1017e1
JM
252 'core_group_delete_group_members' => array(
253 'classname' => 'core_group_external',
254 'methodname' => 'delete_group_members',
255 'classpath' => 'group/externallib.php',
256 'description' => 'Deletes group members.',
257 'type' => 'delete',
258 'capabilities'=> 'moodle/course:managegroups',
259 ),
72f68b51 260
7ce23590
JL
261 'core_group_create_groupings' => array(
262 'classname' => 'core_group_external',
263 'methodname' => 'create_groupings',
264 'classpath' => 'group/externallib.php',
265 'description' => 'Creates new groupings',
266 'type' => 'write',
267 ),
268
269 'core_group_update_groupings' => array(
270 'classname' => 'core_group_external',
271 'methodname' => 'update_groupings',
272 'classpath' => 'group/externallib.php',
273 'description' => 'Updates existing groupings',
274 'type' => 'write',
275 ),
276
277 'core_group_get_groupings' => array(
278 'classname' => 'core_group_external',
279 'methodname' => 'get_groupings',
280 'classpath' => 'group/externallib.php',
281 'description' => 'Returns groupings details.',
282 'type' => 'read',
283 ),
284
285 'core_group_get_course_groupings' => array(
67aa60f9
JL
286 'classname' => 'core_group_external',
287 'methodname' => 'get_course_groupings',
288 'classpath' => 'group/externallib.php',
289 'description' => 'Returns all groupings in specified course.',
290 'type' => 'read',
7ce23590
JL
291 ),
292
293 'core_group_delete_groupings' => array(
67aa60f9
JL
294 'classname' => 'core_group_external',
295 'methodname' => 'delete_groupings',
296 'classpath' => 'group/externallib.php',
297 'description' => 'Deletes all specified groupings.',
298 'type' => 'write',
7ce23590
JL
299 ),
300
301 'core_group_assign_grouping' => array(
67aa60f9
JL
302 'classname' => 'core_group_external',
303 'methodname' => 'assign_grouping',
304 'classpath' => 'group/externallib.php',
305 'description' => 'Assing groups from groupings',
306 'type' => 'write',
7ce23590
JL
307 ),
308
309 'core_group_unassign_grouping' => array(
67aa60f9
JL
310 'classname' => 'core_group_external',
311 'methodname' => 'unassign_grouping',
312 'classpath' => 'group/externallib.php',
313 'description' => 'Unassing groups from groupings',
314 'type' => 'write',
7ce23590
JL
315 ),
316
5d62e813
JL
317 'core_group_get_course_user_groups' => array(
318 'classname' => 'core_group_external',
319 'methodname' => 'get_course_user_groups',
320 'classpath' => 'group/externallib.php',
321 'description' => 'Returns all groups in specified course for the specified user.',
322 'type' => 'read',
323 'capabilities' => 'moodle/course:managegroups',
324 ),
325
7107c2f0
JL
326 'core_group_get_activity_allowed_groups' => array(
327 'classname' => 'core_group_external',
328 'methodname' => 'get_activity_allowed_groups',
329 'classpath' => 'group/externallib.php',
330 'description' => 'Gets a list of groups that the user is allowed to access within the specified activity.',
331 'type' => 'read',
332 'capabilities' => '',
333 ),
334
c0ef63eb
JL
335 'core_group_get_activity_groupmode' => array(
336 'classname' => 'core_group_external',
337 'methodname' => 'get_activity_groupmode',
338 'classpath' => 'group/externallib.php',
339 'description' => 'Returns effective groupmode used in a given activity.',
340 'type' => 'read',
341 'capabilities' => '',
342 ),
343
9857381d
CC
344 'core_notes_get_course_notes' => array(
345 'classname' => 'core_notes_external',
346 'methodname' => 'get_course_notes',
7ceee324 347 'classpath' => 'notes/externallib.php',
9857381d
CC
348 'description' => 'Returns all notes in specified course (or site) for the specified user.',
349 'type' => 'read',
350 'capabilities' => 'moodle/notes:view',
351 ),
352
72f68b51 353 // === file related functions ===
354
249c4f60 355 'moodle_file_get_files' => array(
3c1aa6fd 356 'classname' => 'moodle_file_external',
5d1017e1 357 'methodname' => 'get_files',
3c1aa6fd 358 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_files_get_files()',
5d1017e1
JM
359 'type' => 'read',
360 'classpath' => 'files/externallib.php',
361 ),
362
363 'core_files_get_files' => array(
364 'classname' => 'core_files_external',
249c4f60
DC
365 'methodname' => 'get_files',
366 'description' => 'browse moodle files',
367 'type' => 'read',
368 'classpath' => 'files/externallib.php',
369 ),
5d1017e1 370
249c4f60 371 'moodle_file_upload' => array(
3c1aa6fd 372 'classname' => 'moodle_file_external',
5d1017e1 373 'methodname' => 'upload',
3c1aa6fd 374 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_files_upload()',
5d1017e1
JM
375 'type' => 'write',
376 'classpath' => 'files/externallib.php',
377 ),
378
379 'core_files_upload' => array(
380 'classname' => 'core_files_external',
249c4f60
DC
381 'methodname' => 'upload',
382 'description' => 'upload a file to moodle',
383 'type' => 'write',
384 'classpath' => 'files/externallib.php',
385 ),
4efa2483 386
ef22c1b6 387 // === user related functions ===
72f68b51 388
ef22c1b6 389 'moodle_user_create_users' => array(
3c1aa6fd 390 'classname' => 'moodle_user_external',
5d1017e1
JM
391 'methodname' => 'create_users',
392 'classpath' => 'user/externallib.php',
3c1aa6fd 393 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_user_create_users()',
5d1017e1
JM
394 'type' => 'write',
395 'capabilities'=> 'moodle/user:create',
396 ),
397
398 'core_user_create_users' => array(
399 'classname' => 'core_user_external',
ef22c1b6 400 'methodname' => 'create_users',
401 'classpath' => 'user/externallib.php',
fb79269b 402 'description' => 'Create users.',
403 'type' => 'write',
72f68b51 404 'capabilities'=> 'moodle/user:create',
ef22c1b6 405 ),
406
b0365ea5
JM
407 'core_user_get_users' => array(
408 'classname' => 'core_user_external',
409 'methodname' => 'get_users',
410 'classpath' => 'user/externallib.php',
411 'description' => 'search for users matching the parameters',
412 'type' => 'read',
413 'capabilities'=> 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update',
414 ),
415
fb79269b 416 'moodle_user_get_users_by_id' => array(
3c1aa6fd 417 'classname' => 'moodle_user_external',
5d1017e1
JM
418 'methodname' => 'get_users_by_id',
419 'classpath' => 'user/externallib.php',
3c1aa6fd 420 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. Use core_user_get_users_by_field service instead',
5d1017e1
JM
421 'type' => 'read',
422 'capabilities'=> 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update',
423 ),
424
c70b9853 425 'core_user_get_users_by_field' => array(
86477112 426 'classname' => 'core_user_external',
c70b9853 427 'methodname' => 'get_users_by_field',
86477112 428 'classpath' => 'user/externallib.php',
c70b9853 429 'description' => 'Retrieve users information for a specified unique field - If you want to do a user search, use core_user_get_users()',
86477112
FS
430 'type' => 'read',
431 'capabilities'=> 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update',
432 ),
433
5d1017e1
JM
434 'core_user_get_users_by_id' => array(
435 'classname' => 'core_user_external',
fb79269b 436 'methodname' => 'get_users_by_id',
ef22c1b6 437 'classpath' => 'user/externallib.php',
41f5285f 438 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been replaced by core_user_get_users_by_field()',
fb79269b 439 'type' => 'read',
b4c74367 440 'capabilities'=> 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update',
ef22c1b6 441 ),
442
01479290 443 'moodle_user_get_users_by_courseid' => array(
3c1aa6fd
DM
444 'classname' => 'moodle_user_external',
445 'methodname' => 'get_users_by_courseid',
446 'classpath' => 'user/externallib.php',
447 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_enrol_get_enrolled_users()',
01479290
DC
448 'type' => 'read',
449 'capabilities'=> 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, moodle/site:accessallgroups',
450 ),
451
ea4e96c2 452 'moodle_user_get_course_participants_by_id' => array(
3c1aa6fd
DM
453 'classname' => 'moodle_user_external',
454 'methodname' => 'get_course_participants_by_id',
ea4e96c2 455 'classpath' => 'user/externallib.php',
3c1aa6fd 456 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_user_get_course_user_profiles()',
5d1017e1
JM
457 'type' => 'read',
458 'capabilities'=> 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, moodle/site:accessallgroups',
459 ),
460
461 'core_user_get_course_user_profiles' => array(
462 'classname' => 'core_user_external',
463 'methodname' => 'get_course_user_profiles',
464 'classpath' => 'user/externallib.php',
465 'description' => 'Get course user profiles (each of the profils matching a course id and a user id).',
ea4e96c2
DC
466 'type' => 'read',
467 'capabilities'=> 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, moodle/site:accessallgroups',
468 ),
469
ef22c1b6 470 'moodle_user_delete_users' => array(
3c1aa6fd 471 'classname' => 'moodle_user_external',
5d1017e1
JM
472 'methodname' => 'delete_users',
473 'classpath' => 'user/externallib.php',
3c1aa6fd 474 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_user_delete_users()',
5d1017e1
JM
475 'type' => 'write',
476 'capabilities'=> 'moodle/user:delete',
477 ),
478
479 'core_user_delete_users' => array(
480 'classname' => 'core_user_external',
ef22c1b6 481 'methodname' => 'delete_users',
482 'classpath' => 'user/externallib.php',
fb79269b 483 'description' => 'Delete users.',
484 'type' => 'write',
72f68b51 485 'capabilities'=> 'moodle/user:delete',
ef22c1b6 486 ),
487
488 'moodle_user_update_users' => array(
3c1aa6fd 489 'classname' => 'moodle_user_external',
5d1017e1
JM
490 'methodname' => 'update_users',
491 'classpath' => 'user/externallib.php',
3c1aa6fd 492 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_user_update_users()',
5d1017e1
JM
493 'type' => 'write',
494 'capabilities'=> 'moodle/user:update',
495 ),
496
497 'core_user_update_users' => array(
498 'classname' => 'core_user_external',
ef22c1b6 499 'methodname' => 'update_users',
500 'classpath' => 'user/externallib.php',
fb79269b 501 'description' => 'Update users.',
502 'type' => 'write',
72f68b51 503 'capabilities'=> 'moodle/user:update',
ef22c1b6 504 ),
e9b66095 505
6a403810
JL
506 'core_user_add_user_device' => array(
507 'classname' => 'core_user_external',
508 'methodname' => 'add_user_device',
509 'classpath' => 'user/externallib.php',
510 'description' => 'Store mobile user devices information for PUSH Notifications.',
511 'type' => 'write',
512 'capabilities'=> '',
513 ),
514
3221718e
JL
515 'core_user_remove_user_device' => array(
516 'classname' => 'core_user_external',
517 'methodname' => 'remove_user_device',
518 'classpath' => 'user/externallib.php',
519 'description' => 'Remove a user device from the Moodle database.',
520 'type' => 'write',
521 'capabilities' => '',
522 ),
523
7a334a9b
JL
524 'core_user_view_user_list' => array(
525 'classname' => 'core_user_external',
526 'methodname' => 'view_user_list',
527 'classpath' => 'user/externallib.php',
528 'description' => 'Simulates the web-interface view of user/index.php (triggering events).',
529 'type' => 'write',
530 'capabilities' => 'moodle/course:viewparticipants',
531 ),
532
5770f10e
JL
533 'core_user_view_user_profile' => array(
534 'classname' => 'core_user_external',
535 'methodname' => 'view_user_profile',
536 'classpath' => 'user/externallib.php',
537 'description' => 'Simulates the web-interface view of user/view.php and user/profile.php (triggering events).',
538 'type' => 'write',
539 'capabilities' => 'moodle/user:viewdetails',
540 ),
541
32fb60e7
JL
542 'core_user_add_user_private_files' => array(
543 'classname' => 'core_user_external',
544 'methodname' => 'add_user_private_files',
545 'classpath' => 'user/externallib.php',
546 'description' => 'Copy files from a draft area to users private files area.',
547 'type' => 'write',
548 'capabilities' => 'moodle/user:manageownfiles',
549 ),
550
72f68b51 551 // === enrol related functions ===
d0068cd0 552
b6b6c7ac
PC
553 'core_enrol_get_enrolled_users_with_capability' => array(
554 'classname' => 'core_enrol_external',
555 'methodname' => 'get_enrolled_users_with_capability',
556 'classpath' => 'enrol/externallib.php',
557 'description' => 'For each course and capability specified, return a list of the users that are enrolled in the course
558 and have that capability',
559 'type' => 'read',
560 ),
72f68b51 561
df997f84
PS
562 'moodle_enrol_get_enrolled_users' => array(
563 'classname' => 'moodle_enrol_external',
564 'methodname' => 'get_enrolled_users',
565 'classpath' => 'enrol/externallib.php',
5d1017e1 566 '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 567 'type' => 'read',
72f68b51 568 'capabilities'=> 'moodle/site:viewparticipants, moodle/course:viewparticipants,
569 moodle/role:review, moodle/site:accessallgroups, moodle/course:enrolreview',
df997f84 570 ),
e6acc551 571
5d1017e1
JM
572 'core_enrol_get_enrolled_users' => array(
573 'classname' => 'core_enrol_external',
574 'methodname' => 'get_enrolled_users',
575 'classpath' => 'enrol/externallib.php',
576 'description' => 'Get enrolled users by course id.',
577 'type' => 'read',
578 'capabilities'=> 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, moodle/site:accessallgroups',
579 ),
df997f84 580
3364dbb5 581 'moodle_enrol_get_users_courses' => array(
3c1aa6fd 582 'classname' => 'moodle_enrol_external',
3364dbb5
PS
583 'methodname' => 'get_users_courses',
584 'classpath' => 'enrol/externallib.php',
3c1aa6fd 585 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_enrol_get_users_courses()',
3364dbb5
PS
586 'type' => 'read',
587 'capabilities'=> 'moodle/course:viewparticipants',
588 ),
589
5d1017e1
JM
590 'core_enrol_get_users_courses' => array(
591 'classname' => 'core_enrol_external',
592 'methodname' => 'get_users_courses',
593 'classpath' => 'enrol/externallib.php',
594 'description' => 'Get the list of courses where a user is enrolled in',
595 'type' => 'read',
596 'capabilities'=> 'moodle/course:viewparticipants',
597 ),
598
be9bf94e
RT
599 'core_enrol_get_course_enrolment_methods' => array(
600 'classname' => 'core_enrol_external',
601 'methodname' => 'get_course_enrolment_methods',
602 'classpath' => 'enrol/externallib.php',
603 'description' => 'Get the list of course enrolment methods',
604 'type' => 'read',
605 ),
606
5d1017e1
JM
607 // === Role related functions ===
608
df997f84 609 'moodle_role_assign' => array(
3c1aa6fd
DM
610 'classname' => 'moodle_enrol_external',
611 'methodname' => 'role_assign',
5d1017e1 612 'classpath' => 'enrol/externallib.php',
3c1aa6fd 613 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_role_assign_role()',
5d1017e1
JM
614 'type' => 'write',
615 'capabilities'=> 'moodle/role:assign',
616 ),
617
618 'core_role_assign_roles' => array(
619 'classname' => 'core_role_external',
620 'methodname' => 'assign_roles',
e9b66095 621 'classpath' => 'enrol/externallib.php',
df997f84 622 'description' => 'Manual role assignments.',
e9b66095 623 'type' => 'write',
72f68b51 624 'capabilities'=> 'moodle/role:assign',
e9b66095 625 ),
626
df997f84 627 'moodle_role_unassign' => array(
3c1aa6fd
DM
628 'classname' => 'moodle_enrol_external',
629 'methodname' => 'role_unassign',
5d1017e1 630 'classpath' => 'enrol/externallib.php',
3c1aa6fd 631 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_role_unassign_role()',
5d1017e1
JM
632 'type' => 'write',
633 'capabilities'=> 'moodle/role:assign',
634 ),
635
636 'core_role_unassign_roles' => array(
637 'classname' => 'core_role_external',
638 'methodname' => 'unassign_roles',
e9b66095 639 'classpath' => 'enrol/externallib.php',
df997f84 640 'description' => 'Manual role unassignments.',
e9b66095 641 'type' => 'write',
72f68b51 642 'capabilities'=> 'moodle/role:assign',
e9b66095 643 ),
5b4a78e2 644
6bb31e40 645 // === course related functions ===
646
3ec163dd 647 'core_course_get_contents' => array(
d4a246bc 648 'classname' => 'core_course_external',
3ec163dd 649 'methodname' => 'get_course_contents',
d4a246bc 650 'classpath' => 'course/externallib.php',
3ec163dd 651 'description' => 'Get course contents',
d4a246bc 652 'type' => 'read',
3ec163dd 653 'capabilities'=> 'moodle/course:update,moodle/course:viewhiddencourses',
f2229c68 654 ),
d6ebe011 655
6bb31e40 656 'moodle_course_get_courses' => array(
3c1aa6fd 657 'classname' => 'moodle_course_external',
5d1017e1
JM
658 'methodname' => 'get_courses',
659 'classpath' => 'course/externallib.php',
3c1aa6fd 660 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_course_get_courses()',
5d1017e1
JM
661 'type' => 'read',
662 'capabilities'=> 'moodle/course:view,moodle/course:update,moodle/course:viewhiddencourses',
663 ),
664
665 'core_course_get_courses' => array(
666 'classname' => 'core_course_external',
6bb31e40 667 'methodname' => 'get_courses',
668 'classpath' => 'course/externallib.php',
669 'description' => 'Return course details',
670 'type' => 'read',
671 'capabilities'=> 'moodle/course:view,moodle/course:update,moodle/course:viewhiddencourses',
672 ),
673
740c354f
JL
674 'core_course_search_courses' => array(
675 'classname' => 'core_course_external',
676 'methodname' => 'search_courses',
677 'classpath' => 'course/externallib.php',
678 'description' => 'Search courses by (name, module, block, tag)',
679 'type' => 'read',
680 'capabilities' => '',
681 ),
682
6bb31e40 683 'moodle_course_create_courses' => array(
3c1aa6fd 684 'classname' => 'moodle_course_external',
5d1017e1
JM
685 'methodname' => 'create_courses',
686 'classpath' => 'course/externallib.php',
3c1aa6fd 687 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_course_create_courses()',
5d1017e1
JM
688 'type' => 'write',
689 'capabilities'=> 'moodle/course:create,moodle/course:visibility',
690 ),
691
692 'core_course_create_courses' => array(
693 'classname' => 'core_course_external',
6bb31e40 694 'methodname' => 'create_courses',
695 'classpath' => 'course/externallib.php',
696 'description' => 'Create new courses',
697 'type' => 'write',
698 'capabilities'=> 'moodle/course:create,moodle/course:visibility',
699 ),
700
63a85dc7
JL
701 'core_course_delete_courses' => array(
702 'classname' => 'core_course_external',
703 'methodname' => 'delete_courses',
704 'classpath' => 'course/externallib.php',
705 'description' => 'Deletes all specified courses',
706 'type' => 'write',
707 'capabilities'=> 'moodle/course:delete',
708 ),
709
79949c1b
MN
710 'core_course_delete_modules' => array(
711 'classname' => 'core_course_external',
712 'methodname' => 'delete_modules',
713 'classpath' => 'course/externallib.php',
714 'description' => 'Deletes all specified module instances',
715 'type' => 'write',
716 'capabilities' => 'moodle/course:manageactivities'
717 ),
718
3dc1d76e
JL
719 'core_course_duplicate_course' => array(
720 'classname' => 'core_course_external',
721 'methodname' => 'duplicate_course',
722 'classpath' => 'course/externallib.php',
723 'description' => 'Duplicate an existing course (creating a new one) without user data',
724 'type' => 'write',
725 'capabilities'=> 'moodle/backup:backupcourse,moodle/restore:restorecourse,moodle/course:create',
726 ),
727
791723c3
RT
728 'core_course_update_courses' => array(
729 'classname' => 'core_course_external',
730 'methodname' => 'update_courses',
731 'classpath' => 'course/externallib.php',
732 'description' => 'Update courses',
733 'type' => 'write',
734 'capabilities'=> 'moodle/course:update,moodle/course:changecategory,moodle/course:changefullname,moodle/course:changeshortname,moodle/course:changeidnumber,moodle/course:changesummary,moodle/course:visibility',
735 ),
736
c4f7bf29
JL
737 'core_course_view_course' => array(
738 'classname' => 'core_course_external',
739 'methodname' => 'view_course',
740 'classpath' => 'course/externallib.php',
741 'description' => 'Log that the course was viewed',
742 'type' => 'write'
743 ),
744
c5158499
JL
745 'core_course_get_course_module' => array(
746 'classname' => 'core_course_external',
747 'methodname' => 'get_course_module',
748 'classpath' => 'course/externallib.php',
749 'description' => 'Return information about a course module',
750 'type' => 'read'
751 ),
c4f7bf29 752
13bb6819
JL
753 'core_course_get_course_module_by_instance' => array(
754 'classname' => 'core_course_external',
755 'methodname' => 'get_course_module_by_instance',
756 'classpath' => 'course/externallib.php',
757 'description' => 'Return information about a given module name and instance id',
758 'type' => 'read'
759 ),
760
3ec163dd
EL
761 // === course category related functions ===
762
763 'core_course_get_categories' => array(
764 'classname' => 'core_course_external',
765 'methodname' => 'get_categories',
766 'classpath' => 'course/externallib.php',
767 'description' => 'Return category details',
768 'type' => 'read',
769 'capabilities'=> 'moodle/category:viewhiddencategories',
770 ),
771
479a5db1
FS
772 'core_course_create_categories' => array(
773 'classname' => 'core_course_external',
774 'methodname' => 'create_categories',
775 'classpath' => 'course/externallib.php',
776 'description' => 'Create course categories',
777 'type' => 'write',
778 'capabilities'=> 'moodle/category:manage',
779 ),
d6ebe011 780
3ec163dd
EL
781 'core_course_update_categories' => array(
782 'classname' => 'core_course_external',
783 'methodname' => 'update_categories',
784 'classpath' => 'course/externallib.php',
785 'description' => 'Update categories',
786 'type' => 'write',
afe27edc 787 'capabilities'=> 'moodle/category:manage',
3ec163dd
EL
788 ),
789
2f951d86
FS
790 'core_course_delete_categories' => array(
791 'classname' => 'core_course_external',
792 'methodname' => 'delete_categories',
793 'classpath' => 'course/externallib.php',
794 'description' => 'Delete course categories',
795 'type' => 'write',
796 'capabilities'=> 'moodle/category:manage',
797 ),
479a5db1 798
8430d87b
JL
799 'core_course_import_course' => array(
800 'classname' => 'core_course_external',
801 'methodname' => 'import_course',
802 'classpath' => 'course/externallib.php',
803 'description' => 'Import course data from a course into another course. Does not include any user data.',
804 'type' => 'write',
805 'capabilities'=> 'moodle/backup:backuptargetimport, moodle/restore:restoretargetimport',
806 ),
807
a623b6b8
JM
808 // === message related functions ===
809
4de00da7 810 'moodle_message_send_instantmessages' => array(
3c1aa6fd
DM
811 'classname' => 'moodle_message_external',
812 'methodname' => 'send_instantmessages',
5d1017e1 813 'classpath' => 'message/externallib.php',
3c1aa6fd 814 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_message_send_instant_messages()',
5d1017e1
JM
815 'type' => 'write',
816 'capabilities'=> 'moodle/site:sendmessage',
817 ),
818
819 'core_message_send_instant_messages' => array(
820 'classname' => 'core_message_external',
821 'methodname' => 'send_instant_messages',
a623b6b8 822 'classpath' => 'message/externallib.php',
4de00da7 823 'description' => 'Send instant messages',
a623b6b8
JM
824 'type' => 'write',
825 'capabilities'=> 'moodle/site:sendmessage',
826 ),
827
d6731600
FM
828 'core_message_create_contacts' => array(
829 'classname' => 'core_message_external',
830 'methodname' => 'create_contacts',
831 'classpath' => 'message/externallib.php',
832 'description' => 'Add contacts to the contact list',
833 'type' => 'write',
834 'capabilities'=> '',
835 ),
836
837 'core_message_delete_contacts' => array(
838 'classname' => 'core_message_external',
839 'methodname' => 'delete_contacts',
840 'classpath' => 'message/externallib.php',
841 'description' => 'Remove contacts from the contact list',
842 'type' => 'write',
843 'capabilities'=> '',
844 ),
845
846 'core_message_block_contacts' => array(
847 'classname' => 'core_message_external',
848 'methodname' => 'block_contacts',
849 'classpath' => 'message/externallib.php',
850 'description' => 'Block contacts',
851 'type' => 'write',
852 'capabilities'=> '',
853 ),
854
855 'core_message_unblock_contacts' => array(
856 'classname' => 'core_message_external',
857 'methodname' => 'unblock_contacts',
858 'classpath' => 'message/externallib.php',
859 'description' => 'Unblock contacts',
860 'type' => 'write',
861 'capabilities'=> '',
862 ),
863
864 'core_message_get_contacts' => array(
865 'classname' => 'core_message_external',
866 'methodname' => 'get_contacts',
867 'classpath' => 'message/externallib.php',
868 'description' => 'Retrieve the contact list',
869 'type' => 'read',
870 'capabilities'=> '',
871 ),
872
873 'core_message_search_contacts' => array(
874 'classname' => 'core_message_external',
875 'methodname' => 'search_contacts',
876 'classpath' => 'message/externallib.php',
877 'description' => 'Search for contacts',
878 'type' => 'read',
879 'capabilities'=> '',
880 ),
881
aff9da17 882 'core_message_get_messages' => array(
6ff4464b
JL
883 'classname' => 'core_message_external',
884 'methodname' => 'get_messages',
885 'classpath' => 'message/externallib.php',
127ef540 886 'description' => 'Retrieve a list of messages sent and received by a user (conversations, notifications or both)',
6ff4464b
JL
887 'type' => 'read',
888 'capabilities' => '',
aff9da17
JL
889 ),
890
60ab2e1b
JL
891 'core_message_get_blocked_users' => array(
892 'classname' => 'core_message_external',
893 'methodname' => 'get_blocked_users',
894 'classpath' => 'message/externallib.php',
895 'description' => 'Retrieve a list of users blocked',
896 'type' => 'read',
897 'capabilities' => '',
898 ),
899
a84f89ca
JL
900 'core_message_mark_message_read' => array(
901 'classname' => 'core_message_external',
902 'methodname' => 'mark_message_read',
903 'classpath' => 'message/externallib.php',
904 'description' => 'Mark a single message as read, trigger message_viewed event.',
905 'type' => 'write',
906 'capabilities' => '',
907 ),
908
8d46dabb
JM
909 // === notes related functions ===
910
911 'moodle_notes_create_notes' => array(
3c1aa6fd 912 'classname' => 'moodle_notes_external',
5d1017e1
JM
913 'methodname' => 'create_notes',
914 'classpath' => 'notes/externallib.php',
3c1aa6fd 915 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_notes_create_notes()',
5d1017e1
JM
916 'type' => 'write',
917 'capabilities'=> 'moodle/notes:manage',
918 ),
919
920 'core_notes_create_notes' => array(
921 'classname' => 'core_notes_external',
8d46dabb
JM
922 'methodname' => 'create_notes',
923 'classpath' => 'notes/externallib.php',
924 'description' => 'Create notes',
925 'type' => 'write',
926 'capabilities'=> 'moodle/notes:manage',
927 ),
928
34348b2b
JF
929 'core_notes_delete_notes' => array(
930 'classname' => 'core_notes_external',
931 'methodname' => 'delete_notes',
932 'classpath' => 'notes/externallib.php',
933 'description' => 'Delete notes',
934 'type' => 'write',
935 'capabilities'=> 'moodle/notes:manage',
936 ),
937
938 'core_notes_get_notes' => array(
939 'classname' => 'core_notes_external',
940 'methodname' => 'get_notes',
941 'classpath' => 'notes/externallib.php',
942 'description' => 'Get notes',
943 'type' => 'read',
944 'capabilities'=> 'moodle/notes:view',
945 ),
946
947 'core_notes_update_notes' => array(
948 'classname' => 'core_notes_external',
949 'methodname' => 'update_notes',
950 'classpath' => 'notes/externallib.php',
951 'description' => 'Update notes',
952 'type' => 'write',
953 'capabilities'=> 'moodle/notes:manage',
954 ),
955
a80b5518
JL
956 'core_notes_view_notes' => array(
957 'classname' => 'core_notes_external',
958 'methodname' => 'view_notes',
959 'classpath' => 'notes/externallib.php',
960 'description' => 'Simulates the web interface view of notes/index.php: trigger events.',
961 'type' => 'write',
962 'capabilities' => 'moodle/notes:view',
963 ),
964
9028d9b5
PC
965 // === grading related functions ===
966
967 'core_grading_get_definitions' => array(
968 'classname' => 'core_grading_external',
969 'methodname' => 'get_definitions',
9028d9b5
PC
970 'description' => 'Get grading definitions',
971 'type' => 'read'
972 ),
3f0ea6d8
PC
973
974 'core_grade_get_definitions' => array(
975 'classname' => 'core_grade_external',
976 'methodname' => 'get_definitions',
977 'classpath' => 'grade/externallib.php',
9028d9b5
PC
978 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_grading_get_definitions()',
979 'type' => 'read'
980 ),
981
0ff4ebb4
PC
982 'core_grading_save_definitions' => array(
983 'classname' => 'core_grading_external',
984 'methodname' => 'save_definitions',
985 'description' => 'Save grading definitions',
986 'type' => 'write'
987 ),
988
9028d9b5
PC
989 'core_grading_get_gradingform_instances' => array(
990 'classname' => 'core_grading_external',
991 'methodname' => 'get_gradingform_instances',
9028d9b5 992 'description' => 'Get grading form instances',
3f0ea6d8
PC
993 'type' => 'read'
994 ),
995
0bf486a6
JM
996 // === webservice related functions ===
997
998 'moodle_webservice_get_siteinfo' => array(
3c1aa6fd
DM
999 'classname' => 'moodle_webservice_external',
1000 'methodname' => 'get_siteinfo',
5d1017e1 1001 'classpath' => 'webservice/externallib.php',
3c1aa6fd 1002 'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_webservice_get_site_info()',
5d1017e1
JM
1003 'type' => 'read',
1004 ),
1005
1006 'core_webservice_get_site_info' => array(
1007 'classname' => 'core_webservice_external',
1008 'methodname' => 'get_site_info',
0bf486a6
JM
1009 'classpath' => 'webservice/externallib.php',
1010 'description' => 'Return some site info / user info / list web service functions',
1011 'type' => 'read',
1012 ),
1013
11e76602
JM
1014 'core_get_string' => array(
1015 'classname' => 'core_external',
1016 'methodname' => 'get_string',
1017 'classpath' => 'lib/external/externallib.php',
1018 'description' => 'Return a translated string - similar to core get_string() call',
1019 'type' => 'read',
ba224fb4
DW
1020 'loginrequired' => false,
1021 'ajax' => true,
11e76602
JM
1022 ),
1023
1024 'core_get_strings' => array(
1025 'classname' => 'core_external',
1026 'methodname' => 'get_strings',
1027 'classpath' => 'lib/external/externallib.php',
1028 'description' => 'Return some translated strings - like several core get_string() calls',
1029 'type' => 'read',
ba224fb4
DW
1030 'loginrequired' => false,
1031 'ajax' => true,
11e76602
JM
1032 ),
1033
1034 'core_get_component_strings' => array(
1035 'classname' => 'core_external',
1036 'methodname' => 'get_component_strings',
1037 'classpath' => 'lib/external/externallib.php',
1038 'description' => 'Return all raw strings (with {$a->xxx}) for a specific component
1039 - similar to core get_component_strings() call',
1040 'type' => 'read',
ba224fb4
DW
1041 'loginrequired' => false,
1042 'ajax' => true,
11e76602 1043 ),
5e1350ab
AA
1044
1045
1046 // === Calendar related functions ===
1047
1048 'core_calendar_delete_calendar_events' => array(
1049 'classname' => 'core_calendar_external',
1050 'methodname' => 'delete_calendar_events',
1051 'description' => 'Delete calendar events',
1052 'classpath' => 'calendar/externallib.php',
1053 'type' => 'write',
1054 'capabilities'=> 'moodle/calendar:manageentries', 'moodle/calendar:manageownentries', 'moodle/calendar:managegroupentries'
1055 ),
1056
793d3855
AA
1057
1058 'core_calendar_get_calendar_events' => array(
1059 'classname' => 'core_calendar_external',
1060 'methodname' => 'get_calendar_events',
1061 'description' => 'Get calendar events',
1062 'classpath' => 'calendar/externallib.php',
1063 'type' => 'read',
1064 'capabilities'=> 'moodle/calendar:manageentries', 'moodle/calendar:manageownentries', 'moodle/calendar:managegroupentries'
1065 ),
1066
c66dc3df
AA
1067 'core_calendar_create_calendar_events' => array(
1068 'classname' => 'core_calendar_external',
1069 'methodname' => 'create_calendar_events',
1070 'description' => 'Create calendar events',
1071 'classpath' => 'calendar/externallib.php',
1072 'type' => 'write',
1073 'capabilities'=> 'moodle/calendar:manageentries', 'moodle/calendar:manageownentries', 'moodle/calendar:managegroupentries'
1074 ),
9bdcf579
DW
1075
1076 'core_output_load_template' => array(
1077 'classname' => 'core\output\external',
1078 'methodname' => 'load_template',
1079 'description' => 'Load a template for a renderable',
5d8c1987 1080 'type' => 'read',
ba224fb4
DW
1081 'loginrequired' => false,
1082 'ajax' => true,
9bdcf579 1083 ),
25c49a85
JL
1084
1085 // Completion related functions.
1086 'core_completion_update_activity_completion_status_manually' => array(
1087 'classname' => 'core_completion_external',
1088 'methodname' => 'update_activity_completion_status_manually',
1089 'description' => 'Update completion status for the current user in an activity, only for activities with manual tracking.',
1090 'type' => 'write',
1091 ),
6c785afa 1092
23b398fc
JL
1093 'core_completion_mark_course_self_completed' => array(
1094 'classname' => 'core_completion_external',
1095 'methodname' => 'mark_course_self_completed',
1096 'description' => 'Update the course completion status for the current user (if course self-completion is enabled).',
1097 'type' => 'write',
1098 ),
1099
6c785afa
JL
1100 'core_completion_get_activities_completion_status' => array(
1101 'classname' => 'core_completion_external',
1102 'methodname' => 'get_activities_completion_status',
1103 'description' => 'Return the activities completion status for a user in a course.',
1104 'type' => 'read',
1105 'capabilities' => '',
1106 ),
1107
1108 'core_completion_get_course_completion_status' => array(
1109 'classname' => 'core_completion_external',
1110 'methodname' => 'get_course_completion_status',
1111 'description' => 'Returns course completion status.',
1112 'type' => 'read',
1113 'capabilities' => 'report/completion:view',
1114 ),
89c3afc2 1115
db5b6971
CC
1116 // Rating functions.
1117 'core_rating_get_item_ratings' => array(
46e41e63
JL
1118 'classname' => 'core_rating_external',
1119 'methodname' => 'get_item_ratings',
1120 'description' => 'Retrieve all the ratings for an item.',
1121 'type' => 'read',
1122 'capabilities' => 'moodle/rating:view'
db5b6971 1123 ),
8e355853
MG
1124
1125 // Tag functions.
1126 'core_tag_update_tags' => array(
1127 'classname' => 'core_tag_external',
1128 'methodname' => 'update_tags',
1129 'description' => 'Updates tags',
1130 'type' => 'write',
ba224fb4 1131 'ajax' => true
8e355853
MG
1132 ),
1133
ef4c23cc
MG
1134 'core_tag_get_tags' => array(
1135 'classname' => 'core_tag_external',
1136 'methodname' => 'get_tags',
1137 'description' => 'Gets tags by their ids',
1138 'type' => 'read',
ba224fb4 1139 'ajax' => true
ef4c23cc
MG
1140 ),
1141
9a0df45a 1142);
c1b65883
JM
1143
1144$services = array(
96e0194c
SH
1145 'Moodle mobile web service' => array(
1146 'functions' => array (
1147 'moodle_enrol_get_users_courses',
1148 'moodle_enrol_get_enrolled_users',
f2806b9a
JM
1149 'moodle_user_get_users_by_id',
1150 'moodle_webservice_get_siteinfo',
1151 'moodle_notes_create_notes',
ea4e96c2 1152 'moodle_user_get_course_participants_by_id',
01479290 1153 'moodle_user_get_users_by_courseid',
ec0d6ea2 1154 'moodle_message_send_instantmessages',
11e76602 1155 'core_course_get_contents',
6a403810 1156 'core_get_component_strings',
925f4d6b 1157 'core_user_add_user_device',
cb9d8257
JL
1158 'core_calendar_get_calendar_events',
1159 'core_enrol_get_users_courses',
1160 'core_enrol_get_enrolled_users',
e8ad99ab 1161 'enrol_self_enrol_user',
cb9d8257
JL
1162 'core_user_get_users_by_id',
1163 'core_webservice_get_site_info',
1164 'core_notes_create_notes',
1165 'core_user_get_course_user_profiles',
ba1dc597
JL
1166 'core_message_send_instant_messages',
1167 'mod_assign_get_grades',
1168 'mod_assign_get_assignments',
1169 'mod_assign_get_submissions',
1170 'mod_assign_get_user_flags',
1171 'mod_assign_set_user_flags',
1172 'mod_assign_get_user_mappings',
1173 'mod_assign_revert_submissions_to_draft',
1174 'mod_assign_lock_submissions',
1175 'mod_assign_unlock_submissions',
1176 'mod_assign_save_submission',
1177 'mod_assign_submit_for_grading',
1178 'mod_assign_save_grade',
1179 'mod_assign_save_user_extensions',
6acfacfa
JL
1180 'mod_assign_reveal_identities',
1181 'message_airnotifier_is_system_configured',
2e04d250 1182 'message_airnotifier_are_notification_preferences_configured',
e2ede426
JL
1183 'core_grades_update_grades',
1184 'mod_forum_get_forums_by_courses',
2ce8934b 1185 'mod_forum_get_forum_discussions_paginated',
feae0f9f 1186 'mod_forum_get_forum_discussion_posts',
50a20317 1187 'mod_forum_add_discussion_post',
7ab43ac8 1188 'mod_forum_add_discussion',
aff9da17 1189 'core_files_get_files',
93872873
JL
1190 'core_message_get_messages',
1191 'core_message_create_contacts',
1192 'core_message_delete_contacts',
1193 'core_message_block_contacts',
1194 'core_message_unblock_contacts',
1195 'core_message_get_contacts',
60ab2e1b 1196 'core_message_search_contacts',
3a2ba746 1197 'core_message_get_blocked_users',
5d62e813 1198 'gradereport_user_get_grades_table',
db23cd08 1199 'core_group_get_course_user_groups',
7107c2f0 1200 'core_group_get_activity_allowed_groups',
c0ef63eb 1201 'core_group_get_activity_groupmode',
db23cd08 1202 'core_user_remove_user_device',
25c49a85
JL
1203 'core_course_get_courses',
1204 'core_completion_update_activity_completion_status_manually',
23b398fc 1205 'core_completion_mark_course_self_completed',
e77a0f36
JL
1206 'mod_data_get_databases_by_courses',
1207 'core_comment_get_comments',
449a6304 1208 'mod_forum_view_forum',
c4f7bf29 1209 'core_course_view_course',
740c354f 1210 'core_course_search_courses',
c5158499 1211 'core_course_get_course_module',
13bb6819 1212 'core_course_get_course_module_by_instance',
604afeff 1213 'core_completion_get_activities_completion_status',
9857381d 1214 'core_notes_get_course_notes',
6c785afa 1215 'core_completion_get_course_completion_status',
7a334a9b 1216 'core_user_view_user_list',
a84f89ca 1217 'core_message_mark_message_read',
a80b5518 1218 'core_notes_view_notes',
d508dfe7 1219 'mod_forum_view_forum_discussion',
5770f10e 1220 'core_user_view_user_profile',
1bc85767 1221 'gradereport_user_view_grade_report',
db5b6971 1222 'core_rating_get_item_ratings',
752036b8 1223 'mod_url_view_url',
ceac202f 1224 'core_user_get_users_by_field',
32fb60e7 1225 'core_user_add_user_private_files',
e0d6d10a 1226 'mod_assign_view_grading_table',
e9bf3011 1227 'mod_scorm_view_scorm',
dfe927c8 1228 'mod_scorm_get_scorm_scoes',
822e9df7 1229 'mod_scorm_get_scorm_user_data',
6b4ceb24 1230 'mod_scorm_insert_scorm_tracks',
6b5e69eb 1231 'mod_scorm_get_scorm_sco_tracks',
22de67f4 1232 'mod_scorm_get_scorm_attempt_count',
91ea3678 1233 'mod_scorm_get_scorms_by_courses',
a2926eb3 1234 'mod_survey_get_surveys_by_courses',
09188110 1235 'mod_page_view_page',
3c779961 1236 'mod_resource_view_resource',
734c7452 1237 'mod_folder_view_folder',
1ca4cdf3 1238 'mod_chat_login_user',
e4076a6e 1239 'mod_chat_get_chat_users',
874aa80f 1240 'mod_chat_send_chat_message',
8380bc7f 1241 'mod_chat_get_chat_latest_messages',
5841b9d5 1242 'mod_chat_view_chat',
9f7de631 1243 'mod_chat_get_chats_by_courses',
6c9b2bb5 1244 'mod_book_view_book',
580a14c2 1245 'mod_book_get_books_by_courses',
b87f31db 1246 'mod_choice_get_choice_results',
565528ce 1247 'mod_choice_get_choice_options',
10064594 1248 'mod_choice_submit_choice_response',
4c4d3b73 1249 'mod_choice_view_choice',
f07a2bb0 1250 'mod_choice_get_choices_by_courses',
4b93c3e3 1251 'mod_choice_delete_choice_responses',
ae67efa8 1252 'mod_lti_get_tool_launch_data',
dfcdec12 1253 'mod_lti_get_ltis_by_courses',
4bed1682 1254 'mod_lti_view_lti',
e648d036 1255 'mod_imscp_view_imscp',
bae627b2 1256 'mod_imscp_get_imscps_by_courses',
60ab2e1b 1257 ),
96e0194c
SH
1258 'enabled' => 0,
1259 'restrictedusers' => 0,
af03513f 1260 'shortname' => MOODLE_OFFICIAL_MOBILE_SERVICE,
106c55fb
DW
1261 'downloadfiles' => 1,
1262 'uploadfiles' => 1
96e0194c
SH
1263 ),
1264);