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