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