MDL-64715 message: add send-self-message button to the user profile
[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(
83e4dc17
JL
37 'core_auth_confirm_user' => array(
38 'classname' => 'core_auth_external',
39 'methodname' => 'confirm_user',
40 'description' => 'Confirm a user account.',
41 'type' => 'write',
42 'ajax' => true,
43 'loginrequired' => false,
44 ),
b6f70a37
JL
45 'core_auth_request_password_reset' => array(
46 'classname' => 'core_auth_external',
47 'methodname' => 'request_password_reset',
48 'description' => 'Requests a password reset.',
49 'type' => 'write',
50 'ajax' => true,
51 'loginrequired' => false,
52 ),
25dbbdf9
MG
53 'core_auth_is_minor' => array(
54 'classname' => 'core_auth_external',
55 'methodname' => 'is_minor',
56 'description' => 'Requests a check if a user is a digital minor.',
57 'type' => 'read',
1f7565c1
JL
58 'ajax' => true,
59 'loginrequired' => false,
60 ),
61 'core_auth_is_age_digital_consent_verification_enabled' => array(
62 'classname' => 'core_auth_external',
63 'methodname' => 'is_age_digital_consent_verification_enabled',
64 'description' => 'Checks if age digital consent verification is enabled.',
65 'type' => 'read',
66 'ajax' => true,
25dbbdf9
MG
67 'loginrequired' => false,
68 ),
6f793705
JL
69 'core_auth_resend_confirmation_email' => array(
70 'classname' => 'core_auth_external',
71 'methodname' => 'resend_confirmation_email',
72 'description' => 'Resend confirmation email.',
73 'type' => 'write',
74 'ajax' => true,
75 'loginrequired' => false,
76 ),
2cd901a4
MP
77 'core_backup_get_async_backup_progress' => array(
78 'classname' => 'core_backup_external',
79 'classpath' => 'backup/externallib.php',
80 'methodname' => 'get_async_backup_progress',
81 'description' => 'Get the progress of an Asyncronhous backup.',
82 'type' => 'read',
83 'ajax' => true,
84 'loginrequired' => true,
85 ),
86 'core_backup_get_async_backup_links_backup' => array(
87 'classname' => 'core_backup_external',
88 'classpath' => 'backup/externallib.php',
89 'methodname' => 'get_async_backup_links_backup',
90 'description' => 'Gets the data to use when updating the status table row in the UI for when an async backup completes.',
91 'type' => 'read',
92 'ajax' => true,
93 'loginrequired' => true,
94 ),
95 'core_backup_get_async_backup_links_restore' => array(
96 'classname' => 'core_backup_external',
97 'classpath' => 'backup/externallib.php',
98 'methodname' => 'get_async_backup_links_restore',
99 'description' => 'Gets the data to use when updating the status table row in the UI for when an async restore completes.',
100 'type' => 'read',
101 'ajax' => true,
102 'loginrequired' => true,
103 ),
f23e9b6b
CB
104 'core_badges_get_user_badges' => array(
105 'classname' => 'core_badges_external',
106 'methodname' => 'get_user_badges',
107 'description' => 'Returns the list of badges awarded to a user.',
108 'type' => 'read',
ee7295ee
JL
109 'capabilities' => 'moodle/badges:viewotherbadges',
110 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
088645e2 111 ),
bb96ff71
JL
112 'core_blog_get_entries' => array(
113 'classname' => 'core_blog\external',
114 'methodname' => 'get_entries',
115 'description' => 'Returns blog entries.',
116 'type' => 'read',
117 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
118 'ajax' => true,
119 'loginrequired' => false,
120 ),
ca48cc91
JL
121 'core_blog_view_entries' => array(
122 'classname' => 'core_blog\external',
123 'methodname' => 'view_entries',
124 'description' => 'Trigger the blog_entries_viewed event.',
125 'type' => 'read',
126 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
127 'ajax' => true,
128 'loginrequired' => false,
129 ),
695c5726
AN
130 'core_calendar_get_calendar_monthly_view' => array(
131 'classname' => 'core_calendar_external',
132 'methodname' => 'get_calendar_monthly_view',
133 'description' => 'Fetch the monthly view data for a calendar',
134 'classpath' => 'calendar/externallib.php',
3ea4f446
AN
135 'type' => 'read',
136 'capabilities' => '',
137 'ajax' => true,
138 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
139 ),
140 'core_calendar_get_calendar_day_view' => array(
141 'classname' => 'core_calendar_external',
142 'methodname' => 'get_calendar_day_view',
143 'description' => 'Fetch the day view data for a calendar',
144 'classpath' => 'calendar/externallib.php',
695c5726
AN
145 'type' => 'read',
146 'capabilities' => '',
147 'ajax' => true,
148 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
149 ),
e8306438
SL
150 'core_calendar_get_calendar_upcoming_view' => array(
151 'classname' => 'core_calendar_external',
152 'methodname' => 'get_calendar_upcoming_view',
153 'description' => 'Fetch the upcoming view data for a calendar',
154 'classpath' => 'calendar/externallib.php',
155 'type' => 'read',
156 'capabilities' => '',
157 'ajax' => true,
158 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
159 ),
c6fb9310
RW
160 'core_calendar_update_event_start_day' => array(
161 'classname' => 'core_calendar_external',
162 'methodname' => 'update_event_start_day',
163 'description' => 'Update the start day (but not time) for an event.',
164 'classpath' => 'calendar/externallib.php',
165 'type' => 'write',
166 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
167 'ajax' => true,
168 ),
f23e9b6b
CB
169 'core_calendar_create_calendar_events' => array(
170 'classname' => 'core_calendar_external',
171 'methodname' => 'create_calendar_events',
172 'description' => 'Create calendar events',
173 'classpath' => 'calendar/externallib.php',
174 'type' => 'write',
e453ed68
JL
175 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
176 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
088645e2 177 ),
f23e9b6b
CB
178 'core_calendar_delete_calendar_events' => array(
179 'classname' => 'core_calendar_external',
180 'methodname' => 'delete_calendar_events',
181 'description' => 'Delete calendar events',
182 'classpath' => 'calendar/externallib.php',
183 'type' => 'write',
e453ed68 184 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
542f5afa 185 'ajax' => true,
e453ed68 186 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
088645e2 187 ),
f23e9b6b
CB
188 'core_calendar_get_calendar_events' => array(
189 'classname' => 'core_calendar_external',
190 'methodname' => 'get_calendar_events',
191 'description' => 'Get calendar events',
192 'classpath' => 'calendar/externallib.php',
193 'type' => 'read',
ee7295ee
JL
194 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
195 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
088645e2 196 ),
c0f877fa
MN
197 'core_calendar_get_action_events_by_timesort' => array(
198 'classname' => 'core_calendar_external',
199 'methodname' => 'get_calendar_action_events_by_timesort',
200 'description' => 'Get calendar action events by tiemsort',
201 'classpath' => 'calendar/externallib.php',
202 'type' => 'read',
203 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
60774b28 204 'ajax' => true,
569d091b 205 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
60774b28
RW
206 ),
207 'core_calendar_get_action_events_by_course' => array(
208 'classname' => 'core_calendar_external',
209 'methodname' => 'get_calendar_action_events_by_course',
210 'description' => 'Get calendar action events by course',
211 'classpath' => 'calendar/externallib.php',
212 'type' => 'read',
213 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
9b8e5057 214 'ajax' => true,
569d091b 215 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
9b8e5057
RW
216 ),
217 'core_calendar_get_action_events_by_courses' => array(
218 'classname' => 'core_calendar_external',
219 'methodname' => 'get_calendar_action_events_by_courses',
220 'description' => 'Get calendar action events by courses',
221 'classpath' => 'calendar/externallib.php',
222 'type' => 'read',
223 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
c0f877fa 224 'ajax' => true,
569d091b 225 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
c0f877fa 226 ),
5813d1b9
SL
227 'core_calendar_get_calendar_event_by_id' => array(
228 'classname' => 'core_calendar_external',
229 'methodname' => 'get_calendar_event_by_id',
230 'description' => 'Get calendar event by id',
231 'classpath' => 'calendar/externallib.php',
232 'type' => 'read',
233 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
234 'ajax' => true,
235 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
236 ),
aa091225
RW
237 'core_calendar_submit_create_update_form' => array(
238 'classname' => 'core_calendar_external',
239 'methodname' => 'submit_create_update_form',
240 'description' => 'Submit form data for event form',
241 'classpath' => 'calendar/externallib.php',
242 'type' => 'write',
243 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
244 'ajax' => true,
245 ),
088645e2 246 'core_cohort_add_cohort_members' => array(
f23e9b6b
CB
247 'classname' => 'core_cohort_external',
248 'methodname' => 'add_cohort_members',
249 'classpath' => 'cohort/externallib.php',
088645e2 250 'description' => 'Adds cohort members.',
f23e9b6b
CB
251 'type' => 'write',
252 'capabilities' => 'moodle/cohort:assign'
253 ),
254 'core_cohort_create_cohorts' => array(
255 'classname' => 'core_cohort_external',
256 'methodname' => 'create_cohorts',
257 'classpath' => 'cohort/externallib.php',
258 'description' => 'Creates new cohorts.',
259 'type' => 'write',
260 'capabilities' => 'moodle/cohort:manage'
088645e2 261 ),
088645e2 262 'core_cohort_delete_cohort_members' => array(
f23e9b6b
CB
263 'classname' => 'core_cohort_external',
264 'methodname' => 'delete_cohort_members',
265 'classpath' => 'cohort/externallib.php',
088645e2 266 'description' => 'Deletes cohort members.',
0a4f3eb2 267 'type' => 'write',
f23e9b6b
CB
268 'capabilities' => 'moodle/cohort:assign'
269 ),
270 'core_cohort_delete_cohorts' => array(
271 'classname' => 'core_cohort_external',
272 'methodname' => 'delete_cohorts',
273 'classpath' => 'cohort/externallib.php',
274 'description' => 'Deletes all specified cohorts.',
0a4f3eb2 275 'type' => 'write',
f23e9b6b 276 'capabilities' => 'moodle/cohort:manage'
088645e2 277 ),
088645e2 278 'core_cohort_get_cohort_members' => array(
f23e9b6b
CB
279 'classname' => 'core_cohort_external',
280 'methodname' => 'get_cohort_members',
281 'classpath' => 'cohort/externallib.php',
088645e2 282 'description' => 'Returns cohort members.',
f23e9b6b
CB
283 'type' => 'read',
284 'capabilities' => 'moodle/cohort:view'
e77a0f36 285 ),
a60e8ba5
DW
286 'core_cohort_search_cohorts' => array(
287 'classname' => 'core_cohort_external',
288 'methodname' => 'search_cohorts',
289 'classpath' => 'cohort/externallib.php',
290 'description' => 'Search for cohorts.',
291 'type' => 'read',
292 'ajax' => true,
293 'capabilities' => 'moodle/cohort:view'
294 ),
f23e9b6b
CB
295 'core_cohort_get_cohorts' => array(
296 'classname' => 'core_cohort_external',
297 'methodname' => 'get_cohorts',
298 'classpath' => 'cohort/externallib.php',
299 'description' => 'Returns cohort details.',
300 'type' => 'read',
301 'capabilities' => 'moodle/cohort:view'
d3549931 302 ),
f23e9b6b
CB
303 'core_cohort_update_cohorts' => array(
304 'classname' => 'core_cohort_external',
305 'methodname' => 'update_cohorts',
306 'classpath' => 'cohort/externallib.php',
307 'description' => 'Updates existing cohorts.',
308 'type' => 'write',
309 'capabilities' => 'moodle/cohort:manage'
d3549931 310 ),
f23e9b6b
CB
311 'core_comment_get_comments' => array(
312 'classname' => 'core_comment_external',
313 'methodname' => 'get_comments',
314 'description' => 'Returns comments.',
315 'type' => 'read',
ee7295ee
JL
316 'capabilities' => 'moodle/comment:view',
317 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
5d1017e1 318 ),
f23e9b6b
CB
319 'core_completion_get_activities_completion_status' => array(
320 'classname' => 'core_completion_external',
321 'methodname' => 'get_activities_completion_status',
322 'description' => 'Return the activities completion status for a user in a course.',
323 'type' => 'read',
ee7295ee 324 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
9a0df45a 325 ),
f23e9b6b
CB
326 'core_completion_get_course_completion_status' => array(
327 'classname' => 'core_completion_external',
328 'methodname' => 'get_course_completion_status',
329 'description' => 'Returns course completion status.',
330 'type' => 'read',
ee7295ee
JL
331 'capabilities' => 'report/completion:view',
332 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
5d1017e1 333 ),
f23e9b6b
CB
334 'core_completion_mark_course_self_completed' => array(
335 'classname' => 'core_completion_external',
336 'methodname' => 'mark_course_self_completed',
337 'description' => 'Update the course completion status for the current user (if course self-completion is enabled).',
338 'type' => 'write',
ee7295ee 339 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
9a0df45a 340 ),
f23e9b6b
CB
341 'core_completion_update_activity_completion_status_manually' => array(
342 'classname' => 'core_completion_external',
343 'methodname' => 'update_activity_completion_status_manually',
344 'description' => 'Update completion status for the current user in an activity, only for activities with manual tracking.',
345 'type' => 'write',
ee7295ee 346 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
5d1017e1 347 ),
a39918da
EEAK
348 'core_completion_override_activity_completion_status' => array(
349 'classname' => 'core_completion_external',
350 'methodname' => 'override_activity_completion_status',
351 'description' => 'Update completion status for a user in an activity by overriding it.',
352 'type' => 'write',
353 'capabilities' => 'moodle/course:overridecompletion',
354 'ajax' => true,
355 ),
f23e9b6b
CB
356 'core_course_create_categories' => array(
357 'classname' => 'core_course_external',
358 'methodname' => 'create_categories',
359 'classpath' => 'course/externallib.php',
360 'description' => 'Create course categories',
361 'type' => 'write',
362 'capabilities' => 'moodle/category:manage'
246f6da2 363 ),
f23e9b6b
CB
364 'core_course_create_courses' => array(
365 'classname' => 'core_course_external',
366 'methodname' => 'create_courses',
367 'classpath' => 'course/externallib.php',
368 'description' => 'Create new courses',
369 'type' => 'write',
370 'capabilities' => 'moodle/course:create, moodle/course:visibility'
5d1017e1 371 ),
f23e9b6b
CB
372 'core_course_delete_categories' => array(
373 'classname' => 'core_course_external',
374 'methodname' => 'delete_categories',
375 'classpath' => 'course/externallib.php',
376 'description' => 'Delete course categories',
377 'type' => 'write',
378 'capabilities' => 'moodle/category:manage'
9a0df45a 379 ),
f23e9b6b
CB
380 'core_course_delete_courses' => array(
381 'classname' => 'core_course_external',
382 'methodname' => 'delete_courses',
383 'classpath' => 'course/externallib.php',
384 'description' => 'Deletes all specified courses',
385 'type' => 'write',
386 'capabilities' => 'moodle/course:delete'
5d1017e1 387 ),
f23e9b6b
CB
388 'core_course_delete_modules' => array(
389 'classname' => 'core_course_external',
390 'methodname' => 'delete_modules',
391 'classpath' => 'course/externallib.php',
392 'description' => 'Deletes all specified module instances',
393 'type' => 'write',
394 'capabilities' => 'moodle/course:manageactivities'
9a0df45a 395 ),
f23e9b6b
CB
396 'core_course_duplicate_course' => array(
397 'classname' => 'core_course_external',
398 'methodname' => 'duplicate_course',
399 'classpath' => 'course/externallib.php',
67adb4d8 400 'description' => 'Duplicate an existing course (creating a new one).',
f23e9b6b
CB
401 'type' => 'write',
402 'capabilities' => 'moodle/backup:backupcourse, moodle/restore:restorecourse, moodle/course:create'
5d1017e1 403 ),
f23e9b6b
CB
404 'core_course_get_categories' => array(
405 'classname' => 'core_course_external',
406 'methodname' => 'get_categories',
407 'classpath' => 'course/externallib.php',
408 'description' => 'Return category details',
409 'type' => 'read',
331e038b
JL
410 'capabilities' => 'moodle/category:viewhiddencategories',
411 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
9a0df45a 412 ),
f23e9b6b
CB
413 'core_course_get_contents' => array(
414 'classname' => 'core_course_external',
415 'methodname' => 'get_course_contents',
416 'classpath' => 'course/externallib.php',
417 'description' => 'Get course contents',
418 'type' => 'read',
ee7295ee
JL
419 'capabilities' => 'moodle/course:update, moodle/course:viewhiddencourses',
420 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
9a0df45a 421 ),
f23e9b6b
CB
422 'core_course_get_course_module' => array(
423 'classname' => 'core_course_external',
424 'methodname' => 'get_course_module',
425 'classpath' => 'course/externallib.php',
426 'description' => 'Return information about a course module',
427 'type' => 'read',
ee7295ee 428 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
5d1017e1 429 ),
f23e9b6b
CB
430 'core_course_get_course_module_by_instance' => array(
431 'classname' => 'core_course_external',
432 'methodname' => 'get_course_module_by_instance',
433 'classpath' => 'course/externallib.php',
434 'description' => 'Return information about a given module name and instance id',
435 'type' => 'read',
ee7295ee 436 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
7ce23590 437 ),
4529327a
MG
438 'core_course_get_module' => array(
439 'classname' => 'core_course_external',
440 'methodname' => 'get_module',
441 'classpath' => 'course/externallib.php',
442 'description' => 'Returns html with one activity module on course page',
443 'type' => 'read',
444 'ajax' => true,
445 ),
446 'core_course_edit_module' => array(
447 'classname' => 'core_course_external',
448 'methodname' => 'edit_module',
449 'classpath' => 'course/externallib.php',
450 'description' => 'Performs an action on course module (change visibility, duplicate, delete, etc.)',
451 'type' => 'write',
452 'ajax' => true,
453 ),
454 'core_course_edit_section' => array(
455 'classname' => 'core_course_external',
456 'methodname' => 'edit_section',
457 'classpath' => 'course/externallib.php',
458 'description' => 'Performs an action on course section (change visibility, set marker, delete)',
459 'type' => 'write',
460 'ajax' => true,
461 ),
f23e9b6b
CB
462 'core_course_get_courses' => array(
463 'classname' => 'core_course_external',
464 'methodname' => 'get_courses',
465 'classpath' => 'course/externallib.php',
466 'description' => 'Return course details',
467 'type' => 'read',
468 'capabilities' => 'moodle/course:view, moodle/course:update, moodle/course:viewhiddencourses',
5041600d 469 'ajax' => true,
ee7295ee 470 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
7ce23590 471 ),
f23e9b6b
CB
472 'core_course_import_course' => array(
473 'classname' => 'core_course_external',
474 'methodname' => 'import_course',
475 'classpath' => 'course/externallib.php',
476 'description' => 'Import course data from a course into another course. Does not include any user data.',
477 'type' => 'write',
478 'capabilities' => 'moodle/backup:backuptargetimport, moodle/restore:restoretargetimport'
7ce23590 479 ),
f23e9b6b
CB
480 'core_course_search_courses' => array(
481 'classname' => 'core_course_external',
482 'methodname' => 'search_courses',
483 'classpath' => 'course/externallib.php',
484 'description' => 'Search courses by (name, module, block, tag)',
485 'type' => 'read',
5041600d 486 'ajax' => true,
ee7295ee 487 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
7ce23590 488 ),
f23e9b6b
CB
489 'core_course_update_categories' => array(
490 'classname' => 'core_course_external',
491 'methodname' => 'update_categories',
492 'classpath' => 'course/externallib.php',
493 'description' => 'Update categories',
494 'type' => 'write',
495 'capabilities' => 'moodle/category:manage',
7ce23590 496 ),
f23e9b6b
CB
497 'core_course_update_courses' => array(
498 'classname' => 'core_course_external',
499 'methodname' => 'update_courses',
500 'classpath' => 'course/externallib.php',
501 'description' => 'Update courses',
502 'type' => 'write',
503 'capabilities' => 'moodle/course:update, moodle/course:changecategory, moodle/course:changefullname, '
504 . 'moodle/course:changeshortname, moodle/course:changeidnumber, moodle/course:changesummary, moodle/course:visibility'
7ce23590 505 ),
f23e9b6b
CB
506 'core_course_view_course' => array(
507 'classname' => 'core_course_external',
508 'methodname' => 'view_course',
509 'classpath' => 'course/externallib.php',
510 'description' => 'Log that the course was viewed',
511 'type' => 'write',
ee7295ee 512 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
7ce23590 513 ),
7c4e686f
JL
514 'core_course_get_activities_overview' => array(
515 'classname' => 'core_course_external',
516 'methodname' => 'get_activities_overview',
517 'classpath' => 'course/externallib.php',
e9dfeec9
MN
518 'description' => '** DEPRECATED ** Please do not call this function any more.
519 Return activities overview for the given courses.',
7c4e686f
JL
520 'type' => 'read',
521 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
522 ),
c115ff6a
JL
523 'core_course_get_user_navigation_options' => array(
524 'classname' => 'core_course_external',
525 'methodname' => 'get_user_navigation_options',
526 'classpath' => 'course/externallib.php',
527 'description' => 'Return a list of navigation options in a set of courses that are avaialable or not for the current user.',
528 'type' => 'read',
529 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
530 ),
b9050b10
JL
531 'core_course_get_user_administration_options' => array(
532 'classname' => 'core_course_external',
533 'methodname' => 'get_user_administration_options',
534 'classpath' => 'course/externallib.php',
535 'description' => 'Return a list of administration options in a set of courses that are avaialable or not for the current
536 user.',
537 'type' => 'read',
538 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
539 ),
80adabef
JL
540 'core_course_get_courses_by_field' => array(
541 'classname' => 'core_course_external',
542 'methodname' => 'get_courses_by_field',
543 'classpath' => 'course/externallib.php',
544 'description' => 'Get courses matching a specific field (id/s, shortname, idnumber, category)',
545 'type' => 'read',
546 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
547 ),
26659f62
JL
548 'core_course_check_updates' => array(
549 'classname' => 'core_course_external',
550 'methodname' => 'check_updates',
551 'classpath' => 'course/externallib.php',
552 'description' => 'Check if there is updates affecting the user for the given course and contexts.',
553 'type' => 'read',
554 'ajax' => true,
555 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
556 ),
879a8f56
JL
557 'core_course_get_updates_since' => array(
558 'classname' => 'core_course_external',
559 'methodname' => 'get_updates_since',
560 'classpath' => 'course/externallib.php',
561 'description' => 'Check if there are updates affecting the user for the given course since the given time stamp.',
562 'type' => 'read',
563 'ajax' => true,
564 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
565 ),
2c1d19fd
RW
566 'core_course_get_enrolled_courses_by_timeline_classification' => array(
567 'classname' => 'core_course_external',
568 'methodname' => 'get_enrolled_courses_by_timeline_classification',
569 'classpath' => 'course/externallib.php',
570 'description' => 'List of enrolled courses for the given timeline classification (past, inprogress, or future).',
571 'type' => 'read',
b9508423
JL
572 'ajax' => true,
573 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2c1d19fd 574 ),
98a52c80
VD
575 'core_course_get_recent_courses' => array(
576 'classname' => 'core_course_external',
577 'methodname' => 'get_recent_courses',
578 'classpath' => 'course/externallib.php',
579 'description' => 'List of courses a user has accessed most recently.',
580 'type' => 'read',
b9508423
JL
581 'ajax' => true,
582 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
583 ),
584 'core_course_set_favourite_courses' => array(
585 'classname' => 'core_course_external',
586 'methodname' => 'set_favourite_courses',
587 'classpath' => 'course/externallib.php',
588 'description' => 'Add a list of courses to the list of favourite courses.',
589 'type' => 'read',
590 'ajax' => true,
591 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
98a52c80 592 ),
f23e9b6b
CB
593 'core_enrol_get_course_enrolment_methods' => array(
594 'classname' => 'core_enrol_external',
595 'methodname' => 'get_course_enrolment_methods',
596 'classpath' => 'enrol/externallib.php',
597 'description' => 'Get the list of course enrolment methods',
598 'type' => 'read',
ee7295ee 599 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
5d62e813 600 ),
f23e9b6b
CB
601 'core_enrol_get_enrolled_users' => array(
602 'classname' => 'core_enrol_external',
603 'methodname' => 'get_enrolled_users',
604 'classpath' => 'enrol/externallib.php',
605 'description' => 'Get enrolled users by course id.',
606 'type' => 'read',
607 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, '
ee7295ee
JL
608 . 'moodle/site:accessallgroups',
609 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
7107c2f0 610 ),
f23e9b6b
CB
611 'core_enrol_get_enrolled_users_with_capability' => array(
612 'classname' => 'core_enrol_external',
613 'methodname' => 'get_enrolled_users_with_capability',
614 'classpath' => 'enrol/externallib.php',
615 'description' => 'For each course and capability specified, return a list of the users that are enrolled in the course
616 and have that capability',
617 'type' => 'read',
c0ef63eb 618 ),
a60e8ba5
DW
619 'core_enrol_get_potential_users' => array(
620 'classname' => 'core_enrol_external',
621 'methodname' => 'get_potential_users',
622 'classpath' => 'enrol/externallib.php',
623 'description' => 'Get the list of potential users to enrol',
0fa35b1a 624 'ajax' => true,
a60e8ba5
DW
625 'type' => 'read',
626 'capabilities' => 'moodle/course:enrolreview'
627 ),
f23e9b6b
CB
628 'core_enrol_get_users_courses' => array(
629 'classname' => 'core_enrol_external',
630 'methodname' => 'get_users_courses',
631 'classpath' => 'enrol/externallib.php',
632 'description' => 'Get the list of courses where a user is enrolled in',
633 'type' => 'read',
ee7295ee
JL
634 'capabilities' => 'moodle/course:viewparticipants',
635 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
9857381d 636 ),
58c20c81
JP
637 'core_enrol_edit_user_enrolment' => array(
638 'classname' => 'core_enrol_external',
639 'methodname' => 'edit_user_enrolment',
640 'classpath' => 'enrol/externallib.php',
641 'description' => 'External function that updates a given user enrolment',
642 'type' => 'write',
643 'ajax' => true,
644 ),
c8351261
MG
645 'core_enrol_unenrol_user_enrolment' => array(
646 'classname' => 'core_enrol_external',
647 'methodname' => 'unenrol_user_enrolment',
648 'classpath' => 'enrol/externallib.php',
649 'description' => 'External function that unenrols a given user enrolment',
650 'type' => 'write',
651 'ajax' => true,
652 ),
f23e9b6b
CB
653 'core_fetch_notifications' => array(
654 'classname' => 'core_external',
655 'methodname' => 'fetch_notifications',
656 'classpath' => 'lib/external/externallib.php',
657 'description' => 'Return a list of notifications for the current session',
658 'type' => 'read',
5041600d
RT
659 'loginrequired' => false,
660 'ajax' => true,
5d1017e1 661 ),
5d1017e1 662 'core_files_get_files' => array(
f23e9b6b
CB
663 'classname' => 'core_files_external',
664 'methodname' => 'get_files',
249c4f60 665 'description' => 'browse moodle files',
f23e9b6b
CB
666 'type' => 'read',
667 'classpath' => 'files/externallib.php',
ee7295ee 668 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
5d1017e1 669 ),
5d1017e1 670 'core_files_upload' => array(
f23e9b6b
CB
671 'classname' => 'core_files_external',
672 'methodname' => 'upload',
249c4f60
DC
673 'description' => 'upload a file to moodle',
674 'type' => 'write',
675 'classpath' => 'files/externallib.php',
676 ),
8b493eb0
DM
677 'core_form_get_filetypes_browser_data' => array(
678 'classname' => 'core_form\external',
679 'methodname' => 'get_filetypes_browser_data',
680 'classpath' => '',
681 'description' => 'Provides data for the filetypes element browser.',
682 'type' => 'read',
683 'loginrequired' => false,
684 'ajax' => true,
685 ),
f23e9b6b
CB
686 'core_get_component_strings' => array(
687 'classname' => 'core_external',
688 'methodname' => 'get_component_strings',
689 'classpath' => 'lib/external/externallib.php',
faeca20d
DM
690 'description' => 'Return all raw strings (with {$a->xxx}), for a specific component ' .
691 '- similar to core get_component_strings(), call',
f23e9b6b 692 'type' => 'read',
5041600d
RT
693 'loginrequired' => false,
694 'ajax' => true,
ee7295ee 695 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
3364dbb5 696 ),
f23e9b6b
CB
697 'core_get_fragment' => array(
698 'classname' => 'core_external',
699 'methodname' => 'get_fragment',
700 'classpath' => 'lib/external/externallib.php',
701 'description' => 'Return a fragment for inclusion, such as a JavaScript page.',
702 'type' => 'read',
5041600d 703 'ajax' => true,
5d1017e1 704 ),
f23e9b6b
CB
705 'core_get_string' => array(
706 'classname' => 'core_external',
707 'methodname' => 'get_string',
708 'classpath' => 'lib/external/externallib.php',
709 'description' => 'Return a translated string - similar to core get_string(), call',
710 'type' => 'read',
5041600d
RT
711 'loginrequired' => false,
712 'ajax' => true,
be9bf94e 713 ),
f23e9b6b
CB
714 'core_get_strings' => array(
715 'classname' => 'core_external',
716 'methodname' => 'get_strings',
717 'classpath' => 'lib/external/externallib.php',
718 'description' => 'Return some translated strings - like several core get_string(), calls',
719 'type' => 'read',
5041600d
RT
720 'loginrequired' => false,
721 'ajax' => true,
5d1017e1 722 ),
88c2941b
RW
723 'core_get_user_dates' => array(
724 'classname' => 'core_external',
725 'methodname' => 'get_user_dates',
726 'classpath' => 'lib/external/externallib.php',
727 'description' => 'Return formatted timestamps',
728 'type' => 'read',
729 'ajax' => true,
730 ),
f23e9b6b
CB
731 'core_grades_get_grades' => array(
732 'classname' => 'core_grades_external',
733 'methodname' => 'get_grades',
aa7e371a
JL
734 'description' => '** DEPRECATED ** Please do not call this function any more.
735 Returns student course total grade and grades for activities.
f23e9b6b
CB
736 This function does not return category or manual items.
737 This function is suitable for managers or teachers not students.',
738 'type' => 'read',
739 'capabilities' => 'moodle/grade:view, moodle/grade:viewall, moodle/grade:viewhidden'
e9b66095 740 ),
f23e9b6b
CB
741 'core_grades_update_grades' => array(
742 'classname' => 'core_grades_external',
743 'methodname' => 'update_grades',
744 'description' => 'Update a grade item and associated student grades.',
745 'type' => 'write',
5d1017e1 746 ),
f23e9b6b
CB
747 'core_grading_get_definitions' => array(
748 'classname' => 'core_grading_external',
749 'methodname' => 'get_definitions',
750 'description' => 'Get grading definitions',
751 'type' => 'read',
e9b66095 752 ),
f23e9b6b
CB
753 'core_grading_get_gradingform_instances' => array(
754 'classname' => 'core_grading_external',
755 'methodname' => 'get_gradingform_instances',
756 'description' => 'Get grading form instances',
757 'type' => 'read',
f2229c68 758 ),
f23e9b6b
CB
759 'core_grading_save_definitions' => array(
760 'classname' => 'core_grading_external',
761 'methodname' => 'save_definitions',
762 'description' => 'Save grading definitions',
763 'type' => 'write',
5d1017e1 764 ),
f23e9b6b
CB
765 'core_group_add_group_members' => array(
766 'classname' => 'core_group_external',
767 'methodname' => 'add_group_members',
768 'classpath' => 'group/externallib.php',
769 'description' => 'Adds group members.',
770 'type' => 'write',
771 'capabilities' => 'moodle/course:managegroups',
6bb31e40 772 ),
f23e9b6b
CB
773 'core_group_assign_grouping' => array(
774 'classname' => 'core_group_external',
775 'methodname' => 'assign_grouping',
776 'classpath' => 'group/externallib.php',
777 'description' => 'Assing groups from groupings',
778 'type' => 'write',
740c354f 779 ),
f23e9b6b
CB
780 'core_group_create_groupings' => array(
781 'classname' => 'core_group_external',
782 'methodname' => 'create_groupings',
783 'classpath' => 'group/externallib.php',
784 'description' => 'Creates new groupings',
785 'type' => 'write',
5d1017e1 786 ),
f23e9b6b
CB
787 'core_group_create_groups' => array(
788 'classname' => 'core_group_external',
789 'methodname' => 'create_groups',
790 'classpath' => 'group/externallib.php',
791 'description' => 'Creates new groups.',
792 'type' => 'write',
793 'capabilities' => 'moodle/course:managegroups'
6bb31e40 794 ),
f23e9b6b
CB
795 'core_group_delete_group_members' => array(
796 'classname' => 'core_group_external',
797 'methodname' => 'delete_group_members',
798 'classpath' => 'group/externallib.php',
799 'description' => 'Deletes group members.',
0a4f3eb2 800 'type' => 'write',
f23e9b6b 801 'capabilities' => 'moodle/course:managegroups'
63a85dc7 802 ),
f23e9b6b
CB
803 'core_group_delete_groupings' => array(
804 'classname' => 'core_group_external',
805 'methodname' => 'delete_groupings',
806 'classpath' => 'group/externallib.php',
807 'description' => 'Deletes all specified groupings.',
79949c1b 808 'type' => 'write',
79949c1b 809 ),
f23e9b6b
CB
810 'core_group_delete_groups' => array(
811 'classname' => 'core_group_external',
812 'methodname' => 'delete_groups',
813 'classpath' => 'group/externallib.php',
814 'description' => 'Deletes all specified groups.',
0a4f3eb2 815 'type' => 'write',
f23e9b6b 816 'capabilities' => 'moodle/course:managegroups'
3dc1d76e 817 ),
f23e9b6b
CB
818 'core_group_get_activity_allowed_groups' => array(
819 'classname' => 'core_group_external',
820 'methodname' => 'get_activity_allowed_groups',
821 'classpath' => 'group/externallib.php',
822 'description' => 'Gets a list of groups that the user is allowed to access within the specified activity.',
823 'type' => 'read',
ee7295ee 824 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
791723c3 825 ),
f23e9b6b
CB
826 'core_group_get_activity_groupmode' => array(
827 'classname' => 'core_group_external',
828 'methodname' => 'get_activity_groupmode',
829 'classpath' => 'group/externallib.php',
830 'description' => 'Returns effective groupmode used in a given activity.',
831 'type' => 'read',
ee7295ee 832 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
c4f7bf29 833 ),
f23e9b6b
CB
834 'core_group_get_course_groupings' => array(
835 'classname' => 'core_group_external',
836 'methodname' => 'get_course_groupings',
837 'classpath' => 'group/externallib.php',
838 'description' => 'Returns all groupings in specified course.',
839 'type' => 'read',
c5158499 840 ),
f23e9b6b
CB
841 'core_group_get_course_groups' => array(
842 'classname' => 'core_group_external',
843 'methodname' => 'get_course_groups',
844 'classpath' => 'group/externallib.php',
845 'description' => 'Returns all groups in specified course.',
846 'type' => 'read',
dfc609e5 847 'ajax' => true,
f23e9b6b 848 'capabilities' => 'moodle/course:managegroups'
13bb6819 849 ),
f23e9b6b
CB
850 'core_group_get_course_user_groups' => array(
851 'classname' => 'core_group_external',
852 'methodname' => 'get_course_user_groups',
853 'classpath' => 'group/externallib.php',
854 'description' => 'Returns all groups in specified course for the specified user.',
855 'type' => 'read',
ee7295ee
JL
856 'capabilities' => 'moodle/course:managegroups',
857 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
3ec163dd 858 ),
f23e9b6b
CB
859 'core_group_get_group_members' => array(
860 'classname' => 'core_group_external',
861 'methodname' => 'get_group_members',
862 'classpath' => 'group/externallib.php',
863 'description' => 'Returns group members.',
864 'type' => 'read',
865 'capabilities' => 'moodle/course:managegroups'
479a5db1 866 ),
f23e9b6b
CB
867 'core_group_get_groupings' => array(
868 'classname' => 'core_group_external',
869 'methodname' => 'get_groupings',
870 'classpath' => 'group/externallib.php',
871 'description' => 'Returns groupings details.',
872 'type' => 'read',
3ec163dd 873 ),
f23e9b6b
CB
874 'core_group_get_groups' => array(
875 'classname' => 'core_group_external',
876 'methodname' => 'get_groups',
877 'classpath' => 'group/externallib.php',
878 'description' => 'Returns group details.',
879 'type' => 'read',
880 'capabilities' => 'moodle/course:managegroups'
2f951d86 881 ),
f23e9b6b
CB
882 'core_group_unassign_grouping' => array(
883 'classname' => 'core_group_external',
884 'methodname' => 'unassign_grouping',
885 'classpath' => 'group/externallib.php',
886 'description' => 'Unassing groups from groupings',
887 'type' => 'write',
8430d87b 888 ),
f23e9b6b
CB
889 'core_group_update_groupings' => array(
890 'classname' => 'core_group_external',
891 'methodname' => 'update_groupings',
892 'classpath' => 'group/externallib.php',
893 'description' => 'Updates existing groupings',
894 'type' => 'write',
5d1017e1 895 ),
474dd887
R
896 'core_group_update_groups' => array(
897 'classname' => 'core_group_external',
898 'methodname' => 'update_groups',
899 'classpath' => 'group/externallib.php',
900 'description' => 'Updates existing groups.',
901 'type' => 'write',
902 'capabilities' => 'moodle/course:managegroups'
903 ),
086409f6
MN
904 'core_message_mute_conversations' => array(
905 'classname' => 'core_message_external',
906 'methodname' => 'mute_conversations',
907 'classpath' => 'message/externallib.php',
908 'description' => 'Mutes a list of conversations',
909 'type' => 'write',
910 'ajax' => true,
911 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
912 ),
913 'core_message_unmute_conversations' => array(
914 'classname' => 'core_message_external',
915 'methodname' => 'unmute_conversations',
916 'classpath' => 'message/externallib.php',
917 'description' => 'Unmutes a list of conversations',
918 'type' => 'write',
919 'ajax' => true,
920 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
921 ),
52284186
MN
922 'core_message_block_user' => array(
923 'classname' => 'core_message_external',
924 'methodname' => 'block_user',
925 'classpath' => 'message/externallib.php',
926 'description' => 'Blocks a user',
927 'type' => 'write',
928 'ajax' => true,
929 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
930 ),
f23e9b6b
CB
931 'core_message_block_contacts' => array(
932 'classname' => 'core_message_external',
933 'methodname' => 'block_contacts',
934 'classpath' => 'message/externallib.php',
0b3eadcd
MN
935 'description' => '** DEPRECATED ** Please do not call this function any more.
936 Block contacts',
f23e9b6b 937 'type' => 'write',
c6e97f54 938 'ajax' => true,
ee7295ee 939 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
a623b6b8 940 ),
d6731600 941 'core_message_create_contacts' => array(
f23e9b6b
CB
942 'classname' => 'core_message_external',
943 'methodname' => 'create_contacts',
944 'classpath' => 'message/externallib.php',
0b3eadcd
MN
945 'description' => '** DEPRECATED ** Please do not call this function any more.
946 Add contacts to the contact list',
f23e9b6b 947 'type' => 'write',
c6e97f54 948 'ajax' => true,
ee7295ee 949 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
d6731600 950 ),
52284186
MN
951 'core_message_get_contact_requests' => array(
952 'classname' => 'core_message_external',
953 'methodname' => 'get_contact_requests',
954 'classpath' => 'message/externallib.php',
955 'description' => 'Returns contact requests for a user',
956 'type' => 'read',
957 'ajax' => true,
958 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
959 ),
960 'core_message_create_contact_request' => array(
961 'classname' => 'core_message_external',
962 'methodname' => 'create_contact_request',
963 'classpath' => 'message/externallib.php',
964 'description' => 'Creates a contact request',
965 'type' => 'write',
966 'ajax' => true,
967 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
968 ),
969 'core_message_confirm_contact_request' => array(
970 'classname' => 'core_message_external',
971 'methodname' => 'confirm_contact_request',
972 'classpath' => 'message/externallib.php',
973 'description' => 'Confirms a contact request',
974 'type' => 'write',
975 'ajax' => true,
976 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
977 ),
978 'core_message_decline_contact_request' => array(
979 'classname' => 'core_message_external',
980 'methodname' => 'decline_contact_request',
981 'classpath' => 'message/externallib.php',
982 'description' => 'Declines a contact request',
983 'type' => 'write',
984 'ajax' => true,
985 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
986 ),
7d678923
MN
987 'core_message_get_received_contact_requests_count' => array(
988 'classname' => 'core_message_external',
989 'methodname' => 'get_received_contact_requests_count',
990 'classpath' => 'message/externallib.php',
991 'description' => 'Gets the number of received contact requests',
992 'type' => 'read',
993 'ajax' => true,
994 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
995 ),
d6731600 996 'core_message_delete_contacts' => array(
f23e9b6b
CB
997 'classname' => 'core_message_external',
998 'methodname' => 'delete_contacts',
999 'classpath' => 'message/externallib.php',
d6731600 1000 'description' => 'Remove contacts from the contact list',
f23e9b6b 1001 'type' => 'write',
c6e97f54 1002 'ajax' => true,
ee7295ee 1003 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
d6731600 1004 ),
dec0cd99
MN
1005 'core_message_delete_conversation' => array(
1006 'classname' => 'core_message_external',
1007 'methodname' => 'delete_conversation',
1008 'classpath' => 'message/externallib.php',
fa024820
MN
1009 'description' => '** DEPRECATED ** Please do not call this function any more.
1010 Deletes a conversation.',
dec0cd99
MN
1011 'type' => 'write',
1012 'capabilities' => 'moodle/site:deleteownmessage',
1013 'ajax' => true,
53522c6e 1014 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
dec0cd99 1015 ),
60b67bbc 1016 'core_message_delete_conversations_by_id' => array(
26f39c88 1017 'classname' => 'core_message_external',
60b67bbc 1018 'methodname' => 'delete_conversations_by_id',
26f39c88 1019 'classpath' => 'message/externallib.php',
60b67bbc 1020 'description' => 'Deletes a list of conversations.',
26f39c88
MN
1021 'type' => 'write',
1022 'capabilities' => 'moodle/site:deleteownmessage',
1023 'ajax' => true,
1024 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1025 ),
f23e9b6b
CB
1026 'core_message_delete_message' => array(
1027 'classname' => 'core_message_external',
1028 'methodname' => 'delete_message',
1029 'classpath' => 'message/externallib.php',
1030 'description' => 'Deletes a message.',
1031 'type' => 'write',
ee7295ee 1032 'capabilities' => 'moodle/site:deleteownmessage',
3090f52f 1033 'ajax' => true,
ee7295ee 1034 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
d6731600 1035 ),
f23e9b6b
CB
1036 'core_message_get_blocked_users' => array(
1037 'classname' => 'core_message_external',
1038 'methodname' => 'get_blocked_users',
1039 'classpath' => 'message/externallib.php',
1040 'description' => 'Retrieve a list of users blocked',
1041 'type' => 'read',
ee7295ee 1042 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
d6731600 1043 ),
cd03b8d7
MN
1044 'core_message_data_for_messagearea_search_messages' => array(
1045 'classname' => 'core_message_external',
1046 'methodname' => 'data_for_messagearea_search_messages',
1047 'classpath' => 'message/externallib.php',
1048 'description' => 'Retrieve the template data for searching for messages',
1049 'type' => 'read',
1050 'ajax' => true,
53522c6e 1051 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
cd03b8d7 1052 ),
48e8bdba 1053 'core_message_data_for_messagearea_search_users' => array(
cd03b8d7 1054 'classname' => 'core_message_external',
48e8bdba 1055 'methodname' => 'data_for_messagearea_search_users',
cd03b8d7 1056 'classpath' => 'message/externallib.php',
548cac7d
AA
1057 'description' => '** DEPRECATED ** Please do not call this function any more.
1058 Retrieve the template data for searching for people',
cd03b8d7
MN
1059 'type' => 'read',
1060 'ajax' => true,
1061 ),
48e8bdba 1062 'core_message_data_for_messagearea_search_users_in_course' => array(
cd03b8d7 1063 'classname' => 'core_message_external',
48e8bdba 1064 'methodname' => 'data_for_messagearea_search_users_in_course',
cd03b8d7 1065 'classpath' => 'message/externallib.php',
548cac7d
AA
1066 'description' => '** DEPRECATED ** Please do not call this function any more.
1067 Retrieve the template data for searching for people in a course',
1068 'type' => 'read',
1069 'ajax' => true,
1070 ),
1071 'core_message_message_search_users' => array(
1072 'classname' => 'core_message_external',
1073 'methodname' => 'message_search_users',
1074 'classpath' => 'message/externallib.php',
1075 'description' => 'Retrieve the data for searching for people',
cd03b8d7
MN
1076 'type' => 'read',
1077 'ajax' => true,
548cac7d 1078 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
cd03b8d7 1079 ),
9aa012b5
MN
1080 'core_message_data_for_messagearea_conversations' => array(
1081 'classname' => 'core_message_external',
1082 'methodname' => 'data_for_messagearea_conversations',
1083 'classpath' => 'message/externallib.php',
eb35e0b1
JD
1084 'description' => '** DEPRECATED ** Please do not call this function any more.
1085 Retrieve the template data for the conversation list',
9aa012b5
MN
1086 'type' => 'read',
1087 'ajax' => true,
21d9f020 1088 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
9aa012b5
MN
1089 ),
1090 'core_message_data_for_messagearea_contacts' => array(
1091 'classname' => 'core_message_external',
1092 'methodname' => 'data_for_messagearea_contacts',
1093 'classpath' => 'message/externallib.php',
a6049a79
MN
1094 'description' => '** DEPRECATED ** Please do not call this function any more.
1095 Retrieve the template data for the contact list',
9aa012b5
MN
1096 'type' => 'read',
1097 'ajax' => true,
21d9f020 1098 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
9aa012b5 1099 ),
3cd13828
MN
1100 'core_message_data_for_messagearea_messages' => array(
1101 'classname' => 'core_message_external',
1102 'methodname' => 'data_for_messagearea_messages',
1103 'classpath' => 'message/externallib.php',
a6049a79
MN
1104 'description' => '** DEPRECATED ** Please do not call this function any more.
1105 Retrieve the template data for the messages',
3cd13828
MN
1106 'type' => 'read',
1107 'ajax' => true,
21d9f020 1108 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
3cd13828 1109 ),
c060cd49
MN
1110 'core_message_data_for_messagearea_get_most_recent_message' => array(
1111 'classname' => 'core_message_external',
1112 'methodname' => 'data_for_messagearea_get_most_recent_message',
1113 'classpath' => 'message/externallib.php',
a6049a79
MN
1114 'description' => '** DEPRECATED ** Please do not call this function any more.
1115 Retrieve the template data for the most recent message',
c060cd49
MN
1116 'type' => 'read',
1117 'ajax' => true,
1118 ),
c6e97f54
MN
1119 'core_message_data_for_messagearea_get_profile' => array(
1120 'classname' => 'core_message_external',
1121 'methodname' => 'data_for_messagearea_get_profile',
1122 'classpath' => 'message/externallib.php',
a6049a79
MN
1123 'description' => '** DEPRECATED ** Please do not call this function any more.
1124 Retrieve the template data for the users\'s profile',
c6e97f54
MN
1125 'type' => 'read',
1126 'ajax' => true,
1127 ),
d6731600 1128 'core_message_get_contacts' => array(
f23e9b6b
CB
1129 'classname' => 'core_message_external',
1130 'methodname' => 'get_contacts',
1131 'classpath' => 'message/externallib.php',
f8905537
MN
1132 'description' => '** DEPRECATED ** Please do not call this function any more.
1133 Retrieve the contact list',
f23e9b6b 1134 'type' => 'read',
6f31927a
JD
1135 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1136 ),
c9b0f33f
MN
1137 'core_message_get_user_contacts' => array(
1138 'classname' => 'core_message_external',
1139 'methodname' => 'get_user_contacts',
1140 'classpath' => 'message/externallib.php',
d6731600 1141 'description' => 'Retrieve the contact list',
f23e9b6b 1142 'type' => 'read',
c9b0f33f 1143 'ajax' => true,
6f31927a
JD
1144 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1145 ),
1146 'core_message_get_conversations' => array(
1147 'classname' => 'core_message_external',
1148 'methodname' => 'get_conversations',
1149 'classpath' => 'message/externallib.php',
1150 'description' => 'Retrieve a list of conversations for a user',
1151 'type' => 'read',
ee7295ee 1152 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
b3bbd4a0 1153 'ajax' => true
d6731600 1154 ),
4e313026
RW
1155 'core_message_get_conversation' => array(
1156 'classname' => 'core_message_external',
1157 'methodname' => 'get_conversation',
1158 'classpath' => 'message/externallib.php',
1159 'description' => 'Retrieve a conversation for a user',
1160 'type' => 'read',
569c0bae
RW
1161 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1162 'ajax' => true
1163 ),
1164 'core_message_get_conversation_between_users' => array(
1165 'classname' => 'core_message_external',
1166 'methodname' => 'get_conversation_between_users',
1167 'classpath' => 'message/externallib.php',
1168 'description' => 'Retrieve a conversation for a user between another user',
1169 'type' => 'read',
4e313026
RW
1170 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1171 'ajax' => true
1172 ),
aff9da17 1173 'core_message_get_messages' => array(
f23e9b6b
CB
1174 'classname' => 'core_message_external',
1175 'methodname' => 'get_messages',
1176 'classpath' => 'message/externallib.php',
1177 'description' => 'Retrieve a list of messages sent and received by a user (conversations, notifications or both)',
1178 'type' => 'read',
ee7295ee 1179 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
3274d5ca
RW
1180 'ajax' => true,
1181 ),
28ff6ad1
JD
1182 'core_message_get_conversation_counts' => array(
1183 'classname' => 'core_message_external',
1184 'methodname' => 'get_conversation_counts',
1185 'classpath' => 'message/externallib.php',
1186 'description' => 'Retrieve a list of conversation counts, indexed by type.',
1187 'type' => 'read',
1188 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1189 'ajax' => true,
1190 ),
b402a163
JD
1191 'core_message_get_unread_conversation_counts' => array(
1192 'classname' => 'core_message_external',
1193 'methodname' => 'get_unread_conversation_counts',
1194 'classpath' => 'message/externallib.php',
1195 'description' => 'Retrieve a list of unread conversation counts, indexed by type.',
1196 'type' => 'read',
1197 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1198 'ajax' => true,
1199 ),
5584c48a
MN
1200 'core_message_get_conversation_members' => array(
1201 'classname' => 'core_message_external',
1202 'methodname' => 'get_conversation_members',
1203 'classpath' => 'message/externallib.php',
1204 'description' => 'Retrieve a list of members in a conversation',
1205 'type' => 'read',
1206 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1207 'ajax' => true,
1208 ),
8350978a
RW
1209 'core_message_get_member_info' => array(
1210 'classname' => 'core_message_external',
1211 'methodname' => 'get_member_info',
1212 'classpath' => 'message/externallib.php',
1213 'description' => 'Retrieve a user message profiles',
1214 'type' => 'read',
1215 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1216 'ajax' => true,
1217 ),
8c55bd6c
RW
1218 'core_message_get_unread_conversations_count' => array(
1219 'classname' => 'core_message_external',
1220 'methodname' => 'get_unread_conversations_count',
1221 'classpath' => 'message/externallib.php',
1222 'description' => 'Retrieve the count of unread conversations for a given user',
1223 'type' => 'read',
1224 'ajax' => true,
53522c6e 1225 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
8c55bd6c 1226 ),
3274d5ca
RW
1227 'core_message_mark_all_notifications_as_read' => array(
1228 'classname' => 'core_message_external',
1229 'methodname' => 'mark_all_notifications_as_read',
1230 'classpath' => 'message/externallib.php',
8c55bd6c
RW
1231 'description' => 'Mark all notifications as read for a given user',
1232 'type' => 'write',
1233 'ajax' => true,
53522c6e 1234 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
8c55bd6c
RW
1235 ),
1236 'core_message_mark_all_messages_as_read' => array(
1237 'classname' => 'core_message_external',
1238 'methodname' => 'mark_all_messages_as_read',
1239 'classpath' => 'message/externallib.php',
e4c30994
MN
1240 'description' => '** DEPRECATED ** Please do not call this function any more.
1241 Mark all messages as read for a given user',
3274d5ca
RW
1242 'type' => 'write',
1243 'ajax' => true,
53522c6e 1244 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
60ab2e1b 1245 ),
09ec5017
MN
1246 'core_message_mark_all_conversation_messages_as_read' => array(
1247 'classname' => 'core_message_external',
1248 'methodname' => 'mark_all_conversation_messages_as_read',
1249 'classpath' => 'message/externallib.php',
1250 'description' => 'Mark all conversation messages as read for a given user',
3274d5ca
RW
1251 'type' => 'write',
1252 'ajax' => true,
53522c6e 1253 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
60ab2e1b 1254 ),
a84f89ca 1255 'core_message_mark_message_read' => array(
f23e9b6b
CB
1256 'classname' => 'core_message_external',
1257 'methodname' => 'mark_message_read',
1258 'classpath' => 'message/externallib.php',
1259 'description' => 'Mark a single message as read, trigger message_viewed event.',
1260 'type' => 'write',
ee7295ee 1261 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
0b19d048 1262 'ajax' => true,
a84f89ca 1263 ),
2b595d96
MN
1264 'core_message_mark_notification_read' => array(
1265 'classname' => 'core_message_external',
1266 'methodname' => 'mark_notification_read',
1267 'classpath' => 'message/externallib.php',
1268 'description' => 'Mark a single notification as read, trigger notification_viewed event.',
1269 'type' => 'write',
1270 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1271 'ajax' => true,
1272 ),
a0eabdd3
RW
1273 'core_message_message_processor_config_form' => array(
1274 'classname' => 'core_message_external',
1275 'methodname' => 'message_processor_config_form',
1276 'classpath' => 'message/externallib.php',
1277 'description' => 'Process the message processor config form',
1278 'type' => 'write',
1279 'ajax' => true,
53522c6e 1280 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
a0eabdd3 1281 ),
8c125526
RW
1282 'core_message_get_message_processor' => array(
1283 'classname' => 'core_message_external',
1284 'methodname' => 'get_message_processor',
1285 'classpath' => 'message/externallib.php',
1286 'description' => 'Get a message processor',
1287 'type' => 'read',
1288 'ajax' => true,
1289 ),
f23e9b6b
CB
1290 'core_message_search_contacts' => array(
1291 'classname' => 'core_message_external',
1292 'methodname' => 'search_contacts',
1293 'classpath' => 'message/externallib.php',
1294 'description' => 'Search for contacts',
1295 'type' => 'read',
ee7295ee 1296 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
419b1128 1297 ),
f23e9b6b
CB
1298 'core_message_send_instant_messages' => array(
1299 'classname' => 'core_message_external',
1300 'methodname' => 'send_instant_messages',
1301 'classpath' => 'message/externallib.php',
1302 'description' => 'Send instant messages',
1303 'type' => 'write',
ee7295ee 1304 'capabilities' => 'moodle/site:sendmessage',
c060cd49 1305 'ajax' => true,
ee7295ee 1306 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
f23e9b6b 1307 ),
2553e9db
JD
1308 'core_message_send_messages_to_conversation' => array(
1309 'classname' => 'core_message_external',
1310 'methodname' => 'send_messages_to_conversation',
1311 'classpath' => 'message/externallib.php',
1312 'description' => 'Send messages to an existing conversation between users',
1313 'type' => 'write',
1314 'capabilities' => 'moodle/site:sendmessage',
1315 'ajax' => true,
1316 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1317 ),
fb04293b
SA
1318 'core_message_get_conversation_messages' => array(
1319 'classname' => 'core_message_external',
1320 'methodname' => 'get_conversation_messages',
1321 'classpath' => 'message/externallib.php',
1322 'description' => 'Retrieve the conversation messages and relevant member information',
1323 'type' => 'read',
1324 'ajax' => true,
1325 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1326 ),
52284186
MN
1327 'core_message_unblock_user' => array(
1328 'classname' => 'core_message_external',
1329 'methodname' => 'unblock_user',
1330 'classpath' => 'message/externallib.php',
1331 'description' => 'Unblocks a user',
1332 'type' => 'write',
1333 'ajax' => true,
1334 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1335 ),
f23e9b6b
CB
1336 'core_message_unblock_contacts' => array(
1337 'classname' => 'core_message_external',
1338 'methodname' => 'unblock_contacts',
1339 'classpath' => 'message/externallib.php',
0b3eadcd
MN
1340 'description' => '** DEPRECATED ** Please do not call this function any more.
1341 Unblock contacts',
f23e9b6b 1342 'type' => 'write',
c6e97f54 1343 'ajax' => true,
ee7295ee 1344 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
5d1017e1 1345 ),
e86f0cb4
JL
1346 'core_message_get_user_notification_preferences' => array(
1347 'classname' => 'core_message_external',
1348 'methodname' => 'get_user_notification_preferences',
1349 'classpath' => 'message/externallib.php',
1350 'description' => 'Get the notification preferences for a given user.',
1351 'type' => 'read',
1352 'capabilities' => 'moodle/user:editownmessageprofile',
1353 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1354 ),
2521afd2
JL
1355 'core_message_get_user_message_preferences' => array(
1356 'classname' => 'core_message_external',
1357 'methodname' => 'get_user_message_preferences',
1358 'classpath' => 'message/externallib.php',
1359 'description' => 'Get the message preferences for a given user.',
1360 'type' => 'read',
1361 'capabilities' => 'moodle/user:editownmessageprofile',
1362 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
08ae9a73 1363 'ajax' => true
2521afd2 1364 ),
5b367bae
JD
1365 'core_message_set_favourite_conversations' => array(
1366 'classname' => 'core_message_external',
1367 'methodname' => 'set_favourite_conversations',
1368 'classpath' => 'message/externallib.php',
1369 'description' => 'Mark a conversation or group of conversations as favourites/starred conversations.',
1370 'type' => 'write',
9e189a91 1371 'ajax' => true,
5b367bae
JD
1372 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1373 ),
1374 'core_message_unset_favourite_conversations' => array(
1375 'classname' => 'core_message_external',
1376 'methodname' => 'unset_favourite_conversations',
1377 'classpath' => 'message/externallib.php',
1378 'description' => 'Unset a conversation or group of conversations as favourites/starred conversations.',
1379 'type' => 'write',
9e189a91 1380 'ajax' => true,
5b367bae
JD
1381 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1382 ),
5d1017e1 1383 'core_notes_create_notes' => array(
f23e9b6b
CB
1384 'classname' => 'core_notes_external',
1385 'methodname' => 'create_notes',
1386 'classpath' => 'notes/externallib.php',
8d46dabb 1387 'description' => 'Create notes',
f23e9b6b 1388 'type' => 'write',
b5b81de3 1389 'ajax' => true,
ee7295ee
JL
1390 'capabilities' => 'moodle/notes:manage',
1391 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
8d46dabb 1392 ),
34348b2b 1393 'core_notes_delete_notes' => array(
f23e9b6b
CB
1394 'classname' => 'core_notes_external',
1395 'methodname' => 'delete_notes',
1396 'classpath' => 'notes/externallib.php',
34348b2b 1397 'description' => 'Delete notes',
f23e9b6b 1398 'type' => 'write',
ee7295ee
JL
1399 'capabilities' => 'moodle/notes:manage',
1400 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
f23e9b6b
CB
1401 ),
1402 'core_notes_get_course_notes' => array(
1403 'classname' => 'core_notes_external',
1404 'methodname' => 'get_course_notes',
1405 'classpath' => 'notes/externallib.php',
1406 'description' => 'Returns all notes in specified course (or site), for the specified user.',
1407 'type' => 'read',
ee7295ee
JL
1408 'capabilities' => 'moodle/notes:view',
1409 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
34348b2b 1410 ),
34348b2b 1411 'core_notes_get_notes' => array(
f23e9b6b
CB
1412 'classname' => 'core_notes_external',
1413 'methodname' => 'get_notes',
1414 'classpath' => 'notes/externallib.php',
34348b2b 1415 'description' => 'Get notes',
f23e9b6b
CB
1416 'type' => 'read',
1417 'capabilities' => 'moodle/notes:view'
34348b2b 1418 ),
34348b2b 1419 'core_notes_update_notes' => array(
f23e9b6b
CB
1420 'classname' => 'core_notes_external',
1421 'methodname' => 'update_notes',
1422 'classpath' => 'notes/externallib.php',
34348b2b 1423 'description' => 'Update notes',
f23e9b6b
CB
1424 'type' => 'write',
1425 'capabilities' => 'moodle/notes:manage'
34348b2b 1426 ),
a80b5518 1427 'core_notes_view_notes' => array(
f23e9b6b
CB
1428 'classname' => 'core_notes_external',
1429 'methodname' => 'view_notes',
1430 'classpath' => 'notes/externallib.php',
1431 'description' => 'Simulates the web interface view of notes/index.php: trigger events.',
1432 'type' => 'write',
ee7295ee
JL
1433 'capabilities' => 'moodle/notes:view',
1434 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
9028d9b5 1435 ),
f23e9b6b
CB
1436 'core_output_load_template' => array(
1437 'classname' => 'core\output\external',
1438 'methodname' => 'load_template',
1439 'description' => 'Load a template for a renderable',
1440 'type' => 'read',
5041600d
RT
1441 'loginrequired' => false,
1442 'ajax' => true,
0ff4ebb4 1443 ),
e0034b5d
RW
1444 'core_output_load_template_with_dependencies' => array(
1445 'classname' => 'core\output\external',
1446 'methodname' => 'load_template_with_dependencies',
1447 'description' => 'Load a template and its dependencies for a renderable',
1448 'type' => 'read',
1449 'loginrequired' => false,
1450 'ajax' => true,
1451 ),
e330b1c2 1452 'core_output_load_fontawesome_icon_map' => array(
a26ce248 1453 'classname' => 'core\output\external',
e330b1c2 1454 'methodname' => 'load_fontawesome_icon_map',
a26ce248
DW
1455 'description' => 'Load the mapping of names to icons',
1456 'type' => 'read',
1457 'loginrequired' => false,
1458 'ajax' => true,
1459 ),
f23e9b6b
CB
1460 // Question related functions.
1461 'core_question_update_flag' => array(
1462 'classname' => 'core_question_external',
1463 'methodname' => 'update_flag',
1464 'description' => 'Update the flag state of a question attempt.',
1465 'type' => 'write',
1466 'capabilities' => 'moodle/question:flag',
ee7295ee 1467 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
3f0ea6d8 1468 ),
680d5c5b
SL
1469 'core_question_submit_tags_form' => array(
1470 'classname' => 'core_question_external',
1471 'methodname' => 'submit_tags_form',
1472 'description' => 'Update the question tags.',
1473 'type' => 'write',
1474 'ajax' => true,
1475 ),
6768729e
RW
1476 'core_question_get_random_question_summaries' => array(
1477 'classname' => 'core_question_external',
1478 'methodname' => 'get_random_question_summaries',
1479 'description' => 'Get the random question set for a criteria',
1480 'type' => 'read',
1481 'ajax' => true,
1482 ),
f23e9b6b
CB
1483 'core_rating_get_item_ratings' => array(
1484 'classname' => 'core_rating_external',
1485 'methodname' => 'get_item_ratings',
1486 'description' => 'Retrieve all the ratings for an item.',
1487 'type' => 'read',
ee7295ee
JL
1488 'capabilities' => 'moodle/rating:view',
1489 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
5d1017e1 1490 ),
afb7799a
JL
1491 'core_rating_add_rating' => array(
1492 'classname' => 'core_rating_external',
1493 'methodname' => 'add_rating',
1494 'description' => 'Rates an item.',
1495 'type' => 'write',
1496 'capabilities' => 'moodle/rating:rate',
1497 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1498 ),
f23e9b6b
CB
1499 'core_role_assign_roles' => array(
1500 'classname' => 'core_role_external',
1501 'methodname' => 'assign_roles',
1502 'classpath' => 'enrol/externallib.php',
1503 'description' => 'Manual role assignments.',
1504 'type' => 'write',
1505 'capabilities' => 'moodle/role:assign'
0bf486a6 1506 ),
f23e9b6b
CB
1507 'core_role_unassign_roles' => array(
1508 'classname' => 'core_role_external',
1509 'methodname' => 'unassign_roles',
1510 'classpath' => 'enrol/externallib.php',
1511 'description' => 'Manual role unassignments.',
1512 'type' => 'write',
1513 'capabilities' => 'moodle/role:assign'
11e76602 1514 ),
a6cacdd2 1515 'core_search_get_relevant_users' => array(
1516 'classname' => '\core_search\external',
1517 'methodname' => 'get_relevant_users',
1518 'description' => 'Gets relevant users for a search request.',
1519 'type' => 'read',
1520 'ajax' => true
1521 ),
f23e9b6b
CB
1522 'core_tag_get_tagindex' => array(
1523 'classname' => 'core_tag_external',
1524 'methodname' => 'get_tagindex',
1525 'description' => 'Gets tag index page for one tag and one tag area',
1526 'type' => 'read',
5041600d 1527 'ajax' => true,
52fcc0b8 1528 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
11e76602 1529 ),
f23e9b6b
CB
1530 'core_tag_get_tags' => array(
1531 'classname' => 'core_tag_external',
1532 'methodname' => 'get_tags',
1533 'description' => 'Gets tags by their ids',
1534 'type' => 'read',
5041600d 1535 'ajax' => true,
11e76602 1536 ),
f23e9b6b
CB
1537 'core_tag_update_tags' => array(
1538 'classname' => 'core_tag_external',
1539 'methodname' => 'update_tags',
1540 'description' => 'Updates tags',
1541 'type' => 'write',
5041600d 1542 'ajax' => true,
cc73ea07 1543 ),
f1218899
JL
1544 'core_tag_get_tagindex_per_area' => array(
1545 'classname' => 'core_tag_external',
1546 'methodname' => 'get_tagindex_per_area',
1547 'description' => 'Gets tag index page per different areas.',
1548 'type' => 'read',
1549 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1550 ),
07a48837
JL
1551 'core_tag_get_tag_areas' => array(
1552 'classname' => 'core_tag_external',
1553 'methodname' => 'get_tag_areas',
1554 'description' => 'Retrieves existing tag areas.',
1555 'type' => 'read',
1556 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1557 ),
87bdad57
JL
1558 'core_tag_get_tag_collections' => array(
1559 'classname' => 'core_tag_external',
1560 'methodname' => 'get_tag_collections',
1561 'description' => 'Retrieves existing tag collections.',
1562 'type' => 'read',
1563 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1564 ),
86fd9277
JL
1565 'core_tag_get_tag_cloud' => array(
1566 'classname' => 'core_tag_external',
1567 'methodname' => 'get_tag_cloud',
1568 'description' => 'Retrieves a tag cloud for the given collection and/or query search.',
1569 'type' => 'read',
1570 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1571 ),
cdc5f978 1572 'core_update_inplace_editable' => array(
f23e9b6b
CB
1573 'classname' => 'core_external',
1574 'methodname' => 'update_inplace_editable',
1575 'classpath' => 'lib/external/externallib.php',
cdc5f978 1576 'description' => 'Generic service to update title',
f23e9b6b 1577 'type' => 'write',
5041600d
RT
1578 'loginrequired' => true,
1579 'ajax' => true,
c66dc3df 1580 ),
f23e9b6b
CB
1581 'core_user_add_user_device' => array(
1582 'classname' => 'core_user_external',
1583 'methodname' => 'add_user_device',
1584 'classpath' => 'user/externallib.php',
1585 'description' => 'Store mobile user devices information for PUSH Notifications.',
1586 'type' => 'write',
ee7295ee 1587 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
9bdcf579 1588 ),
f23e9b6b
CB
1589 'core_user_add_user_private_files' => array(
1590 'classname' => 'core_user_external',
1591 'methodname' => 'add_user_private_files',
1592 'classpath' => 'user/externallib.php',
1593 'description' => 'Copy files from a draft area to users private files area.',
1594 'type' => 'write',
ee7295ee
JL
1595 'capabilities' => 'moodle/user:manageownfiles',
1596 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
25c49a85 1597 ),
f23e9b6b
CB
1598 'core_user_create_users' => array(
1599 'classname' => 'core_user_external',
1600 'methodname' => 'create_users',
1601 'classpath' => 'user/externallib.php',
1602 'description' => 'Create users.',
1603 'type' => 'write',
1604 'capabilities' => 'moodle/user:create'
23b398fc 1605 ),
f23e9b6b
CB
1606 'core_user_delete_users' => array(
1607 'classname' => 'core_user_external',
1608 'methodname' => 'delete_users',
1609 'classpath' => 'user/externallib.php',
1610 'description' => 'Delete users.',
1611 'type' => 'write',
1612 'capabilities' => 'moodle/user:delete'
6c785afa 1613 ),
f23e9b6b
CB
1614 'core_user_get_course_user_profiles' => array(
1615 'classname' => 'core_user_external',
1616 'methodname' => 'get_course_user_profiles',
1617 'classpath' => 'user/externallib.php',
1618 'description' => 'Get course user profiles (each of the profils matching a course id and a user id),.',
1619 'type' => 'read',
1620 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, '
ee7295ee
JL
1621 . 'moodle/site:accessallgroups',
1622 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
6c785afa 1623 ),
f23e9b6b
CB
1624 'core_user_get_users' => array(
1625 'classname' => 'core_user_external',
1626 'methodname' => 'get_users',
1627 'classpath' => 'user/externallib.php',
1628 'description' => 'search for users matching the parameters',
1629 'type' => 'read',
1630 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update'
db5b6971 1631 ),
f23e9b6b
CB
1632 'core_user_get_users_by_field' => array(
1633 'classname' => 'core_user_external',
1634 'methodname' => 'get_users_by_field',
1635 'classpath' => 'user/externallib.php',
1636 'description' => 'Retrieve users\' information for a specified unique field - If you want to do a user search, use '
1637 . 'core_user_get_users()',
1638 'type' => 'read',
ee7295ee 1639 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update',
5041600d 1640 'ajax' => true,
ee7295ee 1641 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
8e355853 1642 ),
f23e9b6b
CB
1643 'core_user_remove_user_device' => array(
1644 'classname' => 'core_user_external',
1645 'methodname' => 'remove_user_device',
1646 'classpath' => 'user/externallib.php',
1647 'description' => 'Remove a user device from the Moodle database.',
1648 'type' => 'write',
ee7295ee 1649 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
ef4c23cc 1650 ),
c598f278 1651 'core_user_update_users' => array(
a0eabdd3 1652 'classname' => 'core_user_external',
c598f278 1653 'methodname' => 'update_users',
a0eabdd3 1654 'classpath' => 'user/externallib.php',
c598f278 1655 'description' => 'Update users.',
a0eabdd3
RW
1656 'type' => 'write',
1657 'capabilities' => 'moodle/user:update',
1658 'ajax' => true,
1659 ),
c598f278 1660 'core_user_update_user_preferences' => array(
f23e9b6b 1661 'classname' => 'core_user_external',
c598f278 1662 'methodname' => 'update_user_preferences',
f23e9b6b 1663 'classpath' => 'user/externallib.php',
c598f278 1664 'description' => 'Update a user\'s preferences',
f23e9b6b 1665 'type' => 'write',
c598f278 1666 'capabilities' => 'moodle/user:editownmessageprofile, moodle/user:editmessageprofile',
a0eabdd3 1667 'ajax' => true,
6d2f938c 1668 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
c026a28d 1669 ),
f23e9b6b
CB
1670 'core_user_view_user_list' => array(
1671 'classname' => 'core_user_external',
1672 'methodname' => 'view_user_list',
1673 'classpath' => 'user/externallib.php',
1674 'description' => 'Simulates the web-interface view of user/index.php (triggering events),.',
1675 'type' => 'write',
1676 'capabilities' => 'moodle/course:viewparticipants',
ee7295ee 1677 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
7361b968 1678 ),
f23e9b6b
CB
1679 'core_user_view_user_profile' => array(
1680 'classname' => 'core_user_external',
1681 'methodname' => 'view_user_profile',
1682 'classpath' => 'user/externallib.php',
1683 'description' => 'Simulates the web-interface view of user/view.php and user/profile.php (triggering events),.',
1684 'type' => 'write',
1685 'capabilities' => 'moodle/user:viewdetails',
ee7295ee 1686 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
f4fb827e 1687 ),
45fec983
JL
1688 'core_user_get_user_preferences' => array(
1689 'classname' => 'core_user_external',
1690 'methodname' => 'get_user_preferences',
1691 'classpath' => 'user/externallib.php',
1692 'description' => 'Return user preferences.',
1693 'type' => 'read',
5005d8cf 1694 'ajax' => true,
45fec983
JL
1695 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1696 ),
d44e2e42
JL
1697 'core_user_update_picture' => array(
1698 'classname' => 'core_user_external',
1699 'methodname' => 'update_picture',
1700 'classpath' => 'user/externallib.php',
1701 'description' => 'Update or delete the user picture in the site',
1702 'type' => 'write',
1703 'capabilities' => 'moodle/user:editownprofile, moodle/user:editprofile',
1704 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1705 ),
649777fb
JL
1706 'core_user_set_user_preferences' => array(
1707 'classname' => 'core_user_external',
1708 'methodname' => 'set_user_preferences',
1709 'classpath' => 'user/externallib.php',
1710 'description' => 'Set user preferences.',
1711 'type' => 'write',
1712 'capabilities' => 'moodle/site:config',
2979ca11
JL
1713 'ajax' => true,
1714 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
649777fb 1715 ),
3e8145a3
JL
1716 'core_user_agree_site_policy' => array(
1717 'classname' => 'core_user_external',
1718 'methodname' => 'agree_site_policy',
1719 'classpath' => 'user/externallib.php',
1720 'description' => 'Agree the site policy for the current user.',
1721 'type' => 'write',
1722 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1723 ),
f74ac6e7
JL
1724 'core_user_get_private_files_info' => array(
1725 'classname' => 'core_user_external',
1726 'methodname' => 'get_private_files_info',
1727 'classpath' => 'user/externallib.php',
1728 'description' => 'Returns general information about files in the user private files area.',
1729 'type' => 'read',
1730 'capabilities' => 'moodle/user:manageownfiles',
1731 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1732 ),
649777fb 1733
81de839f
FM
1734 // Competencies functions.
1735 'core_competency_create_competency_framework' => array(
1736 'classname' => 'core_competency\external',
1737 'methodname' => 'create_competency_framework',
1738 'classpath' => '',
1739 'description' => 'Creates new competency frameworks.',
1740 'type' => 'write',
1741 'capabilities' => 'moodle/competency:competencymanage',
1742 'ajax' => true,
1743 ),
1744 'core_competency_read_competency_framework' => array(
1745 'classname' => 'core_competency\external',
1746 'methodname' => 'read_competency_framework',
1747 'classpath' => '',
1748 'description' => 'Load a summary of a competency framework.',
1749 'type' => 'read',
1750 'capabilities' => 'moodle/competency:competencyview',
1751 'ajax' => true,
1752 ),
1753 'core_competency_duplicate_competency_framework' => array(
1754 'classname' => 'core_competency\external',
1755 'methodname' => 'duplicate_competency_framework',
1756 'classpath' => '',
1757 'description' => 'Duplicate a competency framework.',
1758 'type' => 'write',
1759 'capabilities' => 'moodle/competency:competencymanage',
1760 'ajax' => true,
1761 ),
1762 'core_competency_delete_competency_framework' => array(
1763 'classname' => 'core_competency\external',
1764 'methodname' => 'delete_competency_framework',
1765 'classpath' => '',
1766 'description' => 'Delete a competency framework.',
1767 'type' => 'write',
1768 'capabilities' => 'moodle/competency:competencymanage',
1769 'ajax' => true,
1770 ),
1771 'core_competency_update_competency_framework' => array(
1772 'classname' => 'core_competency\external',
1773 'methodname' => 'update_competency_framework',
1774 'classpath' => '',
1775 'description' => 'Update a competency framework.',
1776 'type' => 'write',
1777 'capabilities' => 'moodle/competency:competencymanage',
1778 'ajax' => true,
1779 ),
1780 'core_competency_list_competency_frameworks' => array(
1781 'classname' => 'core_competency\external',
1782 'methodname' => 'list_competency_frameworks',
1783 'classpath' => '',
1784 'description' => 'Load a list of a competency frameworks.',
1785 'type' => 'read',
1786 'capabilities' => 'moodle/competency:competencyview',
1787 'ajax' => true,
1788 ),
1789 'core_competency_count_competency_frameworks' => array(
1790 'classname' => 'core_competency\external',
1791 'methodname' => 'count_competency_frameworks',
1792 'classpath' => '',
1793 'description' => 'Count a list of a competency frameworks.',
1794 'type' => 'read',
1795 'capabilities' => 'moodle/competency:competencyview',
1796 'ajax' => true,
1797 ),
1798 'core_competency_competency_framework_viewed' => array(
1799 'classname' => 'core_competency\external',
1800 'methodname' => 'competency_framework_viewed',
1801 'classpath' => '',
1802 'description' => 'Log event competency framework viewed',
1803 'type' => 'read',
1804 'capabilities' => 'moodle/competency:competencyview',
1805 'ajax' => true,
1806 ),
1807 'core_competency_create_competency' => array(
1808 'classname' => 'core_competency\external',
1809 'methodname' => 'create_competency',
1810 'classpath' => '',
1811 'description' => 'Creates new competencies.',
1812 'type' => 'write',
1813 'capabilities' => 'moodle/competency:competencymanage',
1814 'ajax' => true,
1815 ),
1816 'core_competency_read_competency' => array(
1817 'classname' => 'core_competency\external',
1818 'methodname' => 'read_competency',
1819 'classpath' => '',
1820 'description' => 'Load a summary of a competency.',
1821 'type' => 'read',
1822 'capabilities' => 'moodle/competency:competencyview',
1823 'ajax' => true,
1824 ),
1825 'core_competency_competency_viewed' => array(
1826 'classname' => 'core_competency\external',
1827 'methodname' => 'competency_viewed',
1828 'classpath' => '',
1829 'description' => 'Log event competency viewed',
1830 'type' => 'read',
1831 'capabilities' => 'moodle/competency:competencyview',
1832 'ajax' => true,
3123c2cf 1833 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
1834 ),
1835 'core_competency_delete_competency' => array(
1836 'classname' => 'core_competency\external',
1837 'methodname' => 'delete_competency',
1838 'classpath' => '',
1839 'description' => 'Delete a competency.',
1840 'type' => 'write',
1841 'capabilities' => 'moodle/competency:competencymanage',
1842 'ajax' => true,
1843 ),
1844 'core_competency_update_competency' => array(
1845 'classname' => 'core_competency\external',
1846 'methodname' => 'update_competency',
1847 'classpath' => '',
1848 'description' => 'Update a competency.',
1849 'type' => 'write',
1850 'capabilities' => 'moodle/competency:competencymanage',
1851 'ajax' => true,
1852 ),
1853 'core_competency_list_competencies' => array(
1854 'classname' => 'core_competency\external',
1855 'methodname' => 'list_competencies',
1856 'classpath' => '',
1857 'description' => 'Load a list of a competencies.',
1858 'type' => 'read',
1859 'capabilities' => 'moodle/competency:competencyview',
1860 'ajax' => true,
1861 ),
1862 'core_competency_list_competencies_in_template' => array(
1863 'classname' => 'core_competency\external',
1864 'methodname' => 'list_competencies_in_template',
1865 'classpath' => '',
1866 'description' => 'Load a list of a competencies for a given template.',
1867 'type' => 'read',
1868 'capabilities' => 'moodle/competency:competencyview',
1869 'ajax' => true,
1870 ),
1871 'core_competency_count_competencies' => array(
1872 'classname' => 'core_competency\external',
1873 'methodname' => 'count_competencies',
1874 'classpath' => '',
1875 'description' => 'Count a list of a competencies.',
1876 'type' => 'read',
1877 'capabilities' => 'moodle/competency:competencyview',
1878 'ajax' => true,
1879 ),
1880 'core_competency_count_competencies_in_template' => array(
1881 'classname' => 'core_competency\external',
1882 'methodname' => 'count_competencies_in_template',
1883 'classpath' => '',
1884 'description' => 'Count a list of a competencies for a given template.',
1885 'type' => 'read',
1886 'capabilities' => 'moodle/competency:competencyview',
1887 'ajax' => true,
1888 ),
1889 'core_competency_search_competencies' => array(
1890 'classname' => 'core_competency\external',
1891 'methodname' => 'search_competencies',
1892 'classpath' => '',
1893 'description' => 'Search a list of a competencies.',
1894 'type' => 'read',
1895 'capabilities' => 'moodle/competency:competencyview',
1896 'ajax' => true,
1897 ),
1898 'core_competency_set_parent_competency' => array(
1899 'classname' => 'core_competency\external',
1900 'methodname' => 'set_parent_competency',
1901 'classpath' => '',
1902 'description' => 'Set a new parent for a competency.',
1903 'type' => 'write',
1904 'capabilities' => 'moodle/competency:competencymanage',
1905 'ajax' => true,
1906 ),
1907 'core_competency_move_up_competency' => array(
1908 'classname' => 'core_competency\external',
1909 'methodname' => 'move_up_competency',
1910 'classpath' => '',
1911 'description' => 'Re-order a competency.',
1912 'type' => 'write',
1913 'capabilities' => 'moodle/competency:competencymanage',
1914 'ajax' => true,
1915 ),
1916 'core_competency_move_down_competency' => array(
1917 'classname' => 'core_competency\external',
1918 'methodname' => 'move_down_competency',
1919 'classpath' => '',
1920 'description' => 'Re-order a competency.',
1921 'type' => 'write',
1922 'capabilities' => 'moodle/competency:competencymanage',
1923 'ajax' => true,
1924 ),
1925 'core_competency_list_course_competencies' => array(
1926 'classname' => 'core_competency\external',
1927 'methodname' => 'list_course_competencies',
1928 'classpath' => '',
1929 'description' => 'List the competencies in a course',
1930 'type' => 'read',
1931 'capabilities' => 'moodle/competency:coursecompetencyview',
1932 'ajax' => true,
3123c2cf 1933 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
1934 ),
1935 'core_competency_count_competencies_in_course' => array(
1936 'classname' => 'core_competency\external',
1937 'methodname' => 'count_competencies_in_course',
1938 'classpath' => '',
1939 'description' => 'List the competencies in a course',
1940 'type' => 'read',
1941 'capabilities' => 'moodle/competency:coursecompetencyview',
1942 'ajax' => true,
1943 ),
1944 'core_competency_count_courses_using_competency' => array(
1945 'classname' => 'core_competency\external',
1946 'methodname' => 'count_courses_using_competency',
1947 'classpath' => '',
1948 'description' => 'List the courses using a competency',
1949 'type' => 'read',
1950 'capabilities' => 'moodle/competency:coursecompetencyview',
1951 'ajax' => true,
1952 ),
1953 'core_competency_add_competency_to_course' => array(
1954 'classname' => 'core_competency\external',
1955 'methodname' => 'add_competency_to_course',
1956 'classpath' => '',
1957 'description' => 'Add the competency to a course',
1958 'type' => 'write',
1959 'capabilities' => 'moodle/competency:coursecompetencymanage',
1960 'ajax' => true,
1961 ),
1962 'core_competency_add_competency_to_template' => array(
1963 'classname' => 'core_competency\external',
1964 'methodname' => 'add_competency_to_template',
1965 'classpath' => '',
1966 'description' => 'Add the competency to a template',
1967 'type' => 'write',
1968 'capabilities' => 'moodle/competency:templatemanage',
1969 'ajax' => true,
1970 ),
1971 'core_competency_remove_competency_from_course' => array(
1972 'classname' => 'core_competency\external',
1973 'methodname' => 'remove_competency_from_course',
1974 'classpath' => '',
1975 'description' => 'Remove a competency from a course',
1976 'type' => 'write',
1977 'capabilities' => 'moodle/competency:coursecompetencymanage',
1978 'ajax' => true,
1979 ),
1980 'core_competency_set_course_competency_ruleoutcome' => array(
1981 'classname' => 'core_competency\external',
1982 'methodname' => 'set_course_competency_ruleoutcome',
1983 'classpath' => '',
1984 'description' => 'Modify the ruleoutcome value for course competency',
1985 'type' => 'write',
1986 'capabilities' => 'moodle/competency:coursecompetencymanage',
1987 'ajax' => true,
1988 ),
1989 'core_competency_remove_competency_from_template' => array(
1990 'classname' => 'core_competency\external',
1991 'methodname' => 'remove_competency_from_template',
1992 'classpath' => '',
1993 'description' => 'Remove a competency from a template',
1994 'type' => 'write',
1995 'capabilities' => 'moodle/competency:templatemanage',
1996 'ajax' => true,
1997 ),
1998 'core_competency_reorder_course_competency' => array(
1999 'classname' => 'core_competency\external',
2000 'methodname' => 'reorder_course_competency',
2001 'classpath' => '',
2002 'description' => 'Move a course competency to a new relative sort order.',
2003 'type' => 'write',
2004 'capabilities' => 'moodle/competency:coursecompetencymanage',
2005 'ajax' => true,
2006 ),
2007 'core_competency_reorder_template_competency' => array(
2008 'classname' => 'core_competency\external',
2009 'methodname' => 'reorder_template_competency',
2010 'classpath' => '',
2011 'description' => 'Move a template competency to a new relative sort order.',
2012 'type' => 'write',
2013 'capabilities' => 'moodle/competency:templatemanage',
2014 'ajax' => true,
2015 ),
2016 'core_competency_create_template' => array(
2017 'classname' => 'core_competency\external',
2018 'methodname' => 'create_template',
2019 'classpath' => '',
2020 'description' => 'Creates new learning plan templates.',
2021 'type' => 'write',
2022 'capabilities' => 'moodle/competency:templatemanage',
2023 'ajax' => true,
2024 ),
2025 'core_competency_duplicate_template' => array(
2026 'classname' => 'core_competency\external',
2027 'methodname' => 'duplicate_template',
2028 'classpath' => '',
2029 'description' => 'Duplicate learning plan template.',
2030 'type' => 'write',
2031 'capabilities' => 'moodle/competency:templatemanage',
2032 'ajax' => true,
2033 ),
2034 'core_competency_read_template' => array(
2035 'classname' => 'core_competency\external',
2036 'methodname' => 'read_template',
2037 'classpath' => '',
2038 'description' => 'Load a summary of a learning plan template.',
2039 'type' => 'read',
2040 'capabilities' => 'moodle/competency:templateview',
2041 'ajax' => true,
2042 ),
2043 'core_competency_delete_template' => array(
2044 'classname' => 'core_competency\external',
2045 'methodname' => 'delete_template',
2046 'classpath' => '',
2047 'description' => 'Delete a learning plan template.',
2048 'type' => 'write',
2049 'capabilities' => 'moodle/competency:templatemanage',
2050 'ajax' => true,
2051 ),
2052 'core_competency_update_template' => array(
2053 'classname' => 'core_competency\external',
2054 'methodname' => 'update_template',
2055 'classpath' => '',
2056 'description' => 'Update a learning plan template.',
2057 'type' => 'write',
2058 'capabilities' => 'moodle/competency:templatemanage',
2059 'ajax' => true,
2060 ),
2061 'core_competency_list_templates' => array(
2062 'classname' => 'core_competency\external',
2063 'methodname' => 'list_templates',
2064 'classpath' => '',
2065 'description' => 'Load a list of a learning plan templates.',
2066 'type' => 'read',
2067 'capabilities' => 'moodle/competency:templateview',
2068 'ajax' => true,
2069 ),
2070 'core_competency_list_templates_using_competency' => array(
2071 'classname' => 'core_competency\external',
2072 'methodname' => 'list_templates_using_competency',
2073 'classpath' => '',
2074 'description' => 'Load a list of a learning plan templates for a given competency.',
2075 'type' => 'read',
2076 'capabilities' => 'moodle/competency:templateview',
2077 'ajax' => true,
2078 ),
2079 'core_competency_count_templates' => array(
2080 'classname' => 'core_competency\external',
2081 'methodname' => 'count_templates',
2082 'classpath' => '',
2083 'description' => 'Count a list of a learning plan templates.',
2084 'type' => 'read',
2085 'capabilities' => 'moodle/competency:templateview',
2086 'ajax' => true,
2087 ),
2088 'core_competency_count_templates_using_competency' => array(
2089 'classname' => 'core_competency\external',
2090 'methodname' => 'count_templates_using_competency',
2091 'classpath' => '',
2092 'description' => 'Count a list of a learning plan templates for a given competency.',
2093 'type' => 'read',
2094 'capabilities' => 'moodle/competency:templateview',
2095 'ajax' => true,
2096 ),
2097 'core_competency_create_plan' => array(
2098 'classname' => 'core_competency\external',
2099 'methodname' => 'create_plan',
2100 'classpath' => '',
2101 'description' => 'Creates a learning plan.',
2102 'type' => 'write',
2103 'capabilities' => 'moodle/competency:planmanage',
2104 'ajax' => true,
2105 ),
2106 'core_competency_update_plan' => array(
2107 'classname' => 'core_competency\external',
2108 'methodname' => 'update_plan',
2109 'classpath' => '',
2110 'description' => 'Updates a learning plan.',
2111 'type' => 'write',
2112 'capabilities' => 'moodle/competency:planmanage',
2113 'ajax' => true,
2114 ),
2115 'core_competency_complete_plan' => array(
2116 'classname' => 'core_competency\external',
2117 'methodname' => 'complete_plan',
2118 'classpath' => '',
2119 'description' => 'Complete learning plan.',
2120 'type' => 'write',
2121 'capabilities' => 'moodle/competency:planmanage',
2122 'ajax' => true,
2123 ),
2124 'core_competency_reopen_plan' => array(
2125 'classname' => 'core_competency\external',
2126 'methodname' => 'reopen_plan',
2127 'classpath' => '',
2128 'description' => 'Reopen learning plan.',
2129 'type' => 'write',
2130 'capabilities' => 'moodle/competency:planmanage',
2131 'ajax' => true,
2132 ),
2133 'core_competency_read_plan' => array(
2134 'classname' => 'core_competency\external',
2135 'methodname' => 'read_plan',
2136 'classpath' => '',
2137 'description' => 'Load a learning plan.',
2138 'type' => 'read',
2139 'capabilities' => 'moodle/competency:planviewown',
2140 'ajax' => true,
2141 ),
2142 'core_competency_delete_plan' => array(
2143 'classname' => 'core_competency\external',
2144 'methodname' => 'delete_plan',
2145 'classpath' => '',
2146 'description' => 'Delete a learning plan.',
2147 'type' => 'write',
2148 'capabilities' => 'moodle/competency:planmanage',
2149 'ajax' => true,
2150 ),
2151 'core_competency_list_user_plans' => array(
2152 'classname' => 'core_competency\external',
2153 'methodname' => 'list_user_plans',
2154 'classpath' => '',
2155 'description' => 'List a user\'s learning plans.',
2156 'type' => 'read',
2157 'capabilities' => 'moodle/competency:planviewown',
2158 'ajax' => true,
2159 ),
2160 'core_competency_list_plan_competencies' => array(
2161 'classname' => 'core_competency\external',
2162 'methodname' => 'list_plan_competencies',
2163 'classpath' => '',
2164 'description' => 'List the competencies in a plan',
2165 'type' => 'read',
2166 'capabilities' => 'moodle/competency:planviewown',
2167 'ajax' => true,
2168 ),
2169 'core_competency_add_competency_to_plan' => array(
2170 'classname' => 'core_competency\external',
2171 'methodname' => 'add_competency_to_plan',
2172 'classpath' => '',
2173 'description' => 'Add the competency to a learning plan',
2174 'type' => 'write',
2175 'capabilities' => 'moodle/competency:planmanage',
2176 'ajax' => true,
2177 ),
2178 'core_competency_remove_competency_from_plan' => array(
2179 'classname' => 'core_competency\external',
2180 'methodname' => 'remove_competency_from_plan',
2181 'classpath' => '',
2182 'description' => 'Remove the competency from a learning plan',
2183 'type' => 'write',
2184 'capabilities' => 'moodle/competency:planmanage',
2185 'ajax' => true,
2186 ),
2187 'core_competency_reorder_plan_competency' => array(
2188 'classname' => 'core_competency\external',
2189 'methodname' => 'reorder_plan_competency',
2190 'classpath' => '',
2191 'description' => 'Move a plan competency to a new relative sort order.',
2192 'type' => 'write',
2193 'capabilities' => 'moodle/competency:planmanage',
2194 'ajax' => true,
2195 ),
2196 'core_competency_plan_request_review' => array(
2197 'classname' => 'core_competency\external',
2198 'methodname' => 'plan_request_review',
2199 'classpath' => '',
2200 'description' => 'Request for a plan to be reviewed.',
2201 'type' => 'write',
2202 'capabilities' => 'moodle/competency:planmanagedraft',
2203 'ajax' => true,
2204 ),
2205 'core_competency_plan_start_review' => array(
2206 'classname' => 'core_competency\external',
2207 'methodname' => 'plan_start_review',
2208 'classpath' => '',
2209 'description' => 'Start the review of a plan.',
2210 'type' => 'write',
2211 'capabilities' => 'moodle/competency:planmanage',
2212 'ajax' => true,
2213 ),
2214 'core_competency_plan_stop_review' => array(
2215 'classname' => 'core_competency\external',
2216 'methodname' => 'plan_stop_review',
2217 'classpath' => '',
2218 'description' => 'Stop the review of a plan.',
2219 'type' => 'write',
2220 'capabilities' => 'moodle/competency:planmanage',
2221 'ajax' => true,
2222 ),
2223 'core_competency_plan_cancel_review_request' => array(
2224 'classname' => 'core_competency\external',
2225 'methodname' => 'plan_cancel_review_request',
2226 'classpath' => '',
2227 'description' => 'Cancel the review of a plan.',
2228 'type' => 'write',
2229 'capabilities' => 'moodle/competency:planmanagedraft',
2230 'ajax' => true,
2231 ),
2232 'core_competency_approve_plan' => array(
2233 'classname' => 'core_competency\external',
2234 'methodname' => 'approve_plan',
2235 'classpath' => '',
2236 'description' => 'Approve a plan.',
2237 'type' => 'write',
2238 'capabilities' => 'moodle/competency:planmanage',
2239 'ajax' => true,
2240 ),
2241 'core_competency_unapprove_plan' => array(
2242 'classname' => 'core_competency\external',
2243 'methodname' => 'unapprove_plan',
2244 'classpath' => '',
2245 'description' => 'Unapprove a plan.',
2246 'type' => 'write',
2247 'capabilities' => 'moodle/competency:planmanage',
2248 'ajax' => true,
2249 ),
2250 'core_competency_template_has_related_data' => array(
2251 'classname' => 'core_competency\external',
2252 'methodname' => 'template_has_related_data',
2253 'classpath' => '',
2254 'description' => 'Check if a template has related data',
2255 'type' => 'read',
2256 'capabilities' => 'moodle/competency:templateview',
2257 'ajax' => true,
2258 ),
2259 'core_competency_get_scale_values' => array(
2260 'classname' => 'core_competency\external',
2261 'methodname' => 'get_scale_values',
2262 'classpath' => '',
2263 'description' => 'Fetch the values for a specific scale',
2264 'type' => 'read',
2265 'capabilities' => 'moodle/competency:competencymanage',
2266 'ajax' => true,
3123c2cf 2267 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
2268 ),
2269 'core_competency_add_related_competency' => array(
2270 'classname' => 'core_competency\external',
2271 'methodname' => 'add_related_competency',
2272 'classpath' => '',
2273 'description' => 'Adds a related competency',
2274 'type' => 'write',
2275 'capabilities' => 'moodle/competency:competencymanage',
2276 'ajax' => true,
2277 ),
2278 'core_competency_remove_related_competency' => array(
2279 'classname' => 'core_competency\external',
2280 'methodname' => 'remove_related_competency',
2281 'classpath' => '',
2282 'description' => 'Remove a related competency',
2283 'type' => 'write',
2284 'capabilities' => 'moodle/competency:competencymanage',
2285 'ajax' => true,
2286 ),
2287 'core_competency_read_user_evidence' => array(
2288 'classname' => 'core_competency\external',
2289 'methodname' => 'read_user_evidence',
2290 'classpath' => '',
2291 'description' => 'Read an evidence of prior learning.',
2292 'type' => 'read',
2293 'capabilities' => 'moodle/competency:userevidenceview',
2294 'ajax' => true,
2295 ),
2296 'core_competency_delete_user_evidence' => array(
2297 'classname' => 'core_competency\external',
2298 'methodname' => 'delete_user_evidence',
2299 'classpath' => '',
2300 'description' => 'Delete an evidence of prior learning.',
2301 'type' => 'write',
2302 'capabilities' => 'moodle/competency:userevidencemanageown',
2303 'ajax' => true,
2304 ),
2305 'core_competency_create_user_evidence_competency' => array(
2306 'classname' => 'core_competency\external',
2307 'methodname' => 'create_user_evidence_competency',
2308 'classpath' => '',
2309 'description' => 'Create an evidence of prior learning relationship with a competency.',
2310 'type' => 'read',
2311 'capabilities' => 'moodle/competency:userevidencemanageown, moodle/competency:competencyview',
2312 'ajax' => true,
2313 ),
2314 'core_competency_delete_user_evidence_competency' => array(
2315 'classname' => 'core_competency\external',
2316 'methodname' => 'delete_user_evidence_competency',
2317 'classpath' => '',
2318 'description' => 'Delete an evidence of prior learning relationship with a competency.',
2319 'type' => 'write',
2320 'capabilities' => 'moodle/competency:userevidencemanageown',
2321 'ajax' => true,
2322 ),
2323 'core_competency_user_competency_cancel_review_request' => array(
2324 'classname' => 'core_competency\external',
2325 'methodname' => 'user_competency_cancel_review_request',
2326 'classpath' => '',
2327 'description' => 'Cancel a review request.',
2328 'type' => 'write',
2329 'capabilities' => 'moodle/competency:userevidencemanageown',
2330 'ajax' => true,
2331 ),
2332 'core_competency_user_competency_request_review' => array(
2333 'classname' => 'core_competency\external',
2334 'methodname' => 'user_competency_request_review',
2335 'classpath' => '',
2336 'description' => 'Request a review.',
2337 'type' => 'write',
2338 'capabilities' => 'moodle/competency:userevidencemanageown',
2339 'ajax' => true,
2340 ),
2341 'core_competency_user_competency_start_review' => array(
2342 'classname' => 'core_competency\external',
2343 'methodname' => 'user_competency_start_review',
2344 'classpath' => '',
2345 'description' => 'Start a review.',
2346 'type' => 'write',
2347 'capabilities' => 'moodle/competency:competencygrade',
2348 'ajax' => true,
2349 ),
2350 'core_competency_user_competency_stop_review' => array(
2351 'classname' => 'core_competency\external',
2352 'methodname' => 'user_competency_stop_review',
2353 'classpath' => '',
2354 'description' => 'Stop a review.',
2355 'type' => 'write',
2356 'capabilities' => 'moodle/competency:competencygrade',
2357 'ajax' => true,
2358 ),
2359 'core_competency_user_competency_viewed' => array(
2360 'classname' => 'core_competency\external',
2361 'methodname' => 'user_competency_viewed',
2362 'classpath' => '',
2363 'description' => 'Log the user competency viewed event.',
2364 'type' => 'read',
2365 'capabilities' => 'moodle/competency:usercompetencyview',
2366 'ajax' => true,
3123c2cf 2367 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
2368 ),
2369 'core_competency_user_competency_viewed_in_plan' => array(
2370 'classname' => 'core_competency\external',
2371 'methodname' => 'user_competency_viewed_in_plan',
2372 'classpath' => '',
2373 'description' => 'Log the user competency viewed in plan event.',
2374 'type' => 'read',
2375 'capabilities' => 'moodle/competency:usercompetencyview',
2376 'ajax' => true,
3123c2cf 2377 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
2378 ),
2379 'core_competency_user_competency_viewed_in_course' => array(
2380 'classname' => 'core_competency\external',
2381 'methodname' => 'user_competency_viewed_in_course',
2382 'classpath' => '',
2383 'description' => 'Log the user competency viewed in course event',
2384 'type' => 'read',
2385 'capabilities' => 'moodle/competency:usercompetencyview',
2386 'ajax' => true,
3123c2cf 2387 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
2388 ),
2389 'core_competency_user_competency_plan_viewed' => array(
2390 'classname' => 'core_competency\external',
2391 'methodname' => 'user_competency_plan_viewed',
2392 'classpath' => '',
2393 'description' => 'Log the user competency plan viewed event.',
2394 'type' => 'read',
2395 'capabilities' => 'moodle/competency:usercompetencyview',
2396 'ajax' => true,
3123c2cf 2397 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
2398 ),
2399 'core_competency_grade_competency' => array(
2400 'classname' => 'core_competency\external',
2401 'methodname' => 'grade_competency',
2402 'classpath' => '',
2403 'description' => 'Grade a competency.',
2404 'type' => 'write',
2405 'capabilities' => 'moodle/competency:competencygrade',
2406 'ajax' => true,
2407 ),
2408 'core_competency_grade_competency_in_plan' => array(
2409 'classname' => 'core_competency\external',
2410 'methodname' => 'grade_competency_in_plan',
2411 'classpath' => '',
2412 'description' => 'Grade a competency from the user plan page.',
2413 'type' => 'write',
2414 'capabilities' => 'moodle/competency:competencygrade',
2415 'ajax' => true,
2416 ),
2417 'core_competency_grade_competency_in_course' => array(
2418 'classname' => 'core_competency\external',
2419 'methodname' => 'grade_competency_in_course',
2420 'classpath' => '',
2421 'description' => 'Grade a competency from the course page.',
2422 'type' => 'write',
2423 'capabilities' => 'moodle/competency:competencygrade',
2424 'ajax' => true,
3123c2cf 2425 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
2426 ),
2427 'core_competency_unlink_plan_from_template' => array(
2428 'classname' => 'core_competency\external',
2429 'methodname' => 'unlink_plan_from_template',
2430 'classpath' => '',
2431 'description' => 'Unlink a plan form it template.',
2432 'type' => 'write',
2433 'capabilities' => 'moodle/competency:planmanage',
2434 'ajax' => true,
2435 ),
2436 'core_competency_template_viewed' => array(
2437 'classname' => 'core_competency\external',
2438 'methodname' => 'template_viewed',
2439 'classpath' => '',
2440 'description' => 'Log event template viewed',
2441 'type' => 'read',
2442 'capabilities' => 'moodle/competency:templateview',
2443 'ajax' => true,
2444 ),
2445 'core_competency_request_review_of_user_evidence_linked_competencies' => array(
2446 'classname' => 'core_competency\external',
2447 'methodname' => 'request_review_of_user_evidence_linked_competencies',
2448 'classpath' => '',
2449 'description' => 'Send user evidence competencies in review',
2450 'type' => 'write',
2451 'capabilities' => 'moodle/competency:userevidencemanageown',
2452 'ajax' => true,
2453 ),
2454 'core_competency_update_course_competency_settings' => array(
2455 'classname' => 'core_competency\external',
2456 'methodname' => 'update_course_competency_settings',
2457 'classpath' => '',
2458 'description' => 'Update the course competency settings',
2459 'type' => 'write',
2460 'capabilities' => 'moodle/competency:coursecompetencyconfigure',
2461 'ajax' => true,
2462 ),
1e99f31e
FM
2463 'core_competency_delete_evidence' => array(
2464 'classname' => 'core_competency\external',
2465 'methodname' => 'delete_evidence',
2466 'classpath' => '',
2467 'description' => 'Delete an evidence',
2468 'type' => 'write',
2469 'capabilities' => 'moodle/competency:evidencedelete',
2470 'ajax' => true,
3123c2cf 2471 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1e99f31e 2472 ),
f23e9b6b
CB
2473
2474 'core_webservice_get_site_info' => array(
2475 'classname' => 'core_webservice_external',
2476 'methodname' => 'get_site_info',
2477 'classpath' => 'webservice/externallib.php',
2478 'description' => 'Return some site info / user info / list web service functions',
2479 'type' => 'read',
ee7295ee 2480 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
8446ba36
JL
2481 ),
2482
2483 // Blocks functions.
2484 'core_block_get_course_blocks' => array(
2485 'classname' => 'core_block_external',
2486 'methodname' => 'get_course_blocks',
2487 'description' => 'Returns blocks information for a course.',
2488 'type' => 'read',
2489 'capabilities' => '',
2490 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2491 ),
66ef16d3 2492
0f8b2604
JL
2493 'core_block_get_dashboard_blocks' => array(
2494 'classname' => 'core_block_external',
2495 'methodname' => 'get_dashboard_blocks',
2496 'description' => 'Returns blocks information for the given user dashboard.',
2497 'type' => 'read',
2498 'capabilities' => '',
2499 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2500 ),
2501
66ef16d3
JL
2502 // Filters functions.
2503 'core_filters_get_available_in_context' => array(
2504 'classname' => 'core_filters\external',
2505 'methodname' => 'get_available_in_context',
2506 'description' => 'Returns the filters available in the given contexts.',
2507 'type' => 'read',
2508 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
3cfff885 2509 ),
1eeb465a
TBM
2510 'core_customfield_delete_field' => array(
2511 'classname' => 'core_customfield_external',
2512 'methodname' => 'delete_field',
2513 'classpath' => 'customfield/externallib.php',
2514 'description' => 'Deletes an entry',
2515 'type' => 'write',
2516 'ajax' => 'true'
2517 ),
2518 'core_customfield_reload_template' => array(
2519 'classname' => 'core_customfield_external',
2520 'methodname' => 'reload_template',
2521 'classpath' => 'customfield/externallib.php',
2522 'description' => 'Reloads template',
2523 'type' => 'read',
2524 'ajax' => 'true'
2525 ),
2526 'core_customfield_create_category' => array(
2527 'classname' => 'core_customfield_external',
2528 'methodname' => 'create_category',
2529 'classpath' => 'customfield/externallib.php',
2530 'description' => 'Creates a new category',
2531 'type' => 'write',
2532 'ajax' => 'true'
2533 ),
2534 'core_customfield_delete_category' => array(
2535 'classname' => 'core_customfield_external',
2536 'methodname' => 'delete_category',
2537 'classpath' => 'customfield/externallib.php',
2538 'description' => 'Deletes a category',
2539 'type' => 'write',
2540 'ajax' => 'true'
2541 ),
2542 'core_customfield_move_field' => array(
2543 'classname' => 'core_customfield_external',
2544 'methodname' => 'move_field',
2545 'classpath' => 'customfield/externallib.php',
2546 'description' => 'Drag and drop',
2547 'type' => 'write',
2548 'ajax' => 'true'
2549 ),
2550 'core_customfield_move_category' => array(
2551 'classname' => 'core_customfield_external',
2552 'methodname' => 'move_category',
2553 'classpath' => 'customfield/externallib.php',
2554 'description' => 'Drag and drop categories',
2555 'type' => 'write',
2556 'ajax' => 'true'
2557 )
9a0df45a 2558);
c1b65883
JM
2559
2560$services = array(
96e0194c 2561 'Moodle mobile web service' => array(
12c52b91 2562 'functions' => array(), // Unused as we add the service in each function definition, third party services would use this.
96e0194c
SH
2563 'enabled' => 0,
2564 'restrictedusers' => 0,
af03513f 2565 'shortname' => MOODLE_OFFICIAL_MOBILE_SERVICE,
106c55fb
DW
2566 'downloadfiles' => 1,
2567 'uploadfiles' => 1
96e0194c
SH
2568 ),
2569);