2 // This file is part of Moodle - http://moodle.org/
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.
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/>.
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 http://docs.moodle.org/dev/Web_services_API}
27 * - External API: {@link http://docs.moodle.org/dev/External_functions_API}
28 * - Upgrade API: {@link http://docs.moodle.org/dev/Upgrade_API}
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
37 'core_auth_confirm_user' => array(
38 'classname' => 'core_auth_external',
39 'methodname' => 'confirm_user',
40 'description' => 'Confirm a user account.',
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.',
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.',
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.',
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.',
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.',
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.',
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.',
102 'loginrequired' => true,
104 'core_badges_get_user_badges' => array(
105 'classname' => 'core_badges_external',
106 'methodname' => 'get_user_badges',
107 'description' => 'Returns the list of badges awarded to a user.',
109 'capabilities' => 'moodle/badges:viewotherbadges',
110 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
112 'core_blog_get_entries' => array(
113 'classname' => 'core_blog\external',
114 'methodname' => 'get_entries',
115 'description' => 'Returns blog entries.',
117 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
119 'loginrequired' => false,
121 'core_blog_view_entries' => array(
122 'classname' => 'core_blog\external',
123 'methodname' => 'view_entries',
124 'description' => 'Trigger the blog_entries_viewed event.',
126 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
128 'loginrequired' => false,
130 'core_calendar_get_calendar_monthly_view' => array(
131 'classname' => 'core_calendar_external',
132 'methodname' => 'get_calendar_monthly_view',
133 'description' => 'Fetch the monthly view data for a calendar',
134 'classpath' => 'calendar/externallib.php',
136 'capabilities' => '',
138 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
140 'core_calendar_get_calendar_day_view' => array(
141 'classname' => 'core_calendar_external',
142 'methodname' => 'get_calendar_day_view',
143 'description' => 'Fetch the day view data for a calendar',
144 'classpath' => 'calendar/externallib.php',
146 'capabilities' => '',
148 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
150 'core_calendar_get_calendar_upcoming_view' => array(
151 'classname' => 'core_calendar_external',
152 'methodname' => 'get_calendar_upcoming_view',
153 'description' => 'Fetch the upcoming view data for a calendar',
154 'classpath' => 'calendar/externallib.php',
156 'capabilities' => '',
158 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
160 'core_calendar_update_event_start_day' => array(
161 'classname' => 'core_calendar_external',
162 'methodname' => 'update_event_start_day',
163 'description' => 'Update the start day (but not time) for an event.',
164 'classpath' => 'calendar/externallib.php',
166 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
168 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
170 'core_calendar_create_calendar_events' => array(
171 'classname' => 'core_calendar_external',
172 'methodname' => 'create_calendar_events',
173 'description' => 'Create calendar events',
174 'classpath' => 'calendar/externallib.php',
176 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
177 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
179 'core_calendar_delete_calendar_events' => array(
180 'classname' => 'core_calendar_external',
181 'methodname' => 'delete_calendar_events',
182 'description' => 'Delete calendar events',
183 'classpath' => 'calendar/externallib.php',
185 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
187 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
189 'core_calendar_get_calendar_events' => array(
190 'classname' => 'core_calendar_external',
191 'methodname' => 'get_calendar_events',
192 'description' => 'Get calendar events',
193 'classpath' => 'calendar/externallib.php',
195 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
196 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
198 'core_calendar_get_action_events_by_timesort' => array(
199 'classname' => 'core_calendar_external',
200 'methodname' => 'get_calendar_action_events_by_timesort',
201 'description' => 'Get calendar action events by tiemsort',
202 'classpath' => 'calendar/externallib.php',
204 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
206 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
208 'core_calendar_get_action_events_by_course' => array(
209 'classname' => 'core_calendar_external',
210 'methodname' => 'get_calendar_action_events_by_course',
211 'description' => 'Get calendar action events by course',
212 'classpath' => 'calendar/externallib.php',
214 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
216 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
218 'core_calendar_get_action_events_by_courses' => array(
219 'classname' => 'core_calendar_external',
220 'methodname' => 'get_calendar_action_events_by_courses',
221 'description' => 'Get calendar action events by courses',
222 'classpath' => 'calendar/externallib.php',
224 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
226 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
228 'core_calendar_get_calendar_event_by_id' => array(
229 'classname' => 'core_calendar_external',
230 'methodname' => 'get_calendar_event_by_id',
231 'description' => 'Get calendar event by id',
232 'classpath' => 'calendar/externallib.php',
234 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
236 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
238 'core_calendar_submit_create_update_form' => array(
239 'classname' => 'core_calendar_external',
240 'methodname' => 'submit_create_update_form',
241 'description' => 'Submit form data for event form',
242 'classpath' => 'calendar/externallib.php',
244 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
246 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
248 'core_calendar_get_calendar_access_information' => array(
249 'classname' => 'core_calendar_external',
250 'methodname' => 'get_calendar_access_information',
251 'description' => 'Convenience function to retrieve some permissions/access information for the given course calendar.',
252 'classpath' => 'calendar/externallib.php',
254 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
256 'core_calendar_get_allowed_event_types' => array(
257 'classname' => 'core_calendar_external',
258 'methodname' => 'get_allowed_event_types',
259 'description' => 'Get the type of events a user can create in the given course.',
260 'classpath' => 'calendar/externallib.php',
262 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
264 'core_calendar_get_timestamps' => [
265 'classname' => 'core_calendar_external',
266 'methodname' => 'get_timestamps',
267 'description' => 'Fetch unix timestamps for given date times.',
268 'classpath' => 'calendar/externallib.php',
272 'core_cohort_add_cohort_members' => array(
273 'classname' => 'core_cohort_external',
274 'methodname' => 'add_cohort_members',
275 'classpath' => 'cohort/externallib.php',
276 'description' => 'Adds cohort members.',
278 'capabilities' => 'moodle/cohort:assign'
280 'core_cohort_create_cohorts' => array(
281 'classname' => 'core_cohort_external',
282 'methodname' => 'create_cohorts',
283 'classpath' => 'cohort/externallib.php',
284 'description' => 'Creates new cohorts.',
286 'capabilities' => 'moodle/cohort:manage'
288 'core_cohort_delete_cohort_members' => array(
289 'classname' => 'core_cohort_external',
290 'methodname' => 'delete_cohort_members',
291 'classpath' => 'cohort/externallib.php',
292 'description' => 'Deletes cohort members.',
294 'capabilities' => 'moodle/cohort:assign'
296 'core_cohort_delete_cohorts' => array(
297 'classname' => 'core_cohort_external',
298 'methodname' => 'delete_cohorts',
299 'classpath' => 'cohort/externallib.php',
300 'description' => 'Deletes all specified cohorts.',
302 'capabilities' => 'moodle/cohort:manage'
304 'core_cohort_get_cohort_members' => array(
305 'classname' => 'core_cohort_external',
306 'methodname' => 'get_cohort_members',
307 'classpath' => 'cohort/externallib.php',
308 'description' => 'Returns cohort members.',
310 'capabilities' => 'moodle/cohort:view'
312 'core_cohort_search_cohorts' => array(
313 'classname' => 'core_cohort_external',
314 'methodname' => 'search_cohorts',
315 'classpath' => 'cohort/externallib.php',
316 'description' => 'Search for cohorts.',
319 'capabilities' => 'moodle/cohort:view'
321 'core_cohort_get_cohorts' => array(
322 'classname' => 'core_cohort_external',
323 'methodname' => 'get_cohorts',
324 'classpath' => 'cohort/externallib.php',
325 'description' => 'Returns cohort details.',
327 'capabilities' => 'moodle/cohort:view'
329 'core_cohort_update_cohorts' => array(
330 'classname' => 'core_cohort_external',
331 'methodname' => 'update_cohorts',
332 'classpath' => 'cohort/externallib.php',
333 'description' => 'Updates existing cohorts.',
335 'capabilities' => 'moodle/cohort:manage'
337 'core_comment_get_comments' => array(
338 'classname' => 'core_comment_external',
339 'methodname' => 'get_comments',
340 'description' => 'Returns comments.',
342 'capabilities' => 'moodle/comment:view',
343 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
345 'core_comment_add_comments' => array(
346 'classname' => 'core_comment_external',
347 'methodname' => 'add_comments',
348 'description' => 'Adds a comment or comments.',
350 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
352 'core_comment_delete_comments' => array(
353 'classname' => 'core_comment_external',
354 'methodname' => 'delete_comments',
355 'description' => 'Deletes a comment or comments.',
357 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
359 'core_completion_get_activities_completion_status' => array(
360 'classname' => 'core_completion_external',
361 'methodname' => 'get_activities_completion_status',
362 'description' => 'Return the activities completion status for a user in a course.',
364 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
366 'core_completion_get_course_completion_status' => array(
367 'classname' => 'core_completion_external',
368 'methodname' => 'get_course_completion_status',
369 'description' => 'Returns course completion status.',
371 'capabilities' => 'report/completion:view',
372 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
374 'core_completion_mark_course_self_completed' => array(
375 'classname' => 'core_completion_external',
376 'methodname' => 'mark_course_self_completed',
377 'description' => 'Update the course completion status for the current user (if course self-completion is enabled).',
379 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
381 'core_completion_update_activity_completion_status_manually' => array(
382 'classname' => 'core_completion_external',
383 'methodname' => 'update_activity_completion_status_manually',
384 'description' => 'Update completion status for the current user in an activity, only for activities with manual tracking.',
386 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
388 'core_completion_override_activity_completion_status' => array(
389 'classname' => 'core_completion_external',
390 'methodname' => 'override_activity_completion_status',
391 'description' => 'Update completion status for a user in an activity by overriding it.',
393 'capabilities' => 'moodle/course:overridecompletion',
396 'core_course_create_categories' => array(
397 'classname' => 'core_course_external',
398 'methodname' => 'create_categories',
399 'classpath' => 'course/externallib.php',
400 'description' => 'Create course categories',
402 'capabilities' => 'moodle/category:manage'
404 'core_course_create_courses' => array(
405 'classname' => 'core_course_external',
406 'methodname' => 'create_courses',
407 'classpath' => 'course/externallib.php',
408 'description' => 'Create new courses',
410 'capabilities' => 'moodle/course:create, moodle/course:visibility'
412 'core_course_delete_categories' => array(
413 'classname' => 'core_course_external',
414 'methodname' => 'delete_categories',
415 'classpath' => 'course/externallib.php',
416 'description' => 'Delete course categories',
418 'capabilities' => 'moodle/category:manage'
420 'core_course_delete_courses' => array(
421 'classname' => 'core_course_external',
422 'methodname' => 'delete_courses',
423 'classpath' => 'course/externallib.php',
424 'description' => 'Deletes all specified courses',
426 'capabilities' => 'moodle/course:delete'
428 'core_course_delete_modules' => array(
429 'classname' => 'core_course_external',
430 'methodname' => 'delete_modules',
431 'classpath' => 'course/externallib.php',
432 'description' => 'Deletes all specified module instances',
434 'capabilities' => 'moodle/course:manageactivities'
436 'core_course_duplicate_course' => array(
437 'classname' => 'core_course_external',
438 'methodname' => 'duplicate_course',
439 'classpath' => 'course/externallib.php',
440 'description' => 'Duplicate an existing course (creating a new one).',
442 'capabilities' => 'moodle/backup:backupcourse, moodle/restore:restorecourse, moodle/course:create'
444 'core_course_get_categories' => array(
445 'classname' => 'core_course_external',
446 'methodname' => 'get_categories',
447 'classpath' => 'course/externallib.php',
448 'description' => 'Return category details',
450 'capabilities' => 'moodle/category:viewhiddencategories',
451 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
453 'core_course_get_contents' => array(
454 'classname' => 'core_course_external',
455 'methodname' => 'get_course_contents',
456 'classpath' => 'course/externallib.php',
457 'description' => 'Get course contents',
459 'capabilities' => 'moodle/course:update, moodle/course:viewhiddencourses',
460 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
462 'core_course_get_course_module' => array(
463 'classname' => 'core_course_external',
464 'methodname' => 'get_course_module',
465 'classpath' => 'course/externallib.php',
466 'description' => 'Return information about a course module',
468 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
470 'core_course_get_course_module_by_instance' => array(
471 'classname' => 'core_course_external',
472 'methodname' => 'get_course_module_by_instance',
473 'classpath' => 'course/externallib.php',
474 'description' => 'Return information about a given module name and instance id',
476 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
478 'core_course_get_module' => array(
479 'classname' => 'core_course_external',
480 'methodname' => 'get_module',
481 'classpath' => 'course/externallib.php',
482 'description' => 'Returns html with one activity module on course page',
486 'core_course_edit_module' => array(
487 'classname' => 'core_course_external',
488 'methodname' => 'edit_module',
489 'classpath' => 'course/externallib.php',
490 'description' => 'Performs an action on course module (change visibility, duplicate, delete, etc.)',
494 'core_course_edit_section' => array(
495 'classname' => 'core_course_external',
496 'methodname' => 'edit_section',
497 'classpath' => 'course/externallib.php',
498 'description' => 'Performs an action on course section (change visibility, set marker, delete)',
502 'core_course_get_courses' => array(
503 'classname' => 'core_course_external',
504 'methodname' => 'get_courses',
505 'classpath' => 'course/externallib.php',
506 'description' => 'Return course details',
508 'capabilities' => 'moodle/course:view, moodle/course:update, moodle/course:viewhiddencourses',
510 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
512 'core_course_import_course' => array(
513 'classname' => 'core_course_external',
514 'methodname' => 'import_course',
515 'classpath' => 'course/externallib.php',
516 'description' => 'Import course data from a course into another course. Does not include any user data.',
518 'capabilities' => 'moodle/backup:backuptargetimport, moodle/restore:restoretargetimport'
520 'core_course_search_courses' => array(
521 'classname' => 'core_course_external',
522 'methodname' => 'search_courses',
523 'classpath' => 'course/externallib.php',
524 'description' => 'Search courses by (name, module, block, tag)',
527 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
529 'core_course_update_categories' => array(
530 'classname' => 'core_course_external',
531 'methodname' => 'update_categories',
532 'classpath' => 'course/externallib.php',
533 'description' => 'Update categories',
535 'capabilities' => 'moodle/category:manage',
537 'core_course_update_courses' => array(
538 'classname' => 'core_course_external',
539 'methodname' => 'update_courses',
540 'classpath' => 'course/externallib.php',
541 'description' => 'Update courses',
543 'capabilities' => 'moodle/course:update, moodle/course:changecategory, moodle/course:changefullname, '
544 . 'moodle/course:changeshortname, moodle/course:changeidnumber, moodle/course:changesummary, moodle/course:visibility'
546 'core_course_view_course' => array(
547 'classname' => 'core_course_external',
548 'methodname' => 'view_course',
549 'classpath' => 'course/externallib.php',
550 'description' => 'Log that the course was viewed',
552 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
554 'core_course_get_user_navigation_options' => array(
555 'classname' => 'core_course_external',
556 'methodname' => 'get_user_navigation_options',
557 'classpath' => 'course/externallib.php',
558 'description' => 'Return a list of navigation options in a set of courses that are avaialable or not for the current user.',
560 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
562 'core_course_get_user_administration_options' => array(
563 'classname' => 'core_course_external',
564 'methodname' => 'get_user_administration_options',
565 'classpath' => 'course/externallib.php',
566 'description' => 'Return a list of administration options in a set of courses that are avaialable or not for the current
569 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
571 'core_course_get_courses_by_field' => array(
572 'classname' => 'core_course_external',
573 'methodname' => 'get_courses_by_field',
574 'classpath' => 'course/externallib.php',
575 'description' => 'Get courses matching a specific field (id/s, shortname, idnumber, category)',
577 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
579 'core_course_check_updates' => array(
580 'classname' => 'core_course_external',
581 'methodname' => 'check_updates',
582 'classpath' => 'course/externallib.php',
583 'description' => 'Check if there is updates affecting the user for the given course and contexts.',
586 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
588 'core_course_get_updates_since' => array(
589 'classname' => 'core_course_external',
590 'methodname' => 'get_updates_since',
591 'classpath' => 'course/externallib.php',
592 'description' => 'Check if there are updates affecting the user for the given course since the given time stamp.',
595 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
597 'core_course_get_enrolled_courses_by_timeline_classification' => array(
598 'classname' => 'core_course_external',
599 'methodname' => 'get_enrolled_courses_by_timeline_classification',
600 'classpath' => 'course/externallib.php',
601 'description' => 'List of enrolled courses for the given timeline classification (past, inprogress, or future).',
604 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
606 'core_course_get_recent_courses' => array(
607 'classname' => 'core_course_external',
608 'methodname' => 'get_recent_courses',
609 'classpath' => 'course/externallib.php',
610 'description' => 'List of courses a user has accessed most recently.',
613 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
615 'core_course_set_favourite_courses' => array(
616 'classname' => 'core_course_external',
617 'methodname' => 'set_favourite_courses',
618 'classpath' => 'course/externallib.php',
619 'description' => 'Add a list of courses to the list of favourite courses.',
622 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
624 'core_course_get_enrolled_users_by_cmid' => array(
625 'classname' => 'core_course_external',
626 'methodname' => 'get_enrolled_users_by_cmid',
627 'classpath' => 'course/externallib.php',
628 'description' => 'List users by course module id & filter by group id.',
632 'core_course_add_content_item_to_user_favourites' => array(
633 'classname' => 'core_course_external',
634 'methodname' => 'add_content_item_to_user_favourites',
635 'classpath' => 'course/externallib.php',
636 'description' => 'Adds a content item (activity, resource or their subtypes) to the favourites for the user.',
640 'core_course_remove_content_item_from_user_favourites' => array(
641 'classname' => 'core_course_external',
642 'methodname' => 'remove_content_item_from_user_favourites',
643 'classpath' => 'course/externallib.php',
644 'description' => 'Removes a content item (activity, resource or their subtypes) from the favourites for the user.',
648 'core_course_get_activity_picker_info' => array(
649 'classname' => 'core_course_external',
650 'methodname' => 'fetch_modules_activity_chooser',
651 'classpath' => 'course/externallib.php',
652 'description' => 'Fetch all the module information for the activity picker',
656 'core_course_get_course_content_items' => array(
657 'classname' => 'core_course_external',
658 'methodname' => 'get_course_content_items',
659 'classpath' => 'course/externallib.php',
660 'description' => 'Fetch all the content items (activities, resources and their subtypes) for the activity picker',
664 'core_enrol_get_course_enrolment_methods' => array(
665 'classname' => 'core_enrol_external',
666 'methodname' => 'get_course_enrolment_methods',
667 'classpath' => 'enrol/externallib.php',
668 'description' => 'Get the list of course enrolment methods',
670 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
672 'core_enrol_get_enrolled_users' => array(
673 'classname' => 'core_enrol_external',
674 'methodname' => 'get_enrolled_users',
675 'classpath' => 'enrol/externallib.php',
676 'description' => 'Get enrolled users by course id.',
678 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, '
679 . 'moodle/site:accessallgroups',
680 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
682 'core_enrol_get_enrolled_users_with_capability' => array(
683 'classname' => 'core_enrol_external',
684 'methodname' => 'get_enrolled_users_with_capability',
685 'classpath' => 'enrol/externallib.php',
686 'description' => 'For each course and capability specified, return a list of the users that are enrolled in the course
687 and have that capability',
690 'core_enrol_get_potential_users' => array(
691 'classname' => 'core_enrol_external',
692 'methodname' => 'get_potential_users',
693 'classpath' => 'enrol/externallib.php',
694 'description' => 'Get the list of potential users to enrol',
697 'capabilities' => 'moodle/course:enrolreview'
699 'core_enrol_search_users' => [
700 'classname' => 'core_enrol_external',
701 'methodname' => 'search_users',
702 'classpath' => 'enrol/externallib.php',
703 'description' => 'Search within the list of course participants',
706 'capabilities' => 'moodle/course:viewparticipants',
707 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
709 'core_enrol_get_users_courses' => array(
710 'classname' => 'core_enrol_external',
711 'methodname' => 'get_users_courses',
712 'classpath' => 'enrol/externallib.php',
713 'description' => 'Get the list of courses where a user is enrolled in',
715 'capabilities' => 'moodle/course:viewparticipants',
716 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
718 'core_enrol_edit_user_enrolment' => array(
719 'classname' => 'core_enrol_external',
720 'methodname' => 'edit_user_enrolment',
721 'classpath' => 'enrol/externallib.php',
722 'description' => '** DEPRECATED ** Please do not call this function any more.
723 External function that updates a given user enrolment',
727 'core_enrol_submit_user_enrolment_form' => array(
728 'classname' => 'core_enrol_external',
729 'methodname' => 'submit_user_enrolment_form',
730 'classpath' => 'enrol/externallib.php',
731 'description' => 'Submit form data for enrolment form',
735 'core_enrol_unenrol_user_enrolment' => array(
736 'classname' => 'core_enrol_external',
737 'methodname' => 'unenrol_user_enrolment',
738 'classpath' => 'enrol/externallib.php',
739 'description' => 'External function that unenrols a given user enrolment',
743 'core_fetch_notifications' => array(
744 'classname' => 'core_external',
745 'methodname' => 'fetch_notifications',
746 'classpath' => 'lib/external/externallib.php',
747 'description' => 'Return a list of notifications for the current session',
749 'loginrequired' => false,
752 'core_session_touch' => array(
753 'classname' => 'core\session\external',
754 'methodname' => 'touch_session',
755 'description' => 'Keep the users session alive',
757 'loginrequired' => true,
760 'core_session_time_remaining' => array(
761 'classname' => 'core\session\external',
762 'methodname' => 'time_remaining',
763 'description' => 'Count the seconds remaining in this session',
765 'loginrequired' => true,
768 'core_files_get_files' => array(
769 'classname' => 'core_files_external',
770 'methodname' => 'get_files',
771 'description' => 'browse moodle files',
773 'classpath' => 'files/externallib.php',
774 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
776 'core_files_upload' => array(
777 'classname' => 'core_files_external',
778 'methodname' => 'upload',
779 'description' => 'upload a file to moodle',
781 'classpath' => 'files/externallib.php',
783 'core_form_get_filetypes_browser_data' => array(
784 'classname' => 'core_form\external',
785 'methodname' => 'get_filetypes_browser_data',
787 'description' => 'Provides data for the filetypes element browser.',
789 'loginrequired' => false,
792 'core_get_component_strings' => array(
793 'classname' => 'core_external',
794 'methodname' => 'get_component_strings',
795 'classpath' => 'lib/external/externallib.php',
796 'description' => 'Return all raw strings (with {$a->xxx}), for a specific component ' .
797 '- similar to core get_component_strings(), call',
799 'loginrequired' => false,
801 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
803 'core_get_fragment' => array(
804 'classname' => 'core_external',
805 'methodname' => 'get_fragment',
806 'classpath' => 'lib/external/externallib.php',
807 'description' => 'Return a fragment for inclusion, such as a JavaScript page.',
811 'core_get_string' => array(
812 'classname' => 'core_external',
813 'methodname' => 'get_string',
814 'classpath' => 'lib/external/externallib.php',
815 'description' => 'Return a translated string - similar to core get_string(), call',
817 'loginrequired' => false,
820 'core_get_strings' => array(
821 'classname' => 'core_external',
822 'methodname' => 'get_strings',
823 'classpath' => 'lib/external/externallib.php',
824 'description' => 'Return some translated strings - like several core get_string(), calls',
826 'loginrequired' => false,
829 'core_get_user_dates' => array(
830 'classname' => 'core_external',
831 'methodname' => 'get_user_dates',
832 'classpath' => 'lib/external/externallib.php',
833 'description' => 'Return formatted timestamps',
837 'core_grades_get_grades' => array(
838 'classname' => 'core_grades_external',
839 'methodname' => 'get_grades',
840 'description' => '** DEPRECATED ** Please do not call this function any more.
841 Returns student course total grade and grades for activities.
842 This function does not return category or manual items.
843 This function is suitable for managers or teachers not students.',
845 'capabilities' => 'moodle/grade:view, moodle/grade:viewall, moodle/grade:viewhidden'
847 'core_grades_update_grades' => array(
848 'classname' => 'core_grades_external',
849 'methodname' => 'update_grades',
850 'description' => 'Update a grade item and associated student grades.',
853 'core_grades_grader_gradingpanel_point_fetch' => [
854 'classname' => 'core_grades\\grades\\grader\\gradingpanel\\point\\external\\fetch',
855 'methodname' => 'execute',
856 'description' => 'Fetch the data required to display the grader grading panel for simple grading, ' .
857 'creating the grade item if required',
860 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE
],
862 'core_grades_grader_gradingpanel_point_store' => [
863 'classname' => 'core_grades\\grades\\grader\\gradingpanel\\point\\external\\store',
864 'methodname' => 'execute',
865 'description' => 'Store the data required to display the grader grading panel for simple grading',
868 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE
],
870 'core_grades_grader_gradingpanel_scale_fetch' => [
871 'classname' => 'core_grades\\grades\\grader\\gradingpanel\\scale\\external\\fetch',
872 'methodname' => 'execute',
873 'description' => 'Fetch the data required to display the grader grading panel for scale-based grading, ' .
874 'creating the grade item if required',
877 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE
],
879 'core_grades_grader_gradingpanel_scale_store' => [
880 'classname' => 'core_grades\\grades\\grader\\gradingpanel\\scale\\external\\store',
881 'methodname' => 'execute',
882 'description' => 'Store the data required to display the grader grading panel for scale-based grading',
885 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE
],
887 'core_grading_get_definitions' => array(
888 'classname' => 'core_grading_external',
889 'methodname' => 'get_definitions',
890 'description' => 'Get grading definitions',
893 'core_grading_get_gradingform_instances' => array(
894 'classname' => 'core_grading_external',
895 'methodname' => 'get_gradingform_instances',
896 'description' => 'Get grading form instances',
899 'core_grading_save_definitions' => array(
900 'classname' => 'core_grading_external',
901 'methodname' => 'save_definitions',
902 'description' => 'Save grading definitions',
905 'core_group_add_group_members' => array(
906 'classname' => 'core_group_external',
907 'methodname' => 'add_group_members',
908 'classpath' => 'group/externallib.php',
909 'description' => 'Adds group members.',
911 'capabilities' => 'moodle/course:managegroups',
913 'core_group_assign_grouping' => array(
914 'classname' => 'core_group_external',
915 'methodname' => 'assign_grouping',
916 'classpath' => 'group/externallib.php',
917 'description' => 'Assing groups from groupings',
920 'core_group_create_groupings' => array(
921 'classname' => 'core_group_external',
922 'methodname' => 'create_groupings',
923 'classpath' => 'group/externallib.php',
924 'description' => 'Creates new groupings',
927 'core_group_create_groups' => array(
928 'classname' => 'core_group_external',
929 'methodname' => 'create_groups',
930 'classpath' => 'group/externallib.php',
931 'description' => 'Creates new groups.',
933 'capabilities' => 'moodle/course:managegroups'
935 'core_group_delete_group_members' => array(
936 'classname' => 'core_group_external',
937 'methodname' => 'delete_group_members',
938 'classpath' => 'group/externallib.php',
939 'description' => 'Deletes group members.',
941 'capabilities' => 'moodle/course:managegroups'
943 'core_group_delete_groupings' => array(
944 'classname' => 'core_group_external',
945 'methodname' => 'delete_groupings',
946 'classpath' => 'group/externallib.php',
947 'description' => 'Deletes all specified groupings.',
950 'core_group_delete_groups' => array(
951 'classname' => 'core_group_external',
952 'methodname' => 'delete_groups',
953 'classpath' => 'group/externallib.php',
954 'description' => 'Deletes all specified groups.',
956 'capabilities' => 'moodle/course:managegroups'
958 'core_group_get_activity_allowed_groups' => array(
959 'classname' => 'core_group_external',
960 'methodname' => 'get_activity_allowed_groups',
961 'classpath' => 'group/externallib.php',
962 'description' => 'Gets a list of groups that the user is allowed to access within the specified activity.',
964 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
966 'core_group_get_activity_groupmode' => array(
967 'classname' => 'core_group_external',
968 'methodname' => 'get_activity_groupmode',
969 'classpath' => 'group/externallib.php',
970 'description' => 'Returns effective groupmode used in a given activity.',
972 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
974 'core_group_get_course_groupings' => array(
975 'classname' => 'core_group_external',
976 'methodname' => 'get_course_groupings',
977 'classpath' => 'group/externallib.php',
978 'description' => 'Returns all groupings in specified course.',
980 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
982 'core_group_get_course_groups' => array(
983 'classname' => 'core_group_external',
984 'methodname' => 'get_course_groups',
985 'classpath' => 'group/externallib.php',
986 'description' => 'Returns all groups in specified course.',
989 'capabilities' => 'moodle/course:managegroups',
990 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
992 'core_group_get_course_user_groups' => array(
993 'classname' => 'core_group_external',
994 'methodname' => 'get_course_user_groups',
995 'classpath' => 'group/externallib.php',
996 'description' => 'Returns all groups in specified course for the specified user.',
998 'capabilities' => 'moodle/course:managegroups',
999 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1001 'core_group_get_group_members' => array(
1002 'classname' => 'core_group_external',
1003 'methodname' => 'get_group_members',
1004 'classpath' => 'group/externallib.php',
1005 'description' => 'Returns group members.',
1007 'capabilities' => 'moodle/course:managegroups'
1009 'core_group_get_groupings' => array(
1010 'classname' => 'core_group_external',
1011 'methodname' => 'get_groupings',
1012 'classpath' => 'group/externallib.php',
1013 'description' => 'Returns groupings details.',
1016 'core_group_get_groups' => array(
1017 'classname' => 'core_group_external',
1018 'methodname' => 'get_groups',
1019 'classpath' => 'group/externallib.php',
1020 'description' => 'Returns group details.',
1022 'capabilities' => 'moodle/course:managegroups'
1024 'core_group_unassign_grouping' => array(
1025 'classname' => 'core_group_external',
1026 'methodname' => 'unassign_grouping',
1027 'classpath' => 'group/externallib.php',
1028 'description' => 'Unassing groups from groupings',
1031 'core_group_update_groupings' => array(
1032 'classname' => 'core_group_external',
1033 'methodname' => 'update_groupings',
1034 'classpath' => 'group/externallib.php',
1035 'description' => 'Updates existing groupings',
1038 'core_group_update_groups' => array(
1039 'classname' => 'core_group_external',
1040 'methodname' => 'update_groups',
1041 'classpath' => 'group/externallib.php',
1042 'description' => 'Updates existing groups.',
1044 'capabilities' => 'moodle/course:managegroups'
1046 'core_message_mute_conversations' => array(
1047 'classname' => 'core_message_external',
1048 'methodname' => 'mute_conversations',
1049 'classpath' => 'message/externallib.php',
1050 'description' => 'Mutes a list of conversations',
1053 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1055 'core_message_unmute_conversations' => array(
1056 'classname' => 'core_message_external',
1057 'methodname' => 'unmute_conversations',
1058 'classpath' => 'message/externallib.php',
1059 'description' => 'Unmutes a list of conversations',
1062 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1064 'core_message_block_user' => array(
1065 'classname' => 'core_message_external',
1066 'methodname' => 'block_user',
1067 'classpath' => 'message/externallib.php',
1068 'description' => 'Blocks a user',
1071 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1073 'core_message_block_contacts' => array(
1074 'classname' => 'core_message_external',
1075 'methodname' => 'block_contacts',
1076 'classpath' => 'message/externallib.php',
1077 'description' => '** DEPRECATED ** Please do not call this function any more.
1081 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1083 'core_message_create_contacts' => array(
1084 'classname' => 'core_message_external',
1085 'methodname' => 'create_contacts',
1086 'classpath' => 'message/externallib.php',
1087 'description' => '** DEPRECATED ** Please do not call this function any more.
1088 Add contacts to the contact list',
1091 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1093 'core_message_get_contact_requests' => array(
1094 'classname' => 'core_message_external',
1095 'methodname' => 'get_contact_requests',
1096 'classpath' => 'message/externallib.php',
1097 'description' => 'Returns contact requests for a user',
1100 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1102 'core_message_create_contact_request' => array(
1103 'classname' => 'core_message_external',
1104 'methodname' => 'create_contact_request',
1105 'classpath' => 'message/externallib.php',
1106 'description' => 'Creates a contact request',
1109 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1111 'core_message_confirm_contact_request' => array(
1112 'classname' => 'core_message_external',
1113 'methodname' => 'confirm_contact_request',
1114 'classpath' => 'message/externallib.php',
1115 'description' => 'Confirms a contact request',
1118 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1120 'core_message_decline_contact_request' => array(
1121 'classname' => 'core_message_external',
1122 'methodname' => 'decline_contact_request',
1123 'classpath' => 'message/externallib.php',
1124 'description' => 'Declines a contact request',
1127 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1129 'core_message_get_received_contact_requests_count' => array(
1130 'classname' => 'core_message_external',
1131 'methodname' => 'get_received_contact_requests_count',
1132 'classpath' => 'message/externallib.php',
1133 'description' => 'Gets the number of received contact requests',
1136 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1138 'core_message_delete_contacts' => array(
1139 'classname' => 'core_message_external',
1140 'methodname' => 'delete_contacts',
1141 'classpath' => 'message/externallib.php',
1142 'description' => 'Remove contacts from the contact list',
1145 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1147 'core_message_delete_conversation' => array(
1148 'classname' => 'core_message_external',
1149 'methodname' => 'delete_conversation',
1150 'classpath' => 'message/externallib.php',
1151 'description' => '** DEPRECATED ** Please do not call this function any more.
1152 Deletes a conversation.',
1154 'capabilities' => 'moodle/site:deleteownmessage',
1156 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1158 'core_message_delete_conversations_by_id' => array(
1159 'classname' => 'core_message_external',
1160 'methodname' => 'delete_conversations_by_id',
1161 'classpath' => 'message/externallib.php',
1162 'description' => 'Deletes a list of conversations.',
1164 'capabilities' => 'moodle/site:deleteownmessage',
1166 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1168 'core_message_delete_message' => array(
1169 'classname' => 'core_message_external',
1170 'methodname' => 'delete_message',
1171 'classpath' => 'message/externallib.php',
1172 'description' => 'Deletes a message.',
1174 'capabilities' => 'moodle/site:deleteownmessage',
1176 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1178 'core_message_get_blocked_users' => array(
1179 'classname' => 'core_message_external',
1180 'methodname' => 'get_blocked_users',
1181 'classpath' => 'message/externallib.php',
1182 'description' => 'Retrieve a list of users blocked',
1184 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1186 'core_message_data_for_messagearea_search_messages' => array(
1187 'classname' => 'core_message_external',
1188 'methodname' => 'data_for_messagearea_search_messages',
1189 'classpath' => 'message/externallib.php',
1190 'description' => 'Retrieve the template data for searching for messages',
1193 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1195 'core_message_data_for_messagearea_search_users' => array(
1196 'classname' => 'core_message_external',
1197 'methodname' => 'data_for_messagearea_search_users',
1198 'classpath' => 'message/externallib.php',
1199 'description' => '** DEPRECATED ** Please do not call this function any more.
1200 Retrieve the template data for searching for people',
1204 'core_message_data_for_messagearea_search_users_in_course' => array(
1205 'classname' => 'core_message_external',
1206 'methodname' => 'data_for_messagearea_search_users_in_course',
1207 'classpath' => 'message/externallib.php',
1208 'description' => '** DEPRECATED ** Please do not call this function any more.
1209 Retrieve the template data for searching for people in a course',
1213 'core_message_message_search_users' => array(
1214 'classname' => 'core_message_external',
1215 'methodname' => 'message_search_users',
1216 'classpath' => 'message/externallib.php',
1217 'description' => 'Retrieve the data for searching for people',
1220 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1222 'core_message_data_for_messagearea_conversations' => array(
1223 'classname' => 'core_message_external',
1224 'methodname' => 'data_for_messagearea_conversations',
1225 'classpath' => 'message/externallib.php',
1226 'description' => '** DEPRECATED ** Please do not call this function any more.
1227 Retrieve the template data for the conversation list',
1230 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1232 'core_message_data_for_messagearea_contacts' => array(
1233 'classname' => 'core_message_external',
1234 'methodname' => 'data_for_messagearea_contacts',
1235 'classpath' => 'message/externallib.php',
1236 'description' => '** DEPRECATED ** Please do not call this function any more.
1237 Retrieve the template data for the contact list',
1240 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1242 'core_message_data_for_messagearea_messages' => array(
1243 'classname' => 'core_message_external',
1244 'methodname' => 'data_for_messagearea_messages',
1245 'classpath' => 'message/externallib.php',
1246 'description' => '** DEPRECATED ** Please do not call this function any more.
1247 Retrieve the template data for the messages',
1250 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1252 'core_message_data_for_messagearea_get_most_recent_message' => array(
1253 'classname' => 'core_message_external',
1254 'methodname' => 'data_for_messagearea_get_most_recent_message',
1255 'classpath' => 'message/externallib.php',
1256 'description' => '** DEPRECATED ** Please do not call this function any more.
1257 Retrieve the template data for the most recent message',
1261 'core_message_data_for_messagearea_get_profile' => array(
1262 'classname' => 'core_message_external',
1263 'methodname' => 'data_for_messagearea_get_profile',
1264 'classpath' => 'message/externallib.php',
1265 'description' => '** DEPRECATED ** Please do not call this function any more.
1266 Retrieve the template data for the users\'s profile',
1270 'core_message_get_contacts' => array(
1271 'classname' => 'core_message_external',
1272 'methodname' => 'get_contacts',
1273 'classpath' => 'message/externallib.php',
1274 'description' => '** DEPRECATED ** Please do not call this function any more.
1275 Retrieve the contact list',
1277 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1279 'core_message_get_user_contacts' => array(
1280 'classname' => 'core_message_external',
1281 'methodname' => 'get_user_contacts',
1282 'classpath' => 'message/externallib.php',
1283 'description' => 'Retrieve the contact list',
1286 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1288 'core_message_get_conversations' => array(
1289 'classname' => 'core_message_external',
1290 'methodname' => 'get_conversations',
1291 'classpath' => 'message/externallib.php',
1292 'description' => 'Retrieve a list of conversations for a user',
1294 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1297 'core_message_get_conversation' => array(
1298 'classname' => 'core_message_external',
1299 'methodname' => 'get_conversation',
1300 'classpath' => 'message/externallib.php',
1301 'description' => 'Retrieve a conversation for a user',
1303 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1306 'core_message_get_conversation_between_users' => array(
1307 'classname' => 'core_message_external',
1308 'methodname' => 'get_conversation_between_users',
1309 'classpath' => 'message/externallib.php',
1310 'description' => 'Retrieve a conversation for a user between another user',
1312 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1315 'core_message_get_self_conversation' => array(
1316 'classname' => 'core_message_external',
1317 'methodname' => 'get_self_conversation',
1318 'classpath' => 'message/externallib.php',
1319 'description' => 'Retrieve a self-conversation for a user',
1321 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1324 'core_message_get_messages' => array(
1325 'classname' => 'core_message_external',
1326 'methodname' => 'get_messages',
1327 'classpath' => 'message/externallib.php',
1328 'description' => 'Retrieve a list of messages sent and received by a user (conversations, notifications or both)',
1330 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1333 'core_message_get_conversation_counts' => array(
1334 'classname' => 'core_message_external',
1335 'methodname' => 'get_conversation_counts',
1336 'classpath' => 'message/externallib.php',
1337 'description' => 'Retrieve a list of conversation counts, indexed by type.',
1339 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1342 'core_message_get_unread_conversation_counts' => array(
1343 'classname' => 'core_message_external',
1344 'methodname' => 'get_unread_conversation_counts',
1345 'classpath' => 'message/externallib.php',
1346 'description' => 'Retrieve a list of unread conversation counts, indexed by type.',
1348 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1351 'core_message_get_conversation_members' => array(
1352 'classname' => 'core_message_external',
1353 'methodname' => 'get_conversation_members',
1354 'classpath' => 'message/externallib.php',
1355 'description' => 'Retrieve a list of members in a conversation',
1357 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1360 'core_message_get_member_info' => array(
1361 'classname' => 'core_message_external',
1362 'methodname' => 'get_member_info',
1363 'classpath' => 'message/externallib.php',
1364 'description' => 'Retrieve a user message profiles',
1366 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1369 'core_message_get_unread_conversations_count' => array(
1370 'classname' => 'core_message_external',
1371 'methodname' => 'get_unread_conversations_count',
1372 'classpath' => 'message/externallib.php',
1373 'description' => 'Retrieve the count of unread conversations for a given user',
1376 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1378 'core_message_mark_all_notifications_as_read' => array(
1379 'classname' => 'core_message_external',
1380 'methodname' => 'mark_all_notifications_as_read',
1381 'classpath' => 'message/externallib.php',
1382 'description' => 'Mark all notifications as read for a given user',
1385 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1387 'core_message_mark_all_messages_as_read' => array(
1388 'classname' => 'core_message_external',
1389 'methodname' => 'mark_all_messages_as_read',
1390 'classpath' => 'message/externallib.php',
1391 'description' => '** DEPRECATED ** Please do not call this function any more.
1392 Mark all messages as read for a given user',
1395 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1397 'core_message_mark_all_conversation_messages_as_read' => array(
1398 'classname' => 'core_message_external',
1399 'methodname' => 'mark_all_conversation_messages_as_read',
1400 'classpath' => 'message/externallib.php',
1401 'description' => 'Mark all conversation messages as read for a given user',
1404 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1406 'core_message_mark_message_read' => array(
1407 'classname' => 'core_message_external',
1408 'methodname' => 'mark_message_read',
1409 'classpath' => 'message/externallib.php',
1410 'description' => 'Mark a single message as read, trigger message_viewed event.',
1412 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1415 'core_message_mark_notification_read' => array(
1416 'classname' => 'core_message_external',
1417 'methodname' => 'mark_notification_read',
1418 'classpath' => 'message/externallib.php',
1419 'description' => 'Mark a single notification as read, trigger notification_viewed event.',
1421 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1424 'core_message_message_processor_config_form' => array(
1425 'classname' => 'core_message_external',
1426 'methodname' => 'message_processor_config_form',
1427 'classpath' => 'message/externallib.php',
1428 'description' => 'Process the message processor config form',
1431 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1433 'core_message_get_message_processor' => array(
1434 'classname' => 'core_message_external',
1435 'methodname' => 'get_message_processor',
1436 'classpath' => 'message/externallib.php',
1437 'description' => 'Get a message processor',
1441 'core_message_search_contacts' => array(
1442 'classname' => 'core_message_external',
1443 'methodname' => 'search_contacts',
1444 'classpath' => 'message/externallib.php',
1445 'description' => 'Search for contacts',
1447 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1449 'core_message_send_instant_messages' => array(
1450 'classname' => 'core_message_external',
1451 'methodname' => 'send_instant_messages',
1452 'classpath' => 'message/externallib.php',
1453 'description' => 'Send instant messages',
1455 'capabilities' => 'moodle/site:sendmessage',
1457 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1459 'core_message_send_messages_to_conversation' => array(
1460 'classname' => 'core_message_external',
1461 'methodname' => 'send_messages_to_conversation',
1462 'classpath' => 'message/externallib.php',
1463 'description' => 'Send messages to an existing conversation between users',
1465 'capabilities' => 'moodle/site:sendmessage',
1467 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1469 'core_message_get_conversation_messages' => array(
1470 'classname' => 'core_message_external',
1471 'methodname' => 'get_conversation_messages',
1472 'classpath' => 'message/externallib.php',
1473 'description' => 'Retrieve the conversation messages and relevant member information',
1476 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1478 'core_message_unblock_user' => array(
1479 'classname' => 'core_message_external',
1480 'methodname' => 'unblock_user',
1481 'classpath' => 'message/externallib.php',
1482 'description' => 'Unblocks a user',
1485 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1487 'core_message_unblock_contacts' => array(
1488 'classname' => 'core_message_external',
1489 'methodname' => 'unblock_contacts',
1490 'classpath' => 'message/externallib.php',
1491 'description' => '** DEPRECATED ** Please do not call this function any more.
1495 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1497 'core_message_get_user_notification_preferences' => array(
1498 'classname' => 'core_message_external',
1499 'methodname' => 'get_user_notification_preferences',
1500 'classpath' => 'message/externallib.php',
1501 'description' => 'Get the notification preferences for a given user.',
1503 'capabilities' => 'moodle/user:editownmessageprofile',
1504 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1506 'core_message_get_user_message_preferences' => array(
1507 'classname' => 'core_message_external',
1508 'methodname' => 'get_user_message_preferences',
1509 'classpath' => 'message/externallib.php',
1510 'description' => 'Get the message preferences for a given user.',
1512 'capabilities' => 'moodle/user:editownmessageprofile',
1513 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1516 'core_message_set_favourite_conversations' => array(
1517 'classname' => 'core_message_external',
1518 'methodname' => 'set_favourite_conversations',
1519 'classpath' => 'message/externallib.php',
1520 'description' => 'Mark a conversation or group of conversations as favourites/starred conversations.',
1523 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1525 'core_message_unset_favourite_conversations' => array(
1526 'classname' => 'core_message_external',
1527 'methodname' => 'unset_favourite_conversations',
1528 'classpath' => 'message/externallib.php',
1529 'description' => 'Unset a conversation or group of conversations as favourites/starred conversations.',
1532 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1534 'core_message_delete_message_for_all_users' => array(
1535 'classname' => 'core_message_external',
1536 'methodname' => 'delete_message_for_all_users',
1537 'classpath' => 'message/externallib.php',
1538 'description' => 'Deletes a message for all users.',
1540 'capabilities' => 'moodle/site:deleteanymessage',
1542 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1544 'core_notes_create_notes' => array(
1545 'classname' => 'core_notes_external',
1546 'methodname' => 'create_notes',
1547 'classpath' => 'notes/externallib.php',
1548 'description' => 'Create notes',
1551 'capabilities' => 'moodle/notes:manage',
1552 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1554 'core_notes_delete_notes' => array(
1555 'classname' => 'core_notes_external',
1556 'methodname' => 'delete_notes',
1557 'classpath' => 'notes/externallib.php',
1558 'description' => 'Delete notes',
1560 'capabilities' => 'moodle/notes:manage',
1561 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1563 'core_notes_get_course_notes' => array(
1564 'classname' => 'core_notes_external',
1565 'methodname' => 'get_course_notes',
1566 'classpath' => 'notes/externallib.php',
1567 'description' => 'Returns all notes in specified course (or site), for the specified user.',
1569 'capabilities' => 'moodle/notes:view',
1570 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1572 'core_notes_get_notes' => array(
1573 'classname' => 'core_notes_external',
1574 'methodname' => 'get_notes',
1575 'classpath' => 'notes/externallib.php',
1576 'description' => 'Get notes',
1578 'capabilities' => 'moodle/notes:view'
1580 'core_notes_update_notes' => array(
1581 'classname' => 'core_notes_external',
1582 'methodname' => 'update_notes',
1583 'classpath' => 'notes/externallib.php',
1584 'description' => 'Update notes',
1586 'capabilities' => 'moodle/notes:manage'
1588 'core_notes_view_notes' => array(
1589 'classname' => 'core_notes_external',
1590 'methodname' => 'view_notes',
1591 'classpath' => 'notes/externallib.php',
1592 'description' => 'Simulates the web interface view of notes/index.php: trigger events.',
1594 'capabilities' => 'moodle/notes:view',
1595 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1597 'core_output_load_template' => array(
1598 'classname' => 'core\output\external',
1599 'methodname' => 'load_template',
1600 'description' => 'Load a template for a renderable',
1602 'loginrequired' => false,
1605 'core_output_load_template_with_dependencies' => array(
1606 'classname' => 'core\output\external',
1607 'methodname' => 'load_template_with_dependencies',
1608 'description' => 'Load a template and its dependencies for a renderable',
1610 'loginrequired' => false,
1613 'core_output_load_fontawesome_icon_map' => array(
1614 'classname' => 'core\output\external',
1615 'methodname' => 'load_fontawesome_icon_map',
1616 'description' => 'Load the mapping of names to icons',
1618 'loginrequired' => false,
1621 // Question related functions.
1622 'core_question_update_flag' => array(
1623 'classname' => 'core_question_external',
1624 'methodname' => 'update_flag',
1625 'description' => 'Update the flag state of a question attempt.',
1627 'capabilities' => 'moodle/question:flag',
1628 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1630 'core_question_submit_tags_form' => array(
1631 'classname' => 'core_question_external',
1632 'methodname' => 'submit_tags_form',
1633 'description' => 'Update the question tags.',
1637 'core_question_get_random_question_summaries' => array(
1638 'classname' => 'core_question_external',
1639 'methodname' => 'get_random_question_summaries',
1640 'description' => 'Get the random question set for a criteria',
1644 'core_rating_get_item_ratings' => array(
1645 'classname' => 'core_rating_external',
1646 'methodname' => 'get_item_ratings',
1647 'description' => 'Retrieve all the ratings for an item.',
1649 'capabilities' => 'moodle/rating:view',
1650 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1652 'core_rating_add_rating' => array(
1653 'classname' => 'core_rating_external',
1654 'methodname' => 'add_rating',
1655 'description' => 'Rates an item.',
1657 'capabilities' => 'moodle/rating:rate',
1658 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1660 'core_role_assign_roles' => array(
1661 'classname' => 'core_role_external',
1662 'methodname' => 'assign_roles',
1663 'classpath' => 'enrol/externallib.php',
1664 'description' => 'Manual role assignments.',
1666 'capabilities' => 'moodle/role:assign'
1668 'core_role_unassign_roles' => array(
1669 'classname' => 'core_role_external',
1670 'methodname' => 'unassign_roles',
1671 'classpath' => 'enrol/externallib.php',
1672 'description' => 'Manual role unassignments.',
1674 'capabilities' => 'moodle/role:assign'
1676 'core_search_get_relevant_users' => array(
1677 'classname' => '\core_search\external',
1678 'methodname' => 'get_relevant_users',
1679 'description' => 'Gets relevant users for a search request.',
1683 'core_tag_get_tagindex' => array(
1684 'classname' => 'core_tag_external',
1685 'methodname' => 'get_tagindex',
1686 'description' => 'Gets tag index page for one tag and one tag area',
1689 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1691 'core_tag_get_tags' => array(
1692 'classname' => 'core_tag_external',
1693 'methodname' => 'get_tags',
1694 'description' => 'Gets tags by their ids',
1698 'core_tag_update_tags' => array(
1699 'classname' => 'core_tag_external',
1700 'methodname' => 'update_tags',
1701 'description' => 'Updates tags',
1705 'core_tag_get_tagindex_per_area' => array(
1706 'classname' => 'core_tag_external',
1707 'methodname' => 'get_tagindex_per_area',
1708 'description' => 'Gets tag index page per different areas.',
1710 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1712 'core_tag_get_tag_areas' => array(
1713 'classname' => 'core_tag_external',
1714 'methodname' => 'get_tag_areas',
1715 'description' => 'Retrieves existing tag areas.',
1717 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1719 'core_tag_get_tag_collections' => array(
1720 'classname' => 'core_tag_external',
1721 'methodname' => 'get_tag_collections',
1722 'description' => 'Retrieves existing tag collections.',
1724 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1726 'core_tag_get_tag_cloud' => array(
1727 'classname' => 'core_tag_external',
1728 'methodname' => 'get_tag_cloud',
1729 'description' => 'Retrieves a tag cloud for the given collection and/or query search.',
1731 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1733 'core_update_inplace_editable' => array(
1734 'classname' => 'core_external',
1735 'methodname' => 'update_inplace_editable',
1736 'classpath' => 'lib/external/externallib.php',
1737 'description' => 'Generic service to update title',
1739 'loginrequired' => true,
1742 'core_user_add_user_device' => array(
1743 'classname' => 'core_user_external',
1744 'methodname' => 'add_user_device',
1745 'classpath' => 'user/externallib.php',
1746 'description' => 'Store mobile user devices information for PUSH Notifications.',
1748 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1750 'core_user_add_user_private_files' => array(
1751 'classname' => 'core_user_external',
1752 'methodname' => 'add_user_private_files',
1753 'classpath' => 'user/externallib.php',
1754 'description' => 'Copy files from a draft area to users private files area.',
1756 'capabilities' => 'moodle/user:manageownfiles',
1757 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1759 'core_user_create_users' => array(
1760 'classname' => 'core_user_external',
1761 'methodname' => 'create_users',
1762 'classpath' => 'user/externallib.php',
1763 'description' => 'Create users.',
1765 'capabilities' => 'moodle/user:create'
1767 'core_user_delete_users' => array(
1768 'classname' => 'core_user_external',
1769 'methodname' => 'delete_users',
1770 'classpath' => 'user/externallib.php',
1771 'description' => 'Delete users.',
1773 'capabilities' => 'moodle/user:delete'
1775 'core_user_get_course_user_profiles' => array(
1776 'classname' => 'core_user_external',
1777 'methodname' => 'get_course_user_profiles',
1778 'classpath' => 'user/externallib.php',
1779 'description' => 'Get course user profiles (each of the profils matching a course id and a user id),.',
1781 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, '
1782 . 'moodle/site:accessallgroups',
1783 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1785 'core_user_get_users' => array(
1786 'classname' => 'core_user_external',
1787 'methodname' => 'get_users',
1788 'classpath' => 'user/externallib.php',
1789 'description' => 'search for users matching the parameters',
1791 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update'
1793 'core_user_get_users_by_field' => array(
1794 'classname' => 'core_user_external',
1795 'methodname' => 'get_users_by_field',
1796 'classpath' => 'user/externallib.php',
1797 'description' => 'Retrieve users\' information for a specified unique field - If you want to do a user search, use '
1798 . 'core_user_get_users()',
1800 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update',
1802 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1804 'core_user_remove_user_device' => array(
1805 'classname' => 'core_user_external',
1806 'methodname' => 'remove_user_device',
1807 'classpath' => 'user/externallib.php',
1808 'description' => 'Remove a user device from the Moodle database.',
1810 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1812 'core_user_update_users' => array(
1813 'classname' => 'core_user_external',
1814 'methodname' => 'update_users',
1815 'classpath' => 'user/externallib.php',
1816 'description' => 'Update users.',
1818 'capabilities' => 'moodle/user:update',
1821 'core_user_update_user_preferences' => array(
1822 'classname' => 'core_user_external',
1823 'methodname' => 'update_user_preferences',
1824 'classpath' => 'user/externallib.php',
1825 'description' => 'Update a user\'s preferences',
1827 'capabilities' => 'moodle/user:editownmessageprofile, moodle/user:editmessageprofile',
1829 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1831 'core_user_view_user_list' => array(
1832 'classname' => 'core_user_external',
1833 'methodname' => 'view_user_list',
1834 'classpath' => 'user/externallib.php',
1835 'description' => 'Simulates the web-interface view of user/index.php (triggering events),.',
1837 'capabilities' => 'moodle/course:viewparticipants',
1838 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1840 'core_user_view_user_profile' => array(
1841 'classname' => 'core_user_external',
1842 'methodname' => 'view_user_profile',
1843 'classpath' => 'user/externallib.php',
1844 'description' => 'Simulates the web-interface view of user/view.php and user/profile.php (triggering events),.',
1846 'capabilities' => 'moodle/user:viewdetails',
1847 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1849 'core_user_get_user_preferences' => array(
1850 'classname' => 'core_user_external',
1851 'methodname' => 'get_user_preferences',
1852 'classpath' => 'user/externallib.php',
1853 'description' => 'Return user preferences.',
1856 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1858 'core_user_update_picture' => array(
1859 'classname' => 'core_user_external',
1860 'methodname' => 'update_picture',
1861 'classpath' => 'user/externallib.php',
1862 'description' => 'Update or delete the user picture in the site',
1864 'capabilities' => 'moodle/user:editownprofile, moodle/user:editprofile',
1865 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1867 'core_user_set_user_preferences' => array(
1868 'classname' => 'core_user_external',
1869 'methodname' => 'set_user_preferences',
1870 'classpath' => 'user/externallib.php',
1871 'description' => 'Set user preferences.',
1873 'capabilities' => 'moodle/site:config',
1875 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1877 'core_user_agree_site_policy' => array(
1878 'classname' => 'core_user_external',
1879 'methodname' => 'agree_site_policy',
1880 'classpath' => 'user/externallib.php',
1881 'description' => 'Agree the site policy for the current user.',
1883 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1885 'core_user_get_private_files_info' => array(
1886 'classname' => 'core_user_external',
1887 'methodname' => 'get_private_files_info',
1888 'classpath' => 'user/externallib.php',
1889 'description' => 'Returns general information about files in the user private files area.',
1891 'capabilities' => 'moodle/user:manageownfiles',
1892 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1895 // Competencies functions.
1896 'core_competency_create_competency_framework' => array(
1897 'classname' => 'core_competency\external',
1898 'methodname' => 'create_competency_framework',
1900 'description' => 'Creates new competency frameworks.',
1902 'capabilities' => 'moodle/competency:competencymanage',
1905 'core_competency_read_competency_framework' => array(
1906 'classname' => 'core_competency\external',
1907 'methodname' => 'read_competency_framework',
1909 'description' => 'Load a summary of a competency framework.',
1911 'capabilities' => 'moodle/competency:competencyview',
1914 'core_competency_duplicate_competency_framework' => array(
1915 'classname' => 'core_competency\external',
1916 'methodname' => 'duplicate_competency_framework',
1918 'description' => 'Duplicate a competency framework.',
1920 'capabilities' => 'moodle/competency:competencymanage',
1923 'core_competency_delete_competency_framework' => array(
1924 'classname' => 'core_competency\external',
1925 'methodname' => 'delete_competency_framework',
1927 'description' => 'Delete a competency framework.',
1929 'capabilities' => 'moodle/competency:competencymanage',
1932 'core_competency_update_competency_framework' => array(
1933 'classname' => 'core_competency\external',
1934 'methodname' => 'update_competency_framework',
1936 'description' => 'Update a competency framework.',
1938 'capabilities' => 'moodle/competency:competencymanage',
1941 'core_competency_list_competency_frameworks' => array(
1942 'classname' => 'core_competency\external',
1943 'methodname' => 'list_competency_frameworks',
1945 'description' => 'Load a list of a competency frameworks.',
1947 'capabilities' => 'moodle/competency:competencyview',
1950 'core_competency_count_competency_frameworks' => array(
1951 'classname' => 'core_competency\external',
1952 'methodname' => 'count_competency_frameworks',
1954 'description' => 'Count a list of a competency frameworks.',
1956 'capabilities' => 'moodle/competency:competencyview',
1959 'core_competency_competency_framework_viewed' => array(
1960 'classname' => 'core_competency\external',
1961 'methodname' => 'competency_framework_viewed',
1963 'description' => 'Log event competency framework viewed',
1965 'capabilities' => 'moodle/competency:competencyview',
1968 'core_competency_create_competency' => array(
1969 'classname' => 'core_competency\external',
1970 'methodname' => 'create_competency',
1972 'description' => 'Creates new competencies.',
1974 'capabilities' => 'moodle/competency:competencymanage',
1977 'core_competency_read_competency' => array(
1978 'classname' => 'core_competency\external',
1979 'methodname' => 'read_competency',
1981 'description' => 'Load a summary of a competency.',
1983 'capabilities' => 'moodle/competency:competencyview',
1986 'core_competency_competency_viewed' => array(
1987 'classname' => 'core_competency\external',
1988 'methodname' => 'competency_viewed',
1990 'description' => 'Log event competency viewed',
1992 'capabilities' => 'moodle/competency:competencyview',
1994 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
1996 'core_competency_delete_competency' => array(
1997 'classname' => 'core_competency\external',
1998 'methodname' => 'delete_competency',
2000 'description' => 'Delete a competency.',
2002 'capabilities' => 'moodle/competency:competencymanage',
2005 'core_competency_update_competency' => array(
2006 'classname' => 'core_competency\external',
2007 'methodname' => 'update_competency',
2009 'description' => 'Update a competency.',
2011 'capabilities' => 'moodle/competency:competencymanage',
2014 'core_competency_list_competencies' => array(
2015 'classname' => 'core_competency\external',
2016 'methodname' => 'list_competencies',
2018 'description' => 'Load a list of a competencies.',
2020 'capabilities' => 'moodle/competency:competencyview',
2023 'core_competency_list_competencies_in_template' => array(
2024 'classname' => 'core_competency\external',
2025 'methodname' => 'list_competencies_in_template',
2027 'description' => 'Load a list of a competencies for a given template.',
2029 'capabilities' => 'moodle/competency:competencyview',
2032 'core_competency_count_competencies' => array(
2033 'classname' => 'core_competency\external',
2034 'methodname' => 'count_competencies',
2036 'description' => 'Count a list of a competencies.',
2038 'capabilities' => 'moodle/competency:competencyview',
2041 'core_competency_count_competencies_in_template' => array(
2042 'classname' => 'core_competency\external',
2043 'methodname' => 'count_competencies_in_template',
2045 'description' => 'Count a list of a competencies for a given template.',
2047 'capabilities' => 'moodle/competency:competencyview',
2050 'core_competency_search_competencies' => array(
2051 'classname' => 'core_competency\external',
2052 'methodname' => 'search_competencies',
2054 'description' => 'Search a list of a competencies.',
2056 'capabilities' => 'moodle/competency:competencyview',
2059 'core_competency_set_parent_competency' => array(
2060 'classname' => 'core_competency\external',
2061 'methodname' => 'set_parent_competency',
2063 'description' => 'Set a new parent for a competency.',
2065 'capabilities' => 'moodle/competency:competencymanage',
2068 'core_competency_move_up_competency' => array(
2069 'classname' => 'core_competency\external',
2070 'methodname' => 'move_up_competency',
2072 'description' => 'Re-order a competency.',
2074 'capabilities' => 'moodle/competency:competencymanage',
2077 'core_competency_move_down_competency' => array(
2078 'classname' => 'core_competency\external',
2079 'methodname' => 'move_down_competency',
2081 'description' => 'Re-order a competency.',
2083 'capabilities' => 'moodle/competency:competencymanage',
2086 'core_competency_list_course_module_competencies' => array(
2087 'classname' => 'core_competency\external',
2088 'methodname' => 'list_course_module_competencies',
2090 'description' => 'List the competencies in a course module',
2092 'capabilities' => 'moodle/competency:coursecompetencyview',
2095 'core_competency_count_course_module_competencies' => array(
2096 'classname' => 'core_competency\external',
2097 'methodname' => 'count_course_module_competencies',
2099 'description' => 'Count the competencies in a course module',
2101 'capabilities' => 'moodle/competency:coursecompetencyview',
2104 'core_competency_list_course_competencies' => array(
2105 'classname' => 'core_competency\external',
2106 'methodname' => 'list_course_competencies',
2108 'description' => 'List the competencies in a course',
2110 'capabilities' => 'moodle/competency:coursecompetencyview',
2112 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
2114 'core_competency_count_competencies_in_course' => array(
2115 'classname' => 'core_competency\external',
2116 'methodname' => 'count_competencies_in_course',
2118 'description' => 'List the competencies in a course',
2120 'capabilities' => 'moodle/competency:coursecompetencyview',
2123 'core_competency_count_courses_using_competency' => array(
2124 'classname' => 'core_competency\external',
2125 'methodname' => 'count_courses_using_competency',
2127 'description' => 'List the courses using a competency',
2129 'capabilities' => 'moodle/competency:coursecompetencyview',
2132 'core_competency_add_competency_to_course' => array(
2133 'classname' => 'core_competency\external',
2134 'methodname' => 'add_competency_to_course',
2136 'description' => 'Add the competency to a course',
2138 'capabilities' => 'moodle/competency:coursecompetencymanage',
2141 'core_competency_add_competency_to_template' => array(
2142 'classname' => 'core_competency\external',
2143 'methodname' => 'add_competency_to_template',
2145 'description' => 'Add the competency to a template',
2147 'capabilities' => 'moodle/competency:templatemanage',
2150 'core_competency_remove_competency_from_course' => array(
2151 'classname' => 'core_competency\external',
2152 'methodname' => 'remove_competency_from_course',
2154 'description' => 'Remove a competency from a course',
2156 'capabilities' => 'moodle/competency:coursecompetencymanage',
2159 'core_competency_set_course_competency_ruleoutcome' => array(
2160 'classname' => 'core_competency\external',
2161 'methodname' => 'set_course_competency_ruleoutcome',
2163 'description' => 'Modify the ruleoutcome value for course competency',
2165 'capabilities' => 'moodle/competency:coursecompetencymanage',
2168 'core_competency_remove_competency_from_template' => array(
2169 'classname' => 'core_competency\external',
2170 'methodname' => 'remove_competency_from_template',
2172 'description' => 'Remove a competency from a template',
2174 'capabilities' => 'moodle/competency:templatemanage',
2177 'core_competency_reorder_course_competency' => array(
2178 'classname' => 'core_competency\external',
2179 'methodname' => 'reorder_course_competency',
2181 'description' => 'Move a course competency to a new relative sort order.',
2183 'capabilities' => 'moodle/competency:coursecompetencymanage',
2186 'core_competency_reorder_template_competency' => array(
2187 'classname' => 'core_competency\external',
2188 'methodname' => 'reorder_template_competency',
2190 'description' => 'Move a template competency to a new relative sort order.',
2192 'capabilities' => 'moodle/competency:templatemanage',
2195 'core_competency_create_template' => array(
2196 'classname' => 'core_competency\external',
2197 'methodname' => 'create_template',
2199 'description' => 'Creates new learning plan templates.',
2201 'capabilities' => 'moodle/competency:templatemanage',
2204 'core_competency_duplicate_template' => array(
2205 'classname' => 'core_competency\external',
2206 'methodname' => 'duplicate_template',
2208 'description' => 'Duplicate learning plan template.',
2210 'capabilities' => 'moodle/competency:templatemanage',
2213 'core_competency_read_template' => array(
2214 'classname' => 'core_competency\external',
2215 'methodname' => 'read_template',
2217 'description' => 'Load a summary of a learning plan template.',
2219 'capabilities' => 'moodle/competency:templateview',
2222 'core_competency_delete_template' => array(
2223 'classname' => 'core_competency\external',
2224 'methodname' => 'delete_template',
2226 'description' => 'Delete a learning plan template.',
2228 'capabilities' => 'moodle/competency:templatemanage',
2231 'core_competency_update_template' => array(
2232 'classname' => 'core_competency\external',
2233 'methodname' => 'update_template',
2235 'description' => 'Update a learning plan template.',
2237 'capabilities' => 'moodle/competency:templatemanage',
2240 'core_competency_list_templates' => array(
2241 'classname' => 'core_competency\external',
2242 'methodname' => 'list_templates',
2244 'description' => 'Load a list of a learning plan templates.',
2246 'capabilities' => 'moodle/competency:templateview',
2249 'core_competency_list_templates_using_competency' => array(
2250 'classname' => 'core_competency\external',
2251 'methodname' => 'list_templates_using_competency',
2253 'description' => 'Load a list of a learning plan templates for a given competency.',
2255 'capabilities' => 'moodle/competency:templateview',
2258 'core_competency_count_templates' => array(
2259 'classname' => 'core_competency\external',
2260 'methodname' => 'count_templates',
2262 'description' => 'Count a list of a learning plan templates.',
2264 'capabilities' => 'moodle/competency:templateview',
2267 'core_competency_count_templates_using_competency' => array(
2268 'classname' => 'core_competency\external',
2269 'methodname' => 'count_templates_using_competency',
2271 'description' => 'Count a list of a learning plan templates for a given competency.',
2273 'capabilities' => 'moodle/competency:templateview',
2276 'core_competency_create_plan' => array(
2277 'classname' => 'core_competency\external',
2278 'methodname' => 'create_plan',
2280 'description' => 'Creates a learning plan.',
2282 'capabilities' => 'moodle/competency:planmanage',
2285 'core_competency_update_plan' => array(
2286 'classname' => 'core_competency\external',
2287 'methodname' => 'update_plan',
2289 'description' => 'Updates a learning plan.',
2291 'capabilities' => 'moodle/competency:planmanage',
2294 'core_competency_complete_plan' => array(
2295 'classname' => 'core_competency\external',
2296 'methodname' => 'complete_plan',
2298 'description' => 'Complete learning plan.',
2300 'capabilities' => 'moodle/competency:planmanage',
2303 'core_competency_reopen_plan' => array(
2304 'classname' => 'core_competency\external',
2305 'methodname' => 'reopen_plan',
2307 'description' => 'Reopen learning plan.',
2309 'capabilities' => 'moodle/competency:planmanage',
2312 'core_competency_read_plan' => array(
2313 'classname' => 'core_competency\external',
2314 'methodname' => 'read_plan',
2316 'description' => 'Load a learning plan.',
2318 'capabilities' => 'moodle/competency:planviewown',
2321 'core_competency_delete_plan' => array(
2322 'classname' => 'core_competency\external',
2323 'methodname' => 'delete_plan',
2325 'description' => 'Delete a learning plan.',
2327 'capabilities' => 'moodle/competency:planmanage',
2330 'core_competency_list_user_plans' => array(
2331 'classname' => 'core_competency\external',
2332 'methodname' => 'list_user_plans',
2334 'description' => 'List a user\'s learning plans.',
2336 'capabilities' => 'moodle/competency:planviewown',
2339 'core_competency_list_plan_competencies' => array(
2340 'classname' => 'core_competency\external',
2341 'methodname' => 'list_plan_competencies',
2343 'description' => 'List the competencies in a plan',
2345 'capabilities' => 'moodle/competency:planviewown',
2348 'core_competency_add_competency_to_plan' => array(
2349 'classname' => 'core_competency\external',
2350 'methodname' => 'add_competency_to_plan',
2352 'description' => 'Add the competency to a learning plan',
2354 'capabilities' => 'moodle/competency:planmanage',
2357 'core_competency_remove_competency_from_plan' => array(
2358 'classname' => 'core_competency\external',
2359 'methodname' => 'remove_competency_from_plan',
2361 'description' => 'Remove the competency from a learning plan',
2363 'capabilities' => 'moodle/competency:planmanage',
2366 'core_competency_reorder_plan_competency' => array(
2367 'classname' => 'core_competency\external',
2368 'methodname' => 'reorder_plan_competency',
2370 'description' => 'Move a plan competency to a new relative sort order.',
2372 'capabilities' => 'moodle/competency:planmanage',
2375 'core_competency_plan_request_review' => array(
2376 'classname' => 'core_competency\external',
2377 'methodname' => 'plan_request_review',
2379 'description' => 'Request for a plan to be reviewed.',
2381 'capabilities' => 'moodle/competency:planmanagedraft',
2384 'core_competency_plan_start_review' => array(
2385 'classname' => 'core_competency\external',
2386 'methodname' => 'plan_start_review',
2388 'description' => 'Start the review of a plan.',
2390 'capabilities' => 'moodle/competency:planmanage',
2393 'core_competency_plan_stop_review' => array(
2394 'classname' => 'core_competency\external',
2395 'methodname' => 'plan_stop_review',
2397 'description' => 'Stop the review of a plan.',
2399 'capabilities' => 'moodle/competency:planmanage',
2402 'core_competency_plan_cancel_review_request' => array(
2403 'classname' => 'core_competency\external',
2404 'methodname' => 'plan_cancel_review_request',
2406 'description' => 'Cancel the review of a plan.',
2408 'capabilities' => 'moodle/competency:planmanagedraft',
2411 'core_competency_approve_plan' => array(
2412 'classname' => 'core_competency\external',
2413 'methodname' => 'approve_plan',
2415 'description' => 'Approve a plan.',
2417 'capabilities' => 'moodle/competency:planmanage',
2420 'core_competency_unapprove_plan' => array(
2421 'classname' => 'core_competency\external',
2422 'methodname' => 'unapprove_plan',
2424 'description' => 'Unapprove a plan.',
2426 'capabilities' => 'moodle/competency:planmanage',
2429 'core_competency_template_has_related_data' => array(
2430 'classname' => 'core_competency\external',
2431 'methodname' => 'template_has_related_data',
2433 'description' => 'Check if a template has related data',
2435 'capabilities' => 'moodle/competency:templateview',
2438 'core_competency_get_scale_values' => array(
2439 'classname' => 'core_competency\external',
2440 'methodname' => 'get_scale_values',
2442 'description' => 'Fetch the values for a specific scale',
2444 'capabilities' => 'moodle/competency:competencymanage',
2446 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
2448 'core_competency_add_related_competency' => array(
2449 'classname' => 'core_competency\external',
2450 'methodname' => 'add_related_competency',
2452 'description' => 'Adds a related competency',
2454 'capabilities' => 'moodle/competency:competencymanage',
2457 'core_competency_remove_related_competency' => array(
2458 'classname' => 'core_competency\external',
2459 'methodname' => 'remove_related_competency',
2461 'description' => 'Remove a related competency',
2463 'capabilities' => 'moodle/competency:competencymanage',
2466 'core_competency_read_user_evidence' => array(
2467 'classname' => 'core_competency\external',
2468 'methodname' => 'read_user_evidence',
2470 'description' => 'Read an evidence of prior learning.',
2472 'capabilities' => 'moodle/competency:userevidenceview',
2475 'core_competency_delete_user_evidence' => array(
2476 'classname' => 'core_competency\external',
2477 'methodname' => 'delete_user_evidence',
2479 'description' => 'Delete an evidence of prior learning.',
2481 'capabilities' => 'moodle/competency:userevidencemanageown',
2484 'core_competency_create_user_evidence_competency' => array(
2485 'classname' => 'core_competency\external',
2486 'methodname' => 'create_user_evidence_competency',
2488 'description' => 'Create an evidence of prior learning relationship with a competency.',
2490 'capabilities' => 'moodle/competency:userevidencemanageown, moodle/competency:competencyview',
2493 'core_competency_delete_user_evidence_competency' => array(
2494 'classname' => 'core_competency\external',
2495 'methodname' => 'delete_user_evidence_competency',
2497 'description' => 'Delete an evidence of prior learning relationship with a competency.',
2499 'capabilities' => 'moodle/competency:userevidencemanageown',
2502 'core_competency_user_competency_cancel_review_request' => array(
2503 'classname' => 'core_competency\external',
2504 'methodname' => 'user_competency_cancel_review_request',
2506 'description' => 'Cancel a review request.',
2508 'capabilities' => 'moodle/competency:userevidencemanageown',
2511 'core_competency_user_competency_request_review' => array(
2512 'classname' => 'core_competency\external',
2513 'methodname' => 'user_competency_request_review',
2515 'description' => 'Request a review.',
2517 'capabilities' => 'moodle/competency:userevidencemanageown',
2520 'core_competency_user_competency_start_review' => array(
2521 'classname' => 'core_competency\external',
2522 'methodname' => 'user_competency_start_review',
2524 'description' => 'Start a review.',
2526 'capabilities' => 'moodle/competency:competencygrade',
2529 'core_competency_user_competency_stop_review' => array(
2530 'classname' => 'core_competency\external',
2531 'methodname' => 'user_competency_stop_review',
2533 'description' => 'Stop a review.',
2535 'capabilities' => 'moodle/competency:competencygrade',
2538 'core_competency_user_competency_viewed' => array(
2539 'classname' => 'core_competency\external',
2540 'methodname' => 'user_competency_viewed',
2542 'description' => 'Log the user competency viewed event.',
2544 'capabilities' => 'moodle/competency:usercompetencyview',
2546 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
2548 'core_competency_user_competency_viewed_in_plan' => array(
2549 'classname' => 'core_competency\external',
2550 'methodname' => 'user_competency_viewed_in_plan',
2552 'description' => 'Log the user competency viewed in plan event.',
2554 'capabilities' => 'moodle/competency:usercompetencyview',
2556 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
2558 'core_competency_user_competency_viewed_in_course' => array(
2559 'classname' => 'core_competency\external',
2560 'methodname' => 'user_competency_viewed_in_course',
2562 'description' => 'Log the user competency viewed in course event',
2564 'capabilities' => 'moodle/competency:usercompetencyview',
2566 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
2568 'core_competency_user_competency_plan_viewed' => array(
2569 'classname' => 'core_competency\external',
2570 'methodname' => 'user_competency_plan_viewed',
2572 'description' => 'Log the user competency plan viewed event.',
2574 'capabilities' => 'moodle/competency:usercompetencyview',
2576 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
2578 'core_competency_grade_competency' => array(
2579 'classname' => 'core_competency\external',
2580 'methodname' => 'grade_competency',
2582 'description' => 'Grade a competency.',
2584 'capabilities' => 'moodle/competency:competencygrade',
2587 'core_competency_grade_competency_in_plan' => array(
2588 'classname' => 'core_competency\external',
2589 'methodname' => 'grade_competency_in_plan',
2591 'description' => 'Grade a competency from the user plan page.',
2593 'capabilities' => 'moodle/competency:competencygrade',
2596 'core_competency_grade_competency_in_course' => array(
2597 'classname' => 'core_competency\external',
2598 'methodname' => 'grade_competency_in_course',
2600 'description' => 'Grade a competency from the course page.',
2602 'capabilities' => 'moodle/competency:competencygrade',
2604 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
2606 'core_competency_unlink_plan_from_template' => array(
2607 'classname' => 'core_competency\external',
2608 'methodname' => 'unlink_plan_from_template',
2610 'description' => 'Unlink a plan form it template.',
2612 'capabilities' => 'moodle/competency:planmanage',
2615 'core_competency_template_viewed' => array(
2616 'classname' => 'core_competency\external',
2617 'methodname' => 'template_viewed',
2619 'description' => 'Log event template viewed',
2621 'capabilities' => 'moodle/competency:templateview',
2624 'core_competency_request_review_of_user_evidence_linked_competencies' => array(
2625 'classname' => 'core_competency\external',
2626 'methodname' => 'request_review_of_user_evidence_linked_competencies',
2628 'description' => 'Send user evidence competencies in review',
2630 'capabilities' => 'moodle/competency:userevidencemanageown',
2633 'core_competency_update_course_competency_settings' => array(
2634 'classname' => 'core_competency\external',
2635 'methodname' => 'update_course_competency_settings',
2637 'description' => 'Update the course competency settings',
2639 'capabilities' => 'moodle/competency:coursecompetencyconfigure',
2642 'core_competency_delete_evidence' => array(
2643 'classname' => 'core_competency\external',
2644 'methodname' => 'delete_evidence',
2646 'description' => 'Delete an evidence',
2648 'capabilities' => 'moodle/competency:evidencedelete',
2650 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
2653 'core_webservice_get_site_info' => array(
2654 'classname' => 'core_webservice_external',
2655 'methodname' => 'get_site_info',
2656 'classpath' => 'webservice/externallib.php',
2657 'description' => 'Return some site info / user info / list web service functions',
2659 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
2662 // Blocks functions.
2663 'core_block_get_course_blocks' => array(
2664 'classname' => 'core_block_external',
2665 'methodname' => 'get_course_blocks',
2666 'description' => 'Returns blocks information for a course.',
2668 'capabilities' => '',
2669 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
2672 'core_block_get_dashboard_blocks' => array(
2673 'classname' => 'core_block_external',
2674 'methodname' => 'get_dashboard_blocks',
2675 'description' => 'Returns blocks information for the given user dashboard.',
2677 'capabilities' => '',
2678 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
2681 // Filters functions.
2682 'core_filters_get_available_in_context' => array(
2683 'classname' => 'core_filters\external',
2684 'methodname' => 'get_available_in_context',
2685 'description' => 'Returns the filters available in the given contexts.',
2687 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
),
2689 'core_customfield_delete_field' => array(
2690 'classname' => 'core_customfield_external',
2691 'methodname' => 'delete_field',
2692 'classpath' => 'customfield/externallib.php',
2693 'description' => 'Deletes an entry',
2697 'core_customfield_reload_template' => array(
2698 'classname' => 'core_customfield_external',
2699 'methodname' => 'reload_template',
2700 'classpath' => 'customfield/externallib.php',
2701 'description' => 'Reloads template',
2705 'core_customfield_create_category' => array(
2706 'classname' => 'core_customfield_external',
2707 'methodname' => 'create_category',
2708 'classpath' => 'customfield/externallib.php',
2709 'description' => 'Creates a new category',
2713 'core_customfield_delete_category' => array(
2714 'classname' => 'core_customfield_external',
2715 'methodname' => 'delete_category',
2716 'classpath' => 'customfield/externallib.php',
2717 'description' => 'Deletes a category',
2721 'core_customfield_move_field' => array(
2722 'classname' => 'core_customfield_external',
2723 'methodname' => 'move_field',
2724 'classpath' => 'customfield/externallib.php',
2725 'description' => 'Drag and drop',
2729 'core_customfield_move_category' => array(
2730 'classname' => 'core_customfield_external',
2731 'methodname' => 'move_category',
2732 'classpath' => 'customfield/externallib.php',
2733 'description' => 'Drag and drop categories',
2737 'core_h5p_get_trusted_h5p_file' => [
2738 'classname' => 'core_h5p\external',
2739 'methodname' => 'get_trusted_h5p_file',
2741 'description' => 'Get the H5P file cleaned for Mobile App.',
2744 'capabilities' => '',
2745 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE
],
2750 'Moodle mobile web service' => array(
2751 'functions' => array(), // Unused as we add the service in each function definition, third party services would use this.
2753 'restrictedusers' => 0,
2754 'shortname' => MOODLE_OFFICIAL_MOBILE_SERVICE
,
2755 'downloadfiles' => 1,