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