Merge branch 'MDL-69776-master' of git://github.com/jleyva/moodle
[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 ),
8b493eb0
DM
824 'core_form_get_filetypes_browser_data' => array(
825 'classname' => 'core_form\external',
826 'methodname' => 'get_filetypes_browser_data',
827 'classpath' => '',
828 'description' => 'Provides data for the filetypes element browser.',
829 'type' => 'read',
830 'loginrequired' => false,
831 'ajax' => true,
832 ),
f23e9b6b
CB
833 'core_get_component_strings' => array(
834 'classname' => 'core_external',
835 'methodname' => 'get_component_strings',
836 'classpath' => 'lib/external/externallib.php',
faeca20d
DM
837 'description' => 'Return all raw strings (with {$a->xxx}), for a specific component ' .
838 '- similar to core get_component_strings(), call',
f23e9b6b 839 'type' => 'read',
5041600d
RT
840 'loginrequired' => false,
841 'ajax' => true,
ee7295ee 842 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
3364dbb5 843 ),
f23e9b6b
CB
844 'core_get_fragment' => array(
845 'classname' => 'core_external',
846 'methodname' => 'get_fragment',
847 'classpath' => 'lib/external/externallib.php',
848 'description' => 'Return a fragment for inclusion, such as a JavaScript page.',
849 'type' => 'read',
5041600d 850 'ajax' => true,
5d1017e1 851 ),
f23e9b6b
CB
852 'core_get_string' => array(
853 'classname' => 'core_external',
854 'methodname' => 'get_string',
855 'classpath' => 'lib/external/externallib.php',
856 'description' => 'Return a translated string - similar to core get_string(), call',
857 'type' => 'read',
5041600d
RT
858 'loginrequired' => false,
859 'ajax' => true,
be9bf94e 860 ),
f23e9b6b
CB
861 'core_get_strings' => array(
862 'classname' => 'core_external',
863 'methodname' => 'get_strings',
864 'classpath' => 'lib/external/externallib.php',
865 'description' => 'Return some translated strings - like several core get_string(), calls',
866 'type' => 'read',
5041600d
RT
867 'loginrequired' => false,
868 'ajax' => true,
5d1017e1 869 ),
88c2941b
RW
870 'core_get_user_dates' => array(
871 'classname' => 'core_external',
872 'methodname' => 'get_user_dates',
873 'classpath' => 'lib/external/externallib.php',
874 'description' => 'Return formatted timestamps',
875 'type' => 'read',
876 'ajax' => true,
877 ),
f23e9b6b
CB
878 'core_grades_get_grades' => array(
879 'classname' => 'core_grades_external',
880 'methodname' => 'get_grades',
aa7e371a
JL
881 'description' => '** DEPRECATED ** Please do not call this function any more.
882 Returns student course total grade and grades for activities.
f23e9b6b
CB
883 This function does not return category or manual items.
884 This function is suitable for managers or teachers not students.',
885 'type' => 'read',
886 'capabilities' => 'moodle/grade:view, moodle/grade:viewall, moodle/grade:viewhidden'
e9b66095 887 ),
f23e9b6b
CB
888 'core_grades_update_grades' => array(
889 'classname' => 'core_grades_external',
890 'methodname' => 'update_grades',
891 'description' => 'Update a grade item and associated student grades.',
892 'type' => 'write',
5d1017e1 893 ),
9adedccd
AN
894 'core_grades_grader_gradingpanel_point_fetch' => [
895 'classname' => 'core_grades\\grades\\grader\\gradingpanel\\point\\external\\fetch',
896 'methodname' => 'execute',
897 'description' => 'Fetch the data required to display the grader grading panel for simple grading, ' .
898 'creating the grade item if required',
899 'type' => 'write',
900 'ajax' => true,
901 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
902 ],
903 'core_grades_grader_gradingpanel_point_store' => [
904 'classname' => 'core_grades\\grades\\grader\\gradingpanel\\point\\external\\store',
905 'methodname' => 'execute',
906 'description' => 'Store the data required to display the grader grading panel for simple grading',
907 'type' => 'write',
908 'ajax' => true,
909 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
b253a4f2
AN
910 ],
911 'core_grades_grader_gradingpanel_scale_fetch' => [
912 'classname' => 'core_grades\\grades\\grader\\gradingpanel\\scale\\external\\fetch',
913 'methodname' => 'execute',
914 'description' => 'Fetch the data required to display the grader grading panel for scale-based grading, ' .
915 'creating the grade item if required',
916 'type' => 'write',
917 'ajax' => true,
918 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
919 ],
920 'core_grades_grader_gradingpanel_scale_store' => [
921 'classname' => 'core_grades\\grades\\grader\\gradingpanel\\scale\\external\\store',
922 'methodname' => 'execute',
923 'description' => 'Store the data required to display the grader grading panel for scale-based grading',
924 'type' => 'write',
925 'ajax' => true,
926 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
9adedccd 927 ],
309f54bf
PB
928 'core_grades_create_gradecategory' => array (
929 'classname' => 'core_grades_external',
930 'methodname' => 'create_gradecategory',
931 'description' => 'Create a grade category inside a course gradebook.',
932 'type' => 'write',
933 'capabilities' => 'moodle/grade:manage',
934 ),
f23e9b6b
CB
935 'core_grading_get_definitions' => array(
936 'classname' => 'core_grading_external',
937 'methodname' => 'get_definitions',
938 'description' => 'Get grading definitions',
939 'type' => 'read',
e9b66095 940 ),
f23e9b6b
CB
941 'core_grading_get_gradingform_instances' => array(
942 'classname' => 'core_grading_external',
943 'methodname' => 'get_gradingform_instances',
944 'description' => 'Get grading form instances',
945 'type' => 'read',
f2229c68 946 ),
f23e9b6b
CB
947 'core_grading_save_definitions' => array(
948 'classname' => 'core_grading_external',
949 'methodname' => 'save_definitions',
950 'description' => 'Save grading definitions',
951 'type' => 'write',
5d1017e1 952 ),
f23e9b6b
CB
953 'core_group_add_group_members' => array(
954 'classname' => 'core_group_external',
955 'methodname' => 'add_group_members',
956 'classpath' => 'group/externallib.php',
957 'description' => 'Adds group members.',
958 'type' => 'write',
959 'capabilities' => 'moodle/course:managegroups',
6bb31e40 960 ),
f23e9b6b
CB
961 'core_group_assign_grouping' => array(
962 'classname' => 'core_group_external',
963 'methodname' => 'assign_grouping',
964 'classpath' => 'group/externallib.php',
965 'description' => 'Assing groups from groupings',
966 'type' => 'write',
740c354f 967 ),
f23e9b6b
CB
968 'core_group_create_groupings' => array(
969 'classname' => 'core_group_external',
970 'methodname' => 'create_groupings',
971 'classpath' => 'group/externallib.php',
972 'description' => 'Creates new groupings',
973 'type' => 'write',
5d1017e1 974 ),
f23e9b6b
CB
975 'core_group_create_groups' => array(
976 'classname' => 'core_group_external',
977 'methodname' => 'create_groups',
978 'classpath' => 'group/externallib.php',
979 'description' => 'Creates new groups.',
980 'type' => 'write',
981 'capabilities' => 'moodle/course:managegroups'
6bb31e40 982 ),
f23e9b6b
CB
983 'core_group_delete_group_members' => array(
984 'classname' => 'core_group_external',
985 'methodname' => 'delete_group_members',
986 'classpath' => 'group/externallib.php',
987 'description' => 'Deletes group members.',
0a4f3eb2 988 'type' => 'write',
f23e9b6b 989 'capabilities' => 'moodle/course:managegroups'
63a85dc7 990 ),
f23e9b6b
CB
991 'core_group_delete_groupings' => array(
992 'classname' => 'core_group_external',
993 'methodname' => 'delete_groupings',
994 'classpath' => 'group/externallib.php',
995 'description' => 'Deletes all specified groupings.',
79949c1b 996 'type' => 'write',
79949c1b 997 ),
f23e9b6b
CB
998 'core_group_delete_groups' => array(
999 'classname' => 'core_group_external',
1000 'methodname' => 'delete_groups',
1001 'classpath' => 'group/externallib.php',
1002 'description' => 'Deletes all specified groups.',
0a4f3eb2 1003 'type' => 'write',
f23e9b6b 1004 'capabilities' => 'moodle/course:managegroups'
3dc1d76e 1005 ),
f23e9b6b
CB
1006 'core_group_get_activity_allowed_groups' => array(
1007 'classname' => 'core_group_external',
1008 'methodname' => 'get_activity_allowed_groups',
1009 'classpath' => 'group/externallib.php',
1010 'description' => 'Gets a list of groups that the user is allowed to access within the specified activity.',
1011 'type' => 'read',
ee7295ee 1012 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
791723c3 1013 ),
f23e9b6b
CB
1014 'core_group_get_activity_groupmode' => array(
1015 'classname' => 'core_group_external',
1016 'methodname' => 'get_activity_groupmode',
1017 'classpath' => 'group/externallib.php',
1018 'description' => 'Returns effective groupmode used in a given activity.',
1019 'type' => 'read',
ee7295ee 1020 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
c4f7bf29 1021 ),
f23e9b6b
CB
1022 'core_group_get_course_groupings' => array(
1023 'classname' => 'core_group_external',
1024 'methodname' => 'get_course_groupings',
1025 'classpath' => 'group/externallib.php',
1026 'description' => 'Returns all groupings in specified course.',
1027 'type' => 'read',
57858670 1028 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
c5158499 1029 ),
f23e9b6b
CB
1030 'core_group_get_course_groups' => array(
1031 'classname' => 'core_group_external',
1032 'methodname' => 'get_course_groups',
1033 'classpath' => 'group/externallib.php',
1034 'description' => 'Returns all groups in specified course.',
1035 'type' => 'read',
dfc609e5 1036 'ajax' => true,
57858670
JL
1037 'capabilities' => 'moodle/course:managegroups',
1038 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
13bb6819 1039 ),
f23e9b6b
CB
1040 'core_group_get_course_user_groups' => array(
1041 'classname' => 'core_group_external',
1042 'methodname' => 'get_course_user_groups',
1043 'classpath' => 'group/externallib.php',
1044 'description' => 'Returns all groups in specified course for the specified user.',
1045 'type' => 'read',
ee7295ee
JL
1046 'capabilities' => 'moodle/course:managegroups',
1047 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
3ec163dd 1048 ),
f23e9b6b
CB
1049 'core_group_get_group_members' => array(
1050 'classname' => 'core_group_external',
1051 'methodname' => 'get_group_members',
1052 'classpath' => 'group/externallib.php',
1053 'description' => 'Returns group members.',
1054 'type' => 'read',
1055 'capabilities' => 'moodle/course:managegroups'
479a5db1 1056 ),
f23e9b6b
CB
1057 'core_group_get_groupings' => array(
1058 'classname' => 'core_group_external',
1059 'methodname' => 'get_groupings',
1060 'classpath' => 'group/externallib.php',
1061 'description' => 'Returns groupings details.',
1062 'type' => 'read',
3ec163dd 1063 ),
f23e9b6b
CB
1064 'core_group_get_groups' => array(
1065 'classname' => 'core_group_external',
1066 'methodname' => 'get_groups',
1067 'classpath' => 'group/externallib.php',
1068 'description' => 'Returns group details.',
1069 'type' => 'read',
1070 'capabilities' => 'moodle/course:managegroups'
2f951d86 1071 ),
f23e9b6b
CB
1072 'core_group_unassign_grouping' => array(
1073 'classname' => 'core_group_external',
1074 'methodname' => 'unassign_grouping',
1075 'classpath' => 'group/externallib.php',
1076 'description' => 'Unassing groups from groupings',
1077 'type' => 'write',
8430d87b 1078 ),
f23e9b6b
CB
1079 'core_group_update_groupings' => array(
1080 'classname' => 'core_group_external',
1081 'methodname' => 'update_groupings',
1082 'classpath' => 'group/externallib.php',
1083 'description' => 'Updates existing groupings',
1084 'type' => 'write',
5d1017e1 1085 ),
474dd887
R
1086 'core_group_update_groups' => array(
1087 'classname' => 'core_group_external',
1088 'methodname' => 'update_groups',
1089 'classpath' => 'group/externallib.php',
1090 'description' => 'Updates existing groups.',
1091 'type' => 'write',
1092 'capabilities' => 'moodle/course:managegroups'
1093 ),
086409f6
MN
1094 'core_message_mute_conversations' => array(
1095 'classname' => 'core_message_external',
1096 'methodname' => 'mute_conversations',
1097 'classpath' => 'message/externallib.php',
1098 'description' => 'Mutes a list of conversations',
1099 'type' => 'write',
1100 'ajax' => true,
1101 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1102 ),
1103 'core_message_unmute_conversations' => array(
1104 'classname' => 'core_message_external',
1105 'methodname' => 'unmute_conversations',
1106 'classpath' => 'message/externallib.php',
1107 'description' => 'Unmutes a list of conversations',
1108 'type' => 'write',
1109 'ajax' => true,
1110 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1111 ),
52284186
MN
1112 'core_message_block_user' => array(
1113 'classname' => 'core_message_external',
1114 'methodname' => 'block_user',
1115 'classpath' => 'message/externallib.php',
1116 'description' => 'Blocks a user',
1117 'type' => 'write',
1118 'ajax' => true,
1119 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1120 ),
52284186
MN
1121 'core_message_get_contact_requests' => array(
1122 'classname' => 'core_message_external',
1123 'methodname' => 'get_contact_requests',
1124 'classpath' => 'message/externallib.php',
1125 'description' => 'Returns contact requests for a user',
1126 'type' => 'read',
1127 'ajax' => true,
1128 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1129 ),
1130 'core_message_create_contact_request' => array(
1131 'classname' => 'core_message_external',
1132 'methodname' => 'create_contact_request',
1133 'classpath' => 'message/externallib.php',
1134 'description' => 'Creates a contact request',
1135 'type' => 'write',
1136 'ajax' => true,
1137 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1138 ),
1139 'core_message_confirm_contact_request' => array(
1140 'classname' => 'core_message_external',
1141 'methodname' => 'confirm_contact_request',
1142 'classpath' => 'message/externallib.php',
1143 'description' => 'Confirms a contact request',
1144 'type' => 'write',
1145 'ajax' => true,
1146 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1147 ),
1148 'core_message_decline_contact_request' => array(
1149 'classname' => 'core_message_external',
1150 'methodname' => 'decline_contact_request',
1151 'classpath' => 'message/externallib.php',
1152 'description' => 'Declines a contact request',
1153 'type' => 'write',
1154 'ajax' => true,
1155 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1156 ),
7d678923
MN
1157 'core_message_get_received_contact_requests_count' => array(
1158 'classname' => 'core_message_external',
1159 'methodname' => 'get_received_contact_requests_count',
1160 'classpath' => 'message/externallib.php',
1161 'description' => 'Gets the number of received contact requests',
1162 'type' => 'read',
1163 'ajax' => true,
1164 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1165 ),
d6731600 1166 'core_message_delete_contacts' => array(
f23e9b6b
CB
1167 'classname' => 'core_message_external',
1168 'methodname' => 'delete_contacts',
1169 'classpath' => 'message/externallib.php',
d6731600 1170 'description' => 'Remove contacts from the contact list',
f23e9b6b 1171 'type' => 'write',
c6e97f54 1172 'ajax' => true,
ee7295ee 1173 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
d6731600 1174 ),
60b67bbc 1175 'core_message_delete_conversations_by_id' => array(
26f39c88 1176 'classname' => 'core_message_external',
60b67bbc 1177 'methodname' => 'delete_conversations_by_id',
26f39c88 1178 'classpath' => 'message/externallib.php',
60b67bbc 1179 'description' => 'Deletes a list of conversations.',
26f39c88
MN
1180 'type' => 'write',
1181 'capabilities' => 'moodle/site:deleteownmessage',
1182 'ajax' => true,
1183 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1184 ),
f23e9b6b
CB
1185 'core_message_delete_message' => array(
1186 'classname' => 'core_message_external',
1187 'methodname' => 'delete_message',
1188 'classpath' => 'message/externallib.php',
1189 'description' => 'Deletes a message.',
1190 'type' => 'write',
ee7295ee 1191 'capabilities' => 'moodle/site:deleteownmessage',
3090f52f 1192 'ajax' => true,
ee7295ee 1193 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
d6731600 1194 ),
f23e9b6b
CB
1195 'core_message_get_blocked_users' => array(
1196 'classname' => 'core_message_external',
1197 'methodname' => 'get_blocked_users',
1198 'classpath' => 'message/externallib.php',
1199 'description' => 'Retrieve a list of users blocked',
1200 'type' => 'read',
ee7295ee 1201 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
d6731600 1202 ),
cd03b8d7
MN
1203 'core_message_data_for_messagearea_search_messages' => array(
1204 'classname' => 'core_message_external',
1205 'methodname' => 'data_for_messagearea_search_messages',
1206 'classpath' => 'message/externallib.php',
1207 'description' => 'Retrieve the template data for searching for messages',
1208 'type' => 'read',
1209 'ajax' => true,
53522c6e 1210 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
cd03b8d7 1211 ),
548cac7d
AA
1212 'core_message_message_search_users' => array(
1213 'classname' => 'core_message_external',
1214 'methodname' => 'message_search_users',
1215 'classpath' => 'message/externallib.php',
1216 'description' => 'Retrieve the data for searching for people',
cd03b8d7
MN
1217 'type' => 'read',
1218 'ajax' => true,
548cac7d 1219 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
cd03b8d7 1220 ),
c9b0f33f
MN
1221 'core_message_get_user_contacts' => array(
1222 'classname' => 'core_message_external',
1223 'methodname' => 'get_user_contacts',
1224 'classpath' => 'message/externallib.php',
d6731600 1225 'description' => 'Retrieve the contact list',
f23e9b6b 1226 'type' => 'read',
c9b0f33f 1227 'ajax' => true,
6f31927a
JD
1228 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1229 ),
1230 'core_message_get_conversations' => array(
1231 'classname' => 'core_message_external',
1232 'methodname' => 'get_conversations',
1233 'classpath' => 'message/externallib.php',
1234 'description' => 'Retrieve a list of conversations for a user',
1235 'type' => 'read',
ee7295ee 1236 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
b3bbd4a0 1237 'ajax' => true
d6731600 1238 ),
4e313026
RW
1239 'core_message_get_conversation' => array(
1240 'classname' => 'core_message_external',
1241 'methodname' => 'get_conversation',
1242 'classpath' => 'message/externallib.php',
1243 'description' => 'Retrieve a conversation for a user',
1244 'type' => 'read',
569c0bae
RW
1245 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1246 'ajax' => true
1247 ),
1248 'core_message_get_conversation_between_users' => array(
1249 'classname' => 'core_message_external',
1250 'methodname' => 'get_conversation_between_users',
1251 'classpath' => 'message/externallib.php',
1252 'description' => 'Retrieve a conversation for a user between another user',
1253 'type' => 'read',
4e313026
RW
1254 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1255 'ajax' => true
1256 ),
734b198f
SA
1257 'core_message_get_self_conversation' => array(
1258 'classname' => 'core_message_external',
1259 'methodname' => 'get_self_conversation',
1260 'classpath' => 'message/externallib.php',
1261 'description' => 'Retrieve a self-conversation for a user',
1262 'type' => 'read',
1263 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1264 'ajax' => true
1265 ),
aff9da17 1266 'core_message_get_messages' => array(
f23e9b6b
CB
1267 'classname' => 'core_message_external',
1268 'methodname' => 'get_messages',
1269 'classpath' => 'message/externallib.php',
1270 'description' => 'Retrieve a list of messages sent and received by a user (conversations, notifications or both)',
1271 'type' => 'read',
ee7295ee 1272 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
3274d5ca
RW
1273 'ajax' => true,
1274 ),
28ff6ad1
JD
1275 'core_message_get_conversation_counts' => array(
1276 'classname' => 'core_message_external',
1277 'methodname' => 'get_conversation_counts',
1278 'classpath' => 'message/externallib.php',
1279 'description' => 'Retrieve a list of conversation counts, indexed by type.',
1280 'type' => 'read',
1281 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1282 'ajax' => true,
1283 ),
b402a163
JD
1284 'core_message_get_unread_conversation_counts' => array(
1285 'classname' => 'core_message_external',
1286 'methodname' => 'get_unread_conversation_counts',
1287 'classpath' => 'message/externallib.php',
1288 'description' => 'Retrieve a list of unread conversation counts, indexed by type.',
1289 'type' => 'read',
1290 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1291 'ajax' => true,
1292 ),
5584c48a
MN
1293 'core_message_get_conversation_members' => array(
1294 'classname' => 'core_message_external',
1295 'methodname' => 'get_conversation_members',
1296 'classpath' => 'message/externallib.php',
1297 'description' => 'Retrieve a list of members in a conversation',
1298 'type' => 'read',
1299 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1300 'ajax' => true,
1301 ),
8350978a
RW
1302 'core_message_get_member_info' => array(
1303 'classname' => 'core_message_external',
1304 'methodname' => 'get_member_info',
1305 'classpath' => 'message/externallib.php',
1306 'description' => 'Retrieve a user message profiles',
1307 'type' => 'read',
1308 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1309 'ajax' => true,
1310 ),
8c55bd6c
RW
1311 'core_message_get_unread_conversations_count' => array(
1312 'classname' => 'core_message_external',
1313 'methodname' => 'get_unread_conversations_count',
1314 'classpath' => 'message/externallib.php',
1315 'description' => 'Retrieve the count of unread conversations for a given user',
1316 'type' => 'read',
1317 'ajax' => true,
53522c6e 1318 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
4400ed3e 1319 'readonlysession' => true, // We don't modify the session.
8c55bd6c 1320 ),
3274d5ca
RW
1321 'core_message_mark_all_notifications_as_read' => array(
1322 'classname' => 'core_message_external',
1323 'methodname' => 'mark_all_notifications_as_read',
1324 'classpath' => 'message/externallib.php',
8c55bd6c
RW
1325 'description' => 'Mark all notifications as read for a given user',
1326 'type' => 'write',
1327 'ajax' => true,
53522c6e 1328 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
8c55bd6c 1329 ),
09ec5017
MN
1330 'core_message_mark_all_conversation_messages_as_read' => array(
1331 'classname' => 'core_message_external',
1332 'methodname' => 'mark_all_conversation_messages_as_read',
1333 'classpath' => 'message/externallib.php',
1334 'description' => 'Mark all conversation messages as read for a given user',
3274d5ca
RW
1335 'type' => 'write',
1336 'ajax' => true,
53522c6e 1337 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
60ab2e1b 1338 ),
a84f89ca 1339 'core_message_mark_message_read' => array(
f23e9b6b
CB
1340 'classname' => 'core_message_external',
1341 'methodname' => 'mark_message_read',
1342 'classpath' => 'message/externallib.php',
1343 'description' => 'Mark a single message as read, trigger message_viewed event.',
1344 'type' => 'write',
ee7295ee 1345 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
0b19d048 1346 'ajax' => true,
a84f89ca 1347 ),
2b595d96
MN
1348 'core_message_mark_notification_read' => array(
1349 'classname' => 'core_message_external',
1350 'methodname' => 'mark_notification_read',
1351 'classpath' => 'message/externallib.php',
1352 'description' => 'Mark a single notification as read, trigger notification_viewed event.',
1353 'type' => 'write',
1354 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1355 'ajax' => true,
1356 ),
a0eabdd3
RW
1357 'core_message_message_processor_config_form' => array(
1358 'classname' => 'core_message_external',
1359 'methodname' => 'message_processor_config_form',
1360 'classpath' => 'message/externallib.php',
1361 'description' => 'Process the message processor config form',
1362 'type' => 'write',
1363 'ajax' => true,
53522c6e 1364 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
a0eabdd3 1365 ),
8c125526
RW
1366 'core_message_get_message_processor' => array(
1367 'classname' => 'core_message_external',
1368 'methodname' => 'get_message_processor',
1369 'classpath' => 'message/externallib.php',
1370 'description' => 'Get a message processor',
1371 'type' => 'read',
1372 'ajax' => true,
1373 ),
f23e9b6b
CB
1374 'core_message_search_contacts' => array(
1375 'classname' => 'core_message_external',
1376 'methodname' => 'search_contacts',
1377 'classpath' => 'message/externallib.php',
1378 'description' => 'Search for contacts',
1379 'type' => 'read',
ee7295ee 1380 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
419b1128 1381 ),
f23e9b6b
CB
1382 'core_message_send_instant_messages' => array(
1383 'classname' => 'core_message_external',
1384 'methodname' => 'send_instant_messages',
1385 'classpath' => 'message/externallib.php',
1386 'description' => 'Send instant messages',
1387 'type' => 'write',
ee7295ee 1388 'capabilities' => 'moodle/site:sendmessage',
c060cd49 1389 'ajax' => true,
ee7295ee 1390 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
f23e9b6b 1391 ),
2553e9db
JD
1392 'core_message_send_messages_to_conversation' => array(
1393 'classname' => 'core_message_external',
1394 'methodname' => 'send_messages_to_conversation',
1395 'classpath' => 'message/externallib.php',
1396 'description' => 'Send messages to an existing conversation between users',
1397 'type' => 'write',
1398 'capabilities' => 'moodle/site:sendmessage',
1399 'ajax' => true,
1400 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1401 ),
fb04293b
SA
1402 'core_message_get_conversation_messages' => array(
1403 'classname' => 'core_message_external',
1404 'methodname' => 'get_conversation_messages',
1405 'classpath' => 'message/externallib.php',
1406 'description' => 'Retrieve the conversation messages and relevant member information',
1407 'type' => 'read',
1408 'ajax' => true,
1409 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1410 ),
52284186
MN
1411 'core_message_unblock_user' => array(
1412 'classname' => 'core_message_external',
1413 'methodname' => 'unblock_user',
1414 'classpath' => 'message/externallib.php',
1415 'description' => 'Unblocks a user',
1416 'type' => 'write',
1417 'ajax' => true,
1418 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1419 ),
e86f0cb4
JL
1420 'core_message_get_user_notification_preferences' => array(
1421 'classname' => 'core_message_external',
1422 'methodname' => 'get_user_notification_preferences',
1423 'classpath' => 'message/externallib.php',
1424 'description' => 'Get the notification preferences for a given user.',
1425 'type' => 'read',
1426 'capabilities' => 'moodle/user:editownmessageprofile',
1427 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1428 ),
2521afd2
JL
1429 'core_message_get_user_message_preferences' => array(
1430 'classname' => 'core_message_external',
1431 'methodname' => 'get_user_message_preferences',
1432 'classpath' => 'message/externallib.php',
1433 'description' => 'Get the message preferences for a given user.',
1434 'type' => 'read',
1435 'capabilities' => 'moodle/user:editownmessageprofile',
1436 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
08ae9a73 1437 'ajax' => true
2521afd2 1438 ),
5b367bae
JD
1439 'core_message_set_favourite_conversations' => array(
1440 'classname' => 'core_message_external',
1441 'methodname' => 'set_favourite_conversations',
1442 'classpath' => 'message/externallib.php',
1443 'description' => 'Mark a conversation or group of conversations as favourites/starred conversations.',
1444 'type' => 'write',
9e189a91 1445 'ajax' => true,
5b367bae
JD
1446 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1447 ),
1448 'core_message_unset_favourite_conversations' => array(
1449 'classname' => 'core_message_external',
1450 'methodname' => 'unset_favourite_conversations',
1451 'classpath' => 'message/externallib.php',
1452 'description' => 'Unset a conversation or group of conversations as favourites/starred conversations.',
1453 'type' => 'write',
9e189a91 1454 'ajax' => true,
5b367bae
JD
1455 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1456 ),
e3e19387 1457 'core_message_delete_message_for_all_users' => array(
1458 'classname' => 'core_message_external',
1459 'methodname' => 'delete_message_for_all_users',
1460 'classpath' => 'message/externallib.php',
1461 'description' => 'Deletes a message for all users.',
1462 'type' => 'write',
1463 'capabilities' => 'moodle/site:deleteanymessage',
1464 'ajax' => true,
1465 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1466 ),
5d1017e1 1467 'core_notes_create_notes' => array(
f23e9b6b
CB
1468 'classname' => 'core_notes_external',
1469 'methodname' => 'create_notes',
1470 'classpath' => 'notes/externallib.php',
8d46dabb 1471 'description' => 'Create notes',
f23e9b6b 1472 'type' => 'write',
b5b81de3 1473 'ajax' => true,
ee7295ee
JL
1474 'capabilities' => 'moodle/notes:manage',
1475 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
8d46dabb 1476 ),
34348b2b 1477 'core_notes_delete_notes' => array(
f23e9b6b
CB
1478 'classname' => 'core_notes_external',
1479 'methodname' => 'delete_notes',
1480 'classpath' => 'notes/externallib.php',
34348b2b 1481 'description' => 'Delete notes',
f23e9b6b 1482 'type' => 'write',
ee7295ee
JL
1483 'capabilities' => 'moodle/notes:manage',
1484 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
f23e9b6b
CB
1485 ),
1486 'core_notes_get_course_notes' => array(
1487 'classname' => 'core_notes_external',
1488 'methodname' => 'get_course_notes',
1489 'classpath' => 'notes/externallib.php',
1490 'description' => 'Returns all notes in specified course (or site), for the specified user.',
1491 'type' => 'read',
ee7295ee
JL
1492 'capabilities' => 'moodle/notes:view',
1493 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
34348b2b 1494 ),
34348b2b 1495 'core_notes_get_notes' => array(
f23e9b6b
CB
1496 'classname' => 'core_notes_external',
1497 'methodname' => 'get_notes',
1498 'classpath' => 'notes/externallib.php',
34348b2b 1499 'description' => 'Get notes',
f23e9b6b
CB
1500 'type' => 'read',
1501 'capabilities' => 'moodle/notes:view'
34348b2b 1502 ),
34348b2b 1503 'core_notes_update_notes' => array(
f23e9b6b
CB
1504 'classname' => 'core_notes_external',
1505 'methodname' => 'update_notes',
1506 'classpath' => 'notes/externallib.php',
34348b2b 1507 'description' => 'Update notes',
f23e9b6b
CB
1508 'type' => 'write',
1509 'capabilities' => 'moodle/notes:manage'
34348b2b 1510 ),
a80b5518 1511 'core_notes_view_notes' => array(
f23e9b6b
CB
1512 'classname' => 'core_notes_external',
1513 'methodname' => 'view_notes',
1514 'classpath' => 'notes/externallib.php',
1515 'description' => 'Simulates the web interface view of notes/index.php: trigger events.',
1516 'type' => 'write',
ee7295ee
JL
1517 'capabilities' => 'moodle/notes:view',
1518 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
9028d9b5 1519 ),
f23e9b6b
CB
1520 'core_output_load_template' => array(
1521 'classname' => 'core\output\external',
1522 'methodname' => 'load_template',
1523 'description' => 'Load a template for a renderable',
1524 'type' => 'read',
5041600d
RT
1525 'loginrequired' => false,
1526 'ajax' => true,
0ff4ebb4 1527 ),
e0034b5d
RW
1528 'core_output_load_template_with_dependencies' => array(
1529 'classname' => 'core\output\external',
1530 'methodname' => 'load_template_with_dependencies',
1531 'description' => 'Load a template and its dependencies for a renderable',
1532 'type' => 'read',
1533 'loginrequired' => false,
1534 'ajax' => true,
1535 ),
e330b1c2 1536 'core_output_load_fontawesome_icon_map' => array(
a26ce248 1537 'classname' => 'core\output\external',
e330b1c2 1538 'methodname' => 'load_fontawesome_icon_map',
a26ce248
DW
1539 'description' => 'Load the mapping of names to icons',
1540 'type' => 'read',
1541 'loginrequired' => false,
1542 'ajax' => true,
4a4a3672
AN
1543 ),
1544 'core_output_load_fontawesome_icon_system_map' => array(
1545 'classname' => 'core\external\output\icon_system\load_fontawesome_map',
1546 'methodname' => 'execute',
1547 'description' => 'Load the mapping of moodle pix names to fontawesome icon names',
1548 'type' => 'read',
1549 'loginrequired' => false,
1550 'ajax' => true,
a26ce248 1551 ),
f23e9b6b
CB
1552 // Question related functions.
1553 'core_question_update_flag' => array(
1554 'classname' => 'core_question_external',
1555 'methodname' => 'update_flag',
1556 'description' => 'Update the flag state of a question attempt.',
1557 'type' => 'write',
1558 'capabilities' => 'moodle/question:flag',
ee7295ee 1559 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
3f0ea6d8 1560 ),
680d5c5b
SL
1561 'core_question_submit_tags_form' => array(
1562 'classname' => 'core_question_external',
1563 'methodname' => 'submit_tags_form',
1564 'description' => 'Update the question tags.',
1565 'type' => 'write',
1566 'ajax' => true,
1567 ),
6768729e
RW
1568 'core_question_get_random_question_summaries' => array(
1569 'classname' => 'core_question_external',
1570 'methodname' => 'get_random_question_summaries',
1571 'description' => 'Get the random question set for a criteria',
1572 'type' => 'read',
1573 'ajax' => true,
1574 ),
f23e9b6b
CB
1575 'core_rating_get_item_ratings' => array(
1576 'classname' => 'core_rating_external',
1577 'methodname' => 'get_item_ratings',
1578 'description' => 'Retrieve all the ratings for an item.',
1579 'type' => 'read',
ee7295ee
JL
1580 'capabilities' => 'moodle/rating:view',
1581 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
5d1017e1 1582 ),
afb7799a
JL
1583 'core_rating_add_rating' => array(
1584 'classname' => 'core_rating_external',
1585 'methodname' => 'add_rating',
1586 'description' => 'Rates an item.',
1587 'type' => 'write',
1588 'capabilities' => 'moodle/rating:rate',
1589 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1590 ),
f23e9b6b
CB
1591 'core_role_assign_roles' => array(
1592 'classname' => 'core_role_external',
1593 'methodname' => 'assign_roles',
1594 'classpath' => 'enrol/externallib.php',
1595 'description' => 'Manual role assignments.',
1596 'type' => 'write',
1597 'capabilities' => 'moodle/role:assign'
0bf486a6 1598 ),
f23e9b6b
CB
1599 'core_role_unassign_roles' => array(
1600 'classname' => 'core_role_external',
1601 'methodname' => 'unassign_roles',
1602 'classpath' => 'enrol/externallib.php',
1603 'description' => 'Manual role unassignments.',
1604 'type' => 'write',
1605 'capabilities' => 'moodle/role:assign'
11e76602 1606 ),
a6cacdd2 1607 'core_search_get_relevant_users' => array(
1608 'classname' => '\core_search\external',
1609 'methodname' => 'get_relevant_users',
1610 'description' => 'Gets relevant users for a search request.',
1611 'type' => 'read',
1612 'ajax' => true
1613 ),
f23e9b6b
CB
1614 'core_tag_get_tagindex' => array(
1615 'classname' => 'core_tag_external',
1616 'methodname' => 'get_tagindex',
1617 'description' => 'Gets tag index page for one tag and one tag area',
1618 'type' => 'read',
5041600d 1619 'ajax' => true,
52fcc0b8 1620 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
11e76602 1621 ),
f23e9b6b
CB
1622 'core_tag_get_tags' => array(
1623 'classname' => 'core_tag_external',
1624 'methodname' => 'get_tags',
1625 'description' => 'Gets tags by their ids',
1626 'type' => 'read',
5041600d 1627 'ajax' => true,
11e76602 1628 ),
f23e9b6b
CB
1629 'core_tag_update_tags' => array(
1630 'classname' => 'core_tag_external',
1631 'methodname' => 'update_tags',
1632 'description' => 'Updates tags',
1633 'type' => 'write',
5041600d 1634 'ajax' => true,
cc73ea07 1635 ),
f1218899
JL
1636 'core_tag_get_tagindex_per_area' => array(
1637 'classname' => 'core_tag_external',
1638 'methodname' => 'get_tagindex_per_area',
1639 'description' => 'Gets tag index page per different areas.',
1640 'type' => 'read',
1641 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1642 ),
07a48837
JL
1643 'core_tag_get_tag_areas' => array(
1644 'classname' => 'core_tag_external',
1645 'methodname' => 'get_tag_areas',
1646 'description' => 'Retrieves existing tag areas.',
1647 'type' => 'read',
1648 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1649 ),
87bdad57
JL
1650 'core_tag_get_tag_collections' => array(
1651 'classname' => 'core_tag_external',
1652 'methodname' => 'get_tag_collections',
1653 'description' => 'Retrieves existing tag collections.',
1654 'type' => 'read',
1655 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1656 ),
86fd9277
JL
1657 'core_tag_get_tag_cloud' => array(
1658 'classname' => 'core_tag_external',
1659 'methodname' => 'get_tag_cloud',
1660 'description' => 'Retrieves a tag cloud for the given collection and/or query search.',
1661 'type' => 'read',
1662 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1663 ),
cdc5f978 1664 'core_update_inplace_editable' => array(
f23e9b6b
CB
1665 'classname' => 'core_external',
1666 'methodname' => 'update_inplace_editable',
1667 'classpath' => 'lib/external/externallib.php',
cdc5f978 1668 'description' => 'Generic service to update title',
f23e9b6b 1669 'type' => 'write',
5041600d
RT
1670 'loginrequired' => true,
1671 'ajax' => true,
c66dc3df 1672 ),
f23e9b6b
CB
1673 'core_user_add_user_device' => array(
1674 'classname' => 'core_user_external',
1675 'methodname' => 'add_user_device',
1676 'classpath' => 'user/externallib.php',
1677 'description' => 'Store mobile user devices information for PUSH Notifications.',
1678 'type' => 'write',
ee7295ee 1679 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
9bdcf579 1680 ),
f23e9b6b
CB
1681 'core_user_add_user_private_files' => array(
1682 'classname' => 'core_user_external',
1683 'methodname' => 'add_user_private_files',
1684 'classpath' => 'user/externallib.php',
1685 'description' => 'Copy files from a draft area to users private files area.',
1686 'type' => 'write',
ee7295ee
JL
1687 'capabilities' => 'moodle/user:manageownfiles',
1688 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
25c49a85 1689 ),
f23e9b6b
CB
1690 'core_user_create_users' => array(
1691 'classname' => 'core_user_external',
1692 'methodname' => 'create_users',
1693 'classpath' => 'user/externallib.php',
1694 'description' => 'Create users.',
1695 'type' => 'write',
1696 'capabilities' => 'moodle/user:create'
23b398fc 1697 ),
f23e9b6b
CB
1698 'core_user_delete_users' => array(
1699 'classname' => 'core_user_external',
1700 'methodname' => 'delete_users',
1701 'classpath' => 'user/externallib.php',
1702 'description' => 'Delete users.',
1703 'type' => 'write',
1704 'capabilities' => 'moodle/user:delete'
6c785afa 1705 ),
f23e9b6b
CB
1706 'core_user_get_course_user_profiles' => array(
1707 'classname' => 'core_user_external',
1708 'methodname' => 'get_course_user_profiles',
1709 'classpath' => 'user/externallib.php',
1710 'description' => 'Get course user profiles (each of the profils matching a course id and a user id),.',
1711 'type' => 'read',
1712 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, '
ee7295ee
JL
1713 . 'moodle/site:accessallgroups',
1714 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
6c785afa 1715 ),
f23e9b6b
CB
1716 'core_user_get_users' => array(
1717 'classname' => 'core_user_external',
1718 'methodname' => 'get_users',
1719 'classpath' => 'user/externallib.php',
1720 'description' => 'search for users matching the parameters',
1721 'type' => 'read',
1722 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update'
db5b6971 1723 ),
f23e9b6b
CB
1724 'core_user_get_users_by_field' => array(
1725 'classname' => 'core_user_external',
1726 'methodname' => 'get_users_by_field',
1727 'classpath' => 'user/externallib.php',
1728 'description' => 'Retrieve users\' information for a specified unique field - If you want to do a user search, use '
1729 . 'core_user_get_users()',
1730 'type' => 'read',
ee7295ee 1731 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update',
5041600d 1732 'ajax' => true,
ee7295ee 1733 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
8e355853 1734 ),
f23e9b6b
CB
1735 'core_user_remove_user_device' => array(
1736 'classname' => 'core_user_external',
1737 'methodname' => 'remove_user_device',
1738 'classpath' => 'user/externallib.php',
1739 'description' => 'Remove a user device from the Moodle database.',
1740 'type' => 'write',
ee7295ee 1741 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
ef4c23cc 1742 ),
c598f278 1743 'core_user_update_users' => array(
a0eabdd3 1744 'classname' => 'core_user_external',
c598f278 1745 'methodname' => 'update_users',
a0eabdd3 1746 'classpath' => 'user/externallib.php',
c598f278 1747 'description' => 'Update users.',
a0eabdd3
RW
1748 'type' => 'write',
1749 'capabilities' => 'moodle/user:update',
1750 'ajax' => true,
1751 ),
c598f278 1752 'core_user_update_user_preferences' => array(
f23e9b6b 1753 'classname' => 'core_user_external',
c598f278 1754 'methodname' => 'update_user_preferences',
f23e9b6b 1755 'classpath' => 'user/externallib.php',
c598f278 1756 'description' => 'Update a user\'s preferences',
f23e9b6b 1757 'type' => 'write',
c598f278 1758 'capabilities' => 'moodle/user:editownmessageprofile, moodle/user:editmessageprofile',
a0eabdd3 1759 'ajax' => true,
6d2f938c 1760 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
c026a28d 1761 ),
f23e9b6b
CB
1762 'core_user_view_user_list' => array(
1763 'classname' => 'core_user_external',
1764 'methodname' => 'view_user_list',
1765 'classpath' => 'user/externallib.php',
1766 'description' => 'Simulates the web-interface view of user/index.php (triggering events),.',
1767 'type' => 'write',
1768 'capabilities' => 'moodle/course:viewparticipants',
ee7295ee 1769 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
7361b968 1770 ),
f23e9b6b
CB
1771 'core_user_view_user_profile' => array(
1772 'classname' => 'core_user_external',
1773 'methodname' => 'view_user_profile',
1774 'classpath' => 'user/externallib.php',
1775 'description' => 'Simulates the web-interface view of user/view.php and user/profile.php (triggering events),.',
1776 'type' => 'write',
1777 'capabilities' => 'moodle/user:viewdetails',
ee7295ee 1778 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
f4fb827e 1779 ),
45fec983
JL
1780 'core_user_get_user_preferences' => array(
1781 'classname' => 'core_user_external',
1782 'methodname' => 'get_user_preferences',
1783 'classpath' => 'user/externallib.php',
1784 'description' => 'Return user preferences.',
1785 'type' => 'read',
5005d8cf 1786 'ajax' => true,
45fec983
JL
1787 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1788 ),
d44e2e42
JL
1789 'core_user_update_picture' => array(
1790 'classname' => 'core_user_external',
1791 'methodname' => 'update_picture',
1792 'classpath' => 'user/externallib.php',
1793 'description' => 'Update or delete the user picture in the site',
1794 'type' => 'write',
1795 'capabilities' => 'moodle/user:editownprofile, moodle/user:editprofile',
1796 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1797 ),
649777fb
JL
1798 'core_user_set_user_preferences' => array(
1799 'classname' => 'core_user_external',
1800 'methodname' => 'set_user_preferences',
1801 'classpath' => 'user/externallib.php',
1802 'description' => 'Set user preferences.',
1803 'type' => 'write',
1804 'capabilities' => 'moodle/site:config',
2979ca11
JL
1805 'ajax' => true,
1806 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
649777fb 1807 ),
3e8145a3
JL
1808 'core_user_agree_site_policy' => array(
1809 'classname' => 'core_user_external',
1810 'methodname' => 'agree_site_policy',
1811 'classpath' => 'user/externallib.php',
1812 'description' => 'Agree the site policy for the current user.',
1813 'type' => 'write',
1814 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1815 ),
f74ac6e7
JL
1816 'core_user_get_private_files_info' => array(
1817 'classname' => 'core_user_external',
1818 'methodname' => 'get_private_files_info',
1819 'classpath' => 'user/externallib.php',
1820 'description' => 'Returns general information about files in the user private files area.',
1821 'type' => 'read',
1822 'capabilities' => 'moodle/user:manageownfiles',
1823 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1824 ),
649777fb 1825
81de839f
FM
1826 // Competencies functions.
1827 'core_competency_create_competency_framework' => array(
1828 'classname' => 'core_competency\external',
1829 'methodname' => 'create_competency_framework',
1830 'classpath' => '',
1831 'description' => 'Creates new competency frameworks.',
1832 'type' => 'write',
1833 'capabilities' => 'moodle/competency:competencymanage',
1834 'ajax' => true,
1835 ),
1836 'core_competency_read_competency_framework' => array(
1837 'classname' => 'core_competency\external',
1838 'methodname' => 'read_competency_framework',
1839 'classpath' => '',
1840 'description' => 'Load a summary of a competency framework.',
1841 'type' => 'read',
1842 'capabilities' => 'moodle/competency:competencyview',
1843 'ajax' => true,
1844 ),
1845 'core_competency_duplicate_competency_framework' => array(
1846 'classname' => 'core_competency\external',
1847 'methodname' => 'duplicate_competency_framework',
1848 'classpath' => '',
1849 'description' => 'Duplicate a competency framework.',
1850 'type' => 'write',
1851 'capabilities' => 'moodle/competency:competencymanage',
1852 'ajax' => true,
1853 ),
1854 'core_competency_delete_competency_framework' => array(
1855 'classname' => 'core_competency\external',
1856 'methodname' => 'delete_competency_framework',
1857 'classpath' => '',
1858 'description' => 'Delete a competency framework.',
1859 'type' => 'write',
1860 'capabilities' => 'moodle/competency:competencymanage',
1861 'ajax' => true,
1862 ),
1863 'core_competency_update_competency_framework' => array(
1864 'classname' => 'core_competency\external',
1865 'methodname' => 'update_competency_framework',
1866 'classpath' => '',
1867 'description' => 'Update a competency framework.',
1868 'type' => 'write',
1869 'capabilities' => 'moodle/competency:competencymanage',
1870 'ajax' => true,
1871 ),
1872 'core_competency_list_competency_frameworks' => array(
1873 'classname' => 'core_competency\external',
1874 'methodname' => 'list_competency_frameworks',
1875 'classpath' => '',
1876 'description' => 'Load a list of a competency frameworks.',
1877 'type' => 'read',
1878 'capabilities' => 'moodle/competency:competencyview',
1879 'ajax' => true,
1880 ),
1881 'core_competency_count_competency_frameworks' => array(
1882 'classname' => 'core_competency\external',
1883 'methodname' => 'count_competency_frameworks',
1884 'classpath' => '',
1885 'description' => 'Count a list of a competency frameworks.',
1886 'type' => 'read',
1887 'capabilities' => 'moodle/competency:competencyview',
1888 'ajax' => true,
1889 ),
1890 'core_competency_competency_framework_viewed' => array(
1891 'classname' => 'core_competency\external',
1892 'methodname' => 'competency_framework_viewed',
1893 'classpath' => '',
1894 'description' => 'Log event competency framework viewed',
1895 'type' => 'read',
1896 'capabilities' => 'moodle/competency:competencyview',
1897 'ajax' => true,
1898 ),
1899 'core_competency_create_competency' => array(
1900 'classname' => 'core_competency\external',
1901 'methodname' => 'create_competency',
1902 'classpath' => '',
1903 'description' => 'Creates new competencies.',
1904 'type' => 'write',
1905 'capabilities' => 'moodle/competency:competencymanage',
1906 'ajax' => true,
1907 ),
1908 'core_competency_read_competency' => array(
1909 'classname' => 'core_competency\external',
1910 'methodname' => 'read_competency',
1911 'classpath' => '',
1912 'description' => 'Load a summary of a competency.',
1913 'type' => 'read',
1914 'capabilities' => 'moodle/competency:competencyview',
1915 'ajax' => true,
1916 ),
1917 'core_competency_competency_viewed' => array(
1918 'classname' => 'core_competency\external',
1919 'methodname' => 'competency_viewed',
1920 'classpath' => '',
1921 'description' => 'Log event competency viewed',
1922 'type' => 'read',
1923 'capabilities' => 'moodle/competency:competencyview',
1924 'ajax' => true,
3123c2cf 1925 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
1926 ),
1927 'core_competency_delete_competency' => array(
1928 'classname' => 'core_competency\external',
1929 'methodname' => 'delete_competency',
1930 'classpath' => '',
1931 'description' => 'Delete a competency.',
1932 'type' => 'write',
1933 'capabilities' => 'moodle/competency:competencymanage',
1934 'ajax' => true,
1935 ),
1936 'core_competency_update_competency' => array(
1937 'classname' => 'core_competency\external',
1938 'methodname' => 'update_competency',
1939 'classpath' => '',
1940 'description' => 'Update a competency.',
1941 'type' => 'write',
1942 'capabilities' => 'moodle/competency:competencymanage',
1943 'ajax' => true,
1944 ),
1945 'core_competency_list_competencies' => array(
1946 'classname' => 'core_competency\external',
1947 'methodname' => 'list_competencies',
1948 'classpath' => '',
1949 'description' => 'Load a list of a competencies.',
1950 'type' => 'read',
1951 'capabilities' => 'moodle/competency:competencyview',
1952 'ajax' => true,
1953 ),
1954 'core_competency_list_competencies_in_template' => array(
1955 'classname' => 'core_competency\external',
1956 'methodname' => 'list_competencies_in_template',
1957 'classpath' => '',
1958 'description' => 'Load a list of a competencies for a given template.',
1959 'type' => 'read',
1960 'capabilities' => 'moodle/competency:competencyview',
1961 'ajax' => true,
1962 ),
1963 'core_competency_count_competencies' => array(
1964 'classname' => 'core_competency\external',
1965 'methodname' => 'count_competencies',
1966 'classpath' => '',
1967 'description' => 'Count a list of a competencies.',
1968 'type' => 'read',
1969 'capabilities' => 'moodle/competency:competencyview',
1970 'ajax' => true,
1971 ),
1972 'core_competency_count_competencies_in_template' => array(
1973 'classname' => 'core_competency\external',
1974 'methodname' => 'count_competencies_in_template',
1975 'classpath' => '',
1976 'description' => 'Count a list of a competencies for a given template.',
1977 'type' => 'read',
1978 'capabilities' => 'moodle/competency:competencyview',
1979 'ajax' => true,
1980 ),
1981 'core_competency_search_competencies' => array(
1982 'classname' => 'core_competency\external',
1983 'methodname' => 'search_competencies',
1984 'classpath' => '',
1985 'description' => 'Search a list of a competencies.',
1986 'type' => 'read',
1987 'capabilities' => 'moodle/competency:competencyview',
1988 'ajax' => true,
1989 ),
1990 'core_competency_set_parent_competency' => array(
1991 'classname' => 'core_competency\external',
1992 'methodname' => 'set_parent_competency',
1993 'classpath' => '',
1994 'description' => 'Set a new parent for a competency.',
1995 'type' => 'write',
1996 'capabilities' => 'moodle/competency:competencymanage',
1997 'ajax' => true,
1998 ),
1999 'core_competency_move_up_competency' => array(
2000 'classname' => 'core_competency\external',
2001 'methodname' => 'move_up_competency',
2002 'classpath' => '',
2003 'description' => 'Re-order a competency.',
2004 'type' => 'write',
2005 'capabilities' => 'moodle/competency:competencymanage',
2006 'ajax' => true,
2007 ),
2008 'core_competency_move_down_competency' => array(
2009 'classname' => 'core_competency\external',
2010 'methodname' => 'move_down_competency',
2011 'classpath' => '',
2012 'description' => 'Re-order a competency.',
2013 'type' => 'write',
2014 'capabilities' => 'moodle/competency:competencymanage',
2015 'ajax' => true,
2016 ),
bde97497
DW
2017 'core_competency_list_course_module_competencies' => array(
2018 'classname' => 'core_competency\external',
2019 'methodname' => 'list_course_module_competencies',
2020 'classpath' => '',
2021 'description' => 'List the competencies in a course module',
2022 'type' => 'read',
2023 'capabilities' => 'moodle/competency:coursecompetencyview',
2024 'ajax' => true,
2025 ),
2026 'core_competency_count_course_module_competencies' => array(
2027 'classname' => 'core_competency\external',
2028 'methodname' => 'count_course_module_competencies',
2029 'classpath' => '',
2030 'description' => 'Count the competencies in a course module',
2031 'type' => 'read',
2032 'capabilities' => 'moodle/competency:coursecompetencyview',
2033 'ajax' => true,
2034 ),
81de839f
FM
2035 'core_competency_list_course_competencies' => array(
2036 'classname' => 'core_competency\external',
2037 'methodname' => 'list_course_competencies',
2038 'classpath' => '',
2039 'description' => 'List the competencies in a course',
2040 'type' => 'read',
2041 'capabilities' => 'moodle/competency:coursecompetencyview',
2042 'ajax' => true,
3123c2cf 2043 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
2044 ),
2045 'core_competency_count_competencies_in_course' => array(
2046 'classname' => 'core_competency\external',
2047 'methodname' => 'count_competencies_in_course',
2048 'classpath' => '',
2049 'description' => 'List the competencies in a course',
2050 'type' => 'read',
2051 'capabilities' => 'moodle/competency:coursecompetencyview',
2052 'ajax' => true,
2053 ),
2054 'core_competency_count_courses_using_competency' => array(
2055 'classname' => 'core_competency\external',
2056 'methodname' => 'count_courses_using_competency',
2057 'classpath' => '',
2058 'description' => 'List the courses using a competency',
2059 'type' => 'read',
2060 'capabilities' => 'moodle/competency:coursecompetencyview',
2061 'ajax' => true,
2062 ),
2063 'core_competency_add_competency_to_course' => array(
2064 'classname' => 'core_competency\external',
2065 'methodname' => 'add_competency_to_course',
2066 'classpath' => '',
2067 'description' => 'Add the competency to a course',
2068 'type' => 'write',
2069 'capabilities' => 'moodle/competency:coursecompetencymanage',
2070 'ajax' => true,
2071 ),
2072 'core_competency_add_competency_to_template' => array(
2073 'classname' => 'core_competency\external',
2074 'methodname' => 'add_competency_to_template',
2075 'classpath' => '',
2076 'description' => 'Add the competency to a template',
2077 'type' => 'write',
2078 'capabilities' => 'moodle/competency:templatemanage',
2079 'ajax' => true,
2080 ),
2081 'core_competency_remove_competency_from_course' => array(
2082 'classname' => 'core_competency\external',
2083 'methodname' => 'remove_competency_from_course',
2084 'classpath' => '',
2085 'description' => 'Remove a competency from a course',
2086 'type' => 'write',
2087 'capabilities' => 'moodle/competency:coursecompetencymanage',
2088 'ajax' => true,
2089 ),
2090 'core_competency_set_course_competency_ruleoutcome' => array(
2091 'classname' => 'core_competency\external',
2092 'methodname' => 'set_course_competency_ruleoutcome',
2093 'classpath' => '',
2094 'description' => 'Modify the ruleoutcome value for course competency',
2095 'type' => 'write',
2096 'capabilities' => 'moodle/competency:coursecompetencymanage',
2097 'ajax' => true,
2098 ),
2099 'core_competency_remove_competency_from_template' => array(
2100 'classname' => 'core_competency\external',
2101 'methodname' => 'remove_competency_from_template',
2102 'classpath' => '',
2103 'description' => 'Remove a competency from a template',
2104 'type' => 'write',
2105 'capabilities' => 'moodle/competency:templatemanage',
2106 'ajax' => true,
2107 ),
2108 'core_competency_reorder_course_competency' => array(
2109 'classname' => 'core_competency\external',
2110 'methodname' => 'reorder_course_competency',
2111 'classpath' => '',
2112 'description' => 'Move a course competency to a new relative sort order.',
2113 'type' => 'write',
2114 'capabilities' => 'moodle/competency:coursecompetencymanage',
2115 'ajax' => true,
2116 ),
2117 'core_competency_reorder_template_competency' => array(
2118 'classname' => 'core_competency\external',
2119 'methodname' => 'reorder_template_competency',
2120 'classpath' => '',
2121 'description' => 'Move a template competency to a new relative sort order.',
2122 'type' => 'write',
2123 'capabilities' => 'moodle/competency:templatemanage',
2124 'ajax' => true,
2125 ),
2126 'core_competency_create_template' => array(
2127 'classname' => 'core_competency\external',
2128 'methodname' => 'create_template',
2129 'classpath' => '',
2130 'description' => 'Creates new learning plan templates.',
2131 'type' => 'write',
2132 'capabilities' => 'moodle/competency:templatemanage',
2133 'ajax' => true,
2134 ),
2135 'core_competency_duplicate_template' => array(
2136 'classname' => 'core_competency\external',
2137 'methodname' => 'duplicate_template',
2138 'classpath' => '',
2139 'description' => 'Duplicate learning plan template.',
2140 'type' => 'write',
2141 'capabilities' => 'moodle/competency:templatemanage',
2142 'ajax' => true,
2143 ),
2144 'core_competency_read_template' => array(
2145 'classname' => 'core_competency\external',
2146 'methodname' => 'read_template',
2147 'classpath' => '',
2148 'description' => 'Load a summary of a learning plan template.',
2149 'type' => 'read',
2150 'capabilities' => 'moodle/competency:templateview',
2151 'ajax' => true,
2152 ),
2153 'core_competency_delete_template' => array(
2154 'classname' => 'core_competency\external',
2155 'methodname' => 'delete_template',
2156 'classpath' => '',
2157 'description' => 'Delete a learning plan template.',
2158 'type' => 'write',
2159 'capabilities' => 'moodle/competency:templatemanage',
2160 'ajax' => true,
2161 ),
2162 'core_competency_update_template' => array(
2163 'classname' => 'core_competency\external',
2164 'methodname' => 'update_template',
2165 'classpath' => '',
2166 'description' => 'Update a learning plan template.',
2167 'type' => 'write',
2168 'capabilities' => 'moodle/competency:templatemanage',
2169 'ajax' => true,
2170 ),
2171 'core_competency_list_templates' => array(
2172 'classname' => 'core_competency\external',
2173 'methodname' => 'list_templates',
2174 'classpath' => '',
2175 'description' => 'Load a list of a learning plan templates.',
2176 'type' => 'read',
2177 'capabilities' => 'moodle/competency:templateview',
2178 'ajax' => true,
2179 ),
2180 'core_competency_list_templates_using_competency' => array(
2181 'classname' => 'core_competency\external',
2182 'methodname' => 'list_templates_using_competency',
2183 'classpath' => '',
2184 'description' => 'Load a list of a learning plan templates for a given competency.',
2185 'type' => 'read',
2186 'capabilities' => 'moodle/competency:templateview',
2187 'ajax' => true,
2188 ),
2189 'core_competency_count_templates' => array(
2190 'classname' => 'core_competency\external',
2191 'methodname' => 'count_templates',
2192 'classpath' => '',
2193 'description' => 'Count a list of a learning plan templates.',
2194 'type' => 'read',
2195 'capabilities' => 'moodle/competency:templateview',
2196 'ajax' => true,
2197 ),
2198 'core_competency_count_templates_using_competency' => array(
2199 'classname' => 'core_competency\external',
2200 'methodname' => 'count_templates_using_competency',
2201 'classpath' => '',
2202 'description' => 'Count a list of a learning plan templates for a given competency.',
2203 'type' => 'read',
2204 'capabilities' => 'moodle/competency:templateview',
2205 'ajax' => true,
2206 ),
2207 'core_competency_create_plan' => array(
2208 'classname' => 'core_competency\external',
2209 'methodname' => 'create_plan',
2210 'classpath' => '',
2211 'description' => 'Creates a learning plan.',
2212 'type' => 'write',
2213 'capabilities' => 'moodle/competency:planmanage',
2214 'ajax' => true,
2215 ),
2216 'core_competency_update_plan' => array(
2217 'classname' => 'core_competency\external',
2218 'methodname' => 'update_plan',
2219 'classpath' => '',
2220 'description' => 'Updates a learning plan.',
2221 'type' => 'write',
2222 'capabilities' => 'moodle/competency:planmanage',
2223 'ajax' => true,
2224 ),
2225 'core_competency_complete_plan' => array(
2226 'classname' => 'core_competency\external',
2227 'methodname' => 'complete_plan',
2228 'classpath' => '',
2229 'description' => 'Complete learning plan.',
2230 'type' => 'write',
2231 'capabilities' => 'moodle/competency:planmanage',
2232 'ajax' => true,
2233 ),
2234 'core_competency_reopen_plan' => array(
2235 'classname' => 'core_competency\external',
2236 'methodname' => 'reopen_plan',
2237 'classpath' => '',
2238 'description' => 'Reopen learning plan.',
2239 'type' => 'write',
2240 'capabilities' => 'moodle/competency:planmanage',
2241 'ajax' => true,
2242 ),
2243 'core_competency_read_plan' => array(
2244 'classname' => 'core_competency\external',
2245 'methodname' => 'read_plan',
2246 'classpath' => '',
2247 'description' => 'Load a learning plan.',
2248 'type' => 'read',
2249 'capabilities' => 'moodle/competency:planviewown',
2250 'ajax' => true,
2251 ),
2252 'core_competency_delete_plan' => array(
2253 'classname' => 'core_competency\external',
2254 'methodname' => 'delete_plan',
2255 'classpath' => '',
2256 'description' => 'Delete a learning plan.',
2257 'type' => 'write',
2258 'capabilities' => 'moodle/competency:planmanage',
2259 'ajax' => true,
2260 ),
2261 'core_competency_list_user_plans' => array(
2262 'classname' => 'core_competency\external',
2263 'methodname' => 'list_user_plans',
2264 'classpath' => '',
2265 'description' => 'List a user\'s learning plans.',
2266 'type' => 'read',
2267 'capabilities' => 'moodle/competency:planviewown',
2268 'ajax' => true,
2269 ),
2270 'core_competency_list_plan_competencies' => array(
2271 'classname' => 'core_competency\external',
2272 'methodname' => 'list_plan_competencies',
2273 'classpath' => '',
2274 'description' => 'List the competencies in a plan',
2275 'type' => 'read',
2276 'capabilities' => 'moodle/competency:planviewown',
2277 'ajax' => true,
2278 ),
2279 'core_competency_add_competency_to_plan' => array(
2280 'classname' => 'core_competency\external',
2281 'methodname' => 'add_competency_to_plan',
2282 'classpath' => '',
2283 'description' => 'Add the competency to a learning plan',
2284 'type' => 'write',
2285 'capabilities' => 'moodle/competency:planmanage',
2286 'ajax' => true,
2287 ),
2288 'core_competency_remove_competency_from_plan' => array(
2289 'classname' => 'core_competency\external',
2290 'methodname' => 'remove_competency_from_plan',
2291 'classpath' => '',
2292 'description' => 'Remove the competency from a learning plan',
2293 'type' => 'write',
2294 'capabilities' => 'moodle/competency:planmanage',
2295 'ajax' => true,
2296 ),
2297 'core_competency_reorder_plan_competency' => array(
2298 'classname' => 'core_competency\external',
2299 'methodname' => 'reorder_plan_competency',
2300 'classpath' => '',
2301 'description' => 'Move a plan competency to a new relative sort order.',
2302 'type' => 'write',
2303 'capabilities' => 'moodle/competency:planmanage',
2304 'ajax' => true,
2305 ),
2306 'core_competency_plan_request_review' => array(
2307 'classname' => 'core_competency\external',
2308 'methodname' => 'plan_request_review',
2309 'classpath' => '',
2310 'description' => 'Request for a plan to be reviewed.',
2311 'type' => 'write',
2312 'capabilities' => 'moodle/competency:planmanagedraft',
2313 'ajax' => true,
2314 ),
2315 'core_competency_plan_start_review' => array(
2316 'classname' => 'core_competency\external',
2317 'methodname' => 'plan_start_review',
2318 'classpath' => '',
2319 'description' => 'Start the review of a plan.',
2320 'type' => 'write',
2321 'capabilities' => 'moodle/competency:planmanage',
2322 'ajax' => true,
2323 ),
2324 'core_competency_plan_stop_review' => array(
2325 'classname' => 'core_competency\external',
2326 'methodname' => 'plan_stop_review',
2327 'classpath' => '',
2328 'description' => 'Stop the review of a plan.',
2329 'type' => 'write',
2330 'capabilities' => 'moodle/competency:planmanage',
2331 'ajax' => true,
2332 ),
2333 'core_competency_plan_cancel_review_request' => array(
2334 'classname' => 'core_competency\external',
2335 'methodname' => 'plan_cancel_review_request',
2336 'classpath' => '',
2337 'description' => 'Cancel the review of a plan.',
2338 'type' => 'write',
2339 'capabilities' => 'moodle/competency:planmanagedraft',
2340 'ajax' => true,
2341 ),
2342 'core_competency_approve_plan' => array(
2343 'classname' => 'core_competency\external',
2344 'methodname' => 'approve_plan',
2345 'classpath' => '',
2346 'description' => 'Approve a plan.',
2347 'type' => 'write',
2348 'capabilities' => 'moodle/competency:planmanage',
2349 'ajax' => true,
2350 ),
2351 'core_competency_unapprove_plan' => array(
2352 'classname' => 'core_competency\external',
2353 'methodname' => 'unapprove_plan',
2354 'classpath' => '',
2355 'description' => 'Unapprove a plan.',
2356 'type' => 'write',
2357 'capabilities' => 'moodle/competency:planmanage',
2358 'ajax' => true,
2359 ),
2360 'core_competency_template_has_related_data' => array(
2361 'classname' => 'core_competency\external',
2362 'methodname' => 'template_has_related_data',
2363 'classpath' => '',
2364 'description' => 'Check if a template has related data',
2365 'type' => 'read',
2366 'capabilities' => 'moodle/competency:templateview',
2367 'ajax' => true,
2368 ),
2369 'core_competency_get_scale_values' => array(
2370 'classname' => 'core_competency\external',
2371 'methodname' => 'get_scale_values',
2372 'classpath' => '',
2373 'description' => 'Fetch the values for a specific scale',
2374 'type' => 'read',
2375 'capabilities' => 'moodle/competency:competencymanage',
2376 'ajax' => true,
3123c2cf 2377 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
2378 ),
2379 'core_competency_add_related_competency' => array(
2380 'classname' => 'core_competency\external',
2381 'methodname' => 'add_related_competency',
2382 'classpath' => '',
2383 'description' => 'Adds a related competency',
2384 'type' => 'write',
2385 'capabilities' => 'moodle/competency:competencymanage',
2386 'ajax' => true,
2387 ),
2388 'core_competency_remove_related_competency' => array(
2389 'classname' => 'core_competency\external',
2390 'methodname' => 'remove_related_competency',
2391 'classpath' => '',
2392 'description' => 'Remove a related competency',
2393 'type' => 'write',
2394 'capabilities' => 'moodle/competency:competencymanage',
2395 'ajax' => true,
2396 ),
2397 'core_competency_read_user_evidence' => array(
2398 'classname' => 'core_competency\external',
2399 'methodname' => 'read_user_evidence',
2400 'classpath' => '',
2401 'description' => 'Read an evidence of prior learning.',
2402 'type' => 'read',
2403 'capabilities' => 'moodle/competency:userevidenceview',
2404 'ajax' => true,
2405 ),
2406 'core_competency_delete_user_evidence' => array(
2407 'classname' => 'core_competency\external',
2408 'methodname' => 'delete_user_evidence',
2409 'classpath' => '',
2410 'description' => 'Delete an evidence of prior learning.',
2411 'type' => 'write',
2412 'capabilities' => 'moodle/competency:userevidencemanageown',
2413 'ajax' => true,
2414 ),
2415 'core_competency_create_user_evidence_competency' => array(
2416 'classname' => 'core_competency\external',
2417 'methodname' => 'create_user_evidence_competency',
2418 'classpath' => '',
2419 'description' => 'Create an evidence of prior learning relationship with a competency.',
2420 'type' => 'read',
2421 'capabilities' => 'moodle/competency:userevidencemanageown, moodle/competency:competencyview',
2422 'ajax' => true,
2423 ),
2424 'core_competency_delete_user_evidence_competency' => array(
2425 'classname' => 'core_competency\external',
2426 'methodname' => 'delete_user_evidence_competency',
2427 'classpath' => '',
2428 'description' => 'Delete an evidence of prior learning relationship with a competency.',
2429 'type' => 'write',
2430 'capabilities' => 'moodle/competency:userevidencemanageown',
2431 'ajax' => true,
2432 ),
2433 'core_competency_user_competency_cancel_review_request' => array(
2434 'classname' => 'core_competency\external',
2435 'methodname' => 'user_competency_cancel_review_request',
2436 'classpath' => '',
2437 'description' => 'Cancel a review request.',
2438 'type' => 'write',
2439 'capabilities' => 'moodle/competency:userevidencemanageown',
2440 'ajax' => true,
2441 ),
2442 'core_competency_user_competency_request_review' => array(
2443 'classname' => 'core_competency\external',
2444 'methodname' => 'user_competency_request_review',
2445 'classpath' => '',
2446 'description' => 'Request a review.',
2447 'type' => 'write',
2448 'capabilities' => 'moodle/competency:userevidencemanageown',
2449 'ajax' => true,
2450 ),
2451 'core_competency_user_competency_start_review' => array(
2452 'classname' => 'core_competency\external',
2453 'methodname' => 'user_competency_start_review',
2454 'classpath' => '',
2455 'description' => 'Start a review.',
2456 'type' => 'write',
2457 'capabilities' => 'moodle/competency:competencygrade',
2458 'ajax' => true,
2459 ),
2460 'core_competency_user_competency_stop_review' => array(
2461 'classname' => 'core_competency\external',
2462 'methodname' => 'user_competency_stop_review',
2463 'classpath' => '',
2464 'description' => 'Stop a review.',
2465 'type' => 'write',
2466 'capabilities' => 'moodle/competency:competencygrade',
2467 'ajax' => true,
2468 ),
2469 'core_competency_user_competency_viewed' => array(
2470 'classname' => 'core_competency\external',
2471 'methodname' => 'user_competency_viewed',
2472 'classpath' => '',
2473 'description' => 'Log the user competency viewed event.',
2474 'type' => 'read',
2475 'capabilities' => 'moodle/competency:usercompetencyview',
2476 'ajax' => true,
3123c2cf 2477 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
2478 ),
2479 'core_competency_user_competency_viewed_in_plan' => array(
2480 'classname' => 'core_competency\external',
2481 'methodname' => 'user_competency_viewed_in_plan',
2482 'classpath' => '',
2483 'description' => 'Log the user competency viewed in plan event.',
2484 'type' => 'read',
2485 'capabilities' => 'moodle/competency:usercompetencyview',
2486 'ajax' => true,
3123c2cf 2487 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
2488 ),
2489 'core_competency_user_competency_viewed_in_course' => array(
2490 'classname' => 'core_competency\external',
2491 'methodname' => 'user_competency_viewed_in_course',
2492 'classpath' => '',
2493 'description' => 'Log the user competency viewed in course event',
2494 'type' => 'read',
2495 'capabilities' => 'moodle/competency:usercompetencyview',
2496 'ajax' => true,
3123c2cf 2497 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
2498 ),
2499 'core_competency_user_competency_plan_viewed' => array(
2500 'classname' => 'core_competency\external',
2501 'methodname' => 'user_competency_plan_viewed',
2502 'classpath' => '',
2503 'description' => 'Log the user competency plan viewed event.',
2504 'type' => 'read',
2505 'capabilities' => 'moodle/competency:usercompetencyview',
2506 'ajax' => true,
3123c2cf 2507 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
2508 ),
2509 'core_competency_grade_competency' => array(
2510 'classname' => 'core_competency\external',
2511 'methodname' => 'grade_competency',
2512 'classpath' => '',
2513 'description' => 'Grade a competency.',
2514 'type' => 'write',
2515 'capabilities' => 'moodle/competency:competencygrade',
2516 'ajax' => true,
2517 ),
2518 'core_competency_grade_competency_in_plan' => array(
2519 'classname' => 'core_competency\external',
2520 'methodname' => 'grade_competency_in_plan',
2521 'classpath' => '',
2522 'description' => 'Grade a competency from the user plan page.',
2523 'type' => 'write',
2524 'capabilities' => 'moodle/competency:competencygrade',
2525 'ajax' => true,
2526 ),
2527 'core_competency_grade_competency_in_course' => array(
2528 'classname' => 'core_competency\external',
2529 'methodname' => 'grade_competency_in_course',
2530 'classpath' => '',
2531 'description' => 'Grade a competency from the course page.',
2532 'type' => 'write',
2533 'capabilities' => 'moodle/competency:competencygrade',
2534 'ajax' => true,
3123c2cf 2535 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
2536 ),
2537 'core_competency_unlink_plan_from_template' => array(
2538 'classname' => 'core_competency\external',
2539 'methodname' => 'unlink_plan_from_template',
2540 'classpath' => '',
2541 'description' => 'Unlink a plan form it template.',
2542 'type' => 'write',
2543 'capabilities' => 'moodle/competency:planmanage',
2544 'ajax' => true,
2545 ),
2546 'core_competency_template_viewed' => array(
2547 'classname' => 'core_competency\external',
2548 'methodname' => 'template_viewed',
2549 'classpath' => '',
2550 'description' => 'Log event template viewed',
2551 'type' => 'read',
2552 'capabilities' => 'moodle/competency:templateview',
2553 'ajax' => true,
2554 ),
2555 'core_competency_request_review_of_user_evidence_linked_competencies' => array(
2556 'classname' => 'core_competency\external',
2557 'methodname' => 'request_review_of_user_evidence_linked_competencies',
2558 'classpath' => '',
2559 'description' => 'Send user evidence competencies in review',
2560 'type' => 'write',
2561 'capabilities' => 'moodle/competency:userevidencemanageown',
2562 'ajax' => true,
2563 ),
2564 'core_competency_update_course_competency_settings' => array(
2565 'classname' => 'core_competency\external',
2566 'methodname' => 'update_course_competency_settings',
2567 'classpath' => '',
2568 'description' => 'Update the course competency settings',
2569 'type' => 'write',
2570 'capabilities' => 'moodle/competency:coursecompetencyconfigure',
2571 'ajax' => true,
2572 ),
1e99f31e
FM
2573 'core_competency_delete_evidence' => array(
2574 'classname' => 'core_competency\external',
2575 'methodname' => 'delete_evidence',
2576 'classpath' => '',
2577 'description' => 'Delete an evidence',
2578 'type' => 'write',
2579 'capabilities' => 'moodle/competency:evidencedelete',
2580 'ajax' => true,
3123c2cf 2581 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1e99f31e 2582 ),
f23e9b6b
CB
2583
2584 'core_webservice_get_site_info' => array(
2585 'classname' => 'core_webservice_external',
2586 'methodname' => 'get_site_info',
2587 'classpath' => 'webservice/externallib.php',
2588 'description' => 'Return some site info / user info / list web service functions',
2589 'type' => 'read',
ee7295ee 2590 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
8446ba36
JL
2591 ),
2592
2593 // Blocks functions.
2594 'core_block_get_course_blocks' => array(
2595 'classname' => 'core_block_external',
2596 'methodname' => 'get_course_blocks',
2597 'description' => 'Returns blocks information for a course.',
2598 'type' => 'read',
2599 'capabilities' => '',
2600 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2601 ),
66ef16d3 2602
0f8b2604
JL
2603 'core_block_get_dashboard_blocks' => array(
2604 'classname' => 'core_block_external',
2605 'methodname' => 'get_dashboard_blocks',
2606 'description' => 'Returns blocks information for the given user dashboard.',
2607 'type' => 'read',
2608 'capabilities' => '',
2609 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2610 ),
2611
66ef16d3
JL
2612 // Filters functions.
2613 'core_filters_get_available_in_context' => array(
2614 'classname' => 'core_filters\external',
2615 'methodname' => 'get_available_in_context',
2616 'description' => 'Returns the filters available in the given contexts.',
2617 'type' => 'read',
2618 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
3cfff885 2619 ),
1eeb465a
TBM
2620 'core_customfield_delete_field' => array(
2621 'classname' => 'core_customfield_external',
2622 'methodname' => 'delete_field',
2623 'classpath' => 'customfield/externallib.php',
2624 'description' => 'Deletes an entry',
2625 'type' => 'write',
2626 'ajax' => 'true'
2627 ),
2628 'core_customfield_reload_template' => array(
2629 'classname' => 'core_customfield_external',
2630 'methodname' => 'reload_template',
2631 'classpath' => 'customfield/externallib.php',
2632 'description' => 'Reloads template',
2633 'type' => 'read',
2634 'ajax' => 'true'
2635 ),
2636 'core_customfield_create_category' => array(
2637 'classname' => 'core_customfield_external',
2638 'methodname' => 'create_category',
2639 'classpath' => 'customfield/externallib.php',
2640 'description' => 'Creates a new category',
2641 'type' => 'write',
2642 'ajax' => 'true'
2643 ),
2644 'core_customfield_delete_category' => array(
2645 'classname' => 'core_customfield_external',
2646 'methodname' => 'delete_category',
2647 'classpath' => 'customfield/externallib.php',
2648 'description' => 'Deletes a category',
2649 'type' => 'write',
2650 'ajax' => 'true'
2651 ),
2652 'core_customfield_move_field' => array(
2653 'classname' => 'core_customfield_external',
2654 'methodname' => 'move_field',
2655 'classpath' => 'customfield/externallib.php',
2656 'description' => 'Drag and drop',
2657 'type' => 'write',
2658 'ajax' => 'true'
2659 ),
2660 'core_customfield_move_category' => array(
2661 'classname' => 'core_customfield_external',
2662 'methodname' => 'move_category',
2663 'classpath' => 'customfield/externallib.php',
2664 'description' => 'Drag and drop categories',
2665 'type' => 'write',
2666 'ajax' => 'true'
65ae2441 2667 ),
2668 'core_h5p_get_trusted_h5p_file' => [
2669 'classname' => 'core_h5p\external',
2670 'methodname' => 'get_trusted_h5p_file',
2671 'classpath' => '',
2672 'description' => 'Get the H5P file cleaned for Mobile App.',
2673 'type' => 'read',
2674 'ajax' => 'true',
2675 'capabilities' => '',
2676 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
2677 ],
1179f07d
SL
2678 'core_table_get_dynamic_table_content' => [
2679 'classname' => 'core_table\external\dynamic\get',
1592c3c4 2680 'methodname' => 'execute',
1179f07d 2681 'description' => 'Get the dynamic table content raw html',
1592c3c4
SL
2682 'type' => 'read',
2683 'ajax' => true,
2684 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
2685 ],
1d4c6f53
FR
2686 'core_xapi_statement_post' => [
2687 'classname' => 'core_xapi\external\post_statement',
2688 'methodname' => 'execute',
2689 'classpath' => '',
2690 'description' => 'Post an xAPI statement.',
2691 'type' => 'write',
2692 'ajax' => 'true',
2693 'capabilities' => '',
2694 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
2695 ],
f627173c
SA
2696 'core_contentbank_delete_content' => [
2697 'classname' => 'core_contentbank\external\delete_content',
2698 'methodname' => 'execute',
2699 'classpath' => '',
2700 'description' => 'Delete a content from the content bank.',
2701 'type' => 'write',
2702 'ajax' => 'true',
2703 'capabilities' => 'moodle/contentbank:deleteanycontent',
2704 ],
448012c6
AA
2705 'core_contentbank_rename_content' => [
2706 'classname' => 'core_contentbank\external\rename_content',
2707 'methodname' => 'execute',
2708 'classpath' => '',
2709 'description' => 'Rename a content in the content bank.',
2710 'type' => 'write',
2711 'ajax' => 'true',
2712 'capabilities' => 'moodle/contentbank:manageowncontent',
2713 ],
1a4c8e02 2714 'core_create_userfeedback_action_record' => [
ce80716a 2715 'classname' => 'core\external\record_userfeedback_action',
1a4c8e02
SR
2716 'methodname' => 'execute',
2717 'classpath' => '',
2718 'description' => 'Record the action that the user takes in the user feedback notification for future use.',
2719 'type' => 'write',
2720 'ajax' => 'true',
2721 'capabilities' => '',
2722 ],
9a0df45a 2723);
c1b65883
JM
2724
2725$services = array(
96e0194c 2726 'Moodle mobile web service' => array(
12c52b91 2727 'functions' => array(), // Unused as we add the service in each function definition, third party services would use this.
96e0194c
SH
2728 'enabled' => 0,
2729 'restrictedusers' => 0,
af03513f 2730 'shortname' => MOODLE_OFFICIAL_MOBILE_SERVICE,
106c55fb
DW
2731 'downloadfiles' => 1,
2732 'uploadfiles' => 1
96e0194c
SH
2733 ),
2734);