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