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