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