Merge branch 'MDL-64012' of https://github.com/timhunt/moodle
[moodle.git] / lib / db / services.php
blob9f7392362d93a2d76ce6b00430a6b80d381ac3b7
1 <?php
2 // This file is part of Moodle - http://moodle.org/
3 //
4 // Moodle is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation, either version 3 of the License, or
7 // (at your option) any later version.
8 //
9 // Moodle is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
14 // You should have received a copy of the GNU General Public License
15 // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
18 /**
19 * Core external functions and service definitions.
21 * The functions and services defined on this file are
22 * processed and registered into the Moodle DB after any
23 * install or upgrade operation. All plugins support this.
25 * For more information, take a look to the documentation available:
26 * - Webservices API: {@link 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
36 $functions = array(
37 'core_auth_confirm_user' => array(
38 'classname' => 'core_auth_external',
39 'methodname' => 'confirm_user',
40 'description' => 'Confirm a user account.',
41 'type' => 'write',
42 'ajax' => true,
43 'loginrequired' => false,
45 'core_auth_request_password_reset' => array(
46 'classname' => 'core_auth_external',
47 'methodname' => 'request_password_reset',
48 'description' => 'Requests a password reset.',
49 'type' => 'write',
50 'ajax' => true,
51 'loginrequired' => false,
53 'core_auth_is_minor' => array(
54 'classname' => 'core_auth_external',
55 'methodname' => 'is_minor',
56 'description' => 'Requests a check if a user is a digital minor.',
57 'type' => 'read',
58 'ajax' => true,
59 'loginrequired' => false,
61 'core_auth_is_age_digital_consent_verification_enabled' => array(
62 'classname' => 'core_auth_external',
63 'methodname' => 'is_age_digital_consent_verification_enabled',
64 'description' => 'Checks if age digital consent verification is enabled.',
65 'type' => 'read',
66 'ajax' => true,
67 'loginrequired' => false,
69 'core_auth_resend_confirmation_email' => array(
70 'classname' => 'core_auth_external',
71 'methodname' => 'resend_confirmation_email',
72 'description' => 'Resend confirmation email.',
73 'type' => 'write',
74 'ajax' => true,
75 'loginrequired' => false,
77 'core_badges_get_user_badges' => array(
78 'classname' => 'core_badges_external',
79 'methodname' => 'get_user_badges',
80 'description' => 'Returns the list of badges awarded to a user.',
81 'type' => 'read',
82 'capabilities' => 'moodle/badges:viewotherbadges',
83 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
85 'core_blog_get_entries' => array(
86 'classname' => 'core_blog\external',
87 'methodname' => 'get_entries',
88 'description' => 'Returns blog entries.',
89 'type' => 'read',
90 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
91 'ajax' => true,
92 'loginrequired' => false,
94 'core_blog_view_entries' => array(
95 'classname' => 'core_blog\external',
96 'methodname' => 'view_entries',
97 'description' => 'Trigger the blog_entries_viewed event.',
98 'type' => 'read',
99 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
100 'ajax' => true,
101 'loginrequired' => false,
103 'core_calendar_get_calendar_monthly_view' => array(
104 'classname' => 'core_calendar_external',
105 'methodname' => 'get_calendar_monthly_view',
106 'description' => 'Fetch the monthly view data for a calendar',
107 'classpath' => 'calendar/externallib.php',
108 'type' => 'read',
109 'capabilities' => '',
110 'ajax' => true,
111 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
113 'core_calendar_get_calendar_day_view' => array(
114 'classname' => 'core_calendar_external',
115 'methodname' => 'get_calendar_day_view',
116 'description' => 'Fetch the day view data for a calendar',
117 'classpath' => 'calendar/externallib.php',
118 'type' => 'read',
119 'capabilities' => '',
120 'ajax' => true,
121 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
123 'core_calendar_get_calendar_upcoming_view' => array(
124 'classname' => 'core_calendar_external',
125 'methodname' => 'get_calendar_upcoming_view',
126 'description' => 'Fetch the upcoming view data for a calendar',
127 'classpath' => 'calendar/externallib.php',
128 'type' => 'read',
129 'capabilities' => '',
130 'ajax' => true,
131 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
133 'core_calendar_update_event_start_day' => array(
134 'classname' => 'core_calendar_external',
135 'methodname' => 'update_event_start_day',
136 'description' => 'Update the start day (but not time) for an event.',
137 'classpath' => 'calendar/externallib.php',
138 'type' => 'write',
139 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
140 'ajax' => true,
142 'core_calendar_create_calendar_events' => array(
143 'classname' => 'core_calendar_external',
144 'methodname' => 'create_calendar_events',
145 'description' => 'Create calendar events',
146 'classpath' => 'calendar/externallib.php',
147 'type' => 'write',
148 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
149 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
151 'core_calendar_delete_calendar_events' => array(
152 'classname' => 'core_calendar_external',
153 'methodname' => 'delete_calendar_events',
154 'description' => 'Delete calendar events',
155 'classpath' => 'calendar/externallib.php',
156 'type' => 'write',
157 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
158 'ajax' => true,
159 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
161 'core_calendar_get_calendar_events' => array(
162 'classname' => 'core_calendar_external',
163 'methodname' => 'get_calendar_events',
164 'description' => 'Get calendar events',
165 'classpath' => 'calendar/externallib.php',
166 'type' => 'read',
167 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
168 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
170 'core_calendar_get_action_events_by_timesort' => array(
171 'classname' => 'core_calendar_external',
172 'methodname' => 'get_calendar_action_events_by_timesort',
173 'description' => 'Get calendar action events by tiemsort',
174 'classpath' => 'calendar/externallib.php',
175 'type' => 'read',
176 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
177 'ajax' => true,
178 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
180 'core_calendar_get_action_events_by_course' => array(
181 'classname' => 'core_calendar_external',
182 'methodname' => 'get_calendar_action_events_by_course',
183 'description' => 'Get calendar action events by course',
184 'classpath' => 'calendar/externallib.php',
185 'type' => 'read',
186 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
187 'ajax' => true,
188 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
190 'core_calendar_get_action_events_by_courses' => array(
191 'classname' => 'core_calendar_external',
192 'methodname' => 'get_calendar_action_events_by_courses',
193 'description' => 'Get calendar action events by courses',
194 'classpath' => 'calendar/externallib.php',
195 'type' => 'read',
196 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
197 'ajax' => true,
198 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
200 'core_calendar_get_calendar_event_by_id' => array(
201 'classname' => 'core_calendar_external',
202 'methodname' => 'get_calendar_event_by_id',
203 'description' => 'Get calendar event by id',
204 'classpath' => 'calendar/externallib.php',
205 'type' => 'read',
206 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
207 'ajax' => true,
208 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
210 'core_calendar_submit_create_update_form' => array(
211 'classname' => 'core_calendar_external',
212 'methodname' => 'submit_create_update_form',
213 'description' => 'Submit form data for event form',
214 'classpath' => 'calendar/externallib.php',
215 'type' => 'write',
216 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
217 'ajax' => true,
219 'core_cohort_add_cohort_members' => array(
220 'classname' => 'core_cohort_external',
221 'methodname' => 'add_cohort_members',
222 'classpath' => 'cohort/externallib.php',
223 'description' => 'Adds cohort members.',
224 'type' => 'write',
225 'capabilities' => 'moodle/cohort:assign'
227 'core_cohort_create_cohorts' => array(
228 'classname' => 'core_cohort_external',
229 'methodname' => 'create_cohorts',
230 'classpath' => 'cohort/externallib.php',
231 'description' => 'Creates new cohorts.',
232 'type' => 'write',
233 'capabilities' => 'moodle/cohort:manage'
235 'core_cohort_delete_cohort_members' => array(
236 'classname' => 'core_cohort_external',
237 'methodname' => 'delete_cohort_members',
238 'classpath' => 'cohort/externallib.php',
239 'description' => 'Deletes cohort members.',
240 'type' => 'write',
241 'capabilities' => 'moodle/cohort:assign'
243 'core_cohort_delete_cohorts' => array(
244 'classname' => 'core_cohort_external',
245 'methodname' => 'delete_cohorts',
246 'classpath' => 'cohort/externallib.php',
247 'description' => 'Deletes all specified cohorts.',
248 'type' => 'write',
249 'capabilities' => 'moodle/cohort:manage'
251 'core_cohort_get_cohort_members' => array(
252 'classname' => 'core_cohort_external',
253 'methodname' => 'get_cohort_members',
254 'classpath' => 'cohort/externallib.php',
255 'description' => 'Returns cohort members.',
256 'type' => 'read',
257 'capabilities' => 'moodle/cohort:view'
259 'core_cohort_search_cohorts' => array(
260 'classname' => 'core_cohort_external',
261 'methodname' => 'search_cohorts',
262 'classpath' => 'cohort/externallib.php',
263 'description' => 'Search for cohorts.',
264 'type' => 'read',
265 'ajax' => true,
266 'capabilities' => 'moodle/cohort:view'
268 'core_cohort_get_cohorts' => array(
269 'classname' => 'core_cohort_external',
270 'methodname' => 'get_cohorts',
271 'classpath' => 'cohort/externallib.php',
272 'description' => 'Returns cohort details.',
273 'type' => 'read',
274 'capabilities' => 'moodle/cohort:view'
276 'core_cohort_update_cohorts' => array(
277 'classname' => 'core_cohort_external',
278 'methodname' => 'update_cohorts',
279 'classpath' => 'cohort/externallib.php',
280 'description' => 'Updates existing cohorts.',
281 'type' => 'write',
282 'capabilities' => 'moodle/cohort:manage'
284 'core_comment_get_comments' => array(
285 'classname' => 'core_comment_external',
286 'methodname' => 'get_comments',
287 'description' => 'Returns comments.',
288 'type' => 'read',
289 'capabilities' => 'moodle/comment:view',
290 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
292 'core_completion_get_activities_completion_status' => array(
293 'classname' => 'core_completion_external',
294 'methodname' => 'get_activities_completion_status',
295 'description' => 'Return the activities completion status for a user in a course.',
296 'type' => 'read',
297 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
299 'core_completion_get_course_completion_status' => array(
300 'classname' => 'core_completion_external',
301 'methodname' => 'get_course_completion_status',
302 'description' => 'Returns course completion status.',
303 'type' => 'read',
304 'capabilities' => 'report/completion:view',
305 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
307 'core_completion_mark_course_self_completed' => array(
308 'classname' => 'core_completion_external',
309 'methodname' => 'mark_course_self_completed',
310 'description' => 'Update the course completion status for the current user (if course self-completion is enabled).',
311 'type' => 'write',
312 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
314 'core_completion_update_activity_completion_status_manually' => array(
315 'classname' => 'core_completion_external',
316 'methodname' => 'update_activity_completion_status_manually',
317 'description' => 'Update completion status for the current user in an activity, only for activities with manual tracking.',
318 'type' => 'write',
319 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
321 'core_completion_override_activity_completion_status' => array(
322 'classname' => 'core_completion_external',
323 'methodname' => 'override_activity_completion_status',
324 'description' => 'Update completion status for a user in an activity by overriding it.',
325 'type' => 'write',
326 'capabilities' => 'moodle/course:overridecompletion',
327 'ajax' => true,
329 'core_course_create_categories' => array(
330 'classname' => 'core_course_external',
331 'methodname' => 'create_categories',
332 'classpath' => 'course/externallib.php',
333 'description' => 'Create course categories',
334 'type' => 'write',
335 'capabilities' => 'moodle/category:manage'
337 'core_course_create_courses' => array(
338 'classname' => 'core_course_external',
339 'methodname' => 'create_courses',
340 'classpath' => 'course/externallib.php',
341 'description' => 'Create new courses',
342 'type' => 'write',
343 'capabilities' => 'moodle/course:create, moodle/course:visibility'
345 'core_course_delete_categories' => array(
346 'classname' => 'core_course_external',
347 'methodname' => 'delete_categories',
348 'classpath' => 'course/externallib.php',
349 'description' => 'Delete course categories',
350 'type' => 'write',
351 'capabilities' => 'moodle/category:manage'
353 'core_course_delete_courses' => array(
354 'classname' => 'core_course_external',
355 'methodname' => 'delete_courses',
356 'classpath' => 'course/externallib.php',
357 'description' => 'Deletes all specified courses',
358 'type' => 'write',
359 'capabilities' => 'moodle/course:delete'
361 'core_course_delete_modules' => array(
362 'classname' => 'core_course_external',
363 'methodname' => 'delete_modules',
364 'classpath' => 'course/externallib.php',
365 'description' => 'Deletes all specified module instances',
366 'type' => 'write',
367 'capabilities' => 'moodle/course:manageactivities'
369 'core_course_duplicate_course' => array(
370 'classname' => 'core_course_external',
371 'methodname' => 'duplicate_course',
372 'classpath' => 'course/externallib.php',
373 'description' => 'Duplicate an existing course (creating a new one).',
374 'type' => 'write',
375 'capabilities' => 'moodle/backup:backupcourse, moodle/restore:restorecourse, moodle/course:create'
377 'core_course_get_categories' => array(
378 'classname' => 'core_course_external',
379 'methodname' => 'get_categories',
380 'classpath' => 'course/externallib.php',
381 'description' => 'Return category details',
382 'type' => 'read',
383 'capabilities' => 'moodle/category:viewhiddencategories',
384 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
386 'core_course_get_contents' => array(
387 'classname' => 'core_course_external',
388 'methodname' => 'get_course_contents',
389 'classpath' => 'course/externallib.php',
390 'description' => 'Get course contents',
391 'type' => 'read',
392 'capabilities' => 'moodle/course:update, moodle/course:viewhiddencourses',
393 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
395 'core_course_get_course_module' => array(
396 'classname' => 'core_course_external',
397 'methodname' => 'get_course_module',
398 'classpath' => 'course/externallib.php',
399 'description' => 'Return information about a course module',
400 'type' => 'read',
401 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
403 'core_course_get_course_module_by_instance' => array(
404 'classname' => 'core_course_external',
405 'methodname' => 'get_course_module_by_instance',
406 'classpath' => 'course/externallib.php',
407 'description' => 'Return information about a given module name and instance id',
408 'type' => 'read',
409 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
411 'core_course_get_module' => array(
412 'classname' => 'core_course_external',
413 'methodname' => 'get_module',
414 'classpath' => 'course/externallib.php',
415 'description' => 'Returns html with one activity module on course page',
416 'type' => 'read',
417 'ajax' => true,
419 'core_course_edit_module' => array(
420 'classname' => 'core_course_external',
421 'methodname' => 'edit_module',
422 'classpath' => 'course/externallib.php',
423 'description' => 'Performs an action on course module (change visibility, duplicate, delete, etc.)',
424 'type' => 'write',
425 'ajax' => true,
427 'core_course_edit_section' => array(
428 'classname' => 'core_course_external',
429 'methodname' => 'edit_section',
430 'classpath' => 'course/externallib.php',
431 'description' => 'Performs an action on course section (change visibility, set marker, delete)',
432 'type' => 'write',
433 'ajax' => true,
435 'core_course_get_courses' => array(
436 'classname' => 'core_course_external',
437 'methodname' => 'get_courses',
438 'classpath' => 'course/externallib.php',
439 'description' => 'Return course details',
440 'type' => 'read',
441 'capabilities' => 'moodle/course:view, moodle/course:update, moodle/course:viewhiddencourses',
442 'ajax' => true,
443 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
445 'core_course_import_course' => array(
446 'classname' => 'core_course_external',
447 'methodname' => 'import_course',
448 'classpath' => 'course/externallib.php',
449 'description' => 'Import course data from a course into another course. Does not include any user data.',
450 'type' => 'write',
451 'capabilities' => 'moodle/backup:backuptargetimport, moodle/restore:restoretargetimport'
453 'core_course_search_courses' => array(
454 'classname' => 'core_course_external',
455 'methodname' => 'search_courses',
456 'classpath' => 'course/externallib.php',
457 'description' => 'Search courses by (name, module, block, tag)',
458 'type' => 'read',
459 'ajax' => true,
460 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
462 'core_course_update_categories' => array(
463 'classname' => 'core_course_external',
464 'methodname' => 'update_categories',
465 'classpath' => 'course/externallib.php',
466 'description' => 'Update categories',
467 'type' => 'write',
468 'capabilities' => 'moodle/category:manage',
470 'core_course_update_courses' => array(
471 'classname' => 'core_course_external',
472 'methodname' => 'update_courses',
473 'classpath' => 'course/externallib.php',
474 'description' => 'Update courses',
475 'type' => 'write',
476 'capabilities' => 'moodle/course:update, moodle/course:changecategory, moodle/course:changefullname, '
477 . 'moodle/course:changeshortname, moodle/course:changeidnumber, moodle/course:changesummary, moodle/course:visibility'
479 'core_course_view_course' => array(
480 'classname' => 'core_course_external',
481 'methodname' => 'view_course',
482 'classpath' => 'course/externallib.php',
483 'description' => 'Log that the course was viewed',
484 'type' => 'write',
485 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
487 'core_course_get_activities_overview' => array(
488 'classname' => 'core_course_external',
489 'methodname' => 'get_activities_overview',
490 'classpath' => 'course/externallib.php',
491 'description' => '** DEPRECATED ** Please do not call this function any more.
492 Return activities overview for the given courses.',
493 'type' => 'read',
494 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
496 'core_course_get_user_navigation_options' => array(
497 'classname' => 'core_course_external',
498 'methodname' => 'get_user_navigation_options',
499 'classpath' => 'course/externallib.php',
500 'description' => 'Return a list of navigation options in a set of courses that are avaialable or not for the current user.',
501 'type' => 'read',
502 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
504 'core_course_get_user_administration_options' => array(
505 'classname' => 'core_course_external',
506 'methodname' => 'get_user_administration_options',
507 'classpath' => 'course/externallib.php',
508 'description' => 'Return a list of administration options in a set of courses that are avaialable or not for the current
509 user.',
510 'type' => 'read',
511 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
513 'core_course_get_courses_by_field' => array(
514 'classname' => 'core_course_external',
515 'methodname' => 'get_courses_by_field',
516 'classpath' => 'course/externallib.php',
517 'description' => 'Get courses matching a specific field (id/s, shortname, idnumber, category)',
518 'type' => 'read',
519 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
521 'core_course_check_updates' => array(
522 'classname' => 'core_course_external',
523 'methodname' => 'check_updates',
524 'classpath' => 'course/externallib.php',
525 'description' => 'Check if there is updates affecting the user for the given course and contexts.',
526 'type' => 'read',
527 'ajax' => true,
528 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
530 'core_course_get_updates_since' => array(
531 'classname' => 'core_course_external',
532 'methodname' => 'get_updates_since',
533 'classpath' => 'course/externallib.php',
534 'description' => 'Check if there are updates affecting the user for the given course since the given time stamp.',
535 'type' => 'read',
536 'ajax' => true,
537 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
539 'core_course_get_enrolled_courses_by_timeline_classification' => array(
540 'classname' => 'core_course_external',
541 'methodname' => 'get_enrolled_courses_by_timeline_classification',
542 'classpath' => 'course/externallib.php',
543 'description' => 'List of enrolled courses for the given timeline classification (past, inprogress, or future).',
544 'type' => 'read',
545 'ajax' => true,
546 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
548 'core_course_get_recent_courses' => array(
549 'classname' => 'core_course_external',
550 'methodname' => 'get_recent_courses',
551 'classpath' => 'course/externallib.php',
552 'description' => 'List of courses a user has accessed most recently.',
553 'type' => 'read',
554 'ajax' => true,
555 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
557 'core_course_set_favourite_courses' => array(
558 'classname' => 'core_course_external',
559 'methodname' => 'set_favourite_courses',
560 'classpath' => 'course/externallib.php',
561 'description' => 'Add a list of courses to the list of favourite courses.',
562 'type' => 'read',
563 'ajax' => true,
564 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
566 'core_enrol_get_course_enrolment_methods' => array(
567 'classname' => 'core_enrol_external',
568 'methodname' => 'get_course_enrolment_methods',
569 'classpath' => 'enrol/externallib.php',
570 'description' => 'Get the list of course enrolment methods',
571 'type' => 'read',
572 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
574 'core_enrol_get_enrolled_users' => array(
575 'classname' => 'core_enrol_external',
576 'methodname' => 'get_enrolled_users',
577 'classpath' => 'enrol/externallib.php',
578 'description' => 'Get enrolled users by course id.',
579 'type' => 'read',
580 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, '
581 . 'moodle/site:accessallgroups',
582 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
584 'core_enrol_get_enrolled_users_with_capability' => array(
585 'classname' => 'core_enrol_external',
586 'methodname' => 'get_enrolled_users_with_capability',
587 'classpath' => 'enrol/externallib.php',
588 'description' => 'For each course and capability specified, return a list of the users that are enrolled in the course
589 and have that capability',
590 'type' => 'read',
592 'core_enrol_get_potential_users' => array(
593 'classname' => 'core_enrol_external',
594 'methodname' => 'get_potential_users',
595 'classpath' => 'enrol/externallib.php',
596 'description' => 'Get the list of potential users to enrol',
597 'ajax' => true,
598 'type' => 'read',
599 'capabilities' => 'moodle/course:enrolreview'
601 'core_enrol_get_users_courses' => array(
602 'classname' => 'core_enrol_external',
603 'methodname' => 'get_users_courses',
604 'classpath' => 'enrol/externallib.php',
605 'description' => 'Get the list of courses where a user is enrolled in',
606 'type' => 'read',
607 'capabilities' => 'moodle/course:viewparticipants',
608 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
610 'core_enrol_edit_user_enrolment' => array(
611 'classname' => 'core_enrol_external',
612 'methodname' => 'edit_user_enrolment',
613 'classpath' => 'enrol/externallib.php',
614 'description' => 'External function that updates a given user enrolment',
615 'type' => 'write',
616 'ajax' => true,
618 'core_enrol_unenrol_user_enrolment' => array(
619 'classname' => 'core_enrol_external',
620 'methodname' => 'unenrol_user_enrolment',
621 'classpath' => 'enrol/externallib.php',
622 'description' => 'External function that unenrols a given user enrolment',
623 'type' => 'write',
624 'ajax' => true,
626 'core_fetch_notifications' => array(
627 'classname' => 'core_external',
628 'methodname' => 'fetch_notifications',
629 'classpath' => 'lib/external/externallib.php',
630 'description' => 'Return a list of notifications for the current session',
631 'type' => 'read',
632 'loginrequired' => false,
633 'ajax' => true,
635 'core_files_get_files' => array(
636 'classname' => 'core_files_external',
637 'methodname' => 'get_files',
638 'description' => 'browse moodle files',
639 'type' => 'read',
640 'classpath' => 'files/externallib.php',
641 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
643 'core_files_upload' => array(
644 'classname' => 'core_files_external',
645 'methodname' => 'upload',
646 'description' => 'upload a file to moodle',
647 'type' => 'write',
648 'classpath' => 'files/externallib.php',
650 'core_form_get_filetypes_browser_data' => array(
651 'classname' => 'core_form\external',
652 'methodname' => 'get_filetypes_browser_data',
653 'classpath' => '',
654 'description' => 'Provides data for the filetypes element browser.',
655 'type' => 'read',
656 'loginrequired' => false,
657 'ajax' => true,
659 'core_get_component_strings' => array(
660 'classname' => 'core_external',
661 'methodname' => 'get_component_strings',
662 'classpath' => 'lib/external/externallib.php',
663 'description' => 'Return all raw strings (with {$a->xxx}), for a specific component ' .
664 '- similar to core get_component_strings(), call',
665 'type' => 'read',
666 'loginrequired' => false,
667 'ajax' => true,
668 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
670 'core_get_fragment' => array(
671 'classname' => 'core_external',
672 'methodname' => 'get_fragment',
673 'classpath' => 'lib/external/externallib.php',
674 'description' => 'Return a fragment for inclusion, such as a JavaScript page.',
675 'type' => 'read',
676 'ajax' => true,
678 'core_get_string' => array(
679 'classname' => 'core_external',
680 'methodname' => 'get_string',
681 'classpath' => 'lib/external/externallib.php',
682 'description' => 'Return a translated string - similar to core get_string(), call',
683 'type' => 'read',
684 'loginrequired' => false,
685 'ajax' => true,
687 'core_get_strings' => array(
688 'classname' => 'core_external',
689 'methodname' => 'get_strings',
690 'classpath' => 'lib/external/externallib.php',
691 'description' => 'Return some translated strings - like several core get_string(), calls',
692 'type' => 'read',
693 'loginrequired' => false,
694 'ajax' => true,
696 'core_get_user_dates' => array(
697 'classname' => 'core_external',
698 'methodname' => 'get_user_dates',
699 'classpath' => 'lib/external/externallib.php',
700 'description' => 'Return formatted timestamps',
701 'type' => 'read',
702 'ajax' => true,
704 'core_grades_get_grades' => array(
705 'classname' => 'core_grades_external',
706 'methodname' => 'get_grades',
707 'description' => '** DEPRECATED ** Please do not call this function any more.
708 Returns student course total grade and grades for activities.
709 This function does not return category or manual items.
710 This function is suitable for managers or teachers not students.',
711 'type' => 'read',
712 'capabilities' => 'moodle/grade:view, moodle/grade:viewall, moodle/grade:viewhidden'
714 'core_grades_update_grades' => array(
715 'classname' => 'core_grades_external',
716 'methodname' => 'update_grades',
717 'description' => 'Update a grade item and associated student grades.',
718 'type' => 'write',
720 'core_grading_get_definitions' => array(
721 'classname' => 'core_grading_external',
722 'methodname' => 'get_definitions',
723 'description' => 'Get grading definitions',
724 'type' => 'read',
726 'core_grading_get_gradingform_instances' => array(
727 'classname' => 'core_grading_external',
728 'methodname' => 'get_gradingform_instances',
729 'description' => 'Get grading form instances',
730 'type' => 'read',
732 'core_grading_save_definitions' => array(
733 'classname' => 'core_grading_external',
734 'methodname' => 'save_definitions',
735 'description' => 'Save grading definitions',
736 'type' => 'write',
738 'core_group_add_group_members' => array(
739 'classname' => 'core_group_external',
740 'methodname' => 'add_group_members',
741 'classpath' => 'group/externallib.php',
742 'description' => 'Adds group members.',
743 'type' => 'write',
744 'capabilities' => 'moodle/course:managegroups',
746 'core_group_assign_grouping' => array(
747 'classname' => 'core_group_external',
748 'methodname' => 'assign_grouping',
749 'classpath' => 'group/externallib.php',
750 'description' => 'Assing groups from groupings',
751 'type' => 'write',
753 'core_group_create_groupings' => array(
754 'classname' => 'core_group_external',
755 'methodname' => 'create_groupings',
756 'classpath' => 'group/externallib.php',
757 'description' => 'Creates new groupings',
758 'type' => 'write',
760 'core_group_create_groups' => array(
761 'classname' => 'core_group_external',
762 'methodname' => 'create_groups',
763 'classpath' => 'group/externallib.php',
764 'description' => 'Creates new groups.',
765 'type' => 'write',
766 'capabilities' => 'moodle/course:managegroups'
768 'core_group_delete_group_members' => array(
769 'classname' => 'core_group_external',
770 'methodname' => 'delete_group_members',
771 'classpath' => 'group/externallib.php',
772 'description' => 'Deletes group members.',
773 'type' => 'write',
774 'capabilities' => 'moodle/course:managegroups'
776 'core_group_delete_groupings' => array(
777 'classname' => 'core_group_external',
778 'methodname' => 'delete_groupings',
779 'classpath' => 'group/externallib.php',
780 'description' => 'Deletes all specified groupings.',
781 'type' => 'write',
783 'core_group_delete_groups' => array(
784 'classname' => 'core_group_external',
785 'methodname' => 'delete_groups',
786 'classpath' => 'group/externallib.php',
787 'description' => 'Deletes all specified groups.',
788 'type' => 'write',
789 'capabilities' => 'moodle/course:managegroups'
791 'core_group_get_activity_allowed_groups' => array(
792 'classname' => 'core_group_external',
793 'methodname' => 'get_activity_allowed_groups',
794 'classpath' => 'group/externallib.php',
795 'description' => 'Gets a list of groups that the user is allowed to access within the specified activity.',
796 'type' => 'read',
797 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
799 'core_group_get_activity_groupmode' => array(
800 'classname' => 'core_group_external',
801 'methodname' => 'get_activity_groupmode',
802 'classpath' => 'group/externallib.php',
803 'description' => 'Returns effective groupmode used in a given activity.',
804 'type' => 'read',
805 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
807 'core_group_get_course_groupings' => array(
808 'classname' => 'core_group_external',
809 'methodname' => 'get_course_groupings',
810 'classpath' => 'group/externallib.php',
811 'description' => 'Returns all groupings in specified course.',
812 'type' => 'read',
814 'core_group_get_course_groups' => array(
815 'classname' => 'core_group_external',
816 'methodname' => 'get_course_groups',
817 'classpath' => 'group/externallib.php',
818 'description' => 'Returns all groups in specified course.',
819 'type' => 'read',
820 'ajax' => true,
821 'capabilities' => 'moodle/course:managegroups'
823 'core_group_get_course_user_groups' => array(
824 'classname' => 'core_group_external',
825 'methodname' => 'get_course_user_groups',
826 'classpath' => 'group/externallib.php',
827 'description' => 'Returns all groups in specified course for the specified user.',
828 'type' => 'read',
829 'capabilities' => 'moodle/course:managegroups',
830 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
832 'core_group_get_group_members' => array(
833 'classname' => 'core_group_external',
834 'methodname' => 'get_group_members',
835 'classpath' => 'group/externallib.php',
836 'description' => 'Returns group members.',
837 'type' => 'read',
838 'capabilities' => 'moodle/course:managegroups'
840 'core_group_get_groupings' => array(
841 'classname' => 'core_group_external',
842 'methodname' => 'get_groupings',
843 'classpath' => 'group/externallib.php',
844 'description' => 'Returns groupings details.',
845 'type' => 'read',
847 'core_group_get_groups' => array(
848 'classname' => 'core_group_external',
849 'methodname' => 'get_groups',
850 'classpath' => 'group/externallib.php',
851 'description' => 'Returns group details.',
852 'type' => 'read',
853 'capabilities' => 'moodle/course:managegroups'
855 'core_group_unassign_grouping' => array(
856 'classname' => 'core_group_external',
857 'methodname' => 'unassign_grouping',
858 'classpath' => 'group/externallib.php',
859 'description' => 'Unassing groups from groupings',
860 'type' => 'write',
862 'core_group_update_groupings' => array(
863 'classname' => 'core_group_external',
864 'methodname' => 'update_groupings',
865 'classpath' => 'group/externallib.php',
866 'description' => 'Updates existing groupings',
867 'type' => 'write',
869 'core_group_update_groups' => array(
870 'classname' => 'core_group_external',
871 'methodname' => 'update_groups',
872 'classpath' => 'group/externallib.php',
873 'description' => 'Updates existing groups.',
874 'type' => 'write',
875 'capabilities' => 'moodle/course:managegroups'
877 'core_message_block_user' => array(
878 'classname' => 'core_message_external',
879 'methodname' => 'block_user',
880 'classpath' => 'message/externallib.php',
881 'description' => 'Blocks a user',
882 'type' => 'write',
883 'ajax' => true,
884 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
886 'core_message_block_contacts' => array(
887 'classname' => 'core_message_external',
888 'methodname' => 'block_contacts',
889 'classpath' => 'message/externallib.php',
890 'description' => '** DEPRECATED ** Please do not call this function any more.
891 Block contacts',
892 'type' => 'write',
893 'ajax' => true,
894 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
896 'core_message_create_contacts' => array(
897 'classname' => 'core_message_external',
898 'methodname' => 'create_contacts',
899 'classpath' => 'message/externallib.php',
900 'description' => '** DEPRECATED ** Please do not call this function any more.
901 Add contacts to the contact list',
902 'type' => 'write',
903 'ajax' => true,
904 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
906 'core_message_get_contact_requests' => array(
907 'classname' => 'core_message_external',
908 'methodname' => 'get_contact_requests',
909 'classpath' => 'message/externallib.php',
910 'description' => 'Returns contact requests for a user',
911 'type' => 'read',
912 'ajax' => true,
913 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
915 'core_message_create_contact_request' => array(
916 'classname' => 'core_message_external',
917 'methodname' => 'create_contact_request',
918 'classpath' => 'message/externallib.php',
919 'description' => 'Creates a contact request',
920 'type' => 'write',
921 'ajax' => true,
922 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
924 'core_message_confirm_contact_request' => array(
925 'classname' => 'core_message_external',
926 'methodname' => 'confirm_contact_request',
927 'classpath' => 'message/externallib.php',
928 'description' => 'Confirms a contact request',
929 'type' => 'write',
930 'ajax' => true,
931 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
933 'core_message_decline_contact_request' => array(
934 'classname' => 'core_message_external',
935 'methodname' => 'decline_contact_request',
936 'classpath' => 'message/externallib.php',
937 'description' => 'Declines a contact request',
938 'type' => 'write',
939 'ajax' => true,
940 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
942 'core_message_delete_contacts' => array(
943 'classname' => 'core_message_external',
944 'methodname' => 'delete_contacts',
945 'classpath' => 'message/externallib.php',
946 'description' => 'Remove contacts from the contact list',
947 'type' => 'write',
948 'ajax' => true,
949 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
951 'core_message_delete_conversation' => array(
952 'classname' => 'core_message_external',
953 'methodname' => 'delete_conversation',
954 'classpath' => 'message/externallib.php',
955 'description' => '** DEPRECATED ** Please do not call this function any more.
956 Deletes a conversation.',
957 'type' => 'write',
958 'capabilities' => 'moodle/site:deleteownmessage',
959 'ajax' => true,
960 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
962 'core_message_delete_conversations_by_id' => array(
963 'classname' => 'core_message_external',
964 'methodname' => 'delete_conversations_by_id',
965 'classpath' => 'message/externallib.php',
966 'description' => 'Deletes a list of conversations.',
967 'type' => 'write',
968 'capabilities' => 'moodle/site:deleteownmessage',
969 'ajax' => true,
970 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
972 'core_message_delete_message' => array(
973 'classname' => 'core_message_external',
974 'methodname' => 'delete_message',
975 'classpath' => 'message/externallib.php',
976 'description' => 'Deletes a message.',
977 'type' => 'write',
978 'capabilities' => 'moodle/site:deleteownmessage',
979 'ajax' => true,
980 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
982 'core_message_get_blocked_users' => array(
983 'classname' => 'core_message_external',
984 'methodname' => 'get_blocked_users',
985 'classpath' => 'message/externallib.php',
986 'description' => 'Retrieve a list of users blocked',
987 'type' => 'read',
988 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
990 'core_message_data_for_messagearea_search_messages' => array(
991 'classname' => 'core_message_external',
992 'methodname' => 'data_for_messagearea_search_messages',
993 'classpath' => 'message/externallib.php',
994 'description' => 'Retrieve the template data for searching for messages',
995 'type' => 'read',
996 'ajax' => true,
997 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
999 'core_message_data_for_messagearea_search_users' => array(
1000 'classname' => 'core_message_external',
1001 'methodname' => 'data_for_messagearea_search_users',
1002 'classpath' => 'message/externallib.php',
1003 'description' => '** DEPRECATED ** Please do not call this function any more.
1004 Retrieve the template data for searching for people',
1005 'type' => 'read',
1006 'ajax' => true,
1008 'core_message_data_for_messagearea_search_users_in_course' => array(
1009 'classname' => 'core_message_external',
1010 'methodname' => 'data_for_messagearea_search_users_in_course',
1011 'classpath' => 'message/externallib.php',
1012 'description' => '** DEPRECATED ** Please do not call this function any more.
1013 Retrieve the template data for searching for people in a course',
1014 'type' => 'read',
1015 'ajax' => true,
1017 'core_message_message_search_users' => array(
1018 'classname' => 'core_message_external',
1019 'methodname' => 'message_search_users',
1020 'classpath' => 'message/externallib.php',
1021 'description' => 'Retrieve the data for searching for people',
1022 'type' => 'read',
1023 'ajax' => true,
1024 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1026 'core_message_data_for_messagearea_conversations' => array(
1027 'classname' => 'core_message_external',
1028 'methodname' => 'data_for_messagearea_conversations',
1029 'classpath' => 'message/externallib.php',
1030 'description' => '** DEPRECATED ** Please do not call this function any more.
1031 Retrieve the template data for the conversation list',
1032 'type' => 'read',
1033 'ajax' => true,
1034 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1036 'core_message_data_for_messagearea_contacts' => array(
1037 'classname' => 'core_message_external',
1038 'methodname' => 'data_for_messagearea_contacts',
1039 'classpath' => 'message/externallib.php',
1040 'description' => '** DEPRECATED ** Please do not call this function any more.
1041 Retrieve the template data for the contact list',
1042 'type' => 'read',
1043 'ajax' => true,
1044 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1046 'core_message_data_for_messagearea_messages' => array(
1047 'classname' => 'core_message_external',
1048 'methodname' => 'data_for_messagearea_messages',
1049 'classpath' => 'message/externallib.php',
1050 'description' => '** DEPRECATED ** Please do not call this function any more.
1051 Retrieve the template data for the messages',
1052 'type' => 'read',
1053 'ajax' => true,
1054 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1056 'core_message_data_for_messagearea_get_most_recent_message' => array(
1057 'classname' => 'core_message_external',
1058 'methodname' => 'data_for_messagearea_get_most_recent_message',
1059 'classpath' => 'message/externallib.php',
1060 'description' => '** DEPRECATED ** Please do not call this function any more.
1061 Retrieve the template data for the most recent message',
1062 'type' => 'read',
1063 'ajax' => true,
1065 'core_message_data_for_messagearea_get_profile' => array(
1066 'classname' => 'core_message_external',
1067 'methodname' => 'data_for_messagearea_get_profile',
1068 'classpath' => 'message/externallib.php',
1069 'description' => '** DEPRECATED ** Please do not call this function any more.
1070 Retrieve the template data for the users\'s profile',
1071 'type' => 'read',
1072 'ajax' => true,
1074 'core_message_get_contacts' => array(
1075 'classname' => 'core_message_external',
1076 'methodname' => 'get_contacts',
1077 'classpath' => 'message/externallib.php',
1078 'description' => 'Retrieve the contact list',
1079 'type' => 'read',
1080 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1082 'core_message_get_conversations' => array(
1083 'classname' => 'core_message_external',
1084 'methodname' => 'get_conversations',
1085 'classpath' => 'message/externallib.php',
1086 'description' => 'Retrieve a list of conversations for a user',
1087 'type' => 'read',
1088 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1089 'ajax' => true
1091 'core_message_get_conversation' => array(
1092 'classname' => 'core_message_external',
1093 'methodname' => 'get_conversation',
1094 'classpath' => 'message/externallib.php',
1095 'description' => 'Retrieve a conversation for a user',
1096 'type' => 'read',
1097 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1098 'ajax' => true
1100 'core_message_get_conversation_between_users' => array(
1101 'classname' => 'core_message_external',
1102 'methodname' => 'get_conversation_between_users',
1103 'classpath' => 'message/externallib.php',
1104 'description' => 'Retrieve a conversation for a user between another user',
1105 'type' => 'read',
1106 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1107 'ajax' => true
1109 'core_message_get_messages' => array(
1110 'classname' => 'core_message_external',
1111 'methodname' => 'get_messages',
1112 'classpath' => 'message/externallib.php',
1113 'description' => 'Retrieve a list of messages sent and received by a user (conversations, notifications or both)',
1114 'type' => 'read',
1115 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1116 'ajax' => true,
1118 'core_message_get_conversation_members' => array(
1119 'classname' => 'core_message_external',
1120 'methodname' => 'get_conversation_members',
1121 'classpath' => 'message/externallib.php',
1122 'description' => 'Retrieve a list of members in a conversation',
1123 'type' => 'read',
1124 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1125 'ajax' => true,
1127 'core_message_get_member_info' => array(
1128 'classname' => 'core_message_external',
1129 'methodname' => 'get_member_info',
1130 'classpath' => 'message/externallib.php',
1131 'description' => 'Retrieve a user message profiles',
1132 'type' => 'read',
1133 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1134 'ajax' => true,
1136 'core_message_get_unread_conversations_count' => array(
1137 'classname' => 'core_message_external',
1138 'methodname' => 'get_unread_conversations_count',
1139 'classpath' => 'message/externallib.php',
1140 'description' => 'Retrieve the count of unread conversations for a given user',
1141 'type' => 'read',
1142 'ajax' => true,
1143 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1145 'core_message_mark_all_notifications_as_read' => array(
1146 'classname' => 'core_message_external',
1147 'methodname' => 'mark_all_notifications_as_read',
1148 'classpath' => 'message/externallib.php',
1149 'description' => 'Mark all notifications as read for a given user',
1150 'type' => 'write',
1151 'ajax' => true,
1152 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1154 'core_message_mark_all_messages_as_read' => array(
1155 'classname' => 'core_message_external',
1156 'methodname' => 'mark_all_messages_as_read',
1157 'classpath' => 'message/externallib.php',
1158 'description' => '** DEPRECATED ** Please do not call this function any more.
1159 Mark all messages as read for a given user',
1160 'type' => 'write',
1161 'ajax' => true,
1162 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1164 'core_message_mark_all_conversation_messages_as_read' => array(
1165 'classname' => 'core_message_external',
1166 'methodname' => 'mark_all_conversation_messages_as_read',
1167 'classpath' => 'message/externallib.php',
1168 'description' => 'Mark all conversation messages as read for a given user',
1169 'type' => 'write',
1170 'ajax' => true,
1171 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1173 'core_message_mark_message_read' => array(
1174 'classname' => 'core_message_external',
1175 'methodname' => 'mark_message_read',
1176 'classpath' => 'message/externallib.php',
1177 'description' => 'Mark a single message as read, trigger message_viewed event.',
1178 'type' => 'write',
1179 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1180 'ajax' => true,
1182 'core_message_mark_notification_read' => array(
1183 'classname' => 'core_message_external',
1184 'methodname' => 'mark_notification_read',
1185 'classpath' => 'message/externallib.php',
1186 'description' => 'Mark a single notification as read, trigger notification_viewed event.',
1187 'type' => 'write',
1188 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1189 'ajax' => true,
1191 'core_message_message_processor_config_form' => array(
1192 'classname' => 'core_message_external',
1193 'methodname' => 'message_processor_config_form',
1194 'classpath' => 'message/externallib.php',
1195 'description' => 'Process the message processor config form',
1196 'type' => 'write',
1197 'ajax' => true,
1198 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1200 'core_message_get_message_processor' => array(
1201 'classname' => 'core_message_external',
1202 'methodname' => 'get_message_processor',
1203 'classpath' => 'message/externallib.php',
1204 'description' => 'Get a message processor',
1205 'type' => 'read',
1206 'ajax' => true,
1208 'core_message_search_contacts' => array(
1209 'classname' => 'core_message_external',
1210 'methodname' => 'search_contacts',
1211 'classpath' => 'message/externallib.php',
1212 'description' => 'Search for contacts',
1213 'type' => 'read',
1214 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1216 'core_message_send_instant_messages' => array(
1217 'classname' => 'core_message_external',
1218 'methodname' => 'send_instant_messages',
1219 'classpath' => 'message/externallib.php',
1220 'description' => 'Send instant messages',
1221 'type' => 'write',
1222 'capabilities' => 'moodle/site:sendmessage',
1223 'ajax' => true,
1224 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1226 'core_message_send_messages_to_conversation' => array(
1227 'classname' => 'core_message_external',
1228 'methodname' => 'send_messages_to_conversation',
1229 'classpath' => 'message/externallib.php',
1230 'description' => 'Send messages to an existing conversation between users',
1231 'type' => 'write',
1232 'capabilities' => 'moodle/site:sendmessage',
1233 'ajax' => true,
1234 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1236 'core_message_get_conversation_messages' => array(
1237 'classname' => 'core_message_external',
1238 'methodname' => 'get_conversation_messages',
1239 'classpath' => 'message/externallib.php',
1240 'description' => 'Retrieve the conversation messages and relevant member information',
1241 'type' => 'read',
1242 'ajax' => true,
1243 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1245 'core_message_unblock_user' => array(
1246 'classname' => 'core_message_external',
1247 'methodname' => 'unblock_user',
1248 'classpath' => 'message/externallib.php',
1249 'description' => 'Unblocks a user',
1250 'type' => 'write',
1251 'ajax' => true,
1252 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1254 'core_message_unblock_contacts' => array(
1255 'classname' => 'core_message_external',
1256 'methodname' => 'unblock_contacts',
1257 'classpath' => 'message/externallib.php',
1258 'description' => '** DEPRECATED ** Please do not call this function any more.
1259 Unblock contacts',
1260 'type' => 'write',
1261 'ajax' => true,
1262 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1264 'core_message_get_user_notification_preferences' => array(
1265 'classname' => 'core_message_external',
1266 'methodname' => 'get_user_notification_preferences',
1267 'classpath' => 'message/externallib.php',
1268 'description' => 'Get the notification preferences for a given user.',
1269 'type' => 'read',
1270 'capabilities' => 'moodle/user:editownmessageprofile',
1271 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1273 'core_message_get_user_message_preferences' => array(
1274 'classname' => 'core_message_external',
1275 'methodname' => 'get_user_message_preferences',
1276 'classpath' => 'message/externallib.php',
1277 'description' => 'Get the message preferences for a given user.',
1278 'type' => 'read',
1279 'capabilities' => 'moodle/user:editownmessageprofile',
1280 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1282 'core_message_set_favourite_conversations' => array(
1283 'classname' => 'core_message_external',
1284 'methodname' => 'set_favourite_conversations',
1285 'classpath' => 'message/externallib.php',
1286 'description' => 'Mark a conversation or group of conversations as favourites/starred conversations.',
1287 'type' => 'write',
1288 'ajax' => true,
1289 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1291 'core_message_unset_favourite_conversations' => array(
1292 'classname' => 'core_message_external',
1293 'methodname' => 'unset_favourite_conversations',
1294 'classpath' => 'message/externallib.php',
1295 'description' => 'Unset a conversation or group of conversations as favourites/starred conversations.',
1296 'type' => 'write',
1297 'ajax' => true,
1298 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1300 'core_notes_create_notes' => array(
1301 'classname' => 'core_notes_external',
1302 'methodname' => 'create_notes',
1303 'classpath' => 'notes/externallib.php',
1304 'description' => 'Create notes',
1305 'type' => 'write',
1306 'ajax' => true,
1307 'capabilities' => 'moodle/notes:manage',
1308 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1310 'core_notes_delete_notes' => array(
1311 'classname' => 'core_notes_external',
1312 'methodname' => 'delete_notes',
1313 'classpath' => 'notes/externallib.php',
1314 'description' => 'Delete notes',
1315 'type' => 'write',
1316 'capabilities' => 'moodle/notes:manage',
1317 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1319 'core_notes_get_course_notes' => array(
1320 'classname' => 'core_notes_external',
1321 'methodname' => 'get_course_notes',
1322 'classpath' => 'notes/externallib.php',
1323 'description' => 'Returns all notes in specified course (or site), for the specified user.',
1324 'type' => 'read',
1325 'capabilities' => 'moodle/notes:view',
1326 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1328 'core_notes_get_notes' => array(
1329 'classname' => 'core_notes_external',
1330 'methodname' => 'get_notes',
1331 'classpath' => 'notes/externallib.php',
1332 'description' => 'Get notes',
1333 'type' => 'read',
1334 'capabilities' => 'moodle/notes:view'
1336 'core_notes_update_notes' => array(
1337 'classname' => 'core_notes_external',
1338 'methodname' => 'update_notes',
1339 'classpath' => 'notes/externallib.php',
1340 'description' => 'Update notes',
1341 'type' => 'write',
1342 'capabilities' => 'moodle/notes:manage'
1344 'core_notes_view_notes' => array(
1345 'classname' => 'core_notes_external',
1346 'methodname' => 'view_notes',
1347 'classpath' => 'notes/externallib.php',
1348 'description' => 'Simulates the web interface view of notes/index.php: trigger events.',
1349 'type' => 'write',
1350 'capabilities' => 'moodle/notes:view',
1351 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1353 'core_output_load_template' => array(
1354 'classname' => 'core\output\external',
1355 'methodname' => 'load_template',
1356 'description' => 'Load a template for a renderable',
1357 'type' => 'read',
1358 'loginrequired' => false,
1359 'ajax' => true,
1361 'core_output_load_fontawesome_icon_map' => array(
1362 'classname' => 'core\output\external',
1363 'methodname' => 'load_fontawesome_icon_map',
1364 'description' => 'Load the mapping of names to icons',
1365 'type' => 'read',
1366 'loginrequired' => false,
1367 'ajax' => true,
1369 // Question related functions.
1370 'core_question_update_flag' => array(
1371 'classname' => 'core_question_external',
1372 'methodname' => 'update_flag',
1373 'description' => 'Update the flag state of a question attempt.',
1374 'type' => 'write',
1375 'capabilities' => 'moodle/question:flag',
1376 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1378 'core_question_submit_tags_form' => array(
1379 'classname' => 'core_question_external',
1380 'methodname' => 'submit_tags_form',
1381 'description' => 'Update the question tags.',
1382 'type' => 'write',
1383 'ajax' => true,
1385 'core_question_get_random_question_summaries' => array(
1386 'classname' => 'core_question_external',
1387 'methodname' => 'get_random_question_summaries',
1388 'description' => 'Get the random question set for a criteria',
1389 'type' => 'read',
1390 'ajax' => true,
1392 'core_rating_get_item_ratings' => array(
1393 'classname' => 'core_rating_external',
1394 'methodname' => 'get_item_ratings',
1395 'description' => 'Retrieve all the ratings for an item.',
1396 'type' => 'read',
1397 'capabilities' => 'moodle/rating:view',
1398 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1400 'core_rating_add_rating' => array(
1401 'classname' => 'core_rating_external',
1402 'methodname' => 'add_rating',
1403 'description' => 'Rates an item.',
1404 'type' => 'write',
1405 'capabilities' => 'moodle/rating:rate',
1406 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1408 'core_role_assign_roles' => array(
1409 'classname' => 'core_role_external',
1410 'methodname' => 'assign_roles',
1411 'classpath' => 'enrol/externallib.php',
1412 'description' => 'Manual role assignments.',
1413 'type' => 'write',
1414 'capabilities' => 'moodle/role:assign'
1416 'core_role_unassign_roles' => array(
1417 'classname' => 'core_role_external',
1418 'methodname' => 'unassign_roles',
1419 'classpath' => 'enrol/externallib.php',
1420 'description' => 'Manual role unassignments.',
1421 'type' => 'write',
1422 'capabilities' => 'moodle/role:assign'
1424 'core_search_get_relevant_users' => array(
1425 'classname' => '\core_search\external',
1426 'methodname' => 'get_relevant_users',
1427 'description' => 'Gets relevant users for a search request.',
1428 'type' => 'read',
1429 'ajax' => true
1431 'core_tag_get_tagindex' => array(
1432 'classname' => 'core_tag_external',
1433 'methodname' => 'get_tagindex',
1434 'description' => 'Gets tag index page for one tag and one tag area',
1435 'type' => 'read',
1436 'ajax' => true,
1438 'core_tag_get_tags' => array(
1439 'classname' => 'core_tag_external',
1440 'methodname' => 'get_tags',
1441 'description' => 'Gets tags by their ids',
1442 'type' => 'read',
1443 'ajax' => true,
1445 'core_tag_update_tags' => array(
1446 'classname' => 'core_tag_external',
1447 'methodname' => 'update_tags',
1448 'description' => 'Updates tags',
1449 'type' => 'write',
1450 'ajax' => true,
1452 'core_update_inplace_editable' => array(
1453 'classname' => 'core_external',
1454 'methodname' => 'update_inplace_editable',
1455 'classpath' => 'lib/external/externallib.php',
1456 'description' => 'Generic service to update title',
1457 'type' => 'write',
1458 'loginrequired' => true,
1459 'ajax' => true,
1461 'core_user_add_user_device' => array(
1462 'classname' => 'core_user_external',
1463 'methodname' => 'add_user_device',
1464 'classpath' => 'user/externallib.php',
1465 'description' => 'Store mobile user devices information for PUSH Notifications.',
1466 'type' => 'write',
1467 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1469 'core_user_add_user_private_files' => array(
1470 'classname' => 'core_user_external',
1471 'methodname' => 'add_user_private_files',
1472 'classpath' => 'user/externallib.php',
1473 'description' => 'Copy files from a draft area to users private files area.',
1474 'type' => 'write',
1475 'capabilities' => 'moodle/user:manageownfiles',
1476 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1478 'core_user_create_users' => array(
1479 'classname' => 'core_user_external',
1480 'methodname' => 'create_users',
1481 'classpath' => 'user/externallib.php',
1482 'description' => 'Create users.',
1483 'type' => 'write',
1484 'capabilities' => 'moodle/user:create'
1486 'core_user_delete_users' => array(
1487 'classname' => 'core_user_external',
1488 'methodname' => 'delete_users',
1489 'classpath' => 'user/externallib.php',
1490 'description' => 'Delete users.',
1491 'type' => 'write',
1492 'capabilities' => 'moodle/user:delete'
1494 'core_user_get_course_user_profiles' => array(
1495 'classname' => 'core_user_external',
1496 'methodname' => 'get_course_user_profiles',
1497 'classpath' => 'user/externallib.php',
1498 'description' => 'Get course user profiles (each of the profils matching a course id and a user id),.',
1499 'type' => 'read',
1500 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, '
1501 . 'moodle/site:accessallgroups',
1502 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1504 'core_user_get_users' => array(
1505 'classname' => 'core_user_external',
1506 'methodname' => 'get_users',
1507 'classpath' => 'user/externallib.php',
1508 'description' => 'search for users matching the parameters',
1509 'type' => 'read',
1510 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update'
1512 'core_user_get_users_by_field' => array(
1513 'classname' => 'core_user_external',
1514 'methodname' => 'get_users_by_field',
1515 'classpath' => 'user/externallib.php',
1516 'description' => 'Retrieve users\' information for a specified unique field - If you want to do a user search, use '
1517 . 'core_user_get_users()',
1518 'type' => 'read',
1519 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update',
1520 'ajax' => true,
1521 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1523 'core_user_remove_user_device' => array(
1524 'classname' => 'core_user_external',
1525 'methodname' => 'remove_user_device',
1526 'classpath' => 'user/externallib.php',
1527 'description' => 'Remove a user device from the Moodle database.',
1528 'type' => 'write',
1529 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1531 'core_user_update_users' => array(
1532 'classname' => 'core_user_external',
1533 'methodname' => 'update_users',
1534 'classpath' => 'user/externallib.php',
1535 'description' => 'Update users.',
1536 'type' => 'write',
1537 'capabilities' => 'moodle/user:update',
1538 'ajax' => true,
1540 'core_user_update_user_preferences' => array(
1541 'classname' => 'core_user_external',
1542 'methodname' => 'update_user_preferences',
1543 'classpath' => 'user/externallib.php',
1544 'description' => 'Update a user\'s preferences',
1545 'type' => 'write',
1546 'capabilities' => 'moodle/user:editownmessageprofile, moodle/user:editmessageprofile',
1547 'ajax' => true,
1548 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1550 'core_user_view_user_list' => array(
1551 'classname' => 'core_user_external',
1552 'methodname' => 'view_user_list',
1553 'classpath' => 'user/externallib.php',
1554 'description' => 'Simulates the web-interface view of user/index.php (triggering events),.',
1555 'type' => 'write',
1556 'capabilities' => 'moodle/course:viewparticipants',
1557 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1559 'core_user_view_user_profile' => array(
1560 'classname' => 'core_user_external',
1561 'methodname' => 'view_user_profile',
1562 'classpath' => 'user/externallib.php',
1563 'description' => 'Simulates the web-interface view of user/view.php and user/profile.php (triggering events),.',
1564 'type' => 'write',
1565 'capabilities' => 'moodle/user:viewdetails',
1566 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1568 'core_user_get_user_preferences' => array(
1569 'classname' => 'core_user_external',
1570 'methodname' => 'get_user_preferences',
1571 'classpath' => 'user/externallib.php',
1572 'description' => 'Return user preferences.',
1573 'type' => 'read',
1574 'ajax' => true,
1575 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1577 'core_user_update_picture' => array(
1578 'classname' => 'core_user_external',
1579 'methodname' => 'update_picture',
1580 'classpath' => 'user/externallib.php',
1581 'description' => 'Update or delete the user picture in the site',
1582 'type' => 'write',
1583 'capabilities' => 'moodle/user:editownprofile, moodle/user:editprofile',
1584 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1586 'core_user_set_user_preferences' => array(
1587 'classname' => 'core_user_external',
1588 'methodname' => 'set_user_preferences',
1589 'classpath' => 'user/externallib.php',
1590 'description' => 'Set user preferences.',
1591 'type' => 'write',
1592 'capabilities' => 'moodle/site:config',
1593 'ajax' => true,
1594 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1596 'core_user_agree_site_policy' => array(
1597 'classname' => 'core_user_external',
1598 'methodname' => 'agree_site_policy',
1599 'classpath' => 'user/externallib.php',
1600 'description' => 'Agree the site policy for the current user.',
1601 'type' => 'write',
1602 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1604 'core_user_get_private_files_info' => array(
1605 'classname' => 'core_user_external',
1606 'methodname' => 'get_private_files_info',
1607 'classpath' => 'user/externallib.php',
1608 'description' => 'Returns general information about files in the user private files area.',
1609 'type' => 'read',
1610 'capabilities' => 'moodle/user:manageownfiles',
1611 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1614 // Competencies functions.
1615 'core_competency_create_competency_framework' => array(
1616 'classname' => 'core_competency\external',
1617 'methodname' => 'create_competency_framework',
1618 'classpath' => '',
1619 'description' => 'Creates new competency frameworks.',
1620 'type' => 'write',
1621 'capabilities' => 'moodle/competency:competencymanage',
1622 'ajax' => true,
1624 'core_competency_read_competency_framework' => array(
1625 'classname' => 'core_competency\external',
1626 'methodname' => 'read_competency_framework',
1627 'classpath' => '',
1628 'description' => 'Load a summary of a competency framework.',
1629 'type' => 'read',
1630 'capabilities' => 'moodle/competency:competencyview',
1631 'ajax' => true,
1633 'core_competency_duplicate_competency_framework' => array(
1634 'classname' => 'core_competency\external',
1635 'methodname' => 'duplicate_competency_framework',
1636 'classpath' => '',
1637 'description' => 'Duplicate a competency framework.',
1638 'type' => 'write',
1639 'capabilities' => 'moodle/competency:competencymanage',
1640 'ajax' => true,
1642 'core_competency_delete_competency_framework' => array(
1643 'classname' => 'core_competency\external',
1644 'methodname' => 'delete_competency_framework',
1645 'classpath' => '',
1646 'description' => 'Delete a competency framework.',
1647 'type' => 'write',
1648 'capabilities' => 'moodle/competency:competencymanage',
1649 'ajax' => true,
1651 'core_competency_update_competency_framework' => array(
1652 'classname' => 'core_competency\external',
1653 'methodname' => 'update_competency_framework',
1654 'classpath' => '',
1655 'description' => 'Update a competency framework.',
1656 'type' => 'write',
1657 'capabilities' => 'moodle/competency:competencymanage',
1658 'ajax' => true,
1660 'core_competency_list_competency_frameworks' => array(
1661 'classname' => 'core_competency\external',
1662 'methodname' => 'list_competency_frameworks',
1663 'classpath' => '',
1664 'description' => 'Load a list of a competency frameworks.',
1665 'type' => 'read',
1666 'capabilities' => 'moodle/competency:competencyview',
1667 'ajax' => true,
1669 'core_competency_count_competency_frameworks' => array(
1670 'classname' => 'core_competency\external',
1671 'methodname' => 'count_competency_frameworks',
1672 'classpath' => '',
1673 'description' => 'Count a list of a competency frameworks.',
1674 'type' => 'read',
1675 'capabilities' => 'moodle/competency:competencyview',
1676 'ajax' => true,
1678 'core_competency_competency_framework_viewed' => array(
1679 'classname' => 'core_competency\external',
1680 'methodname' => 'competency_framework_viewed',
1681 'classpath' => '',
1682 'description' => 'Log event competency framework viewed',
1683 'type' => 'read',
1684 'capabilities' => 'moodle/competency:competencyview',
1685 'ajax' => true,
1687 'core_competency_create_competency' => array(
1688 'classname' => 'core_competency\external',
1689 'methodname' => 'create_competency',
1690 'classpath' => '',
1691 'description' => 'Creates new competencies.',
1692 'type' => 'write',
1693 'capabilities' => 'moodle/competency:competencymanage',
1694 'ajax' => true,
1696 'core_competency_read_competency' => array(
1697 'classname' => 'core_competency\external',
1698 'methodname' => 'read_competency',
1699 'classpath' => '',
1700 'description' => 'Load a summary of a competency.',
1701 'type' => 'read',
1702 'capabilities' => 'moodle/competency:competencyview',
1703 'ajax' => true,
1705 'core_competency_competency_viewed' => array(
1706 'classname' => 'core_competency\external',
1707 'methodname' => 'competency_viewed',
1708 'classpath' => '',
1709 'description' => 'Log event competency viewed',
1710 'type' => 'read',
1711 'capabilities' => 'moodle/competency:competencyview',
1712 'ajax' => true,
1713 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1715 'core_competency_delete_competency' => array(
1716 'classname' => 'core_competency\external',
1717 'methodname' => 'delete_competency',
1718 'classpath' => '',
1719 'description' => 'Delete a competency.',
1720 'type' => 'write',
1721 'capabilities' => 'moodle/competency:competencymanage',
1722 'ajax' => true,
1724 'core_competency_update_competency' => array(
1725 'classname' => 'core_competency\external',
1726 'methodname' => 'update_competency',
1727 'classpath' => '',
1728 'description' => 'Update a competency.',
1729 'type' => 'write',
1730 'capabilities' => 'moodle/competency:competencymanage',
1731 'ajax' => true,
1733 'core_competency_list_competencies' => array(
1734 'classname' => 'core_competency\external',
1735 'methodname' => 'list_competencies',
1736 'classpath' => '',
1737 'description' => 'Load a list of a competencies.',
1738 'type' => 'read',
1739 'capabilities' => 'moodle/competency:competencyview',
1740 'ajax' => true,
1742 'core_competency_list_competencies_in_template' => array(
1743 'classname' => 'core_competency\external',
1744 'methodname' => 'list_competencies_in_template',
1745 'classpath' => '',
1746 'description' => 'Load a list of a competencies for a given template.',
1747 'type' => 'read',
1748 'capabilities' => 'moodle/competency:competencyview',
1749 'ajax' => true,
1751 'core_competency_count_competencies' => array(
1752 'classname' => 'core_competency\external',
1753 'methodname' => 'count_competencies',
1754 'classpath' => '',
1755 'description' => 'Count a list of a competencies.',
1756 'type' => 'read',
1757 'capabilities' => 'moodle/competency:competencyview',
1758 'ajax' => true,
1760 'core_competency_count_competencies_in_template' => array(
1761 'classname' => 'core_competency\external',
1762 'methodname' => 'count_competencies_in_template',
1763 'classpath' => '',
1764 'description' => 'Count a list of a competencies for a given template.',
1765 'type' => 'read',
1766 'capabilities' => 'moodle/competency:competencyview',
1767 'ajax' => true,
1769 'core_competency_search_competencies' => array(
1770 'classname' => 'core_competency\external',
1771 'methodname' => 'search_competencies',
1772 'classpath' => '',
1773 'description' => 'Search a list of a competencies.',
1774 'type' => 'read',
1775 'capabilities' => 'moodle/competency:competencyview',
1776 'ajax' => true,
1778 'core_competency_set_parent_competency' => array(
1779 'classname' => 'core_competency\external',
1780 'methodname' => 'set_parent_competency',
1781 'classpath' => '',
1782 'description' => 'Set a new parent for a competency.',
1783 'type' => 'write',
1784 'capabilities' => 'moodle/competency:competencymanage',
1785 'ajax' => true,
1787 'core_competency_move_up_competency' => array(
1788 'classname' => 'core_competency\external',
1789 'methodname' => 'move_up_competency',
1790 'classpath' => '',
1791 'description' => 'Re-order a competency.',
1792 'type' => 'write',
1793 'capabilities' => 'moodle/competency:competencymanage',
1794 'ajax' => true,
1796 'core_competency_move_down_competency' => array(
1797 'classname' => 'core_competency\external',
1798 'methodname' => 'move_down_competency',
1799 'classpath' => '',
1800 'description' => 'Re-order a competency.',
1801 'type' => 'write',
1802 'capabilities' => 'moodle/competency:competencymanage',
1803 'ajax' => true,
1805 'core_competency_list_course_competencies' => array(
1806 'classname' => 'core_competency\external',
1807 'methodname' => 'list_course_competencies',
1808 'classpath' => '',
1809 'description' => 'List the competencies in a course',
1810 'type' => 'read',
1811 'capabilities' => 'moodle/competency:coursecompetencyview',
1812 'ajax' => true,
1813 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1815 'core_competency_count_competencies_in_course' => array(
1816 'classname' => 'core_competency\external',
1817 'methodname' => 'count_competencies_in_course',
1818 'classpath' => '',
1819 'description' => 'List the competencies in a course',
1820 'type' => 'read',
1821 'capabilities' => 'moodle/competency:coursecompetencyview',
1822 'ajax' => true,
1824 'core_competency_count_courses_using_competency' => array(
1825 'classname' => 'core_competency\external',
1826 'methodname' => 'count_courses_using_competency',
1827 'classpath' => '',
1828 'description' => 'List the courses using a competency',
1829 'type' => 'read',
1830 'capabilities' => 'moodle/competency:coursecompetencyview',
1831 'ajax' => true,
1833 'core_competency_add_competency_to_course' => array(
1834 'classname' => 'core_competency\external',
1835 'methodname' => 'add_competency_to_course',
1836 'classpath' => '',
1837 'description' => 'Add the competency to a course',
1838 'type' => 'write',
1839 'capabilities' => 'moodle/competency:coursecompetencymanage',
1840 'ajax' => true,
1842 'core_competency_add_competency_to_template' => array(
1843 'classname' => 'core_competency\external',
1844 'methodname' => 'add_competency_to_template',
1845 'classpath' => '',
1846 'description' => 'Add the competency to a template',
1847 'type' => 'write',
1848 'capabilities' => 'moodle/competency:templatemanage',
1849 'ajax' => true,
1851 'core_competency_remove_competency_from_course' => array(
1852 'classname' => 'core_competency\external',
1853 'methodname' => 'remove_competency_from_course',
1854 'classpath' => '',
1855 'description' => 'Remove a competency from a course',
1856 'type' => 'write',
1857 'capabilities' => 'moodle/competency:coursecompetencymanage',
1858 'ajax' => true,
1860 'core_competency_set_course_competency_ruleoutcome' => array(
1861 'classname' => 'core_competency\external',
1862 'methodname' => 'set_course_competency_ruleoutcome',
1863 'classpath' => '',
1864 'description' => 'Modify the ruleoutcome value for course competency',
1865 'type' => 'write',
1866 'capabilities' => 'moodle/competency:coursecompetencymanage',
1867 'ajax' => true,
1869 'core_competency_remove_competency_from_template' => array(
1870 'classname' => 'core_competency\external',
1871 'methodname' => 'remove_competency_from_template',
1872 'classpath' => '',
1873 'description' => 'Remove a competency from a template',
1874 'type' => 'write',
1875 'capabilities' => 'moodle/competency:templatemanage',
1876 'ajax' => true,
1878 'core_competency_reorder_course_competency' => array(
1879 'classname' => 'core_competency\external',
1880 'methodname' => 'reorder_course_competency',
1881 'classpath' => '',
1882 'description' => 'Move a course competency to a new relative sort order.',
1883 'type' => 'write',
1884 'capabilities' => 'moodle/competency:coursecompetencymanage',
1885 'ajax' => true,
1887 'core_competency_reorder_template_competency' => array(
1888 'classname' => 'core_competency\external',
1889 'methodname' => 'reorder_template_competency',
1890 'classpath' => '',
1891 'description' => 'Move a template competency to a new relative sort order.',
1892 'type' => 'write',
1893 'capabilities' => 'moodle/competency:templatemanage',
1894 'ajax' => true,
1896 'core_competency_create_template' => array(
1897 'classname' => 'core_competency\external',
1898 'methodname' => 'create_template',
1899 'classpath' => '',
1900 'description' => 'Creates new learning plan templates.',
1901 'type' => 'write',
1902 'capabilities' => 'moodle/competency:templatemanage',
1903 'ajax' => true,
1905 'core_competency_duplicate_template' => array(
1906 'classname' => 'core_competency\external',
1907 'methodname' => 'duplicate_template',
1908 'classpath' => '',
1909 'description' => 'Duplicate learning plan template.',
1910 'type' => 'write',
1911 'capabilities' => 'moodle/competency:templatemanage',
1912 'ajax' => true,
1914 'core_competency_read_template' => array(
1915 'classname' => 'core_competency\external',
1916 'methodname' => 'read_template',
1917 'classpath' => '',
1918 'description' => 'Load a summary of a learning plan template.',
1919 'type' => 'read',
1920 'capabilities' => 'moodle/competency:templateview',
1921 'ajax' => true,
1923 'core_competency_delete_template' => array(
1924 'classname' => 'core_competency\external',
1925 'methodname' => 'delete_template',
1926 'classpath' => '',
1927 'description' => 'Delete a learning plan template.',
1928 'type' => 'write',
1929 'capabilities' => 'moodle/competency:templatemanage',
1930 'ajax' => true,
1932 'core_competency_update_template' => array(
1933 'classname' => 'core_competency\external',
1934 'methodname' => 'update_template',
1935 'classpath' => '',
1936 'description' => 'Update a learning plan template.',
1937 'type' => 'write',
1938 'capabilities' => 'moodle/competency:templatemanage',
1939 'ajax' => true,
1941 'core_competency_list_templates' => array(
1942 'classname' => 'core_competency\external',
1943 'methodname' => 'list_templates',
1944 'classpath' => '',
1945 'description' => 'Load a list of a learning plan templates.',
1946 'type' => 'read',
1947 'capabilities' => 'moodle/competency:templateview',
1948 'ajax' => true,
1950 'core_competency_list_templates_using_competency' => array(
1951 'classname' => 'core_competency\external',
1952 'methodname' => 'list_templates_using_competency',
1953 'classpath' => '',
1954 'description' => 'Load a list of a learning plan templates for a given competency.',
1955 'type' => 'read',
1956 'capabilities' => 'moodle/competency:templateview',
1957 'ajax' => true,
1959 'core_competency_count_templates' => array(
1960 'classname' => 'core_competency\external',
1961 'methodname' => 'count_templates',
1962 'classpath' => '',
1963 'description' => 'Count a list of a learning plan templates.',
1964 'type' => 'read',
1965 'capabilities' => 'moodle/competency:templateview',
1966 'ajax' => true,
1968 'core_competency_count_templates_using_competency' => array(
1969 'classname' => 'core_competency\external',
1970 'methodname' => 'count_templates_using_competency',
1971 'classpath' => '',
1972 'description' => 'Count a list of a learning plan templates for a given competency.',
1973 'type' => 'read',
1974 'capabilities' => 'moodle/competency:templateview',
1975 'ajax' => true,
1977 'core_competency_create_plan' => array(
1978 'classname' => 'core_competency\external',
1979 'methodname' => 'create_plan',
1980 'classpath' => '',
1981 'description' => 'Creates a learning plan.',
1982 'type' => 'write',
1983 'capabilities' => 'moodle/competency:planmanage',
1984 'ajax' => true,
1986 'core_competency_update_plan' => array(
1987 'classname' => 'core_competency\external',
1988 'methodname' => 'update_plan',
1989 'classpath' => '',
1990 'description' => 'Updates a learning plan.',
1991 'type' => 'write',
1992 'capabilities' => 'moodle/competency:planmanage',
1993 'ajax' => true,
1995 'core_competency_complete_plan' => array(
1996 'classname' => 'core_competency\external',
1997 'methodname' => 'complete_plan',
1998 'classpath' => '',
1999 'description' => 'Complete learning plan.',
2000 'type' => 'write',
2001 'capabilities' => 'moodle/competency:planmanage',
2002 'ajax' => true,
2004 'core_competency_reopen_plan' => array(
2005 'classname' => 'core_competency\external',
2006 'methodname' => 'reopen_plan',
2007 'classpath' => '',
2008 'description' => 'Reopen learning plan.',
2009 'type' => 'write',
2010 'capabilities' => 'moodle/competency:planmanage',
2011 'ajax' => true,
2013 'core_competency_read_plan' => array(
2014 'classname' => 'core_competency\external',
2015 'methodname' => 'read_plan',
2016 'classpath' => '',
2017 'description' => 'Load a learning plan.',
2018 'type' => 'read',
2019 'capabilities' => 'moodle/competency:planviewown',
2020 'ajax' => true,
2022 'core_competency_delete_plan' => array(
2023 'classname' => 'core_competency\external',
2024 'methodname' => 'delete_plan',
2025 'classpath' => '',
2026 'description' => 'Delete a learning plan.',
2027 'type' => 'write',
2028 'capabilities' => 'moodle/competency:planmanage',
2029 'ajax' => true,
2031 'core_competency_list_user_plans' => array(
2032 'classname' => 'core_competency\external',
2033 'methodname' => 'list_user_plans',
2034 'classpath' => '',
2035 'description' => 'List a user\'s learning plans.',
2036 'type' => 'read',
2037 'capabilities' => 'moodle/competency:planviewown',
2038 'ajax' => true,
2040 'core_competency_list_plan_competencies' => array(
2041 'classname' => 'core_competency\external',
2042 'methodname' => 'list_plan_competencies',
2043 'classpath' => '',
2044 'description' => 'List the competencies in a plan',
2045 'type' => 'read',
2046 'capabilities' => 'moodle/competency:planviewown',
2047 'ajax' => true,
2049 'core_competency_add_competency_to_plan' => array(
2050 'classname' => 'core_competency\external',
2051 'methodname' => 'add_competency_to_plan',
2052 'classpath' => '',
2053 'description' => 'Add the competency to a learning plan',
2054 'type' => 'write',
2055 'capabilities' => 'moodle/competency:planmanage',
2056 'ajax' => true,
2058 'core_competency_remove_competency_from_plan' => array(
2059 'classname' => 'core_competency\external',
2060 'methodname' => 'remove_competency_from_plan',
2061 'classpath' => '',
2062 'description' => 'Remove the competency from a learning plan',
2063 'type' => 'write',
2064 'capabilities' => 'moodle/competency:planmanage',
2065 'ajax' => true,
2067 'core_competency_reorder_plan_competency' => array(
2068 'classname' => 'core_competency\external',
2069 'methodname' => 'reorder_plan_competency',
2070 'classpath' => '',
2071 'description' => 'Move a plan competency to a new relative sort order.',
2072 'type' => 'write',
2073 'capabilities' => 'moodle/competency:planmanage',
2074 'ajax' => true,
2076 'core_competency_plan_request_review' => array(
2077 'classname' => 'core_competency\external',
2078 'methodname' => 'plan_request_review',
2079 'classpath' => '',
2080 'description' => 'Request for a plan to be reviewed.',
2081 'type' => 'write',
2082 'capabilities' => 'moodle/competency:planmanagedraft',
2083 'ajax' => true,
2085 'core_competency_plan_start_review' => array(
2086 'classname' => 'core_competency\external',
2087 'methodname' => 'plan_start_review',
2088 'classpath' => '',
2089 'description' => 'Start the review of a plan.',
2090 'type' => 'write',
2091 'capabilities' => 'moodle/competency:planmanage',
2092 'ajax' => true,
2094 'core_competency_plan_stop_review' => array(
2095 'classname' => 'core_competency\external',
2096 'methodname' => 'plan_stop_review',
2097 'classpath' => '',
2098 'description' => 'Stop the review of a plan.',
2099 'type' => 'write',
2100 'capabilities' => 'moodle/competency:planmanage',
2101 'ajax' => true,
2103 'core_competency_plan_cancel_review_request' => array(
2104 'classname' => 'core_competency\external',
2105 'methodname' => 'plan_cancel_review_request',
2106 'classpath' => '',
2107 'description' => 'Cancel the review of a plan.',
2108 'type' => 'write',
2109 'capabilities' => 'moodle/competency:planmanagedraft',
2110 'ajax' => true,
2112 'core_competency_approve_plan' => array(
2113 'classname' => 'core_competency\external',
2114 'methodname' => 'approve_plan',
2115 'classpath' => '',
2116 'description' => 'Approve a plan.',
2117 'type' => 'write',
2118 'capabilities' => 'moodle/competency:planmanage',
2119 'ajax' => true,
2121 'core_competency_unapprove_plan' => array(
2122 'classname' => 'core_competency\external',
2123 'methodname' => 'unapprove_plan',
2124 'classpath' => '',
2125 'description' => 'Unapprove a plan.',
2126 'type' => 'write',
2127 'capabilities' => 'moodle/competency:planmanage',
2128 'ajax' => true,
2130 'core_competency_template_has_related_data' => array(
2131 'classname' => 'core_competency\external',
2132 'methodname' => 'template_has_related_data',
2133 'classpath' => '',
2134 'description' => 'Check if a template has related data',
2135 'type' => 'read',
2136 'capabilities' => 'moodle/competency:templateview',
2137 'ajax' => true,
2139 'core_competency_get_scale_values' => array(
2140 'classname' => 'core_competency\external',
2141 'methodname' => 'get_scale_values',
2142 'classpath' => '',
2143 'description' => 'Fetch the values for a specific scale',
2144 'type' => 'read',
2145 'capabilities' => 'moodle/competency:competencymanage',
2146 'ajax' => true,
2147 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2149 'core_competency_add_related_competency' => array(
2150 'classname' => 'core_competency\external',
2151 'methodname' => 'add_related_competency',
2152 'classpath' => '',
2153 'description' => 'Adds a related competency',
2154 'type' => 'write',
2155 'capabilities' => 'moodle/competency:competencymanage',
2156 'ajax' => true,
2158 'core_competency_remove_related_competency' => array(
2159 'classname' => 'core_competency\external',
2160 'methodname' => 'remove_related_competency',
2161 'classpath' => '',
2162 'description' => 'Remove a related competency',
2163 'type' => 'write',
2164 'capabilities' => 'moodle/competency:competencymanage',
2165 'ajax' => true,
2167 'core_competency_read_user_evidence' => array(
2168 'classname' => 'core_competency\external',
2169 'methodname' => 'read_user_evidence',
2170 'classpath' => '',
2171 'description' => 'Read an evidence of prior learning.',
2172 'type' => 'read',
2173 'capabilities' => 'moodle/competency:userevidenceview',
2174 'ajax' => true,
2176 'core_competency_delete_user_evidence' => array(
2177 'classname' => 'core_competency\external',
2178 'methodname' => 'delete_user_evidence',
2179 'classpath' => '',
2180 'description' => 'Delete an evidence of prior learning.',
2181 'type' => 'write',
2182 'capabilities' => 'moodle/competency:userevidencemanageown',
2183 'ajax' => true,
2185 'core_competency_create_user_evidence_competency' => array(
2186 'classname' => 'core_competency\external',
2187 'methodname' => 'create_user_evidence_competency',
2188 'classpath' => '',
2189 'description' => 'Create an evidence of prior learning relationship with a competency.',
2190 'type' => 'read',
2191 'capabilities' => 'moodle/competency:userevidencemanageown, moodle/competency:competencyview',
2192 'ajax' => true,
2194 'core_competency_delete_user_evidence_competency' => array(
2195 'classname' => 'core_competency\external',
2196 'methodname' => 'delete_user_evidence_competency',
2197 'classpath' => '',
2198 'description' => 'Delete an evidence of prior learning relationship with a competency.',
2199 'type' => 'write',
2200 'capabilities' => 'moodle/competency:userevidencemanageown',
2201 'ajax' => true,
2203 'core_competency_user_competency_cancel_review_request' => array(
2204 'classname' => 'core_competency\external',
2205 'methodname' => 'user_competency_cancel_review_request',
2206 'classpath' => '',
2207 'description' => 'Cancel a review request.',
2208 'type' => 'write',
2209 'capabilities' => 'moodle/competency:userevidencemanageown',
2210 'ajax' => true,
2212 'core_competency_user_competency_request_review' => array(
2213 'classname' => 'core_competency\external',
2214 'methodname' => 'user_competency_request_review',
2215 'classpath' => '',
2216 'description' => 'Request a review.',
2217 'type' => 'write',
2218 'capabilities' => 'moodle/competency:userevidencemanageown',
2219 'ajax' => true,
2221 'core_competency_user_competency_start_review' => array(
2222 'classname' => 'core_competency\external',
2223 'methodname' => 'user_competency_start_review',
2224 'classpath' => '',
2225 'description' => 'Start a review.',
2226 'type' => 'write',
2227 'capabilities' => 'moodle/competency:competencygrade',
2228 'ajax' => true,
2230 'core_competency_user_competency_stop_review' => array(
2231 'classname' => 'core_competency\external',
2232 'methodname' => 'user_competency_stop_review',
2233 'classpath' => '',
2234 'description' => 'Stop a review.',
2235 'type' => 'write',
2236 'capabilities' => 'moodle/competency:competencygrade',
2237 'ajax' => true,
2239 'core_competency_user_competency_viewed' => array(
2240 'classname' => 'core_competency\external',
2241 'methodname' => 'user_competency_viewed',
2242 'classpath' => '',
2243 'description' => 'Log the user competency viewed event.',
2244 'type' => 'read',
2245 'capabilities' => 'moodle/competency:usercompetencyview',
2246 'ajax' => true,
2247 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2249 'core_competency_user_competency_viewed_in_plan' => array(
2250 'classname' => 'core_competency\external',
2251 'methodname' => 'user_competency_viewed_in_plan',
2252 'classpath' => '',
2253 'description' => 'Log the user competency viewed in plan event.',
2254 'type' => 'read',
2255 'capabilities' => 'moodle/competency:usercompetencyview',
2256 'ajax' => true,
2257 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2259 'core_competency_user_competency_viewed_in_course' => array(
2260 'classname' => 'core_competency\external',
2261 'methodname' => 'user_competency_viewed_in_course',
2262 'classpath' => '',
2263 'description' => 'Log the user competency viewed in course event',
2264 'type' => 'read',
2265 'capabilities' => 'moodle/competency:usercompetencyview',
2266 'ajax' => true,
2267 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2269 'core_competency_user_competency_plan_viewed' => array(
2270 'classname' => 'core_competency\external',
2271 'methodname' => 'user_competency_plan_viewed',
2272 'classpath' => '',
2273 'description' => 'Log the user competency plan viewed event.',
2274 'type' => 'read',
2275 'capabilities' => 'moodle/competency:usercompetencyview',
2276 'ajax' => true,
2277 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2279 'core_competency_grade_competency' => array(
2280 'classname' => 'core_competency\external',
2281 'methodname' => 'grade_competency',
2282 'classpath' => '',
2283 'description' => 'Grade a competency.',
2284 'type' => 'write',
2285 'capabilities' => 'moodle/competency:competencygrade',
2286 'ajax' => true,
2288 'core_competency_grade_competency_in_plan' => array(
2289 'classname' => 'core_competency\external',
2290 'methodname' => 'grade_competency_in_plan',
2291 'classpath' => '',
2292 'description' => 'Grade a competency from the user plan page.',
2293 'type' => 'write',
2294 'capabilities' => 'moodle/competency:competencygrade',
2295 'ajax' => true,
2297 'core_competency_grade_competency_in_course' => array(
2298 'classname' => 'core_competency\external',
2299 'methodname' => 'grade_competency_in_course',
2300 'classpath' => '',
2301 'description' => 'Grade a competency from the course page.',
2302 'type' => 'write',
2303 'capabilities' => 'moodle/competency:competencygrade',
2304 'ajax' => true,
2305 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2307 'core_competency_unlink_plan_from_template' => array(
2308 'classname' => 'core_competency\external',
2309 'methodname' => 'unlink_plan_from_template',
2310 'classpath' => '',
2311 'description' => 'Unlink a plan form it template.',
2312 'type' => 'write',
2313 'capabilities' => 'moodle/competency:planmanage',
2314 'ajax' => true,
2316 'core_competency_template_viewed' => array(
2317 'classname' => 'core_competency\external',
2318 'methodname' => 'template_viewed',
2319 'classpath' => '',
2320 'description' => 'Log event template viewed',
2321 'type' => 'read',
2322 'capabilities' => 'moodle/competency:templateview',
2323 'ajax' => true,
2325 'core_competency_request_review_of_user_evidence_linked_competencies' => array(
2326 'classname' => 'core_competency\external',
2327 'methodname' => 'request_review_of_user_evidence_linked_competencies',
2328 'classpath' => '',
2329 'description' => 'Send user evidence competencies in review',
2330 'type' => 'write',
2331 'capabilities' => 'moodle/competency:userevidencemanageown',
2332 'ajax' => true,
2334 'core_competency_update_course_competency_settings' => array(
2335 'classname' => 'core_competency\external',
2336 'methodname' => 'update_course_competency_settings',
2337 'classpath' => '',
2338 'description' => 'Update the course competency settings',
2339 'type' => 'write',
2340 'capabilities' => 'moodle/competency:coursecompetencyconfigure',
2341 'ajax' => true,
2343 'core_competency_delete_evidence' => array(
2344 'classname' => 'core_competency\external',
2345 'methodname' => 'delete_evidence',
2346 'classpath' => '',
2347 'description' => 'Delete an evidence',
2348 'type' => 'write',
2349 'capabilities' => 'moodle/competency:evidencedelete',
2350 'ajax' => true,
2351 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2354 'core_webservice_get_site_info' => array(
2355 'classname' => 'core_webservice_external',
2356 'methodname' => 'get_site_info',
2357 'classpath' => 'webservice/externallib.php',
2358 'description' => 'Return some site info / user info / list web service functions',
2359 'type' => 'read',
2360 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2363 // Blocks functions.
2364 'core_block_get_course_blocks' => array(
2365 'classname' => 'core_block_external',
2366 'methodname' => 'get_course_blocks',
2367 'description' => 'Returns blocks information for a course.',
2368 'type' => 'read',
2369 'capabilities' => '',
2370 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2373 'core_block_get_dashboard_blocks' => array(
2374 'classname' => 'core_block_external',
2375 'methodname' => 'get_dashboard_blocks',
2376 'description' => 'Returns blocks information for the given user dashboard.',
2377 'type' => 'read',
2378 'capabilities' => '',
2379 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2382 // Filters functions.
2383 'core_filters_get_available_in_context' => array(
2384 'classname' => 'core_filters\external',
2385 'methodname' => 'get_available_in_context',
2386 'description' => 'Returns the filters available in the given contexts.',
2387 'type' => 'read',
2388 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2392 $services = array(
2393 'Moodle mobile web service' => array(
2394 'functions' => array(), // Unused as we add the service in each function definition, third party services would use this.
2395 'enabled' => 0,
2396 'restrictedusers' => 0,
2397 'shortname' => MOODLE_OFFICIAL_MOBILE_SERVICE,
2398 'downloadfiles' => 1,
2399 'uploadfiles' => 1