Merge branch 'MDL-81065-master' of https://github.com/jleyva/moodle
[moodle.git] / lib / db / services.php
blob672509c38b34440eacf133b72e6c5ddbb7226a88
1 <?php
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.
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/>.
18 /**
19 * Core external functions and service definitions.
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.
25 * For more information, take a look to the documentation available:
26 * - Webservices API: {@link https://moodledev.io/docs/apis/subsystems/external/writing-a-service}
27 * - External API: {@link https://moodledev.io/docs/apis/subsystems/external/functions}
28 * - Upgrade API: {@link https://moodledev.io/docs/guides/upgrade}
30 * @package core_webservice
31 * @category webservice
32 * @copyright 2009 Petr Skodak
33 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
36 $functions = array(
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,
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,
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',
58 'ajax' => true,
59 'loginrequired' => false,
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,
67 'loginrequired' => false,
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,
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,
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,
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,
104 'core_backup_get_copy_progress' => array(
105 'classname' => 'core_backup_external',
106 'classpath' => 'backup/externallib.php',
107 'methodname' => 'get_copy_progress',
108 'description' => 'Gets the progress of course copy operations.',
109 'type' => 'read',
110 'ajax' => true,
111 'loginrequired' => true,
113 'core_backup_submit_copy_form' => array(
114 'classname' => 'core_backup_external',
115 'classpath' => 'backup/externallib.php',
116 'methodname' => 'submit_copy_form',
117 'description' => 'Handles ajax submission of course copy form.',
118 'type' => 'read',
119 'ajax' => true,
120 'loginrequired' => true,
122 'core_badges_get_user_badges' => array(
123 'classname' => 'core_badges_external',
124 'methodname' => 'get_user_badges',
125 'description' => 'Returns the list of badges awarded to a user.',
126 'type' => 'read',
127 'capabilities' => 'moodle/badges:viewotherbadges',
128 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
130 'core_badges_get_user_badge_by_hash' => [
131 'classname' => 'core_badges\external\get_user_badge_by_hash',
132 'description' => 'Returns the badge awarded to a user by hash.',
133 'type' => 'read',
134 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
136 'core_blog_get_entries' => array(
137 'classname' => 'core_blog\external',
138 'methodname' => 'get_entries',
139 'description' => 'Returns blog entries.',
140 'type' => 'read',
141 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
142 'ajax' => true,
143 'loginrequired' => false,
145 'core_blog_view_entries' => array(
146 'classname' => 'core_blog\external',
147 'methodname' => 'view_entries',
148 'description' => 'Trigger the blog_entries_viewed event.',
149 'type' => 'read',
150 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
151 'ajax' => true,
152 'loginrequired' => false,
154 'core_blog_get_access_information' => [
155 'classname' => '\core_blog\external\get_access_information',
156 'description' => 'Retrieves permission information for the current user.',
157 'type' => 'read',
158 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
160 'core_blog_add_entry' => [
161 'classname' => '\core_blog\external\add_entry',
162 'description' => 'Creates a new blog post entry.',
163 'type' => 'write',
164 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
166 'core_blog_delete_entry' => [
167 'classname' => '\core_blog\external\delete_entry',
168 'description' => 'Deletes a blog post entry.',
169 'type' => 'write',
170 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
172 'core_blog_prepare_entry_for_edition' => [
173 'classname' => '\core_blog\external\prepare_entry_for_edition',
174 'description' => 'Prepare a draft area for editing a blog entry..',
175 'type' => 'write',
176 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
178 'core_blog_update_entry' => [
179 'classname' => '\core_blog\external\update_entry',
180 'description' => 'Updates a blog entry.',
181 'type' => 'write',
182 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
184 'core_calendar_get_calendar_monthly_view' => array(
185 'classname' => 'core_calendar_external',
186 'methodname' => 'get_calendar_monthly_view',
187 'description' => 'Fetch the monthly view data for a calendar',
188 'classpath' => 'calendar/externallib.php',
189 'type' => 'read',
190 'capabilities' => '',
191 'ajax' => true,
192 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
194 'core_calendar_get_calendar_day_view' => array(
195 'classname' => 'core_calendar_external',
196 'methodname' => 'get_calendar_day_view',
197 'description' => 'Fetch the day view data for a calendar',
198 'classpath' => 'calendar/externallib.php',
199 'type' => 'read',
200 'capabilities' => '',
201 'ajax' => true,
202 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
204 'core_calendar_get_calendar_upcoming_view' => array(
205 'classname' => 'core_calendar_external',
206 'methodname' => 'get_calendar_upcoming_view',
207 'description' => 'Fetch the upcoming view data for a calendar',
208 'classpath' => 'calendar/externallib.php',
209 'type' => 'read',
210 'capabilities' => '',
211 'ajax' => true,
212 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
214 'core_calendar_update_event_start_day' => array(
215 'classname' => 'core_calendar_external',
216 'methodname' => 'update_event_start_day',
217 'description' => 'Update the start day (but not time) for an event.',
218 'classpath' => 'calendar/externallib.php',
219 'type' => 'write',
220 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
221 'ajax' => true,
222 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
224 'core_calendar_create_calendar_events' => array(
225 'classname' => 'core_calendar_external',
226 'methodname' => 'create_calendar_events',
227 'description' => 'Create calendar events',
228 'classpath' => 'calendar/externallib.php',
229 'type' => 'write',
230 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
231 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
233 'core_calendar_delete_calendar_events' => array(
234 'classname' => 'core_calendar_external',
235 'methodname' => 'delete_calendar_events',
236 'description' => 'Delete calendar events',
237 'classpath' => 'calendar/externallib.php',
238 'type' => 'write',
239 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
240 'ajax' => true,
241 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
243 'core_calendar_get_calendar_events' => array(
244 'classname' => 'core_calendar_external',
245 'methodname' => 'get_calendar_events',
246 'description' => 'Get calendar events',
247 'classpath' => 'calendar/externallib.php',
248 'type' => 'read',
249 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
250 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
252 'core_calendar_get_action_events_by_timesort' => array(
253 'classname' => 'core_calendar_external',
254 'methodname' => 'get_calendar_action_events_by_timesort',
255 'description' => 'Get calendar action events by tiemsort',
256 'classpath' => 'calendar/externallib.php',
257 'type' => 'read',
258 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
259 'ajax' => true,
260 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
261 'readonlysession' => true,
263 'core_calendar_get_action_events_by_course' => array(
264 'classname' => 'core_calendar_external',
265 'methodname' => 'get_calendar_action_events_by_course',
266 'description' => 'Get calendar action events by course',
267 'classpath' => 'calendar/externallib.php',
268 'type' => 'read',
269 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
270 'ajax' => true,
271 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
273 'core_calendar_get_action_events_by_courses' => array(
274 'classname' => 'core_calendar_external',
275 'methodname' => 'get_calendar_action_events_by_courses',
276 'description' => 'Get calendar action events by courses',
277 'classpath' => 'calendar/externallib.php',
278 'type' => 'read',
279 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
280 'ajax' => true,
281 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
283 'core_calendar_get_calendar_event_by_id' => array(
284 'classname' => 'core_calendar_external',
285 'methodname' => 'get_calendar_event_by_id',
286 'description' => 'Get calendar event by id',
287 'classpath' => 'calendar/externallib.php',
288 'type' => 'read',
289 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
290 'ajax' => true,
291 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
293 'core_calendar_submit_create_update_form' => array(
294 'classname' => 'core_calendar_external',
295 'methodname' => 'submit_create_update_form',
296 'description' => 'Submit form data for event form',
297 'classpath' => 'calendar/externallib.php',
298 'type' => 'write',
299 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
300 'ajax' => true,
301 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
303 'core_calendar_get_calendar_access_information' => array(
304 'classname' => 'core_calendar_external',
305 'methodname' => 'get_calendar_access_information',
306 'description' => 'Convenience function to retrieve some permissions/access information for the given course calendar.',
307 'classpath' => 'calendar/externallib.php',
308 'type' => 'read',
309 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
311 'core_calendar_get_allowed_event_types' => array(
312 'classname' => 'core_calendar_external',
313 'methodname' => 'get_allowed_event_types',
314 'description' => 'Get the type of events a user can create in the given course.',
315 'classpath' => 'calendar/externallib.php',
316 'type' => 'read',
317 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
319 'core_calendar_get_timestamps' => [
320 'classname' => 'core_calendar_external',
321 'methodname' => 'get_timestamps',
322 'description' => 'Fetch unix timestamps for given date times.',
323 'classpath' => 'calendar/externallib.php',
324 'type' => 'read',
325 'ajax' => true,
327 'core_calendar_get_calendar_export_token' => [
328 'classname' => 'core_calendar\external\export\token',
329 'description' => 'Return the auth token required for exporting a calendar.',
330 'type' => 'read',
331 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
333 'core_calendar_delete_subscription' => [
334 'classname' => 'core_calendar\external\subscription\delete',
335 'description' => 'Delete the calendar subscription',
336 'type' => 'write',
337 'ajax' => true
339 'core_check_get_result_admintree' => [
340 'classname' => 'core\check\external\get_result_admintree',
341 'description' => 'Executes a check stored in the admin tree and returns the result',
342 'type' => 'read',
343 'ajax' => true,
344 'readonlysession' => true,
346 'core_cohort_add_cohort_members' => array(
347 'classname' => 'core_cohort_external',
348 'methodname' => 'add_cohort_members',
349 'classpath' => 'cohort/externallib.php',
350 'description' => 'Adds cohort members.',
351 'type' => 'write',
352 'capabilities' => 'moodle/cohort:assign'
354 'core_cohort_create_cohorts' => array(
355 'classname' => 'core_cohort_external',
356 'methodname' => 'create_cohorts',
357 'classpath' => 'cohort/externallib.php',
358 'description' => 'Creates new cohorts.',
359 'type' => 'write',
360 'capabilities' => 'moodle/cohort:manage'
362 'core_cohort_delete_cohort_members' => array(
363 'classname' => 'core_cohort_external',
364 'methodname' => 'delete_cohort_members',
365 'classpath' => 'cohort/externallib.php',
366 'description' => 'Deletes cohort members.',
367 'type' => 'write',
368 'capabilities' => 'moodle/cohort:assign'
370 'core_cohort_delete_cohorts' => array(
371 'classname' => 'core_cohort_external',
372 'methodname' => 'delete_cohorts',
373 'classpath' => 'cohort/externallib.php',
374 'description' => 'Deletes all specified cohorts.',
375 'type' => 'write',
376 'capabilities' => 'moodle/cohort:manage'
378 'core_cohort_get_cohort_members' => array(
379 'classname' => 'core_cohort_external',
380 'methodname' => 'get_cohort_members',
381 'classpath' => 'cohort/externallib.php',
382 'description' => 'Returns cohort members.',
383 'type' => 'read',
384 'capabilities' => 'moodle/cohort:view'
386 'core_cohort_search_cohorts' => array(
387 'classname' => 'core_cohort_external',
388 'methodname' => 'search_cohorts',
389 'classpath' => 'cohort/externallib.php',
390 'description' => 'Search for cohorts.',
391 'type' => 'read',
392 'ajax' => true,
393 'capabilities' => 'moodle/cohort:view'
395 'core_cohort_get_cohorts' => array(
396 'classname' => 'core_cohort_external',
397 'methodname' => 'get_cohorts',
398 'classpath' => 'cohort/externallib.php',
399 'description' => 'Returns cohort details.',
400 'type' => 'read',
401 'capabilities' => 'moodle/cohort:view'
403 'core_cohort_update_cohorts' => array(
404 'classname' => 'core_cohort_external',
405 'methodname' => 'update_cohorts',
406 'classpath' => 'cohort/externallib.php',
407 'description' => 'Updates existing cohorts.',
408 'type' => 'write',
409 'capabilities' => 'moodle/cohort:manage'
411 'core_comment_get_comments' => array(
412 'classname' => 'core_comment_external',
413 'methodname' => 'get_comments',
414 'description' => 'Returns comments.',
415 'type' => 'read',
416 'capabilities' => 'moodle/comment:view',
417 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
419 'core_comment_add_comments' => array(
420 'classname' => 'core_comment_external',
421 'methodname' => 'add_comments',
422 'description' => 'Adds a comment or comments.',
423 'type' => 'write',
424 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
426 'core_comment_delete_comments' => array(
427 'classname' => 'core_comment_external',
428 'methodname' => 'delete_comments',
429 'description' => 'Deletes a comment or comments.',
430 'type' => 'write',
431 'ajax' => true,
432 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
434 'core_completion_get_activities_completion_status' => array(
435 'classname' => 'core_completion_external',
436 'methodname' => 'get_activities_completion_status',
437 'description' => 'Return the activities completion status for a user in a course.',
438 'type' => 'read',
439 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
441 'core_completion_get_course_completion_status' => array(
442 'classname' => 'core_completion_external',
443 'methodname' => 'get_course_completion_status',
444 'description' => 'Returns course completion status.',
445 'type' => 'read',
446 'capabilities' => 'report/completion:view',
447 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
449 'core_completion_mark_course_self_completed' => array(
450 'classname' => 'core_completion_external',
451 'methodname' => 'mark_course_self_completed',
452 'description' => 'Update the course completion status for the current user (if course self-completion is enabled).',
453 'type' => 'write',
454 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
456 'core_completion_update_activity_completion_status_manually' => array(
457 'classname' => 'core_completion_external',
458 'methodname' => 'update_activity_completion_status_manually',
459 'description' => 'Update completion status for the current user in an activity, only for activities with manual tracking.',
460 'type' => 'write',
461 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
462 'ajax' => true,
464 'core_completion_override_activity_completion_status' => array(
465 'classname' => 'core_completion_external',
466 'methodname' => 'override_activity_completion_status',
467 'description' => 'Update completion status for a user in an activity by overriding it.',
468 'type' => 'write',
469 'capabilities' => 'moodle/course:overridecompletion',
470 'ajax' => true,
472 'core_course_create_categories' => array(
473 'classname' => 'core_course_external',
474 'methodname' => 'create_categories',
475 'classpath' => 'course/externallib.php',
476 'description' => 'Create course categories',
477 'type' => 'write',
478 'capabilities' => 'moodle/category:manage'
480 'core_course_create_courses' => array(
481 'classname' => 'core_course_external',
482 'methodname' => 'create_courses',
483 'classpath' => 'course/externallib.php',
484 'description' => 'Create new courses',
485 'type' => 'write',
486 'capabilities' => 'moodle/course:create, moodle/course:visibility'
488 'core_course_delete_categories' => array(
489 'classname' => 'core_course_external',
490 'methodname' => 'delete_categories',
491 'classpath' => 'course/externallib.php',
492 'description' => 'Delete course categories',
493 'type' => 'write',
494 'capabilities' => 'moodle/category:manage'
496 'core_course_delete_courses' => array(
497 'classname' => 'core_course_external',
498 'methodname' => 'delete_courses',
499 'classpath' => 'course/externallib.php',
500 'description' => 'Deletes all specified courses',
501 'type' => 'write',
502 'capabilities' => 'moodle/course:delete'
504 'core_course_delete_modules' => array(
505 'classname' => 'core_course_external',
506 'methodname' => 'delete_modules',
507 'classpath' => 'course/externallib.php',
508 'description' => 'Deletes all specified module instances',
509 'type' => 'write',
510 'capabilities' => 'moodle/course:manageactivities'
512 'core_course_duplicate_course' => array(
513 'classname' => 'core_course_external',
514 'methodname' => 'duplicate_course',
515 'classpath' => 'course/externallib.php',
516 'description' => 'Duplicate an existing course (creating a new one).',
517 'type' => 'write',
518 'capabilities' => 'moodle/backup:backupcourse, moodle/restore:restorecourse, moodle/course:create'
520 'core_course_get_categories' => array(
521 'classname' => 'core_course_external',
522 'methodname' => 'get_categories',
523 'classpath' => 'course/externallib.php',
524 'description' => 'Return category details',
525 'type' => 'read',
526 'capabilities' => 'moodle/category:viewhiddencategories',
527 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
529 'core_course_get_contents' => array(
530 'classname' => 'core_course_external',
531 'methodname' => 'get_course_contents',
532 'classpath' => 'course/externallib.php',
533 'description' => 'Get course contents',
534 'type' => 'read',
535 'capabilities' => 'moodle/course:update, moodle/course:viewhiddencourses',
536 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
538 'core_course_get_course_module' => array(
539 'classname' => 'core_course_external',
540 'methodname' => 'get_course_module',
541 'classpath' => 'course/externallib.php',
542 'description' => 'Return information about a course module',
543 'type' => 'read',
544 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
546 'core_course_get_course_module_by_instance' => array(
547 'classname' => 'core_course_external',
548 'methodname' => 'get_course_module_by_instance',
549 'classpath' => 'course/externallib.php',
550 'description' => 'Return information about a given module name and instance id',
551 'type' => 'read',
552 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
554 'core_course_get_module' => array(
555 'classname' => 'core_course_external',
556 'methodname' => 'get_module',
557 'classpath' => 'course/externallib.php',
558 'description' => 'Returns html with one activity module on course page',
559 'type' => 'read',
560 'ajax' => true,
562 'core_courseformat_file_handlers' => [
563 'classname' => 'core_courseformat\external\file_handlers',
564 'description' => 'Get the current course file hanlders.',
565 'type' => 'read',
566 'ajax' => true,
568 'core_courseformat_get_state' => [
569 'classname' => 'core_courseformat\external\get_state',
570 'description' => 'Get the current course state.',
571 'type' => 'read',
572 'ajax' => true,
574 'core_courseformat_update_course' => [
575 'classname' => 'core_courseformat\external\update_course',
576 'methodname' => 'execute',
577 'description' => 'Update course contents.',
578 'type' => 'write',
579 'ajax' => true,
580 'capabilities' => 'moodle/course:sectionvisibility, moodle/course:activityvisibility',
582 'core_course_edit_module' => array(
583 'classname' => 'core_course_external',
584 'methodname' => 'edit_module',
585 'classpath' => 'course/externallib.php',
586 'description' => 'Performs an action on course module (change visibility, duplicate, delete, etc.)',
587 'type' => 'write',
588 'ajax' => true,
590 'core_course_edit_section' => array(
591 'classname' => 'core_course_external',
592 'methodname' => 'edit_section',
593 'classpath' => 'course/externallib.php',
594 'description' => 'Performs an action on course section (change visibility, set marker, delete)',
595 'type' => 'write',
596 'ajax' => true,
598 'core_course_get_courses' => array(
599 'classname' => 'core_course_external',
600 'methodname' => 'get_courses',
601 'classpath' => 'course/externallib.php',
602 'description' => 'Return course details',
603 'type' => 'read',
604 'capabilities' => 'moodle/course:view, moodle/course:update, moodle/course:viewhiddencourses',
605 'ajax' => true,
606 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
608 'core_course_import_course' => array(
609 'classname' => 'core_course_external',
610 'methodname' => 'import_course',
611 'classpath' => 'course/externallib.php',
612 'description' => 'Import course data from a course into another course. Does not include any user data.',
613 'type' => 'write',
614 'capabilities' => 'moodle/backup:backuptargetimport, moodle/restore:restoretargetimport'
616 'core_course_search_courses' => array(
617 'classname' => 'core_course_external',
618 'methodname' => 'search_courses',
619 'classpath' => 'course/externallib.php',
620 'description' => 'Search courses by (name, module, block, tag)',
621 'type' => 'read',
622 'ajax' => true,
623 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
625 'core_course_update_categories' => array(
626 'classname' => 'core_course_external',
627 'methodname' => 'update_categories',
628 'classpath' => 'course/externallib.php',
629 'description' => 'Update categories',
630 'type' => 'write',
631 'capabilities' => 'moodle/category:manage',
633 'core_course_update_courses' => array(
634 'classname' => 'core_course_external',
635 'methodname' => 'update_courses',
636 'classpath' => 'course/externallib.php',
637 'description' => 'Update courses',
638 'type' => 'write',
639 'capabilities' => 'moodle/course:update, moodle/course:changecategory, moodle/course:changefullname, '
640 . 'moodle/course:changeshortname, moodle/course:changeidnumber, moodle/course:changesummary, moodle/course:visibility'
642 'core_course_view_course' => array(
643 'classname' => 'core_course_external',
644 'methodname' => 'view_course',
645 'classpath' => 'course/externallib.php',
646 'description' => 'Log that the course was viewed',
647 'type' => 'write',
648 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
650 'core_course_get_user_navigation_options' => array(
651 'classname' => 'core_course_external',
652 'methodname' => 'get_user_navigation_options',
653 'classpath' => 'course/externallib.php',
654 'description' => 'Return a list of navigation options in a set of courses that are avaialable or not for the current user.',
655 'type' => 'read',
656 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
658 'core_course_get_user_administration_options' => array(
659 'classname' => 'core_course_external',
660 'methodname' => 'get_user_administration_options',
661 'classpath' => 'course/externallib.php',
662 'description' => 'Return a list of administration options in a set of courses that are avaialable or not for the current
663 user.',
664 'type' => 'read',
665 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
667 'core_course_get_courses_by_field' => array(
668 'classname' => 'core_course_external',
669 'methodname' => 'get_courses_by_field',
670 'classpath' => 'course/externallib.php',
671 'description' => 'Get courses matching a specific field (id/s, shortname, idnumber, category)',
672 'type' => 'read',
673 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
675 'core_course_check_updates' => array(
676 'classname' => 'core_course_external',
677 'methodname' => 'check_updates',
678 'classpath' => 'course/externallib.php',
679 'description' => 'Check if there is updates affecting the user for the given course and contexts.',
680 'type' => 'read',
681 'ajax' => true,
682 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
684 'core_course_get_updates_since' => array(
685 'classname' => 'core_course_external',
686 'methodname' => 'get_updates_since',
687 'classpath' => 'course/externallib.php',
688 'description' => 'Check if there are updates affecting the user for the given course since the given time stamp.',
689 'type' => 'read',
690 'ajax' => true,
691 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
693 'core_course_get_enrolled_courses_by_timeline_classification' => array(
694 'classname' => 'core_course_external',
695 'methodname' => 'get_enrolled_courses_by_timeline_classification',
696 'classpath' => 'course/externallib.php',
697 'description' => 'List of enrolled courses for the given timeline classification (past, inprogress, or future).',
698 'type' => 'read',
699 'ajax' => true,
700 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
702 'core_course_get_enrolled_courses_with_action_events_by_timeline_classification' => array(
703 'classname' => '\core_course\external\get_enrolled_courses_with_action_events_by_timeline_classification',
704 'methodname' => 'execute',
705 'classpath' => '',
706 'description' => 'List of enrolled courses with action events in a given timeframe, for the given timeline classification.',
707 'type' => 'read',
708 'ajax' => true,
709 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
710 'readonlysession' => true,
712 'core_course_get_recent_courses' => array(
713 'classname' => 'core_course_external',
714 'methodname' => 'get_recent_courses',
715 'classpath' => 'course/externallib.php',
716 'description' => 'List of courses a user has accessed most recently.',
717 'type' => 'read',
718 'ajax' => true,
719 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
721 'core_course_set_favourite_courses' => array(
722 'classname' => 'core_course_external',
723 'methodname' => 'set_favourite_courses',
724 'classpath' => 'course/externallib.php',
725 'description' => 'Add a list of courses to the list of favourite courses.',
726 'type' => 'read',
727 'ajax' => true,
728 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
730 'core_course_get_enrolled_users_by_cmid' => array(
731 'classname' => 'core_course_external',
732 'methodname' => 'get_enrolled_users_by_cmid',
733 'classpath' => 'course/externallib.php',
734 'description' => 'List users by course module id, filter by group and active enrolment status.',
735 'type' => 'read',
736 'ajax' => true,
738 'core_course_add_content_item_to_user_favourites' => array(
739 'classname' => 'core_course_external',
740 'methodname' => 'add_content_item_to_user_favourites',
741 'classpath' => 'course/externallib.php',
742 'description' => 'Adds a content item (activity, resource or their subtypes) to the favourites for the user.',
743 'type' => 'write',
744 'ajax' => true,
746 'core_course_remove_content_item_from_user_favourites' => array(
747 'classname' => 'core_course_external',
748 'methodname' => 'remove_content_item_from_user_favourites',
749 'classpath' => 'course/externallib.php',
750 'description' => 'Removes a content item (activity, resource or their subtypes) from the favourites for the user.',
751 'type' => 'write',
752 'ajax' => true,
754 'core_course_get_course_content_items' => array(
755 'classname' => 'core_course_external',
756 'methodname' => 'get_course_content_items',
757 'classpath' => 'course/externallib.php',
758 'description' => 'Fetch all the content items (activities, resources and their subtypes) for the activity picker',
759 'type' => 'read',
760 'ajax' => true,
762 'core_course_get_activity_chooser_footer' => array(
763 'classname' => 'core_course_external',
764 'methodname' => 'get_activity_chooser_footer',
765 'classpath' => 'course/externallib.php',
766 'description' => 'Fetch the data for the activity chooser footer.',
767 'type' => 'read',
768 'ajax' => true,
770 'core_course_toggle_activity_recommendation' => array(
771 'classname' => 'core_course_external',
772 'methodname' => 'toggle_activity_recommendation',
773 'classpath' => 'course/externallib.php',
774 'description' => 'Adds or removes an activity as a recommendation in the activity chooser.',
775 'type' => 'write',
776 'ajax' => true,
778 'core_enrol_get_course_enrolment_methods' => array(
779 'classname' => 'core_enrol_external',
780 'methodname' => 'get_course_enrolment_methods',
781 'classpath' => 'enrol/externallib.php',
782 'description' => 'Get the list of course enrolment methods',
783 'type' => 'read',
784 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
786 'core_enrol_get_enrolled_users' => array(
787 'classname' => 'core_enrol_external',
788 'methodname' => 'get_enrolled_users',
789 'classpath' => 'enrol/externallib.php',
790 'description' => 'Get enrolled users by course id.',
791 'type' => 'read',
792 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, '
793 . 'moodle/site:accessallgroups',
794 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
796 'core_enrol_get_enrolled_users_with_capability' => array(
797 'classname' => 'core_enrol_external',
798 'methodname' => 'get_enrolled_users_with_capability',
799 'classpath' => 'enrol/externallib.php',
800 'description' => 'For each course and capability specified, return a list of the users that are enrolled in the course
801 and have that capability',
802 'type' => 'read',
804 'core_enrol_get_potential_users' => array(
805 'classname' => 'core_enrol_external',
806 'methodname' => 'get_potential_users',
807 'classpath' => 'enrol/externallib.php',
808 'description' => 'Get the list of potential users to enrol',
809 'ajax' => true,
810 'type' => 'read',
811 'capabilities' => 'moodle/course:enrolreview'
813 'core_enrol_search_users' => [
814 'classname' => 'core_enrol_external',
815 'methodname' => 'search_users',
816 'classpath' => 'enrol/externallib.php',
817 'description' => 'Search within the list of course participants',
818 'ajax' => true,
819 'type' => 'read',
820 'capabilities' => 'moodle/course:viewparticipants',
821 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
823 'core_enrol_get_users_courses' => array(
824 'classname' => 'core_enrol_external',
825 'methodname' => 'get_users_courses',
826 'classpath' => 'enrol/externallib.php',
827 'description' => 'Get the list of courses where a user is enrolled in',
828 'type' => 'read',
829 'capabilities' => 'moodle/course:viewparticipants',
830 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
832 'core_enrol_submit_user_enrolment_form' => array(
833 'classname' => 'core_enrol_external',
834 'methodname' => 'submit_user_enrolment_form',
835 'classpath' => 'enrol/externallib.php',
836 'description' => 'Submit form data for enrolment form',
837 'type' => 'write',
838 'ajax' => true,
840 'core_enrol_unenrol_user_enrolment' => array(
841 'classname' => 'core_enrol_external',
842 'methodname' => 'unenrol_user_enrolment',
843 'classpath' => 'enrol/externallib.php',
844 'description' => 'External function that unenrols a given user enrolment',
845 'type' => 'write',
846 'ajax' => true,
848 'core_fetch_notifications' => array(
849 'classname' => 'core_external',
850 'methodname' => 'fetch_notifications',
851 'classpath' => 'lib/external/externallib.php',
852 'description' => 'Return a list of notifications for the current session',
853 'type' => 'read',
854 'loginrequired' => false,
855 'ajax' => true,
856 'readonlysession' => false, // Fetching removes from stack.
858 'core_session_touch' => array(
859 'classname' => 'core\session\external',
860 'methodname' => 'touch_session',
861 'description' => 'Keep the users session alive',
862 'type' => 'read',
863 'loginrequired' => true,
864 'ajax' => true,
866 'core_session_time_remaining' => array(
867 'classname' => 'core\session\external',
868 'methodname' => 'time_remaining',
869 'description' => 'Count the seconds remaining in this session',
870 'type' => 'read',
871 'loginrequired' => true,
872 'ajax' => true,
874 'core_files_get_files' => array(
875 'classname' => 'core_files_external',
876 'methodname' => 'get_files',
877 'description' => 'browse moodle files',
878 'type' => 'read',
879 'classpath' => 'files/externallib.php',
880 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
882 'core_files_upload' => array(
883 'classname' => 'core_files_external',
884 'methodname' => 'upload',
885 'description' => 'upload a file to moodle',
886 'type' => 'write',
887 'classpath' => 'files/externallib.php',
889 'core_files_delete_draft_files' => array(
890 'classname' => 'core_files\external\delete\draft',
891 'description' => 'Delete the indicated files (or directories) from a user draft file area.',
892 'type' => 'write',
893 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
895 'core_files_get_unused_draft_itemid' => array(
896 'classname' => 'core_files\external\get\unused_draft',
897 'description' => 'Generate a new draft itemid for the current user.',
898 'type' => 'write',
899 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
901 'core_form_get_filetypes_browser_data' => array(
902 'classname' => 'core_form\external',
903 'methodname' => 'get_filetypes_browser_data',
904 'classpath' => '',
905 'description' => 'Provides data for the filetypes element browser.',
906 'type' => 'read',
907 'loginrequired' => false,
908 'ajax' => true,
910 'core_form_dynamic_form' => array(
911 'classname' => 'core_form\external\dynamic_form',
912 'description' => 'Process submission of a dynamic (modal) form',
913 'type' => 'write',
914 'ajax' => true,
916 'core_get_component_strings' => array(
917 'classname' => 'core_external',
918 'methodname' => 'get_component_strings',
919 'classpath' => 'lib/external/externallib.php',
920 'description' => 'Return all raw strings (with {$a->xxx}), for a specific component ' .
921 '- similar to core get_component_strings(), call',
922 'type' => 'read',
923 'loginrequired' => false,
924 'ajax' => true,
925 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
927 'core_get_fragment' => array(
928 'classname' => 'core_external',
929 'methodname' => 'get_fragment',
930 'classpath' => 'lib/external/externallib.php',
931 'description' => 'Return a fragment for inclusion, such as a JavaScript page.',
932 'type' => 'read',
933 'ajax' => true,
935 'core_get_string' => array(
936 'classname' => 'core_external',
937 'methodname' => 'get_string',
938 'classpath' => 'lib/external/externallib.php',
939 'description' => 'Return a translated string - similar to core get_string(), call',
940 'type' => 'read',
941 'loginrequired' => false,
942 'ajax' => true,
944 'core_get_strings' => array(
945 'classname' => 'core_external',
946 'methodname' => 'get_strings',
947 'classpath' => 'lib/external/externallib.php',
948 'description' => 'Return some translated strings - like several core get_string(), calls',
949 'type' => 'read',
950 'loginrequired' => false,
951 'ajax' => true,
953 'core_get_user_dates' => array(
954 'classname' => 'core_external',
955 'methodname' => 'get_user_dates',
956 'classpath' => 'lib/external/externallib.php',
957 'description' => 'Return formatted timestamps',
958 'type' => 'read',
959 'ajax' => true,
961 'core_grades_update_grades' => array(
962 'classname' => 'core_grades_external',
963 'methodname' => 'update_grades',
964 'description' => 'Update a grade item and associated student grades.',
965 'type' => 'write',
967 'core_grades_grader_gradingpanel_point_fetch' => [
968 'classname' => 'core_grades\\grades\\grader\\gradingpanel\\point\\external\\fetch',
969 'description' => 'Fetch the data required to display the grader grading panel for simple grading, ' .
970 'creating the grade item if required',
971 'type' => 'write',
972 'ajax' => true,
973 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
975 'core_grades_grader_gradingpanel_point_store' => [
976 'classname' => 'core_grades\\grades\\grader\\gradingpanel\\point\\external\\store',
977 'description' => 'Store the data required to display the grader grading panel for simple grading',
978 'type' => 'write',
979 'ajax' => true,
980 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
982 'core_grades_grader_gradingpanel_scale_fetch' => [
983 'classname' => 'core_grades\\grades\\grader\\gradingpanel\\scale\\external\\fetch',
984 'description' => 'Fetch the data required to display the grader grading panel for scale-based grading, ' .
985 'creating the grade item if required',
986 'type' => 'write',
987 'ajax' => true,
988 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
990 'core_grades_grader_gradingpanel_scale_store' => [
991 'classname' => 'core_grades\\grades\\grader\\gradingpanel\\scale\\external\\store',
992 'description' => 'Store the data required to display the grader grading panel for scale-based grading',
993 'type' => 'write',
994 'ajax' => true,
995 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
997 'core_grades_create_gradecategories' => array (
998 'classname' => 'core_grades\external\create_gradecategories',
999 'description' => 'Create grade categories inside a course gradebook.',
1000 'type' => 'write',
1001 'capabilities' => 'moodle/grade:manage',
1003 'core_grades_get_enrolled_users_for_search_widget' => array (
1004 'classname' => 'core_grades\external\get_enrolled_users_for_search_widget',
1005 'description' => '** DEPRECATED ** Please do not call this function any more. ' .
1006 'Use core_grades_get_enrolled_users_for_selector instead. ' .
1007 'Returns the enrolled users within and map some fields to the returned array of user objects.',
1008 'type' => 'read',
1009 'ajax' => true,
1010 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
1012 'core_grades_get_enrolled_users_for_selector' => array (
1013 'classname' => 'core_grades\external\get_enrolled_users_for_selector',
1014 'description' => 'Returns the enrolled users within and map some fields to the returned array of user objects.',
1015 'type' => 'read',
1016 'ajax' => true,
1017 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
1019 'core_grades_get_groups_for_search_widget' => [
1020 'classname' => 'core_group\external\get_groups_for_selector',
1021 'description' => '** DEPRECATED ** Please do not call this function any more. ' .
1022 'Use core_group_get_groups_for_selector instead. ' .
1023 'Get the group/(s) for a course',
1024 'type' => 'read',
1025 'ajax' => true,
1026 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
1028 'core_grades_get_groups_for_selector' => [
1029 'classname' => 'core_group\external\get_groups_for_selector',
1030 'description' => '** DEPRECATED ** Please do not call this function any more. ' .
1031 'Use core_group_get_groups_for_selector instead. ' .
1032 'Get the group/(s) for a course',
1033 'type' => 'read',
1034 'ajax' => true,
1035 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
1037 'core_grades_get_feedback' => [
1038 'classname' => 'core_grades\external\get_feedback',
1039 'description' => 'Get the feedback data for a grade item',
1040 'type' => 'read',
1041 'ajax' => true,
1043 'core_grades_get_gradeitems' => [
1044 'classname' => 'core_grades\external\get_gradeitems',
1045 'description' => 'Get the gradeitems for a course',
1046 'type' => 'read',
1047 'ajax' => true,
1048 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
1050 'core_grades_get_grade_tree' => [
1051 'classname' => 'core_grades\external\get_grade_tree',
1052 'description' => 'Get the grade tree structure for a course',
1053 'type' => 'read',
1054 'ajax' => true,
1056 'core_grades_get_gradable_users' => [
1057 'classname' => 'core_grades\external\get_gradable_users',
1058 'description' => 'Returns the gradable users in a course',
1059 'type' => 'read',
1060 'ajax' => true,
1061 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
1063 'core_grading_get_definitions' => array(
1064 'classname' => 'core_grading_external',
1065 'methodname' => 'get_definitions',
1066 'description' => 'Get grading definitions',
1067 'type' => 'read',
1069 'core_grading_get_gradingform_instances' => array(
1070 'classname' => 'core_grading_external',
1071 'methodname' => 'get_gradingform_instances',
1072 'description' => 'Get grading form instances',
1073 'type' => 'read',
1075 'core_grading_save_definitions' => array(
1076 'classname' => 'core_grading_external',
1077 'methodname' => 'save_definitions',
1078 'description' => 'Save grading definitions',
1079 'type' => 'write',
1081 'core_group_add_group_members' => array(
1082 'classname' => 'core_group_external',
1083 'methodname' => 'add_group_members',
1084 'classpath' => 'group/externallib.php',
1085 'description' => 'Adds group members.',
1086 'type' => 'write',
1087 'capabilities' => 'moodle/course:managegroups',
1089 'core_group_assign_grouping' => array(
1090 'classname' => 'core_group_external',
1091 'methodname' => 'assign_grouping',
1092 'classpath' => 'group/externallib.php',
1093 'description' => 'Assing groups from groupings',
1094 'type' => 'write',
1096 'core_group_create_groupings' => array(
1097 'classname' => 'core_group_external',
1098 'methodname' => 'create_groupings',
1099 'classpath' => 'group/externallib.php',
1100 'description' => 'Creates new groupings',
1101 'type' => 'write',
1103 'core_group_create_groups' => array(
1104 'classname' => 'core_group_external',
1105 'methodname' => 'create_groups',
1106 'classpath' => 'group/externallib.php',
1107 'description' => 'Creates new groups.',
1108 'type' => 'write',
1109 'capabilities' => 'moodle/course:managegroups'
1111 'core_group_delete_group_members' => array(
1112 'classname' => 'core_group_external',
1113 'methodname' => 'delete_group_members',
1114 'classpath' => 'group/externallib.php',
1115 'description' => 'Deletes group members.',
1116 'type' => 'write',
1117 'capabilities' => 'moodle/course:managegroups'
1119 'core_group_delete_groupings' => array(
1120 'classname' => 'core_group_external',
1121 'methodname' => 'delete_groupings',
1122 'classpath' => 'group/externallib.php',
1123 'description' => 'Deletes all specified groupings.',
1124 'type' => 'write',
1126 'core_group_delete_groups' => array(
1127 'classname' => 'core_group_external',
1128 'methodname' => 'delete_groups',
1129 'classpath' => 'group/externallib.php',
1130 'description' => 'Deletes all specified groups.',
1131 'type' => 'write',
1132 'capabilities' => 'moodle/course:managegroups'
1134 'core_group_get_activity_allowed_groups' => array(
1135 'classname' => 'core_group_external',
1136 'methodname' => 'get_activity_allowed_groups',
1137 'classpath' => 'group/externallib.php',
1138 'description' => 'Gets a list of groups that the user is allowed to access within the specified activity.',
1139 'type' => 'read',
1140 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1142 'core_group_get_activity_groupmode' => array(
1143 'classname' => 'core_group_external',
1144 'methodname' => 'get_activity_groupmode',
1145 'classpath' => 'group/externallib.php',
1146 'description' => 'Returns effective groupmode used in a given activity.',
1147 'type' => 'read',
1148 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1150 'core_group_get_course_groupings' => array(
1151 'classname' => 'core_group_external',
1152 'methodname' => 'get_course_groupings',
1153 'classpath' => 'group/externallib.php',
1154 'description' => 'Returns all groupings in specified course.',
1155 'type' => 'read',
1156 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1158 'core_group_get_course_groups' => array(
1159 'classname' => 'core_group_external',
1160 'methodname' => 'get_course_groups',
1161 'classpath' => 'group/externallib.php',
1162 'description' => 'Returns all groups in specified course.',
1163 'type' => 'read',
1164 'ajax' => true,
1165 'capabilities' => 'moodle/course:managegroups',
1166 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1168 'core_group_get_course_user_groups' => array(
1169 'classname' => 'core_group_external',
1170 'methodname' => 'get_course_user_groups',
1171 'classpath' => 'group/externallib.php',
1172 'description' => 'Returns all groups in specified course for the specified user.',
1173 'type' => 'read',
1174 'capabilities' => 'moodle/course:managegroups',
1175 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1177 'core_group_get_group_members' => array(
1178 'classname' => 'core_group_external',
1179 'methodname' => 'get_group_members',
1180 'classpath' => 'group/externallib.php',
1181 'description' => 'Returns group members.',
1182 'type' => 'read',
1183 'capabilities' => 'moodle/course:managegroups'
1185 'core_group_get_groupings' => array(
1186 'classname' => 'core_group_external',
1187 'methodname' => 'get_groupings',
1188 'classpath' => 'group/externallib.php',
1189 'description' => 'Returns groupings details.',
1190 'type' => 'read',
1192 'core_group_get_groups' => array(
1193 'classname' => 'core_group_external',
1194 'methodname' => 'get_groups',
1195 'classpath' => 'group/externallib.php',
1196 'description' => 'Returns group details.',
1197 'type' => 'read',
1198 'capabilities' => 'moodle/course:managegroups'
1200 'core_group_get_groups_for_selector' => [
1201 'classname' => 'core_group\external\get_groups_for_selector',
1202 'description' => 'Get the group/(s) for a course',
1203 'type' => 'read',
1204 'ajax' => true,
1205 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
1207 'core_group_unassign_grouping' => array(
1208 'classname' => 'core_group_external',
1209 'methodname' => 'unassign_grouping',
1210 'classpath' => 'group/externallib.php',
1211 'description' => 'Unassing groups from groupings',
1212 'type' => 'write',
1214 'core_group_update_groupings' => array(
1215 'classname' => 'core_group_external',
1216 'methodname' => 'update_groupings',
1217 'classpath' => 'group/externallib.php',
1218 'description' => 'Updates existing groupings',
1219 'type' => 'write',
1221 'core_group_update_groups' => array(
1222 'classname' => 'core_group_external',
1223 'methodname' => 'update_groups',
1224 'classpath' => 'group/externallib.php',
1225 'description' => 'Updates existing groups.',
1226 'type' => 'write',
1227 'capabilities' => 'moodle/course:managegroups'
1229 'core_message_mute_conversations' => array(
1230 'classname' => 'core_message_external',
1231 'methodname' => 'mute_conversations',
1232 'classpath' => 'message/externallib.php',
1233 'description' => 'Mutes a list of conversations',
1234 'type' => 'write',
1235 'ajax' => true,
1236 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1238 'core_message_unmute_conversations' => array(
1239 'classname' => 'core_message_external',
1240 'methodname' => 'unmute_conversations',
1241 'classpath' => 'message/externallib.php',
1242 'description' => 'Unmutes a list of conversations',
1243 'type' => 'write',
1244 'ajax' => true,
1245 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1247 'core_message_block_user' => array(
1248 'classname' => 'core_message_external',
1249 'methodname' => 'block_user',
1250 'classpath' => 'message/externallib.php',
1251 'description' => 'Blocks a user',
1252 'type' => 'write',
1253 'ajax' => true,
1254 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1256 'core_message_get_contact_requests' => array(
1257 'classname' => 'core_message_external',
1258 'methodname' => 'get_contact_requests',
1259 'classpath' => 'message/externallib.php',
1260 'description' => 'Returns contact requests for a user',
1261 'type' => 'read',
1262 'ajax' => true,
1263 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1265 'core_message_create_contact_request' => array(
1266 'classname' => 'core_message_external',
1267 'methodname' => 'create_contact_request',
1268 'classpath' => 'message/externallib.php',
1269 'description' => 'Creates a contact request',
1270 'type' => 'write',
1271 'ajax' => true,
1272 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1274 'core_message_confirm_contact_request' => array(
1275 'classname' => 'core_message_external',
1276 'methodname' => 'confirm_contact_request',
1277 'classpath' => 'message/externallib.php',
1278 'description' => 'Confirms a contact request',
1279 'type' => 'write',
1280 'ajax' => true,
1281 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1283 'core_message_decline_contact_request' => array(
1284 'classname' => 'core_message_external',
1285 'methodname' => 'decline_contact_request',
1286 'classpath' => 'message/externallib.php',
1287 'description' => 'Declines a contact request',
1288 'type' => 'write',
1289 'ajax' => true,
1290 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1292 'core_message_get_received_contact_requests_count' => array(
1293 'classname' => 'core_message_external',
1294 'methodname' => 'get_received_contact_requests_count',
1295 'classpath' => 'message/externallib.php',
1296 'description' => 'Gets the number of received contact requests',
1297 'type' => 'read',
1298 'ajax' => true,
1299 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1301 'core_message_delete_contacts' => array(
1302 'classname' => 'core_message_external',
1303 'methodname' => 'delete_contacts',
1304 'classpath' => 'message/externallib.php',
1305 'description' => 'Remove contacts from the contact list',
1306 'type' => 'write',
1307 'ajax' => true,
1308 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1310 'core_message_delete_conversations_by_id' => array(
1311 'classname' => 'core_message_external',
1312 'methodname' => 'delete_conversations_by_id',
1313 'classpath' => 'message/externallib.php',
1314 'description' => 'Deletes a list of conversations.',
1315 'type' => 'write',
1316 'capabilities' => 'moodle/site:deleteownmessage',
1317 'ajax' => true,
1318 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1320 'core_message_delete_message' => array(
1321 'classname' => 'core_message_external',
1322 'methodname' => 'delete_message',
1323 'classpath' => 'message/externallib.php',
1324 'description' => 'Deletes a message.',
1325 'type' => 'write',
1326 'capabilities' => 'moodle/site:deleteownmessage',
1327 'ajax' => true,
1328 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1330 'core_message_get_blocked_users' => array(
1331 'classname' => 'core_message_external',
1332 'methodname' => 'get_blocked_users',
1333 'classpath' => 'message/externallib.php',
1334 'description' => 'Retrieve a list of users blocked',
1335 'type' => 'read',
1336 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1338 'core_message_data_for_messagearea_search_messages' => array(
1339 'classname' => 'core_message_external',
1340 'methodname' => 'data_for_messagearea_search_messages',
1341 'classpath' => 'message/externallib.php',
1342 'description' => 'Retrieve the template data for searching for messages',
1343 'type' => 'read',
1344 'ajax' => true,
1345 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1347 'core_message_message_search_users' => array(
1348 'classname' => 'core_message_external',
1349 'methodname' => 'message_search_users',
1350 'classpath' => 'message/externallib.php',
1351 'description' => 'Retrieve the data for searching for people',
1352 'type' => 'read',
1353 'ajax' => true,
1354 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1356 'core_message_get_user_contacts' => array(
1357 'classname' => 'core_message_external',
1358 'methodname' => 'get_user_contacts',
1359 'classpath' => 'message/externallib.php',
1360 'description' => 'Retrieve the contact list',
1361 'type' => 'read',
1362 'ajax' => true,
1363 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1365 'core_message_get_conversations' => array(
1366 'classname' => 'core_message_external',
1367 'methodname' => 'get_conversations',
1368 'classpath' => 'message/externallib.php',
1369 'description' => 'Retrieve a list of conversations for a user',
1370 'type' => 'read',
1371 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1372 'ajax' => true
1374 'core_message_get_conversation' => array(
1375 'classname' => 'core_message_external',
1376 'methodname' => 'get_conversation',
1377 'classpath' => 'message/externallib.php',
1378 'description' => 'Retrieve a conversation for a user',
1379 'type' => 'read',
1380 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1381 'ajax' => true
1383 'core_message_get_conversation_between_users' => array(
1384 'classname' => 'core_message_external',
1385 'methodname' => 'get_conversation_between_users',
1386 'classpath' => 'message/externallib.php',
1387 'description' => 'Retrieve a conversation for a user between another user',
1388 'type' => 'read',
1389 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1390 'ajax' => true
1392 'core_message_get_self_conversation' => array(
1393 'classname' => 'core_message_external',
1394 'methodname' => 'get_self_conversation',
1395 'classpath' => 'message/externallib.php',
1396 'description' => 'Retrieve a self-conversation for a user',
1397 'type' => 'read',
1398 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1399 'ajax' => true
1401 'core_message_get_messages' => array(
1402 'classname' => 'core_message_external',
1403 'methodname' => 'get_messages',
1404 'classpath' => 'message/externallib.php',
1405 'description' => 'Retrieve a list of messages sent and received by a user (conversations, notifications or both)',
1406 'type' => 'read',
1407 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1408 'ajax' => true,
1410 'core_message_get_conversation_counts' => array(
1411 'classname' => 'core_message_external',
1412 'methodname' => 'get_conversation_counts',
1413 'classpath' => 'message/externallib.php',
1414 'description' => 'Retrieve a list of conversation counts, indexed by type.',
1415 'type' => 'read',
1416 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1417 'ajax' => true,
1419 'core_message_get_unread_conversation_counts' => array(
1420 'classname' => 'core_message_external',
1421 'methodname' => 'get_unread_conversation_counts',
1422 'classpath' => 'message/externallib.php',
1423 'description' => 'Retrieve a list of unread conversation counts, indexed by type.',
1424 'type' => 'read',
1425 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1426 'ajax' => true,
1428 'core_message_get_conversation_members' => array(
1429 'classname' => 'core_message_external',
1430 'methodname' => 'get_conversation_members',
1431 'classpath' => 'message/externallib.php',
1432 'description' => 'Retrieve a list of members in a conversation',
1433 'type' => 'read',
1434 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1435 'ajax' => true,
1437 'core_message_get_member_info' => array(
1438 'classname' => 'core_message_external',
1439 'methodname' => 'get_member_info',
1440 'classpath' => 'message/externallib.php',
1441 'description' => 'Retrieve a user message profiles',
1442 'type' => 'read',
1443 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1444 'ajax' => true,
1446 'core_message_get_unread_conversations_count' => array(
1447 'classname' => 'core_message_external',
1448 'methodname' => 'get_unread_conversations_count',
1449 'classpath' => 'message/externallib.php',
1450 'description' => 'Retrieve the count of unread conversations for a given user',
1451 'type' => 'read',
1452 'ajax' => true,
1453 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1454 'readonlysession' => true, // We don't modify the session.
1456 'core_message_mark_all_notifications_as_read' => array(
1457 'classname' => 'core_message_external',
1458 'methodname' => 'mark_all_notifications_as_read',
1459 'classpath' => 'message/externallib.php',
1460 'description' => 'Mark all notifications as read for a given user',
1461 'type' => 'write',
1462 'ajax' => true,
1463 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1465 'core_message_mark_all_conversation_messages_as_read' => array(
1466 'classname' => 'core_message_external',
1467 'methodname' => 'mark_all_conversation_messages_as_read',
1468 'classpath' => 'message/externallib.php',
1469 'description' => 'Mark all conversation messages as read for a given user',
1470 'type' => 'write',
1471 'ajax' => true,
1472 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1474 'core_message_mark_message_read' => array(
1475 'classname' => 'core_message_external',
1476 'methodname' => 'mark_message_read',
1477 'classpath' => 'message/externallib.php',
1478 'description' => 'Mark a single message as read, trigger message_viewed event.',
1479 'type' => 'write',
1480 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1481 'ajax' => true,
1483 'core_message_mark_notification_read' => array(
1484 'classname' => 'core_message_external',
1485 'methodname' => 'mark_notification_read',
1486 'classpath' => 'message/externallib.php',
1487 'description' => 'Mark a single notification as read, trigger notification_viewed event.',
1488 'type' => 'write',
1489 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1490 'ajax' => true,
1492 'core_message_message_processor_config_form' => array(
1493 'classname' => 'core_message_external',
1494 'methodname' => 'message_processor_config_form',
1495 'classpath' => 'message/externallib.php',
1496 'description' => 'Process the message processor config form',
1497 'type' => 'write',
1498 'ajax' => true,
1499 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1501 'core_message_get_message_processor' => array(
1502 'classname' => 'core_message_external',
1503 'methodname' => 'get_message_processor',
1504 'classpath' => 'message/externallib.php',
1505 'description' => 'Get a message processor',
1506 'type' => 'read',
1507 'ajax' => true,
1509 'core_message_search_contacts' => array(
1510 'classname' => 'core_message_external',
1511 'methodname' => 'search_contacts',
1512 'classpath' => 'message/externallib.php',
1513 'description' => 'Search for contacts',
1514 'type' => 'read',
1515 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1517 'core_message_send_instant_messages' => array(
1518 'classname' => 'core_message_external',
1519 'methodname' => 'send_instant_messages',
1520 'classpath' => 'message/externallib.php',
1521 'description' => 'Send instant messages',
1522 'type' => 'write',
1523 'capabilities' => 'moodle/site:sendmessage',
1524 'ajax' => true,
1525 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1526 'readonlysession' => true,
1528 'core_message_send_messages_to_conversation' => array(
1529 'classname' => 'core_message_external',
1530 'methodname' => 'send_messages_to_conversation',
1531 'classpath' => 'message/externallib.php',
1532 'description' => 'Send messages to an existing conversation between users',
1533 'type' => 'write',
1534 'capabilities' => 'moodle/site:sendmessage',
1535 'ajax' => true,
1536 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1538 'core_message_get_conversation_messages' => array(
1539 'classname' => 'core_message_external',
1540 'methodname' => 'get_conversation_messages',
1541 'classpath' => 'message/externallib.php',
1542 'description' => 'Retrieve the conversation messages and relevant member information',
1543 'type' => 'read',
1544 'ajax' => true,
1545 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1547 'core_message_unblock_user' => array(
1548 'classname' => 'core_message_external',
1549 'methodname' => 'unblock_user',
1550 'classpath' => 'message/externallib.php',
1551 'description' => 'Unblocks a user',
1552 'type' => 'write',
1553 'ajax' => true,
1554 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1556 'core_message_get_user_notification_preferences' => array(
1557 'classname' => 'core_message_external',
1558 'methodname' => 'get_user_notification_preferences',
1559 'classpath' => 'message/externallib.php',
1560 'description' => 'Get the notification preferences for a given user.',
1561 'type' => 'read',
1562 'capabilities' => 'moodle/user:editownmessageprofile',
1563 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1565 'core_message_get_user_message_preferences' => array(
1566 'classname' => 'core_message_external',
1567 'methodname' => 'get_user_message_preferences',
1568 'classpath' => 'message/externallib.php',
1569 'description' => 'Get the message preferences for a given user.',
1570 'type' => 'read',
1571 'capabilities' => 'moodle/user:editownmessageprofile',
1572 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1573 'ajax' => true
1575 'core_message_set_favourite_conversations' => array(
1576 'classname' => 'core_message_external',
1577 'methodname' => 'set_favourite_conversations',
1578 'classpath' => 'message/externallib.php',
1579 'description' => 'Mark a conversation or group of conversations as favourites/starred conversations.',
1580 'type' => 'write',
1581 'ajax' => true,
1582 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1584 'core_message_unset_favourite_conversations' => array(
1585 'classname' => 'core_message_external',
1586 'methodname' => 'unset_favourite_conversations',
1587 'classpath' => 'message/externallib.php',
1588 'description' => 'Unset a conversation or group of conversations as favourites/starred conversations.',
1589 'type' => 'write',
1590 'ajax' => true,
1591 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1593 'core_message_delete_message_for_all_users' => array(
1594 'classname' => 'core_message_external',
1595 'methodname' => 'delete_message_for_all_users',
1596 'classpath' => 'message/externallib.php',
1597 'description' => 'Deletes a message for all users.',
1598 'type' => 'write',
1599 'capabilities' => 'moodle/site:deleteanymessage',
1600 'ajax' => true,
1601 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1603 'core_message_get_unread_notification_count' => [
1604 'classname' => '\core_message\external\get_unread_notification_count',
1605 'description' => 'Get number of unread notifications.',
1606 'type' => 'read',
1607 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
1609 'core_my_view_page' => [
1610 'classname' => '\core_my\external\view_page',
1611 'methodname' => 'execute',
1612 'description' => 'Trigger the My or Dashboard viewed event.',
1613 'type' => 'write',
1614 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
1616 'core_notes_create_notes' => array(
1617 'classname' => 'core_notes_external',
1618 'methodname' => 'create_notes',
1619 'classpath' => 'notes/externallib.php',
1620 'description' => 'Create notes',
1621 'type' => 'write',
1622 'ajax' => true,
1623 'capabilities' => 'moodle/notes:manage',
1624 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1626 'core_notes_delete_notes' => array(
1627 'classname' => 'core_notes_external',
1628 'methodname' => 'delete_notes',
1629 'classpath' => 'notes/externallib.php',
1630 'description' => 'Delete notes',
1631 'type' => 'write',
1632 'capabilities' => 'moodle/notes:manage',
1633 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1635 'core_notes_get_course_notes' => array(
1636 'classname' => 'core_notes_external',
1637 'methodname' => 'get_course_notes',
1638 'classpath' => 'notes/externallib.php',
1639 'description' => 'Returns all notes in specified course (or site), for the specified user.',
1640 'type' => 'read',
1641 'capabilities' => 'moodle/notes:view',
1642 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1644 'core_notes_get_notes' => array(
1645 'classname' => 'core_notes_external',
1646 'methodname' => 'get_notes',
1647 'classpath' => 'notes/externallib.php',
1648 'description' => 'Get notes',
1649 'type' => 'read',
1650 'capabilities' => 'moodle/notes:view'
1652 'core_notes_update_notes' => array(
1653 'classname' => 'core_notes_external',
1654 'methodname' => 'update_notes',
1655 'classpath' => 'notes/externallib.php',
1656 'description' => 'Update notes',
1657 'type' => 'write',
1658 'capabilities' => 'moodle/notes:manage'
1660 'core_notes_view_notes' => array(
1661 'classname' => 'core_notes_external',
1662 'methodname' => 'view_notes',
1663 'classpath' => 'notes/externallib.php',
1664 'description' => 'Simulates the web interface view of notes/index.php: trigger events.',
1665 'type' => 'write',
1666 'capabilities' => 'moodle/notes:view',
1667 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1669 'core_output_load_template' => array(
1670 'classname' => 'core\output\external',
1671 'methodname' => 'load_template',
1672 'description' => 'Load a template for a renderable',
1673 'type' => 'read',
1674 'loginrequired' => false,
1675 'ajax' => true,
1677 'core_output_load_template_with_dependencies' => array(
1678 'classname' => 'core\output\external',
1679 'methodname' => 'load_template_with_dependencies',
1680 'description' => 'Load a template and its dependencies for a renderable',
1681 'type' => 'read',
1682 'loginrequired' => false,
1683 'ajax' => true,
1685 'core_output_load_fontawesome_icon_map' => array(
1686 'classname' => 'core\output\external',
1687 'methodname' => 'load_fontawesome_icon_map',
1688 'description' => 'Load the mapping of names to icons',
1689 'type' => 'read',
1690 'loginrequired' => false,
1691 'ajax' => true,
1693 'core_output_load_fontawesome_icon_system_map' => array(
1694 'classname' => 'core\external\output\icon_system\load_fontawesome_map',
1695 'description' => 'Load the mapping of moodle pix names to fontawesome icon names',
1696 'type' => 'read',
1697 'loginrequired' => false,
1698 'ajax' => true,
1700 // Question related functions.
1701 'core_question_update_flag' => array(
1702 'classname' => 'core_question_external',
1703 'methodname' => 'update_flag',
1704 'description' => 'Update the flag state of a question attempt.',
1705 'type' => 'write',
1706 'capabilities' => 'moodle/question:flag',
1707 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1709 'core_question_submit_tags_form' => array(
1710 'classname' => 'core_question_external',
1711 'methodname' => 'submit_tags_form',
1712 'description' => 'Update the question tags.',
1713 'type' => 'write',
1714 'ajax' => true,
1716 'core_question_get_random_question_summaries' => array(
1717 'classname' => 'core_question_external',
1718 'methodname' => 'get_random_question_summaries',
1719 'description' => 'Get the random question set for a criteria',
1720 'type' => 'read',
1721 'ajax' => true,
1723 'core_rating_get_item_ratings' => array(
1724 'classname' => 'core_rating_external',
1725 'methodname' => 'get_item_ratings',
1726 'description' => 'Retrieve all the ratings for an item.',
1727 'type' => 'read',
1728 'capabilities' => 'moodle/rating:view',
1729 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1731 'core_rating_add_rating' => array(
1732 'classname' => 'core_rating_external',
1733 'methodname' => 'add_rating',
1734 'description' => 'Rates an item.',
1735 'type' => 'write',
1736 'capabilities' => 'moodle/rating:rate',
1737 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1739 'core_role_assign_roles' => array(
1740 'classname' => 'core_role_external',
1741 'methodname' => 'assign_roles',
1742 'classpath' => 'enrol/externallib.php',
1743 'description' => 'Manual role assignments.',
1744 'type' => 'write',
1745 'capabilities' => 'moodle/role:assign'
1747 'core_role_unassign_roles' => array(
1748 'classname' => 'core_role_external',
1749 'methodname' => 'unassign_roles',
1750 'classpath' => 'enrol/externallib.php',
1751 'description' => 'Manual role unassignments.',
1752 'type' => 'write',
1753 'capabilities' => 'moodle/role:assign'
1755 'core_search_get_relevant_users' => array(
1756 'classname' => '\core_search\external',
1757 'methodname' => 'get_relevant_users',
1758 'description' => 'Gets relevant users for a search request.',
1759 'type' => 'read',
1760 'ajax' => true
1762 'core_search_get_results' => [
1763 'classname' => '\core_search\external\get_results',
1764 'description' => 'Get search results.',
1765 'type' => 'read',
1766 'capabilities' => 'moodle/search:query',
1767 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
1769 'core_search_get_search_areas_list' => [
1770 'classname' => '\core_search\external\get_search_areas_list',
1771 'description' => 'Get search areas.',
1772 'type' => 'read',
1773 'capabilities' => 'moodle/search:query',
1774 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
1776 'core_search_view_results' => [
1777 'classname' => '\core_search\external\view_results',
1778 'description' => 'Trigger view search results event.',
1779 'type' => 'write',
1780 'capabilities' => 'moodle/search:query',
1781 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
1783 'core_search_get_top_results' => [
1784 'classname' => '\core_search\external\get_top_results',
1785 'description' => 'Get top search results.',
1786 'type' => 'read',
1787 'capabilities' => 'moodle/search:query',
1788 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
1790 'core_tag_get_tagindex' => array(
1791 'classname' => 'core_tag_external',
1792 'methodname' => 'get_tagindex',
1793 'description' => 'Gets tag index page for one tag and one tag area',
1794 'type' => 'read',
1795 'ajax' => true,
1796 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1798 'core_tag_get_tags' => array(
1799 'classname' => 'core_tag_external',
1800 'methodname' => 'get_tags',
1801 'description' => 'Gets tags by their ids',
1802 'type' => 'read',
1803 'ajax' => true,
1805 'core_tag_update_tags' => array(
1806 'classname' => 'core_tag_external',
1807 'methodname' => 'update_tags',
1808 'description' => 'Updates tags',
1809 'type' => 'write',
1810 'ajax' => true,
1812 'core_tag_get_tagindex_per_area' => array(
1813 'classname' => 'core_tag_external',
1814 'methodname' => 'get_tagindex_per_area',
1815 'description' => 'Gets tag index page per different areas.',
1816 'type' => 'read',
1817 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1819 'core_tag_get_tag_areas' => array(
1820 'classname' => 'core_tag_external',
1821 'methodname' => 'get_tag_areas',
1822 'description' => 'Retrieves existing tag areas.',
1823 'type' => 'read',
1824 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1826 'core_tag_get_tag_collections' => array(
1827 'classname' => 'core_tag_external',
1828 'methodname' => 'get_tag_collections',
1829 'description' => 'Retrieves existing tag collections.',
1830 'type' => 'read',
1831 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1833 'core_tag_get_tag_cloud' => array(
1834 'classname' => 'core_tag_external',
1835 'methodname' => 'get_tag_cloud',
1836 'description' => 'Retrieves a tag cloud for the given collection and/or query search.',
1837 'type' => 'read',
1838 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1840 'core_update_inplace_editable' => array(
1841 'classname' => 'core_external',
1842 'methodname' => 'update_inplace_editable',
1843 'classpath' => 'lib/external/externallib.php',
1844 'description' => 'Generic service to update title',
1845 'type' => 'write',
1846 'loginrequired' => true,
1847 'ajax' => true,
1849 'core_user_add_user_device' => array(
1850 'classname' => 'core_user_external',
1851 'methodname' => 'add_user_device',
1852 'classpath' => 'user/externallib.php',
1853 'description' => 'Store mobile user devices information for PUSH Notifications.',
1854 'type' => 'write',
1855 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1857 'core_user_update_user_device_public_key' => array(
1858 'classname' => '\core_user\external\update_user_device_public_key',
1859 'description' => 'Store mobile user public key.',
1860 'type' => 'write',
1861 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1863 'core_user_add_user_private_files' => array(
1864 'classname' => 'core_user_external',
1865 'methodname' => 'add_user_private_files',
1866 'classpath' => 'user/externallib.php',
1867 'description' => 'Copy files from a draft area to users private files area.',
1868 'type' => 'write',
1869 'capabilities' => 'moodle/user:manageownfiles',
1870 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1872 'core_user_create_users' => array(
1873 'classname' => 'core_user_external',
1874 'methodname' => 'create_users',
1875 'classpath' => 'user/externallib.php',
1876 'description' => 'Create users.',
1877 'type' => 'write',
1878 'capabilities' => 'moodle/user:create'
1880 'core_user_delete_users' => array(
1881 'classname' => 'core_user_external',
1882 'methodname' => 'delete_users',
1883 'classpath' => 'user/externallib.php',
1884 'description' => 'Delete users.',
1885 'type' => 'write',
1886 'capabilities' => 'moodle/user:delete'
1888 'core_user_get_course_user_profiles' => array(
1889 'classname' => 'core_user_external',
1890 'methodname' => 'get_course_user_profiles',
1891 'classpath' => 'user/externallib.php',
1892 'description' => 'Get course user profiles (each of the profils matching a course id and a user id),.',
1893 'type' => 'read',
1894 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, '
1895 . 'moodle/site:accessallgroups',
1896 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1898 'core_user_get_users' => array(
1899 'classname' => 'core_user_external',
1900 'methodname' => 'get_users',
1901 'classpath' => 'user/externallib.php',
1902 'description' => 'search for users matching the parameters',
1903 'type' => 'read',
1904 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update'
1906 'core_user_get_users_by_field' => array(
1907 'classname' => 'core_user_external',
1908 'methodname' => 'get_users_by_field',
1909 'classpath' => 'user/externallib.php',
1910 'description' => 'Retrieve users\' information for a specified unique field - If you want to do a user search, use '
1911 . 'core_user_get_users() or core_user_search_identity().',
1912 'type' => 'read',
1913 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update',
1914 'ajax' => true,
1915 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1917 'core_user_search_identity' => array(
1918 'classname' => '\core_user\external\search_identity',
1919 'description' => 'Return list of users identities matching the given criteria in their name or other identity fields.',
1920 'type' => 'read',
1921 'capabilities' => 'moodle/user:viewalldetails',
1922 'ajax' => true,
1923 'loginrequired' => true,
1925 'core_user_remove_user_device' => array(
1926 'classname' => 'core_user_external',
1927 'methodname' => 'remove_user_device',
1928 'classpath' => 'user/externallib.php',
1929 'description' => 'Remove a user device from the Moodle database.',
1930 'type' => 'write',
1931 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1933 'core_user_update_users' => array(
1934 'classname' => 'core_user_external',
1935 'methodname' => 'update_users',
1936 'classpath' => 'user/externallib.php',
1937 'description' => 'Update users.',
1938 'type' => 'write',
1939 'capabilities' => 'moodle/user:update',
1940 'ajax' => true,
1942 'core_user_update_user_preferences' => array(
1943 'classname' => 'core_user_external',
1944 'methodname' => 'update_user_preferences',
1945 'classpath' => 'user/externallib.php',
1946 'description' => 'Update a user\'s preferences',
1947 'type' => 'write',
1948 'capabilities' => 'moodle/user:editownmessageprofile, moodle/user:editmessageprofile',
1949 'ajax' => true,
1950 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1952 'core_user_view_user_list' => array(
1953 'classname' => 'core_user_external',
1954 'methodname' => 'view_user_list',
1955 'classpath' => 'user/externallib.php',
1956 'description' => 'Simulates the web-interface view of user/index.php (triggering events),.',
1957 'type' => 'write',
1958 'capabilities' => 'moodle/course:viewparticipants',
1959 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1961 'core_user_view_user_profile' => array(
1962 'classname' => 'core_user_external',
1963 'methodname' => 'view_user_profile',
1964 'classpath' => 'user/externallib.php',
1965 'description' => 'Simulates the web-interface view of user/view.php and user/profile.php (triggering events),.',
1966 'type' => 'write',
1967 'capabilities' => 'moodle/user:viewdetails',
1968 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1970 'core_user_get_user_preferences' => array(
1971 'classname' => 'core_user_external',
1972 'methodname' => 'get_user_preferences',
1973 'classpath' => 'user/externallib.php',
1974 'description' => 'Return user preferences.',
1975 'type' => 'read',
1976 'ajax' => true,
1977 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1979 'core_user_update_picture' => array(
1980 'classname' => 'core_user_external',
1981 'methodname' => 'update_picture',
1982 'classpath' => 'user/externallib.php',
1983 'description' => 'Update or delete the user picture in the site',
1984 'type' => 'write',
1985 'capabilities' => 'moodle/user:editownprofile, moodle/user:editprofile',
1986 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1988 'core_user_set_user_preferences' => array(
1989 'classname' => 'core_user_external',
1990 'methodname' => 'set_user_preferences',
1991 'classpath' => 'user/externallib.php',
1992 'description' => 'Set user preferences.',
1993 'type' => 'write',
1994 'capabilities' => 'moodle/site:config',
1995 'ajax' => true,
1996 'loginrequired' => false,
1997 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1999 'core_user_agree_site_policy' => array(
2000 'classname' => 'core_user_external',
2001 'methodname' => 'agree_site_policy',
2002 'classpath' => 'user/externallib.php',
2003 'description' => 'Agree the site policy for the current user.',
2004 'type' => 'write',
2005 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2007 'core_user_get_private_files_info' => array(
2008 'classname' => 'core_user_external',
2009 'methodname' => 'get_private_files_info',
2010 'classpath' => 'user/externallib.php',
2011 'description' => 'Returns general information about files in the user private files area.',
2012 'type' => 'read',
2013 'capabilities' => 'moodle/user:manageownfiles',
2014 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2017 // Competencies functions.
2018 'core_competency_create_competency_framework' => array(
2019 'classname' => 'core_competency\external',
2020 'methodname' => 'create_competency_framework',
2021 'classpath' => '',
2022 'description' => 'Creates new competency frameworks.',
2023 'type' => 'write',
2024 'capabilities' => 'moodle/competency:competencymanage',
2025 'ajax' => true,
2027 'core_competency_read_competency_framework' => array(
2028 'classname' => 'core_competency\external',
2029 'methodname' => 'read_competency_framework',
2030 'classpath' => '',
2031 'description' => 'Load a summary of a competency framework.',
2032 'type' => 'read',
2033 'capabilities' => 'moodle/competency:competencyview',
2034 'ajax' => true,
2036 'core_competency_duplicate_competency_framework' => array(
2037 'classname' => 'core_competency\external',
2038 'methodname' => 'duplicate_competency_framework',
2039 'classpath' => '',
2040 'description' => 'Duplicate a competency framework.',
2041 'type' => 'write',
2042 'capabilities' => 'moodle/competency:competencymanage',
2043 'ajax' => true,
2045 'core_competency_delete_competency_framework' => array(
2046 'classname' => 'core_competency\external',
2047 'methodname' => 'delete_competency_framework',
2048 'classpath' => '',
2049 'description' => 'Delete a competency framework.',
2050 'type' => 'write',
2051 'capabilities' => 'moodle/competency:competencymanage',
2052 'ajax' => true,
2054 'core_competency_update_competency_framework' => array(
2055 'classname' => 'core_competency\external',
2056 'methodname' => 'update_competency_framework',
2057 'classpath' => '',
2058 'description' => 'Update a competency framework.',
2059 'type' => 'write',
2060 'capabilities' => 'moodle/competency:competencymanage',
2061 'ajax' => true,
2063 'core_competency_list_competency_frameworks' => array(
2064 'classname' => 'core_competency\external',
2065 'methodname' => 'list_competency_frameworks',
2066 'classpath' => '',
2067 'description' => 'Load a list of a competency frameworks.',
2068 'type' => 'read',
2069 'capabilities' => 'moodle/competency:competencyview',
2070 'ajax' => true,
2072 'core_competency_count_competency_frameworks' => array(
2073 'classname' => 'core_competency\external',
2074 'methodname' => 'count_competency_frameworks',
2075 'classpath' => '',
2076 'description' => 'Count a list of a competency frameworks.',
2077 'type' => 'read',
2078 'capabilities' => 'moodle/competency:competencyview',
2079 'ajax' => true,
2081 'core_competency_competency_framework_viewed' => array(
2082 'classname' => 'core_competency\external',
2083 'methodname' => 'competency_framework_viewed',
2084 'classpath' => '',
2085 'description' => 'Log event competency framework viewed',
2086 'type' => 'read',
2087 'capabilities' => 'moodle/competency:competencyview',
2088 'ajax' => true,
2090 'core_competency_create_competency' => array(
2091 'classname' => 'core_competency\external',
2092 'methodname' => 'create_competency',
2093 'classpath' => '',
2094 'description' => 'Creates new competencies.',
2095 'type' => 'write',
2096 'capabilities' => 'moodle/competency:competencymanage',
2097 'ajax' => true,
2099 'core_competency_read_competency' => array(
2100 'classname' => 'core_competency\external',
2101 'methodname' => 'read_competency',
2102 'classpath' => '',
2103 'description' => 'Load a summary of a competency.',
2104 'type' => 'read',
2105 'capabilities' => 'moodle/competency:competencyview',
2106 'ajax' => true,
2108 'core_competency_competency_viewed' => array(
2109 'classname' => 'core_competency\external',
2110 'methodname' => 'competency_viewed',
2111 'classpath' => '',
2112 'description' => 'Log event competency viewed',
2113 'type' => 'read',
2114 'capabilities' => 'moodle/competency:competencyview',
2115 'ajax' => true,
2116 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2118 'core_competency_delete_competency' => array(
2119 'classname' => 'core_competency\external',
2120 'methodname' => 'delete_competency',
2121 'classpath' => '',
2122 'description' => 'Delete a competency.',
2123 'type' => 'write',
2124 'capabilities' => 'moodle/competency:competencymanage',
2125 'ajax' => true,
2127 'core_competency_update_competency' => array(
2128 'classname' => 'core_competency\external',
2129 'methodname' => 'update_competency',
2130 'classpath' => '',
2131 'description' => 'Update a competency.',
2132 'type' => 'write',
2133 'capabilities' => 'moodle/competency:competencymanage',
2134 'ajax' => true,
2136 'core_competency_list_competencies' => array(
2137 'classname' => 'core_competency\external',
2138 'methodname' => 'list_competencies',
2139 'classpath' => '',
2140 'description' => 'Load a list of a competencies.',
2141 'type' => 'read',
2142 'capabilities' => 'moodle/competency:competencyview',
2143 'ajax' => true,
2145 'core_competency_list_competencies_in_template' => array(
2146 'classname' => 'core_competency\external',
2147 'methodname' => 'list_competencies_in_template',
2148 'classpath' => '',
2149 'description' => 'Load a list of a competencies for a given template.',
2150 'type' => 'read',
2151 'capabilities' => 'moodle/competency:competencyview',
2152 'ajax' => true,
2154 'core_competency_count_competencies' => array(
2155 'classname' => 'core_competency\external',
2156 'methodname' => 'count_competencies',
2157 'classpath' => '',
2158 'description' => 'Count a list of a competencies.',
2159 'type' => 'read',
2160 'capabilities' => 'moodle/competency:competencyview',
2161 'ajax' => true,
2163 'core_competency_count_competencies_in_template' => array(
2164 'classname' => 'core_competency\external',
2165 'methodname' => 'count_competencies_in_template',
2166 'classpath' => '',
2167 'description' => 'Count a list of a competencies for a given template.',
2168 'type' => 'read',
2169 'capabilities' => 'moodle/competency:competencyview',
2170 'ajax' => true,
2172 'core_competency_search_competencies' => array(
2173 'classname' => 'core_competency\external',
2174 'methodname' => 'search_competencies',
2175 'classpath' => '',
2176 'description' => 'Search a list of a competencies.',
2177 'type' => 'read',
2178 'capabilities' => 'moodle/competency:competencyview',
2179 'ajax' => true,
2181 'core_competency_set_parent_competency' => array(
2182 'classname' => 'core_competency\external',
2183 'methodname' => 'set_parent_competency',
2184 'classpath' => '',
2185 'description' => 'Set a new parent for a competency.',
2186 'type' => 'write',
2187 'capabilities' => 'moodle/competency:competencymanage',
2188 'ajax' => true,
2190 'core_competency_move_up_competency' => array(
2191 'classname' => 'core_competency\external',
2192 'methodname' => 'move_up_competency',
2193 'classpath' => '',
2194 'description' => 'Re-order a competency.',
2195 'type' => 'write',
2196 'capabilities' => 'moodle/competency:competencymanage',
2197 'ajax' => true,
2199 'core_competency_move_down_competency' => array(
2200 'classname' => 'core_competency\external',
2201 'methodname' => 'move_down_competency',
2202 'classpath' => '',
2203 'description' => 'Re-order a competency.',
2204 'type' => 'write',
2205 'capabilities' => 'moodle/competency:competencymanage',
2206 'ajax' => true,
2208 'core_competency_list_course_module_competencies' => array(
2209 'classname' => 'core_competency\external',
2210 'methodname' => 'list_course_module_competencies',
2211 'classpath' => '',
2212 'description' => 'List the competencies in a course module',
2213 'type' => 'read',
2214 'capabilities' => 'moodle/competency:coursecompetencyview',
2215 'ajax' => true,
2217 'core_competency_count_course_module_competencies' => array(
2218 'classname' => 'core_competency\external',
2219 'methodname' => 'count_course_module_competencies',
2220 'classpath' => '',
2221 'description' => 'Count the competencies in a course module',
2222 'type' => 'read',
2223 'capabilities' => 'moodle/competency:coursecompetencyview',
2224 'ajax' => true,
2226 'core_competency_list_course_competencies' => array(
2227 'classname' => 'core_competency\external',
2228 'methodname' => 'list_course_competencies',
2229 'classpath' => '',
2230 'description' => 'List the competencies in a course',
2231 'type' => 'read',
2232 'capabilities' => 'moodle/competency:coursecompetencyview',
2233 'ajax' => true,
2234 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2236 'core_competency_count_competencies_in_course' => array(
2237 'classname' => 'core_competency\external',
2238 'methodname' => 'count_competencies_in_course',
2239 'classpath' => '',
2240 'description' => 'List the competencies in a course',
2241 'type' => 'read',
2242 'capabilities' => 'moodle/competency:coursecompetencyview',
2243 'ajax' => true,
2245 'core_competency_count_courses_using_competency' => array(
2246 'classname' => 'core_competency\external',
2247 'methodname' => 'count_courses_using_competency',
2248 'classpath' => '',
2249 'description' => 'List the courses using a competency',
2250 'type' => 'read',
2251 'capabilities' => 'moodle/competency:coursecompetencyview',
2252 'ajax' => true,
2254 'core_competency_add_competency_to_course' => array(
2255 'classname' => 'core_competency\external',
2256 'methodname' => 'add_competency_to_course',
2257 'classpath' => '',
2258 'description' => 'Add the competency to a course',
2259 'type' => 'write',
2260 'capabilities' => 'moodle/competency:coursecompetencymanage',
2261 'ajax' => true,
2263 'core_competency_add_competency_to_template' => array(
2264 'classname' => 'core_competency\external',
2265 'methodname' => 'add_competency_to_template',
2266 'classpath' => '',
2267 'description' => 'Add the competency to a template',
2268 'type' => 'write',
2269 'capabilities' => 'moodle/competency:templatemanage',
2270 'ajax' => true,
2272 'core_competency_remove_competency_from_course' => array(
2273 'classname' => 'core_competency\external',
2274 'methodname' => 'remove_competency_from_course',
2275 'classpath' => '',
2276 'description' => 'Remove a competency from a course',
2277 'type' => 'write',
2278 'capabilities' => 'moodle/competency:coursecompetencymanage',
2279 'ajax' => true,
2281 'core_competency_set_course_competency_ruleoutcome' => array(
2282 'classname' => 'core_competency\external',
2283 'methodname' => 'set_course_competency_ruleoutcome',
2284 'classpath' => '',
2285 'description' => 'Modify the ruleoutcome value for course competency',
2286 'type' => 'write',
2287 'capabilities' => 'moodle/competency:coursecompetencymanage',
2288 'ajax' => true,
2290 'core_competency_remove_competency_from_template' => array(
2291 'classname' => 'core_competency\external',
2292 'methodname' => 'remove_competency_from_template',
2293 'classpath' => '',
2294 'description' => 'Remove a competency from a template',
2295 'type' => 'write',
2296 'capabilities' => 'moodle/competency:templatemanage',
2297 'ajax' => true,
2299 'core_competency_reorder_course_competency' => array(
2300 'classname' => 'core_competency\external',
2301 'methodname' => 'reorder_course_competency',
2302 'classpath' => '',
2303 'description' => 'Move a course competency to a new relative sort order.',
2304 'type' => 'write',
2305 'capabilities' => 'moodle/competency:coursecompetencymanage',
2306 'ajax' => true,
2308 'core_competency_reorder_template_competency' => array(
2309 'classname' => 'core_competency\external',
2310 'methodname' => 'reorder_template_competency',
2311 'classpath' => '',
2312 'description' => 'Move a template competency to a new relative sort order.',
2313 'type' => 'write',
2314 'capabilities' => 'moodle/competency:templatemanage',
2315 'ajax' => true,
2317 'core_competency_create_template' => array(
2318 'classname' => 'core_competency\external',
2319 'methodname' => 'create_template',
2320 'classpath' => '',
2321 'description' => 'Creates new learning plan templates.',
2322 'type' => 'write',
2323 'capabilities' => 'moodle/competency:templatemanage',
2324 'ajax' => true,
2326 'core_competency_duplicate_template' => array(
2327 'classname' => 'core_competency\external',
2328 'methodname' => 'duplicate_template',
2329 'classpath' => '',
2330 'description' => 'Duplicate learning plan template.',
2331 'type' => 'write',
2332 'capabilities' => 'moodle/competency:templatemanage',
2333 'ajax' => true,
2335 'core_competency_read_template' => array(
2336 'classname' => 'core_competency\external',
2337 'methodname' => 'read_template',
2338 'classpath' => '',
2339 'description' => 'Load a summary of a learning plan template.',
2340 'type' => 'read',
2341 'capabilities' => 'moodle/competency:templateview',
2342 'ajax' => true,
2344 'core_competency_delete_template' => array(
2345 'classname' => 'core_competency\external',
2346 'methodname' => 'delete_template',
2347 'classpath' => '',
2348 'description' => 'Delete a learning plan template.',
2349 'type' => 'write',
2350 'capabilities' => 'moodle/competency:templatemanage',
2351 'ajax' => true,
2353 'core_competency_update_template' => array(
2354 'classname' => 'core_competency\external',
2355 'methodname' => 'update_template',
2356 'classpath' => '',
2357 'description' => 'Update a learning plan template.',
2358 'type' => 'write',
2359 'capabilities' => 'moodle/competency:templatemanage',
2360 'ajax' => true,
2362 'core_competency_list_templates' => array(
2363 'classname' => 'core_competency\external',
2364 'methodname' => 'list_templates',
2365 'classpath' => '',
2366 'description' => 'Load a list of a learning plan templates.',
2367 'type' => 'read',
2368 'capabilities' => 'moodle/competency:templateview',
2369 'ajax' => true,
2371 'core_competency_list_templates_using_competency' => array(
2372 'classname' => 'core_competency\external',
2373 'methodname' => 'list_templates_using_competency',
2374 'classpath' => '',
2375 'description' => 'Load a list of a learning plan templates for a given competency.',
2376 'type' => 'read',
2377 'capabilities' => 'moodle/competency:templateview',
2378 'ajax' => true,
2380 'core_competency_count_templates' => array(
2381 'classname' => 'core_competency\external',
2382 'methodname' => 'count_templates',
2383 'classpath' => '',
2384 'description' => 'Count a list of a learning plan templates.',
2385 'type' => 'read',
2386 'capabilities' => 'moodle/competency:templateview',
2387 'ajax' => true,
2389 'core_competency_count_templates_using_competency' => array(
2390 'classname' => 'core_competency\external',
2391 'methodname' => 'count_templates_using_competency',
2392 'classpath' => '',
2393 'description' => 'Count a list of a learning plan templates for a given competency.',
2394 'type' => 'read',
2395 'capabilities' => 'moodle/competency:templateview',
2396 'ajax' => true,
2398 'core_competency_create_plan' => array(
2399 'classname' => 'core_competency\external',
2400 'methodname' => 'create_plan',
2401 'classpath' => '',
2402 'description' => 'Creates a learning plan.',
2403 'type' => 'write',
2404 'capabilities' => 'moodle/competency:planmanage',
2405 'ajax' => true,
2407 'core_competency_update_plan' => array(
2408 'classname' => 'core_competency\external',
2409 'methodname' => 'update_plan',
2410 'classpath' => '',
2411 'description' => 'Updates a learning plan.',
2412 'type' => 'write',
2413 'capabilities' => 'moodle/competency:planmanage',
2414 'ajax' => true,
2416 'core_competency_complete_plan' => array(
2417 'classname' => 'core_competency\external',
2418 'methodname' => 'complete_plan',
2419 'classpath' => '',
2420 'description' => 'Complete learning plan.',
2421 'type' => 'write',
2422 'capabilities' => 'moodle/competency:planmanage',
2423 'ajax' => true,
2425 'core_competency_reopen_plan' => array(
2426 'classname' => 'core_competency\external',
2427 'methodname' => 'reopen_plan',
2428 'classpath' => '',
2429 'description' => 'Reopen learning plan.',
2430 'type' => 'write',
2431 'capabilities' => 'moodle/competency:planmanage',
2432 'ajax' => true,
2434 'core_competency_read_plan' => array(
2435 'classname' => 'core_competency\external',
2436 'methodname' => 'read_plan',
2437 'classpath' => '',
2438 'description' => 'Load a learning plan.',
2439 'type' => 'read',
2440 'capabilities' => 'moodle/competency:planviewown',
2441 'ajax' => true,
2443 'core_competency_delete_plan' => array(
2444 'classname' => 'core_competency\external',
2445 'methodname' => 'delete_plan',
2446 'classpath' => '',
2447 'description' => 'Delete a learning plan.',
2448 'type' => 'write',
2449 'capabilities' => 'moodle/competency:planmanage',
2450 'ajax' => true,
2452 'core_competency_list_user_plans' => array(
2453 'classname' => 'core_competency\external',
2454 'methodname' => 'list_user_plans',
2455 'classpath' => '',
2456 'description' => 'List a user\'s learning plans.',
2457 'type' => 'read',
2458 'capabilities' => 'moodle/competency:planviewown',
2459 'ajax' => true,
2461 'core_competency_list_plan_competencies' => array(
2462 'classname' => 'core_competency\external',
2463 'methodname' => 'list_plan_competencies',
2464 'classpath' => '',
2465 'description' => 'List the competencies in a plan',
2466 'type' => 'read',
2467 'capabilities' => 'moodle/competency:planviewown',
2468 'ajax' => true,
2470 'core_competency_add_competency_to_plan' => array(
2471 'classname' => 'core_competency\external',
2472 'methodname' => 'add_competency_to_plan',
2473 'classpath' => '',
2474 'description' => 'Add the competency to a learning plan',
2475 'type' => 'write',
2476 'capabilities' => 'moodle/competency:planmanage',
2477 'ajax' => true,
2479 'core_competency_remove_competency_from_plan' => array(
2480 'classname' => 'core_competency\external',
2481 'methodname' => 'remove_competency_from_plan',
2482 'classpath' => '',
2483 'description' => 'Remove the competency from a learning plan',
2484 'type' => 'write',
2485 'capabilities' => 'moodle/competency:planmanage',
2486 'ajax' => true,
2488 'core_competency_reorder_plan_competency' => array(
2489 'classname' => 'core_competency\external',
2490 'methodname' => 'reorder_plan_competency',
2491 'classpath' => '',
2492 'description' => 'Move a plan competency to a new relative sort order.',
2493 'type' => 'write',
2494 'capabilities' => 'moodle/competency:planmanage',
2495 'ajax' => true,
2497 'core_competency_plan_request_review' => array(
2498 'classname' => 'core_competency\external',
2499 'methodname' => 'plan_request_review',
2500 'classpath' => '',
2501 'description' => 'Request for a plan to be reviewed.',
2502 'type' => 'write',
2503 'capabilities' => 'moodle/competency:planmanagedraft',
2504 'ajax' => true,
2506 'core_competency_plan_start_review' => array(
2507 'classname' => 'core_competency\external',
2508 'methodname' => 'plan_start_review',
2509 'classpath' => '',
2510 'description' => 'Start the review of a plan.',
2511 'type' => 'write',
2512 'capabilities' => 'moodle/competency:planmanage',
2513 'ajax' => true,
2515 'core_competency_plan_stop_review' => array(
2516 'classname' => 'core_competency\external',
2517 'methodname' => 'plan_stop_review',
2518 'classpath' => '',
2519 'description' => 'Stop the review of a plan.',
2520 'type' => 'write',
2521 'capabilities' => 'moodle/competency:planmanage',
2522 'ajax' => true,
2524 'core_competency_plan_cancel_review_request' => array(
2525 'classname' => 'core_competency\external',
2526 'methodname' => 'plan_cancel_review_request',
2527 'classpath' => '',
2528 'description' => 'Cancel the review of a plan.',
2529 'type' => 'write',
2530 'capabilities' => 'moodle/competency:planmanagedraft',
2531 'ajax' => true,
2533 'core_competency_approve_plan' => array(
2534 'classname' => 'core_competency\external',
2535 'methodname' => 'approve_plan',
2536 'classpath' => '',
2537 'description' => 'Approve a plan.',
2538 'type' => 'write',
2539 'capabilities' => 'moodle/competency:planmanage',
2540 'ajax' => true,
2542 'core_competency_unapprove_plan' => array(
2543 'classname' => 'core_competency\external',
2544 'methodname' => 'unapprove_plan',
2545 'classpath' => '',
2546 'description' => 'Unapprove a plan.',
2547 'type' => 'write',
2548 'capabilities' => 'moodle/competency:planmanage',
2549 'ajax' => true,
2551 'core_competency_template_has_related_data' => array(
2552 'classname' => 'core_competency\external',
2553 'methodname' => 'template_has_related_data',
2554 'classpath' => '',
2555 'description' => 'Check if a template has related data',
2556 'type' => 'read',
2557 'capabilities' => 'moodle/competency:templateview',
2558 'ajax' => true,
2560 'core_competency_get_scale_values' => array(
2561 'classname' => 'core_competency\external',
2562 'methodname' => 'get_scale_values',
2563 'classpath' => '',
2564 'description' => 'Fetch the values for a specific scale',
2565 'type' => 'read',
2566 'capabilities' => 'moodle/competency:competencymanage',
2567 'ajax' => true,
2568 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2570 'core_competency_add_related_competency' => array(
2571 'classname' => 'core_competency\external',
2572 'methodname' => 'add_related_competency',
2573 'classpath' => '',
2574 'description' => 'Adds a related competency',
2575 'type' => 'write',
2576 'capabilities' => 'moodle/competency:competencymanage',
2577 'ajax' => true,
2579 'core_competency_remove_related_competency' => array(
2580 'classname' => 'core_competency\external',
2581 'methodname' => 'remove_related_competency',
2582 'classpath' => '',
2583 'description' => 'Remove a related competency',
2584 'type' => 'write',
2585 'capabilities' => 'moodle/competency:competencymanage',
2586 'ajax' => true,
2588 'core_competency_read_user_evidence' => array(
2589 'classname' => 'core_competency\external',
2590 'methodname' => 'read_user_evidence',
2591 'classpath' => '',
2592 'description' => 'Read an evidence of prior learning.',
2593 'type' => 'read',
2594 'capabilities' => 'moodle/competency:userevidenceview',
2595 'ajax' => true,
2597 'core_competency_delete_user_evidence' => array(
2598 'classname' => 'core_competency\external',
2599 'methodname' => 'delete_user_evidence',
2600 'classpath' => '',
2601 'description' => 'Delete an evidence of prior learning.',
2602 'type' => 'write',
2603 'capabilities' => 'moodle/competency:userevidencemanageown',
2604 'ajax' => true,
2606 'core_competency_create_user_evidence_competency' => array(
2607 'classname' => 'core_competency\external',
2608 'methodname' => 'create_user_evidence_competency',
2609 'classpath' => '',
2610 'description' => 'Create an evidence of prior learning relationship with a competency.',
2611 'type' => 'read',
2612 'capabilities' => 'moodle/competency:userevidencemanageown, moodle/competency:competencyview',
2613 'ajax' => true,
2615 'core_competency_delete_user_evidence_competency' => array(
2616 'classname' => 'core_competency\external',
2617 'methodname' => 'delete_user_evidence_competency',
2618 'classpath' => '',
2619 'description' => 'Delete an evidence of prior learning relationship with a competency.',
2620 'type' => 'write',
2621 'capabilities' => 'moodle/competency:userevidencemanageown',
2622 'ajax' => true,
2624 'core_competency_user_competency_cancel_review_request' => array(
2625 'classname' => 'core_competency\external',
2626 'methodname' => 'user_competency_cancel_review_request',
2627 'classpath' => '',
2628 'description' => 'Cancel a review request.',
2629 'type' => 'write',
2630 'capabilities' => 'moodle/competency:userevidencemanageown',
2631 'ajax' => true,
2633 'core_competency_user_competency_request_review' => array(
2634 'classname' => 'core_competency\external',
2635 'methodname' => 'user_competency_request_review',
2636 'classpath' => '',
2637 'description' => 'Request a review.',
2638 'type' => 'write',
2639 'capabilities' => 'moodle/competency:userevidencemanageown',
2640 'ajax' => true,
2642 'core_competency_user_competency_start_review' => array(
2643 'classname' => 'core_competency\external',
2644 'methodname' => 'user_competency_start_review',
2645 'classpath' => '',
2646 'description' => 'Start a review.',
2647 'type' => 'write',
2648 'capabilities' => 'moodle/competency:competencygrade',
2649 'ajax' => true,
2651 'core_competency_user_competency_stop_review' => array(
2652 'classname' => 'core_competency\external',
2653 'methodname' => 'user_competency_stop_review',
2654 'classpath' => '',
2655 'description' => 'Stop a review.',
2656 'type' => 'write',
2657 'capabilities' => 'moodle/competency:competencygrade',
2658 'ajax' => true,
2660 'core_competency_user_competency_viewed' => array(
2661 'classname' => 'core_competency\external',
2662 'methodname' => 'user_competency_viewed',
2663 'classpath' => '',
2664 'description' => 'Log the user competency viewed event.',
2665 'type' => 'read',
2666 'capabilities' => 'moodle/competency:usercompetencyview',
2667 'ajax' => true,
2668 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2670 'core_competency_user_competency_viewed_in_plan' => array(
2671 'classname' => 'core_competency\external',
2672 'methodname' => 'user_competency_viewed_in_plan',
2673 'classpath' => '',
2674 'description' => 'Log the user competency viewed in plan event.',
2675 'type' => 'read',
2676 'capabilities' => 'moodle/competency:usercompetencyview',
2677 'ajax' => true,
2678 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2680 'core_competency_user_competency_viewed_in_course' => array(
2681 'classname' => 'core_competency\external',
2682 'methodname' => 'user_competency_viewed_in_course',
2683 'classpath' => '',
2684 'description' => 'Log the user competency viewed in course event',
2685 'type' => 'read',
2686 'capabilities' => 'moodle/competency:usercompetencyview',
2687 'ajax' => true,
2688 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2690 'core_competency_user_competency_plan_viewed' => array(
2691 'classname' => 'core_competency\external',
2692 'methodname' => 'user_competency_plan_viewed',
2693 'classpath' => '',
2694 'description' => 'Log the user competency plan viewed event.',
2695 'type' => 'read',
2696 'capabilities' => 'moodle/competency:usercompetencyview',
2697 'ajax' => true,
2698 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2700 'core_competency_grade_competency' => array(
2701 'classname' => 'core_competency\external',
2702 'methodname' => 'grade_competency',
2703 'classpath' => '',
2704 'description' => 'Grade a competency.',
2705 'type' => 'write',
2706 'capabilities' => 'moodle/competency:competencygrade',
2707 'ajax' => true,
2709 'core_competency_grade_competency_in_plan' => array(
2710 'classname' => 'core_competency\external',
2711 'methodname' => 'grade_competency_in_plan',
2712 'classpath' => '',
2713 'description' => 'Grade a competency from the user plan page.',
2714 'type' => 'write',
2715 'capabilities' => 'moodle/competency:competencygrade',
2716 'ajax' => true,
2718 'core_competency_grade_competency_in_course' => array(
2719 'classname' => 'core_competency\external',
2720 'methodname' => 'grade_competency_in_course',
2721 'classpath' => '',
2722 'description' => 'Grade a competency from the course page.',
2723 'type' => 'write',
2724 'capabilities' => 'moodle/competency:competencygrade',
2725 'ajax' => true,
2726 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2728 'core_competency_unlink_plan_from_template' => array(
2729 'classname' => 'core_competency\external',
2730 'methodname' => 'unlink_plan_from_template',
2731 'classpath' => '',
2732 'description' => 'Unlink a plan form it template.',
2733 'type' => 'write',
2734 'capabilities' => 'moodle/competency:planmanage',
2735 'ajax' => true,
2737 'core_competency_template_viewed' => array(
2738 'classname' => 'core_competency\external',
2739 'methodname' => 'template_viewed',
2740 'classpath' => '',
2741 'description' => 'Log event template viewed',
2742 'type' => 'read',
2743 'capabilities' => 'moodle/competency:templateview',
2744 'ajax' => true,
2746 'core_competency_request_review_of_user_evidence_linked_competencies' => array(
2747 'classname' => 'core_competency\external',
2748 'methodname' => 'request_review_of_user_evidence_linked_competencies',
2749 'classpath' => '',
2750 'description' => 'Send user evidence competencies in review',
2751 'type' => 'write',
2752 'capabilities' => 'moodle/competency:userevidencemanageown',
2753 'ajax' => true,
2755 'core_competency_update_course_competency_settings' => array(
2756 'classname' => 'core_competency\external',
2757 'methodname' => 'update_course_competency_settings',
2758 'classpath' => '',
2759 'description' => 'Update the course competency settings',
2760 'type' => 'write',
2761 'capabilities' => 'moodle/competency:coursecompetencyconfigure',
2762 'ajax' => true,
2764 'core_competency_delete_evidence' => array(
2765 'classname' => 'core_competency\external',
2766 'methodname' => 'delete_evidence',
2767 'classpath' => '',
2768 'description' => 'Delete an evidence',
2769 'type' => 'write',
2770 'capabilities' => 'moodle/competency:evidencedelete',
2771 'ajax' => true,
2772 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2775 'core_webservice_get_site_info' => array(
2776 'classname' => 'core_webservice_external',
2777 'methodname' => 'get_site_info',
2778 'classpath' => 'webservice/externallib.php',
2779 'description' => 'Return some site info / user info / list web service functions',
2780 'type' => 'read',
2781 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2784 // Blocks functions.
2785 'core_block_get_course_blocks' => array(
2786 'classname' => 'core_block_external',
2787 'methodname' => 'get_course_blocks',
2788 'description' => 'Returns blocks information for a course.',
2789 'type' => 'read',
2790 'capabilities' => '',
2791 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2794 'core_block_get_dashboard_blocks' => array(
2795 'classname' => 'core_block_external',
2796 'methodname' => 'get_dashboard_blocks',
2797 'description' => 'Returns blocks information for the given user dashboard.',
2798 'type' => 'read',
2799 'capabilities' => '',
2800 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2803 'core_block_fetch_addable_blocks' => array(
2804 'classname' => 'core_block\external\fetch_addable_blocks',
2805 'description' => 'Returns all addable blocks in a given page.',
2806 'type' => 'read',
2807 'capabilities' => 'moodle/site:manageblocks',
2808 'ajax' => true,
2809 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2812 // Filters functions.
2813 'core_filters_get_available_in_context' => array(
2814 'classname' => 'core_filters\external',
2815 'methodname' => 'get_available_in_context',
2816 'description' => 'Returns the filters available in the given contexts.',
2817 'type' => 'read',
2818 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2820 'core_filters_get_all_states' => [
2821 'classname' => 'core_filters\external\get_all_states',
2822 'description' => 'Retrieve all the filters and their states (including overridden ones in any context).',
2823 'type' => 'read',
2824 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
2827 'core_customfield_delete_field' => array(
2828 'classname' => 'core_customfield_external',
2829 'methodname' => 'delete_field',
2830 'classpath' => 'customfield/externallib.php',
2831 'description' => 'Deletes an entry',
2832 'type' => 'write',
2833 'ajax' => true,
2835 'core_customfield_reload_template' => array(
2836 'classname' => 'core_customfield_external',
2837 'methodname' => 'reload_template',
2838 'classpath' => 'customfield/externallib.php',
2839 'description' => 'Reloads template',
2840 'type' => 'read',
2841 'ajax' => true,
2843 'core_customfield_create_category' => array(
2844 'classname' => 'core_customfield_external',
2845 'methodname' => 'create_category',
2846 'classpath' => 'customfield/externallib.php',
2847 'description' => 'Creates a new category',
2848 'type' => 'write',
2849 'ajax' => true,
2851 'core_customfield_delete_category' => array(
2852 'classname' => 'core_customfield_external',
2853 'methodname' => 'delete_category',
2854 'classpath' => 'customfield/externallib.php',
2855 'description' => 'Deletes a category',
2856 'type' => 'write',
2857 'ajax' => true,
2859 'core_customfield_move_field' => array(
2860 'classname' => 'core_customfield_external',
2861 'methodname' => 'move_field',
2862 'classpath' => 'customfield/externallib.php',
2863 'description' => 'Drag and drop',
2864 'type' => 'write',
2865 'ajax' => true,
2867 'core_customfield_move_category' => array(
2868 'classname' => 'core_customfield_external',
2869 'methodname' => 'move_category',
2870 'classpath' => 'customfield/externallib.php',
2871 'description' => 'Drag and drop categories',
2872 'type' => 'write',
2873 'ajax' => true,
2875 'core_h5p_get_trusted_h5p_file' => [
2876 'classname' => 'core_h5p\external',
2877 'methodname' => 'get_trusted_h5p_file',
2878 'classpath' => '',
2879 'description' => 'Get the H5P file cleaned for Mobile App.',
2880 'type' => 'read',
2881 'ajax' => true,
2882 'capabilities' => '',
2883 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
2885 'core_table_get_dynamic_table_content' => [
2886 'classname' => 'core_table\external\dynamic\get',
2887 'description' => 'Get the dynamic table content raw html',
2888 'type' => 'read',
2889 'ajax' => true,
2890 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
2892 'core_xapi_statement_post' => [
2893 'classname' => 'core_xapi\external\post_statement',
2894 'classpath' => '',
2895 'description' => 'Post an xAPI statement.',
2896 'type' => 'write',
2897 'ajax' => true,
2898 'capabilities' => '',
2899 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
2901 'core_xapi_post_state' => [
2902 'classname' => 'core_xapi\external\post_state',
2903 'classpath' => '',
2904 'description' => 'Post an xAPI state into an activityId.',
2905 'type' => 'write',
2906 'ajax' => true,
2907 'capabilities' => '',
2908 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
2910 'core_xapi_get_state' => [
2911 'classname' => 'core_xapi\external\get_state',
2912 'classpath' => '',
2913 'description' => 'Get an xAPI state data from an activityId.',
2914 'type' => 'read',
2915 'ajax' => true,
2916 'capabilities' => '',
2917 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
2919 'core_xapi_get_states' => [
2920 'classname' => 'core_xapi\external\get_states',
2921 'description' => 'Get all state ID from an activityId.',
2922 'type' => 'read',
2923 'ajax' => true,
2924 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
2926 'core_xapi_delete_state' => [
2927 'classname' => 'core_xapi\external\delete_state',
2928 'classpath' => '',
2929 'description' => 'Delete an xAPI state data from an activityId.',
2930 'type' => 'write',
2931 'ajax' => true,
2932 'capabilities' => '',
2933 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
2935 'core_xapi_delete_states' => [
2936 'classname' => 'core_xapi\external\delete_states',
2937 'description' => 'Delete all xAPI state data from an activityId.',
2938 'type' => 'write',
2939 'ajax' => true,
2940 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
2942 'core_contentbank_delete_content' => [
2943 'classname' => 'core_contentbank\external\delete_content',
2944 'classpath' => '',
2945 'description' => 'Delete a content from the content bank.',
2946 'type' => 'write',
2947 'ajax' => true,
2948 'capabilities' => 'moodle/contentbank:deleteanycontent',
2950 'core_contentbank_rename_content' => [
2951 'classname' => 'core_contentbank\external\rename_content',
2952 'classpath' => '',
2953 'description' => 'Rename a content in the content bank.',
2954 'type' => 'write',
2955 'ajax' => true,
2956 'capabilities' => 'moodle/contentbank:manageowncontent',
2958 'core_contentbank_copy_content' => [
2959 'classname' => 'core_contentbank\external\copy_content',
2960 'classpath' => '',
2961 'description' => 'Copy a content in the content bank.',
2962 'type' => 'write',
2963 'ajax' => 'true',
2964 'capabilities' => 'moodle/contentbank:copycontent, moodle/contentbank:copyanycontent',
2966 'core_contentbank_set_content_visibility' => [
2967 'classname' => 'core_contentbank\external\set_content_visibility',
2968 'classpath' => '',
2969 'description' => 'Set the visibility of a content in the content bank.',
2970 'type' => 'write',
2971 'ajax' => true,
2972 'capabilities' => 'moodle/contentbank:manageowncontent',
2974 'core_create_userfeedback_action_record' => [
2975 'classname' => 'core\external\record_userfeedback_action',
2976 'classpath' => '',
2977 'description' => 'Record the action that the user takes in the user feedback notification for future use.',
2978 'type' => 'write',
2979 'ajax' => true,
2980 'capabilities' => '',
2982 'core_payment_get_available_gateways' => [
2983 'classname' => 'core_payment\external\get_available_gateways',
2984 'description' => 'Get the list of payment gateways that support the given component/area',
2985 'type' => 'read',
2986 'ajax' => true,
2988 'core_reportbuilder_filters_reset' => [
2989 'classname' => 'core_reportbuilder\external\filters\reset',
2990 'description' => 'Reset filters for given report',
2991 'type' => 'write',
2992 'ajax' => true,
2994 'core_reportbuilder_set_filters' => [
2995 'classname' => 'core_reportbuilder\external\filters\set',
2996 'description' => 'Set filter values for given report',
2997 'type' => 'write',
2998 'ajax' => true,
3000 'core_dynamic_tabs_get_content' => [
3001 'classname' => 'core\external\dynamic_tabs_get_content',
3002 'description' => 'Returns the content for a dynamic tab',
3003 'type' => 'read',
3004 'ajax' => true,
3006 'core_change_editmode' => [
3007 'classname' => 'core\external\editmode',
3008 'methodname' => 'change_editmode',
3009 'description' => 'Change the editing mode',
3010 'type' => 'write',
3011 'ajax' => true,
3013 'core_reportbuilder_reports_delete' => [
3014 'classname' => 'core_reportbuilder\external\reports\delete',
3015 'description' => 'Delete report',
3016 'type' => 'write',
3017 'ajax' => true,
3019 'core_reportbuilder_reports_get' => [
3020 'classname' => 'core_reportbuilder\external\reports\get',
3021 'description' => 'Get custom report',
3022 'type' => 'read',
3023 'ajax' => true,
3025 'core_reportbuilder_list_reports' => [
3026 'classname' => 'core_reportbuilder\external\reports\listing',
3027 'description' => 'List custom reports for current user',
3028 'type' => 'read',
3029 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
3031 'core_reportbuilder_retrieve_report' => [
3032 'classname' => 'core_reportbuilder\external\reports\retrieve',
3033 'description' => 'Retrieve custom report content',
3034 'type' => 'read',
3035 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
3037 'core_reportbuilder_retrieve_system_report' => [
3038 'classname' => 'core_reportbuilder\external\systemreports\retrieve',
3039 'description' => 'Retrieve system report content',
3040 'type' => 'read',
3041 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
3043 'core_reportbuilder_can_view_system_report' => [
3044 'classname' => 'core_reportbuilder\external\systemreports\can_view',
3045 'description' => 'Determine access to a system report',
3046 'type' => 'read',
3047 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
3049 'core_reportbuilder_view_report' => [
3050 'classname' => 'core_reportbuilder\external\reports\view',
3051 'description' => 'Trigger custom report viewed',
3052 'type' => 'write',
3053 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
3055 'core_reportbuilder_columns_add' => [
3056 'classname' => 'core_reportbuilder\external\columns\add',
3057 'description' => 'Add column to report',
3058 'type' => 'write',
3059 'ajax' => true,
3061 'core_reportbuilder_columns_delete' => [
3062 'classname' => 'core_reportbuilder\external\columns\delete',
3063 'description' => 'Delete column from report',
3064 'type' => 'write',
3065 'ajax' => true,
3067 'core_reportbuilder_columns_reorder' => [
3068 'classname' => 'core_reportbuilder\external\columns\reorder',
3069 'description' => 'Re-order column within report',
3070 'type' => 'write',
3071 'ajax' => true,
3073 'core_reportbuilder_columns_sort_get' => [
3074 'classname' => 'core_reportbuilder\external\columns\sort\get',
3075 'description' => 'Retrieve column sorting for report',
3076 'type' => 'read',
3077 'ajax' => true,
3079 'core_reportbuilder_columns_sort_reorder' => [
3080 'classname' => 'core_reportbuilder\external\columns\sort\reorder',
3081 'description' => 'Re-order column sorting within report',
3082 'type' => 'write',
3083 'ajax' => true,
3085 'core_reportbuilder_columns_sort_toggle' => [
3086 'classname' => 'core_reportbuilder\external\columns\sort\toggle',
3087 'description' => 'Toggle sorting of column within report',
3088 'type' => 'write',
3089 'ajax' => true,
3091 'core_reportbuilder_conditions_add' => [
3092 'classname' => 'core_reportbuilder\external\conditions\add',
3093 'description' => 'Add condition to report',
3094 'type' => 'write',
3095 'ajax' => true,
3097 'core_reportbuilder_conditions_delete' => [
3098 'classname' => 'core_reportbuilder\external\conditions\delete',
3099 'description' => 'Delete condition from report',
3100 'type' => 'write',
3101 'ajax' => true,
3103 'core_reportbuilder_conditions_reorder' => [
3104 'classname' => 'core_reportbuilder\external\conditions\reorder',
3105 'description' => 'Re-order condition within report',
3106 'type' => 'write',
3107 'ajax' => true,
3109 'core_reportbuilder_conditions_reset' => [
3110 'classname' => 'core_reportbuilder\external\conditions\reset',
3111 'description' => 'Reset conditions for given report',
3112 'type' => 'write',
3113 'ajax' => true,
3115 'core_reportbuilder_filters_add' => [
3116 'classname' => 'core_reportbuilder\external\filters\add',
3117 'description' => 'Add filter to report',
3118 'type' => 'write',
3119 'ajax' => true,
3121 'core_reportbuilder_filters_delete' => [
3122 'classname' => 'core_reportbuilder\external\filters\delete',
3123 'description' => 'Delete filter from report',
3124 'type' => 'write',
3125 'ajax' => true,
3127 'core_reportbuilder_filters_reorder' => [
3128 'classname' => 'core_reportbuilder\external\filters\reorder',
3129 'description' => 'Re-order filter within report',
3130 'type' => 'write',
3131 'ajax' => true,
3133 'core_reportbuilder_audiences_delete' => [
3134 'classname' => 'core_reportbuilder\external\audiences\delete',
3135 'description' => 'Delete audience from report',
3136 'type' => 'write',
3137 'ajax' => true,
3139 'core_reportbuilder_schedules_delete' => [
3140 'classname' => 'core_reportbuilder\external\schedules\delete',
3141 'description' => 'Delete schedule from report',
3142 'type' => 'write',
3143 'ajax' => true,
3145 'core_reportbuilder_schedules_send' => [
3146 'classname' => 'core_reportbuilder\external\schedules\send',
3147 'description' => 'Send report schedule',
3148 'type' => 'write',
3149 'ajax' => true,
3151 'core_reportbuilder_schedules_toggle' => [
3152 'classname' => 'core_reportbuilder\external\schedules\toggle',
3153 'description' => 'Toggle state of report schedule',
3154 'type' => 'write',
3155 'ajax' => true,
3157 'core_admin_set_plugin_state' => [
3158 'classname' => 'core_admin\external\set_plugin_state',
3159 'description' => 'Set the state of a plugin',
3160 'type' => 'write',
3161 'ajax' => true,
3163 'core_admin_set_plugin_order' => [
3164 'classname' => 'core_admin\external\set_plugin_order',
3165 'description' => 'Set the order of a plugin',
3166 'type' => 'write',
3167 'ajax' => true,
3169 'core_admin_set_block_protection' => [
3170 'classname' => 'core_admin\external\set_block_protection',
3171 'description' => 'Set the protection state for a block plugin',
3172 'type' => 'write',
3173 'ajax' => true,
3175 'core_moodlenet_send_activity' => [
3176 'classname' => 'core\external\moodlenet_send_activity',
3177 'description' => 'Send activity to MoodleNet',
3178 'type' => 'read',
3179 'ajax' => true,
3181 'core_moodlenet_get_share_info_activity' => [
3182 'classname' => 'core\external\moodlenet_get_share_info_activity',
3183 'description' => 'Get information about an activity being shared',
3184 'type' => 'read',
3185 'ajax' => true,
3187 'core_moodlenet_auth_check' => [
3188 'classname' => 'core\external\moodlenet_auth_check',
3189 'description' => 'Check a user has authorized for a given MoodleNet site',
3190 'type' => 'write',
3191 'ajax' => true,
3193 'core_moodlenet_get_shared_course_info' => [
3194 'classname' => 'core\external\moodlenet_get_shared_course_info',
3195 'description' => 'Get information about an course being shared',
3196 'type' => 'read',
3197 'ajax' => true,
3199 'core_moodlenet_send_course' => [
3200 'classname' => 'core\external\moodlenet_send_course',
3201 'description' => 'Send course to MoodleNet',
3202 'type' => 'read',
3203 'ajax' => true,
3207 $services = array(
3208 'Moodle mobile web service' => array(
3209 'functions' => array(), // Unused as we add the service in each function definition, third party services would use this.
3210 'enabled' => 0,
3211 'restrictedusers' => 0,
3212 'shortname' => MOODLE_OFFICIAL_MOBILE_SERVICE,
3213 'downloadfiles' => 1,
3214 'uploadfiles' => 1