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