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