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