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