MDL-63742 auth: New WS core_auth_resend_confirmation_email
[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 ),
f23e9b6b
CB
547 'core_enrol_get_course_enrolment_methods' => array(
548 'classname' => 'core_enrol_external',
549 'methodname' => 'get_course_enrolment_methods',
550 'classpath' => 'enrol/externallib.php',
551 'description' => 'Get the list of course enrolment methods',
552 'type' => 'read',
ee7295ee 553 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
5d62e813 554 ),
f23e9b6b
CB
555 'core_enrol_get_enrolled_users' => array(
556 'classname' => 'core_enrol_external',
557 'methodname' => 'get_enrolled_users',
558 'classpath' => 'enrol/externallib.php',
559 'description' => 'Get enrolled users by course id.',
560 'type' => 'read',
561 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, '
ee7295ee
JL
562 . 'moodle/site:accessallgroups',
563 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
7107c2f0 564 ),
f23e9b6b
CB
565 'core_enrol_get_enrolled_users_with_capability' => array(
566 'classname' => 'core_enrol_external',
567 'methodname' => 'get_enrolled_users_with_capability',
568 'classpath' => 'enrol/externallib.php',
569 'description' => 'For each course and capability specified, return a list of the users that are enrolled in the course
570 and have that capability',
571 'type' => 'read',
c0ef63eb 572 ),
a60e8ba5
DW
573 'core_enrol_get_potential_users' => array(
574 'classname' => 'core_enrol_external',
575 'methodname' => 'get_potential_users',
576 'classpath' => 'enrol/externallib.php',
577 'description' => 'Get the list of potential users to enrol',
0fa35b1a 578 'ajax' => true,
a60e8ba5
DW
579 'type' => 'read',
580 'capabilities' => 'moodle/course:enrolreview'
581 ),
f23e9b6b
CB
582 'core_enrol_get_users_courses' => array(
583 'classname' => 'core_enrol_external',
584 'methodname' => 'get_users_courses',
585 'classpath' => 'enrol/externallib.php',
586 'description' => 'Get the list of courses where a user is enrolled in',
587 'type' => 'read',
ee7295ee
JL
588 'capabilities' => 'moodle/course:viewparticipants',
589 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
9857381d 590 ),
58c20c81
JP
591 'core_enrol_edit_user_enrolment' => array(
592 'classname' => 'core_enrol_external',
593 'methodname' => 'edit_user_enrolment',
594 'classpath' => 'enrol/externallib.php',
595 'description' => 'External function that updates a given user enrolment',
596 'type' => 'write',
597 'ajax' => true,
598 ),
c8351261
MG
599 'core_enrol_unenrol_user_enrolment' => array(
600 'classname' => 'core_enrol_external',
601 'methodname' => 'unenrol_user_enrolment',
602 'classpath' => 'enrol/externallib.php',
603 'description' => 'External function that unenrols a given user enrolment',
604 'type' => 'write',
605 'ajax' => true,
606 ),
f23e9b6b
CB
607 'core_fetch_notifications' => array(
608 'classname' => 'core_external',
609 'methodname' => 'fetch_notifications',
610 'classpath' => 'lib/external/externallib.php',
611 'description' => 'Return a list of notifications for the current session',
612 'type' => 'read',
5041600d
RT
613 'loginrequired' => false,
614 'ajax' => true,
5d1017e1 615 ),
5d1017e1 616 'core_files_get_files' => array(
f23e9b6b
CB
617 'classname' => 'core_files_external',
618 'methodname' => 'get_files',
249c4f60 619 'description' => 'browse moodle files',
f23e9b6b
CB
620 'type' => 'read',
621 'classpath' => 'files/externallib.php',
ee7295ee 622 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
5d1017e1 623 ),
5d1017e1 624 'core_files_upload' => array(
f23e9b6b
CB
625 'classname' => 'core_files_external',
626 'methodname' => 'upload',
249c4f60
DC
627 'description' => 'upload a file to moodle',
628 'type' => 'write',
629 'classpath' => 'files/externallib.php',
630 ),
8b493eb0
DM
631 'core_form_get_filetypes_browser_data' => array(
632 'classname' => 'core_form\external',
633 'methodname' => 'get_filetypes_browser_data',
634 'classpath' => '',
635 'description' => 'Provides data for the filetypes element browser.',
636 'type' => 'read',
637 'loginrequired' => false,
638 'ajax' => true,
639 ),
f23e9b6b
CB
640 'core_get_component_strings' => array(
641 'classname' => 'core_external',
642 'methodname' => 'get_component_strings',
643 'classpath' => 'lib/external/externallib.php',
faeca20d
DM
644 'description' => 'Return all raw strings (with {$a->xxx}), for a specific component ' .
645 '- similar to core get_component_strings(), call',
f23e9b6b 646 'type' => 'read',
5041600d
RT
647 'loginrequired' => false,
648 'ajax' => true,
ee7295ee 649 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
3364dbb5 650 ),
f23e9b6b
CB
651 'core_get_fragment' => array(
652 'classname' => 'core_external',
653 'methodname' => 'get_fragment',
654 'classpath' => 'lib/external/externallib.php',
655 'description' => 'Return a fragment for inclusion, such as a JavaScript page.',
656 'type' => 'read',
5041600d 657 'ajax' => true,
5d1017e1 658 ),
f23e9b6b
CB
659 'core_get_string' => array(
660 'classname' => 'core_external',
661 'methodname' => 'get_string',
662 'classpath' => 'lib/external/externallib.php',
663 'description' => 'Return a translated string - similar to core get_string(), call',
664 'type' => 'read',
5041600d
RT
665 'loginrequired' => false,
666 'ajax' => true,
be9bf94e 667 ),
f23e9b6b
CB
668 'core_get_strings' => array(
669 'classname' => 'core_external',
670 'methodname' => 'get_strings',
671 'classpath' => 'lib/external/externallib.php',
672 'description' => 'Return some translated strings - like several core get_string(), calls',
673 'type' => 'read',
5041600d
RT
674 'loginrequired' => false,
675 'ajax' => true,
5d1017e1 676 ),
88c2941b
RW
677 'core_get_user_dates' => array(
678 'classname' => 'core_external',
679 'methodname' => 'get_user_dates',
680 'classpath' => 'lib/external/externallib.php',
681 'description' => 'Return formatted timestamps',
682 'type' => 'read',
683 'ajax' => true,
684 ),
f23e9b6b
CB
685 'core_grades_get_grades' => array(
686 'classname' => 'core_grades_external',
687 'methodname' => 'get_grades',
aa7e371a
JL
688 'description' => '** DEPRECATED ** Please do not call this function any more.
689 Returns student course total grade and grades for activities.
f23e9b6b
CB
690 This function does not return category or manual items.
691 This function is suitable for managers or teachers not students.',
692 'type' => 'read',
693 'capabilities' => 'moodle/grade:view, moodle/grade:viewall, moodle/grade:viewhidden'
e9b66095 694 ),
f23e9b6b
CB
695 'core_grades_update_grades' => array(
696 'classname' => 'core_grades_external',
697 'methodname' => 'update_grades',
698 'description' => 'Update a grade item and associated student grades.',
699 'type' => 'write',
5d1017e1 700 ),
f23e9b6b
CB
701 'core_grading_get_definitions' => array(
702 'classname' => 'core_grading_external',
703 'methodname' => 'get_definitions',
704 'description' => 'Get grading definitions',
705 'type' => 'read',
e9b66095 706 ),
f23e9b6b
CB
707 'core_grading_get_gradingform_instances' => array(
708 'classname' => 'core_grading_external',
709 'methodname' => 'get_gradingform_instances',
710 'description' => 'Get grading form instances',
711 'type' => 'read',
f2229c68 712 ),
f23e9b6b
CB
713 'core_grading_save_definitions' => array(
714 'classname' => 'core_grading_external',
715 'methodname' => 'save_definitions',
716 'description' => 'Save grading definitions',
717 'type' => 'write',
5d1017e1 718 ),
f23e9b6b
CB
719 'core_group_add_group_members' => array(
720 'classname' => 'core_group_external',
721 'methodname' => 'add_group_members',
722 'classpath' => 'group/externallib.php',
723 'description' => 'Adds group members.',
724 'type' => 'write',
725 'capabilities' => 'moodle/course:managegroups',
6bb31e40 726 ),
f23e9b6b
CB
727 'core_group_assign_grouping' => array(
728 'classname' => 'core_group_external',
729 'methodname' => 'assign_grouping',
730 'classpath' => 'group/externallib.php',
731 'description' => 'Assing groups from groupings',
732 'type' => 'write',
740c354f 733 ),
f23e9b6b
CB
734 'core_group_create_groupings' => array(
735 'classname' => 'core_group_external',
736 'methodname' => 'create_groupings',
737 'classpath' => 'group/externallib.php',
738 'description' => 'Creates new groupings',
739 'type' => 'write',
5d1017e1 740 ),
f23e9b6b
CB
741 'core_group_create_groups' => array(
742 'classname' => 'core_group_external',
743 'methodname' => 'create_groups',
744 'classpath' => 'group/externallib.php',
745 'description' => 'Creates new groups.',
746 'type' => 'write',
747 'capabilities' => 'moodle/course:managegroups'
6bb31e40 748 ),
f23e9b6b
CB
749 'core_group_delete_group_members' => array(
750 'classname' => 'core_group_external',
751 'methodname' => 'delete_group_members',
752 'classpath' => 'group/externallib.php',
753 'description' => 'Deletes group members.',
0a4f3eb2 754 'type' => 'write',
f23e9b6b 755 'capabilities' => 'moodle/course:managegroups'
63a85dc7 756 ),
f23e9b6b
CB
757 'core_group_delete_groupings' => array(
758 'classname' => 'core_group_external',
759 'methodname' => 'delete_groupings',
760 'classpath' => 'group/externallib.php',
761 'description' => 'Deletes all specified groupings.',
79949c1b 762 'type' => 'write',
79949c1b 763 ),
f23e9b6b
CB
764 'core_group_delete_groups' => array(
765 'classname' => 'core_group_external',
766 'methodname' => 'delete_groups',
767 'classpath' => 'group/externallib.php',
768 'description' => 'Deletes all specified groups.',
0a4f3eb2 769 'type' => 'write',
f23e9b6b 770 'capabilities' => 'moodle/course:managegroups'
3dc1d76e 771 ),
f23e9b6b
CB
772 'core_group_get_activity_allowed_groups' => array(
773 'classname' => 'core_group_external',
774 'methodname' => 'get_activity_allowed_groups',
775 'classpath' => 'group/externallib.php',
776 'description' => 'Gets a list of groups that the user is allowed to access within the specified activity.',
777 'type' => 'read',
ee7295ee 778 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
791723c3 779 ),
f23e9b6b
CB
780 'core_group_get_activity_groupmode' => array(
781 'classname' => 'core_group_external',
782 'methodname' => 'get_activity_groupmode',
783 'classpath' => 'group/externallib.php',
784 'description' => 'Returns effective groupmode used in a given activity.',
785 'type' => 'read',
ee7295ee 786 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
c4f7bf29 787 ),
f23e9b6b
CB
788 'core_group_get_course_groupings' => array(
789 'classname' => 'core_group_external',
790 'methodname' => 'get_course_groupings',
791 'classpath' => 'group/externallib.php',
792 'description' => 'Returns all groupings in specified course.',
793 'type' => 'read',
c5158499 794 ),
f23e9b6b
CB
795 'core_group_get_course_groups' => array(
796 'classname' => 'core_group_external',
797 'methodname' => 'get_course_groups',
798 'classpath' => 'group/externallib.php',
799 'description' => 'Returns all groups in specified course.',
800 'type' => 'read',
dfc609e5 801 'ajax' => true,
f23e9b6b 802 'capabilities' => 'moodle/course:managegroups'
13bb6819 803 ),
f23e9b6b
CB
804 'core_group_get_course_user_groups' => array(
805 'classname' => 'core_group_external',
806 'methodname' => 'get_course_user_groups',
807 'classpath' => 'group/externallib.php',
808 'description' => 'Returns all groups in specified course for the specified user.',
809 'type' => 'read',
ee7295ee
JL
810 'capabilities' => 'moodle/course:managegroups',
811 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
3ec163dd 812 ),
f23e9b6b
CB
813 'core_group_get_group_members' => array(
814 'classname' => 'core_group_external',
815 'methodname' => 'get_group_members',
816 'classpath' => 'group/externallib.php',
817 'description' => 'Returns group members.',
818 'type' => 'read',
819 'capabilities' => 'moodle/course:managegroups'
479a5db1 820 ),
f23e9b6b
CB
821 'core_group_get_groupings' => array(
822 'classname' => 'core_group_external',
823 'methodname' => 'get_groupings',
824 'classpath' => 'group/externallib.php',
825 'description' => 'Returns groupings details.',
826 'type' => 'read',
3ec163dd 827 ),
f23e9b6b
CB
828 'core_group_get_groups' => array(
829 'classname' => 'core_group_external',
830 'methodname' => 'get_groups',
831 'classpath' => 'group/externallib.php',
832 'description' => 'Returns group details.',
833 'type' => 'read',
834 'capabilities' => 'moodle/course:managegroups'
2f951d86 835 ),
f23e9b6b
CB
836 'core_group_unassign_grouping' => array(
837 'classname' => 'core_group_external',
838 'methodname' => 'unassign_grouping',
839 'classpath' => 'group/externallib.php',
840 'description' => 'Unassing groups from groupings',
841 'type' => 'write',
8430d87b 842 ),
f23e9b6b
CB
843 'core_group_update_groupings' => array(
844 'classname' => 'core_group_external',
845 'methodname' => 'update_groupings',
846 'classpath' => 'group/externallib.php',
847 'description' => 'Updates existing groupings',
848 'type' => 'write',
5d1017e1 849 ),
52284186
MN
850 'core_message_block_user' => array(
851 'classname' => 'core_message_external',
852 'methodname' => 'block_user',
853 'classpath' => 'message/externallib.php',
854 'description' => 'Blocks a user',
855 'type' => 'write',
856 'ajax' => true,
857 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
858 ),
f23e9b6b
CB
859 'core_message_block_contacts' => array(
860 'classname' => 'core_message_external',
861 'methodname' => 'block_contacts',
862 'classpath' => 'message/externallib.php',
0b3eadcd
MN
863 'description' => '** DEPRECATED ** Please do not call this function any more.
864 Block contacts',
f23e9b6b 865 'type' => 'write',
c6e97f54 866 'ajax' => true,
ee7295ee 867 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
a623b6b8 868 ),
d6731600 869 'core_message_create_contacts' => array(
f23e9b6b
CB
870 'classname' => 'core_message_external',
871 'methodname' => 'create_contacts',
872 'classpath' => 'message/externallib.php',
0b3eadcd
MN
873 'description' => '** DEPRECATED ** Please do not call this function any more.
874 Add contacts to the contact list',
f23e9b6b 875 'type' => 'write',
c6e97f54 876 'ajax' => true,
ee7295ee 877 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
d6731600 878 ),
52284186
MN
879 'core_message_get_contact_requests' => array(
880 'classname' => 'core_message_external',
881 'methodname' => 'get_contact_requests',
882 'classpath' => 'message/externallib.php',
883 'description' => 'Returns contact requests for a user',
884 'type' => 'read',
885 'ajax' => true,
886 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
887 ),
888 'core_message_create_contact_request' => array(
889 'classname' => 'core_message_external',
890 'methodname' => 'create_contact_request',
891 'classpath' => 'message/externallib.php',
892 'description' => 'Creates a contact request',
893 'type' => 'write',
894 'ajax' => true,
895 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
896 ),
897 'core_message_confirm_contact_request' => array(
898 'classname' => 'core_message_external',
899 'methodname' => 'confirm_contact_request',
900 'classpath' => 'message/externallib.php',
901 'description' => 'Confirms a contact request',
902 'type' => 'write',
903 'ajax' => true,
904 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
905 ),
906 'core_message_decline_contact_request' => array(
907 'classname' => 'core_message_external',
908 'methodname' => 'decline_contact_request',
909 'classpath' => 'message/externallib.php',
910 'description' => 'Declines a contact request',
911 'type' => 'write',
912 'ajax' => true,
913 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
914 ),
d6731600 915 'core_message_delete_contacts' => array(
f23e9b6b
CB
916 'classname' => 'core_message_external',
917 'methodname' => 'delete_contacts',
918 'classpath' => 'message/externallib.php',
d6731600 919 'description' => 'Remove contacts from the contact list',
f23e9b6b 920 'type' => 'write',
c6e97f54 921 'ajax' => true,
ee7295ee 922 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
d6731600 923 ),
dec0cd99
MN
924 'core_message_delete_conversation' => array(
925 'classname' => 'core_message_external',
926 'methodname' => 'delete_conversation',
927 'classpath' => 'message/externallib.php',
fa024820
MN
928 'description' => '** DEPRECATED ** Please do not call this function any more.
929 Deletes a conversation.',
dec0cd99
MN
930 'type' => 'write',
931 'capabilities' => 'moodle/site:deleteownmessage',
932 'ajax' => true,
53522c6e 933 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
dec0cd99 934 ),
60b67bbc 935 'core_message_delete_conversations_by_id' => array(
26f39c88 936 'classname' => 'core_message_external',
60b67bbc 937 'methodname' => 'delete_conversations_by_id',
26f39c88 938 'classpath' => 'message/externallib.php',
60b67bbc 939 'description' => 'Deletes a list of conversations.',
26f39c88
MN
940 'type' => 'write',
941 'capabilities' => 'moodle/site:deleteownmessage',
942 'ajax' => true,
943 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
944 ),
f23e9b6b
CB
945 'core_message_delete_message' => array(
946 'classname' => 'core_message_external',
947 'methodname' => 'delete_message',
948 'classpath' => 'message/externallib.php',
949 'description' => 'Deletes a message.',
950 'type' => 'write',
ee7295ee 951 'capabilities' => 'moodle/site:deleteownmessage',
3090f52f 952 'ajax' => true,
ee7295ee 953 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
d6731600 954 ),
f23e9b6b
CB
955 'core_message_get_blocked_users' => array(
956 'classname' => 'core_message_external',
957 'methodname' => 'get_blocked_users',
958 'classpath' => 'message/externallib.php',
959 'description' => 'Retrieve a list of users blocked',
960 'type' => 'read',
ee7295ee 961 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
d6731600 962 ),
cd03b8d7
MN
963 'core_message_data_for_messagearea_search_messages' => array(
964 'classname' => 'core_message_external',
965 'methodname' => 'data_for_messagearea_search_messages',
966 'classpath' => 'message/externallib.php',
967 'description' => 'Retrieve the template data for searching for messages',
968 'type' => 'read',
969 'ajax' => true,
53522c6e 970 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
cd03b8d7 971 ),
48e8bdba 972 'core_message_data_for_messagearea_search_users' => array(
cd03b8d7 973 'classname' => 'core_message_external',
48e8bdba 974 'methodname' => 'data_for_messagearea_search_users',
cd03b8d7
MN
975 'classpath' => 'message/externallib.php',
976 'description' => 'Retrieve the template data for searching for people',
977 'type' => 'read',
978 'ajax' => true,
979 ),
48e8bdba 980 'core_message_data_for_messagearea_search_users_in_course' => array(
cd03b8d7 981 'classname' => 'core_message_external',
48e8bdba 982 'methodname' => 'data_for_messagearea_search_users_in_course',
cd03b8d7
MN
983 'classpath' => 'message/externallib.php',
984 'description' => 'Retrieve the template data for searching for people in a course',
985 'type' => 'read',
986 'ajax' => true,
987 ),
9aa012b5
MN
988 'core_message_data_for_messagearea_conversations' => array(
989 'classname' => 'core_message_external',
990 'methodname' => 'data_for_messagearea_conversations',
991 'classpath' => 'message/externallib.php',
992 'description' => 'Retrieve the template data for the conversation list',
993 'type' => 'read',
994 'ajax' => true,
21d9f020 995 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
9aa012b5
MN
996 ),
997 'core_message_data_for_messagearea_contacts' => array(
998 'classname' => 'core_message_external',
999 'methodname' => 'data_for_messagearea_contacts',
1000 'classpath' => 'message/externallib.php',
1001 'description' => 'Retrieve the template data for the contact list',
1002 'type' => 'read',
1003 'ajax' => true,
21d9f020 1004 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
9aa012b5 1005 ),
3cd13828
MN
1006 'core_message_data_for_messagearea_messages' => array(
1007 'classname' => 'core_message_external',
1008 'methodname' => 'data_for_messagearea_messages',
1009 'classpath' => 'message/externallib.php',
1010 'description' => 'Retrieve the template data for the messages',
1011 'type' => 'read',
1012 'ajax' => true,
21d9f020 1013 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
3cd13828 1014 ),
c060cd49
MN
1015 'core_message_data_for_messagearea_get_most_recent_message' => array(
1016 'classname' => 'core_message_external',
1017 'methodname' => 'data_for_messagearea_get_most_recent_message',
1018 'classpath' => 'message/externallib.php',
1019 'description' => 'Retrieve the template data for the most recent message',
1020 'type' => 'read',
1021 'ajax' => true,
1022 ),
c6e97f54
MN
1023 'core_message_data_for_messagearea_get_profile' => array(
1024 'classname' => 'core_message_external',
1025 'methodname' => 'data_for_messagearea_get_profile',
1026 'classpath' => 'message/externallib.php',
1027 'description' => 'Retrieve the template data for the users\'s profile',
1028 'type' => 'read',
1029 'ajax' => true,
1030 ),
d6731600 1031 'core_message_get_contacts' => array(
f23e9b6b
CB
1032 'classname' => 'core_message_external',
1033 'methodname' => 'get_contacts',
1034 'classpath' => 'message/externallib.php',
d6731600 1035 'description' => 'Retrieve the contact list',
f23e9b6b 1036 'type' => 'read',
ee7295ee 1037 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
d6731600 1038 ),
aff9da17 1039 'core_message_get_messages' => array(
f23e9b6b
CB
1040 'classname' => 'core_message_external',
1041 'methodname' => 'get_messages',
1042 'classpath' => 'message/externallib.php',
1043 'description' => 'Retrieve a list of messages sent and received by a user (conversations, notifications or both)',
1044 'type' => 'read',
ee7295ee 1045 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
3274d5ca
RW
1046 'ajax' => true,
1047 ),
8c55bd6c
RW
1048 'core_message_get_unread_conversations_count' => array(
1049 'classname' => 'core_message_external',
1050 'methodname' => 'get_unread_conversations_count',
1051 'classpath' => 'message/externallib.php',
1052 'description' => 'Retrieve the count of unread conversations for a given user',
1053 'type' => 'read',
1054 'ajax' => true,
53522c6e 1055 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
8c55bd6c 1056 ),
3274d5ca
RW
1057 'core_message_mark_all_notifications_as_read' => array(
1058 'classname' => 'core_message_external',
1059 'methodname' => 'mark_all_notifications_as_read',
1060 'classpath' => 'message/externallib.php',
8c55bd6c
RW
1061 'description' => 'Mark all notifications as read for a given user',
1062 'type' => 'write',
1063 'ajax' => true,
53522c6e 1064 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
8c55bd6c
RW
1065 ),
1066 'core_message_mark_all_messages_as_read' => array(
1067 'classname' => 'core_message_external',
1068 'methodname' => 'mark_all_messages_as_read',
1069 'classpath' => 'message/externallib.php',
e4c30994
MN
1070 'description' => '** DEPRECATED ** Please do not call this function any more.
1071 Mark all messages as read for a given user',
3274d5ca
RW
1072 'type' => 'write',
1073 'ajax' => true,
53522c6e 1074 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
60ab2e1b 1075 ),
09ec5017
MN
1076 'core_message_mark_all_conversation_messages_as_read' => array(
1077 'classname' => 'core_message_external',
1078 'methodname' => 'mark_all_conversation_messages_as_read',
1079 'classpath' => 'message/externallib.php',
1080 'description' => 'Mark all conversation messages as read for a given user',
3274d5ca
RW
1081 'type' => 'write',
1082 'ajax' => true,
53522c6e 1083 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
60ab2e1b 1084 ),
a84f89ca 1085 'core_message_mark_message_read' => array(
f23e9b6b
CB
1086 'classname' => 'core_message_external',
1087 'methodname' => 'mark_message_read',
1088 'classpath' => 'message/externallib.php',
1089 'description' => 'Mark a single message as read, trigger message_viewed event.',
1090 'type' => 'write',
ee7295ee 1091 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
0b19d048 1092 'ajax' => true,
a84f89ca 1093 ),
2b595d96
MN
1094 'core_message_mark_notification_read' => array(
1095 'classname' => 'core_message_external',
1096 'methodname' => 'mark_notification_read',
1097 'classpath' => 'message/externallib.php',
1098 'description' => 'Mark a single notification as read, trigger notification_viewed event.',
1099 'type' => 'write',
1100 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1101 'ajax' => true,
1102 ),
a0eabdd3
RW
1103 'core_message_message_processor_config_form' => array(
1104 'classname' => 'core_message_external',
1105 'methodname' => 'message_processor_config_form',
1106 'classpath' => 'message/externallib.php',
1107 'description' => 'Process the message processor config form',
1108 'type' => 'write',
1109 'ajax' => true,
53522c6e 1110 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
a0eabdd3 1111 ),
8c125526
RW
1112 'core_message_get_message_processor' => array(
1113 'classname' => 'core_message_external',
1114 'methodname' => 'get_message_processor',
1115 'classpath' => 'message/externallib.php',
1116 'description' => 'Get a message processor',
1117 'type' => 'read',
1118 'ajax' => true,
1119 ),
f23e9b6b
CB
1120 'core_message_search_contacts' => array(
1121 'classname' => 'core_message_external',
1122 'methodname' => 'search_contacts',
1123 'classpath' => 'message/externallib.php',
1124 'description' => 'Search for contacts',
1125 'type' => 'read',
ee7295ee 1126 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
419b1128 1127 ),
f23e9b6b
CB
1128 'core_message_send_instant_messages' => array(
1129 'classname' => 'core_message_external',
1130 'methodname' => 'send_instant_messages',
1131 'classpath' => 'message/externallib.php',
1132 'description' => 'Send instant messages',
1133 'type' => 'write',
ee7295ee 1134 'capabilities' => 'moodle/site:sendmessage',
c060cd49 1135 'ajax' => true,
ee7295ee 1136 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
f23e9b6b 1137 ),
fb04293b
SA
1138 'core_message_get_conversation_messages' => array(
1139 'classname' => 'core_message_external',
1140 'methodname' => 'get_conversation_messages',
1141 'classpath' => 'message/externallib.php',
1142 'description' => 'Retrieve the conversation messages and relevant member information',
1143 'type' => 'read',
1144 'ajax' => true,
1145 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1146 ),
52284186
MN
1147 'core_message_unblock_user' => array(
1148 'classname' => 'core_message_external',
1149 'methodname' => 'unblock_user',
1150 'classpath' => 'message/externallib.php',
1151 'description' => 'Unblocks a user',
1152 'type' => 'write',
1153 'ajax' => true,
1154 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1155 ),
f23e9b6b
CB
1156 'core_message_unblock_contacts' => array(
1157 'classname' => 'core_message_external',
1158 'methodname' => 'unblock_contacts',
1159 'classpath' => 'message/externallib.php',
0b3eadcd
MN
1160 'description' => '** DEPRECATED ** Please do not call this function any more.
1161 Unblock contacts',
f23e9b6b 1162 'type' => 'write',
c6e97f54 1163 'ajax' => true,
ee7295ee 1164 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
5d1017e1 1165 ),
e86f0cb4
JL
1166 'core_message_get_user_notification_preferences' => array(
1167 'classname' => 'core_message_external',
1168 'methodname' => 'get_user_notification_preferences',
1169 'classpath' => 'message/externallib.php',
1170 'description' => 'Get the notification preferences for a given user.',
1171 'type' => 'read',
1172 'capabilities' => 'moodle/user:editownmessageprofile',
1173 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1174 ),
2521afd2
JL
1175 'core_message_get_user_message_preferences' => array(
1176 'classname' => 'core_message_external',
1177 'methodname' => 'get_user_message_preferences',
1178 'classpath' => 'message/externallib.php',
1179 'description' => 'Get the message preferences for a given user.',
1180 'type' => 'read',
1181 'capabilities' => 'moodle/user:editownmessageprofile',
1182 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1183 ),
5b367bae
JD
1184 'core_message_set_favourite_conversations' => array(
1185 'classname' => 'core_message_external',
1186 'methodname' => 'set_favourite_conversations',
1187 'classpath' => 'message/externallib.php',
1188 'description' => 'Mark a conversation or group of conversations as favourites/starred conversations.',
1189 'type' => 'write',
1190 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1191 ),
1192 'core_message_unset_favourite_conversations' => array(
1193 'classname' => 'core_message_external',
1194 'methodname' => 'unset_favourite_conversations',
1195 'classpath' => 'message/externallib.php',
1196 'description' => 'Unset a conversation or group of conversations as favourites/starred conversations.',
1197 'type' => 'write',
1198 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1199 ),
5d1017e1 1200 'core_notes_create_notes' => array(
f23e9b6b
CB
1201 'classname' => 'core_notes_external',
1202 'methodname' => 'create_notes',
1203 'classpath' => 'notes/externallib.php',
8d46dabb 1204 'description' => 'Create notes',
f23e9b6b 1205 'type' => 'write',
b5b81de3 1206 'ajax' => true,
ee7295ee
JL
1207 'capabilities' => 'moodle/notes:manage',
1208 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
8d46dabb 1209 ),
34348b2b 1210 'core_notes_delete_notes' => array(
f23e9b6b
CB
1211 'classname' => 'core_notes_external',
1212 'methodname' => 'delete_notes',
1213 'classpath' => 'notes/externallib.php',
34348b2b 1214 'description' => 'Delete notes',
f23e9b6b 1215 'type' => 'write',
ee7295ee
JL
1216 'capabilities' => 'moodle/notes:manage',
1217 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
f23e9b6b
CB
1218 ),
1219 'core_notes_get_course_notes' => array(
1220 'classname' => 'core_notes_external',
1221 'methodname' => 'get_course_notes',
1222 'classpath' => 'notes/externallib.php',
1223 'description' => 'Returns all notes in specified course (or site), for the specified user.',
1224 'type' => 'read',
ee7295ee
JL
1225 'capabilities' => 'moodle/notes:view',
1226 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
34348b2b 1227 ),
34348b2b 1228 'core_notes_get_notes' => array(
f23e9b6b
CB
1229 'classname' => 'core_notes_external',
1230 'methodname' => 'get_notes',
1231 'classpath' => 'notes/externallib.php',
34348b2b 1232 'description' => 'Get notes',
f23e9b6b
CB
1233 'type' => 'read',
1234 'capabilities' => 'moodle/notes:view'
34348b2b 1235 ),
34348b2b 1236 'core_notes_update_notes' => array(
f23e9b6b
CB
1237 'classname' => 'core_notes_external',
1238 'methodname' => 'update_notes',
1239 'classpath' => 'notes/externallib.php',
34348b2b 1240 'description' => 'Update notes',
f23e9b6b
CB
1241 'type' => 'write',
1242 'capabilities' => 'moodle/notes:manage'
34348b2b 1243 ),
a80b5518 1244 'core_notes_view_notes' => array(
f23e9b6b
CB
1245 'classname' => 'core_notes_external',
1246 'methodname' => 'view_notes',
1247 'classpath' => 'notes/externallib.php',
1248 'description' => 'Simulates the web interface view of notes/index.php: trigger events.',
1249 'type' => 'write',
ee7295ee
JL
1250 'capabilities' => 'moodle/notes:view',
1251 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
9028d9b5 1252 ),
f23e9b6b
CB
1253 'core_output_load_template' => array(
1254 'classname' => 'core\output\external',
1255 'methodname' => 'load_template',
1256 'description' => 'Load a template for a renderable',
1257 'type' => 'read',
5041600d
RT
1258 'loginrequired' => false,
1259 'ajax' => true,
0ff4ebb4 1260 ),
e330b1c2 1261 'core_output_load_fontawesome_icon_map' => array(
a26ce248 1262 'classname' => 'core\output\external',
e330b1c2 1263 'methodname' => 'load_fontawesome_icon_map',
a26ce248
DW
1264 'description' => 'Load the mapping of names to icons',
1265 'type' => 'read',
1266 'loginrequired' => false,
1267 'ajax' => true,
1268 ),
f23e9b6b
CB
1269 // Question related functions.
1270 'core_question_update_flag' => array(
1271 'classname' => 'core_question_external',
1272 'methodname' => 'update_flag',
1273 'description' => 'Update the flag state of a question attempt.',
1274 'type' => 'write',
1275 'capabilities' => 'moodle/question:flag',
ee7295ee 1276 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
3f0ea6d8 1277 ),
680d5c5b
SL
1278 'core_question_submit_tags_form' => array(
1279 'classname' => 'core_question_external',
1280 'methodname' => 'submit_tags_form',
1281 'description' => 'Update the question tags.',
1282 'type' => 'write',
1283 'ajax' => true,
1284 ),
6768729e
RW
1285 'core_question_get_random_question_summaries' => array(
1286 'classname' => 'core_question_external',
1287 'methodname' => 'get_random_question_summaries',
1288 'description' => 'Get the random question set for a criteria',
1289 'type' => 'read',
1290 'ajax' => true,
1291 ),
f23e9b6b
CB
1292 'core_rating_get_item_ratings' => array(
1293 'classname' => 'core_rating_external',
1294 'methodname' => 'get_item_ratings',
1295 'description' => 'Retrieve all the ratings for an item.',
1296 'type' => 'read',
ee7295ee
JL
1297 'capabilities' => 'moodle/rating:view',
1298 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
5d1017e1 1299 ),
afb7799a
JL
1300 'core_rating_add_rating' => array(
1301 'classname' => 'core_rating_external',
1302 'methodname' => 'add_rating',
1303 'description' => 'Rates an item.',
1304 'type' => 'write',
1305 'capabilities' => 'moodle/rating:rate',
1306 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1307 ),
f23e9b6b
CB
1308 'core_role_assign_roles' => array(
1309 'classname' => 'core_role_external',
1310 'methodname' => 'assign_roles',
1311 'classpath' => 'enrol/externallib.php',
1312 'description' => 'Manual role assignments.',
1313 'type' => 'write',
1314 'capabilities' => 'moodle/role:assign'
0bf486a6 1315 ),
f23e9b6b
CB
1316 'core_role_unassign_roles' => array(
1317 'classname' => 'core_role_external',
1318 'methodname' => 'unassign_roles',
1319 'classpath' => 'enrol/externallib.php',
1320 'description' => 'Manual role unassignments.',
1321 'type' => 'write',
1322 'capabilities' => 'moodle/role:assign'
11e76602 1323 ),
a6cacdd2 1324 'core_search_get_relevant_users' => array(
1325 'classname' => '\core_search\external',
1326 'methodname' => 'get_relevant_users',
1327 'description' => 'Gets relevant users for a search request.',
1328 'type' => 'read',
1329 'ajax' => true
1330 ),
f23e9b6b
CB
1331 'core_tag_get_tagindex' => array(
1332 'classname' => 'core_tag_external',
1333 'methodname' => 'get_tagindex',
1334 'description' => 'Gets tag index page for one tag and one tag area',
1335 'type' => 'read',
5041600d 1336 'ajax' => true,
11e76602 1337 ),
f23e9b6b
CB
1338 'core_tag_get_tags' => array(
1339 'classname' => 'core_tag_external',
1340 'methodname' => 'get_tags',
1341 'description' => 'Gets tags by their ids',
1342 'type' => 'read',
5041600d 1343 'ajax' => true,
11e76602 1344 ),
f23e9b6b
CB
1345 'core_tag_update_tags' => array(
1346 'classname' => 'core_tag_external',
1347 'methodname' => 'update_tags',
1348 'description' => 'Updates tags',
1349 'type' => 'write',
5041600d 1350 'ajax' => true,
cc73ea07 1351 ),
cdc5f978 1352 'core_update_inplace_editable' => array(
f23e9b6b
CB
1353 'classname' => 'core_external',
1354 'methodname' => 'update_inplace_editable',
1355 'classpath' => 'lib/external/externallib.php',
cdc5f978 1356 'description' => 'Generic service to update title',
f23e9b6b 1357 'type' => 'write',
5041600d
RT
1358 'loginrequired' => true,
1359 'ajax' => true,
c66dc3df 1360 ),
f23e9b6b
CB
1361 'core_user_add_user_device' => array(
1362 'classname' => 'core_user_external',
1363 'methodname' => 'add_user_device',
1364 'classpath' => 'user/externallib.php',
1365 'description' => 'Store mobile user devices information for PUSH Notifications.',
1366 'type' => 'write',
ee7295ee 1367 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
9bdcf579 1368 ),
f23e9b6b
CB
1369 'core_user_add_user_private_files' => array(
1370 'classname' => 'core_user_external',
1371 'methodname' => 'add_user_private_files',
1372 'classpath' => 'user/externallib.php',
1373 'description' => 'Copy files from a draft area to users private files area.',
1374 'type' => 'write',
ee7295ee
JL
1375 'capabilities' => 'moodle/user:manageownfiles',
1376 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
25c49a85 1377 ),
f23e9b6b
CB
1378 'core_user_create_users' => array(
1379 'classname' => 'core_user_external',
1380 'methodname' => 'create_users',
1381 'classpath' => 'user/externallib.php',
1382 'description' => 'Create users.',
1383 'type' => 'write',
1384 'capabilities' => 'moodle/user:create'
23b398fc 1385 ),
f23e9b6b
CB
1386 'core_user_delete_users' => array(
1387 'classname' => 'core_user_external',
1388 'methodname' => 'delete_users',
1389 'classpath' => 'user/externallib.php',
1390 'description' => 'Delete users.',
1391 'type' => 'write',
1392 'capabilities' => 'moodle/user:delete'
6c785afa 1393 ),
f23e9b6b
CB
1394 'core_user_get_course_user_profiles' => array(
1395 'classname' => 'core_user_external',
1396 'methodname' => 'get_course_user_profiles',
1397 'classpath' => 'user/externallib.php',
1398 'description' => 'Get course user profiles (each of the profils matching a course id and a user id),.',
1399 'type' => 'read',
1400 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, '
ee7295ee
JL
1401 . 'moodle/site:accessallgroups',
1402 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
6c785afa 1403 ),
f23e9b6b
CB
1404 'core_user_get_users' => array(
1405 'classname' => 'core_user_external',
1406 'methodname' => 'get_users',
1407 'classpath' => 'user/externallib.php',
1408 'description' => 'search for users matching the parameters',
1409 'type' => 'read',
1410 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update'
db5b6971 1411 ),
f23e9b6b
CB
1412 'core_user_get_users_by_field' => array(
1413 'classname' => 'core_user_external',
1414 'methodname' => 'get_users_by_field',
1415 'classpath' => 'user/externallib.php',
1416 'description' => 'Retrieve users\' information for a specified unique field - If you want to do a user search, use '
1417 . 'core_user_get_users()',
1418 'type' => 'read',
ee7295ee 1419 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update',
5041600d 1420 'ajax' => true,
ee7295ee 1421 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
8e355853 1422 ),
f23e9b6b
CB
1423 'core_user_remove_user_device' => array(
1424 'classname' => 'core_user_external',
1425 'methodname' => 'remove_user_device',
1426 'classpath' => 'user/externallib.php',
1427 'description' => 'Remove a user device from the Moodle database.',
1428 'type' => 'write',
ee7295ee 1429 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
ef4c23cc 1430 ),
c598f278 1431 'core_user_update_users' => array(
a0eabdd3 1432 'classname' => 'core_user_external',
c598f278 1433 'methodname' => 'update_users',
a0eabdd3 1434 'classpath' => 'user/externallib.php',
c598f278 1435 'description' => 'Update users.',
a0eabdd3
RW
1436 'type' => 'write',
1437 'capabilities' => 'moodle/user:update',
1438 'ajax' => true,
1439 ),
c598f278 1440 'core_user_update_user_preferences' => array(
f23e9b6b 1441 'classname' => 'core_user_external',
c598f278 1442 'methodname' => 'update_user_preferences',
f23e9b6b 1443 'classpath' => 'user/externallib.php',
c598f278 1444 'description' => 'Update a user\'s preferences',
f23e9b6b 1445 'type' => 'write',
c598f278 1446 'capabilities' => 'moodle/user:editownmessageprofile, moodle/user:editmessageprofile',
a0eabdd3 1447 'ajax' => true,
6d2f938c 1448 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
c026a28d 1449 ),
f23e9b6b
CB
1450 'core_user_view_user_list' => array(
1451 'classname' => 'core_user_external',
1452 'methodname' => 'view_user_list',
1453 'classpath' => 'user/externallib.php',
1454 'description' => 'Simulates the web-interface view of user/index.php (triggering events),.',
1455 'type' => 'write',
1456 'capabilities' => 'moodle/course:viewparticipants',
ee7295ee 1457 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
7361b968 1458 ),
f23e9b6b
CB
1459 'core_user_view_user_profile' => array(
1460 'classname' => 'core_user_external',
1461 'methodname' => 'view_user_profile',
1462 'classpath' => 'user/externallib.php',
1463 'description' => 'Simulates the web-interface view of user/view.php and user/profile.php (triggering events),.',
1464 'type' => 'write',
1465 'capabilities' => 'moodle/user:viewdetails',
ee7295ee 1466 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
f4fb827e 1467 ),
45fec983
JL
1468 'core_user_get_user_preferences' => array(
1469 'classname' => 'core_user_external',
1470 'methodname' => 'get_user_preferences',
1471 'classpath' => 'user/externallib.php',
1472 'description' => 'Return user preferences.',
1473 'type' => 'read',
1474 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1475 ),
d44e2e42
JL
1476 'core_user_update_picture' => array(
1477 'classname' => 'core_user_external',
1478 'methodname' => 'update_picture',
1479 'classpath' => 'user/externallib.php',
1480 'description' => 'Update or delete the user picture in the site',
1481 'type' => 'write',
1482 'capabilities' => 'moodle/user:editownprofile, moodle/user:editprofile',
1483 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1484 ),
649777fb
JL
1485 'core_user_set_user_preferences' => array(
1486 'classname' => 'core_user_external',
1487 'methodname' => 'set_user_preferences',
1488 'classpath' => 'user/externallib.php',
1489 'description' => 'Set user preferences.',
1490 'type' => 'write',
1491 'capabilities' => 'moodle/site:config',
5226999d 1492 'ajax' => true
649777fb 1493 ),
3e8145a3
JL
1494 'core_user_agree_site_policy' => array(
1495 'classname' => 'core_user_external',
1496 'methodname' => 'agree_site_policy',
1497 'classpath' => 'user/externallib.php',
1498 'description' => 'Agree the site policy for the current user.',
1499 'type' => 'write',
1500 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1501 ),
f74ac6e7
JL
1502 'core_user_get_private_files_info' => array(
1503 'classname' => 'core_user_external',
1504 'methodname' => 'get_private_files_info',
1505 'classpath' => 'user/externallib.php',
1506 'description' => 'Returns general information about files in the user private files area.',
1507 'type' => 'read',
1508 'capabilities' => 'moodle/user:manageownfiles',
1509 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1510 ),
649777fb 1511
81de839f
FM
1512 // Competencies functions.
1513 'core_competency_create_competency_framework' => array(
1514 'classname' => 'core_competency\external',
1515 'methodname' => 'create_competency_framework',
1516 'classpath' => '',
1517 'description' => 'Creates new competency frameworks.',
1518 'type' => 'write',
1519 'capabilities' => 'moodle/competency:competencymanage',
1520 'ajax' => true,
1521 ),
1522 'core_competency_read_competency_framework' => array(
1523 'classname' => 'core_competency\external',
1524 'methodname' => 'read_competency_framework',
1525 'classpath' => '',
1526 'description' => 'Load a summary of a competency framework.',
1527 'type' => 'read',
1528 'capabilities' => 'moodle/competency:competencyview',
1529 'ajax' => true,
1530 ),
1531 'core_competency_duplicate_competency_framework' => array(
1532 'classname' => 'core_competency\external',
1533 'methodname' => 'duplicate_competency_framework',
1534 'classpath' => '',
1535 'description' => 'Duplicate a competency framework.',
1536 'type' => 'write',
1537 'capabilities' => 'moodle/competency:competencymanage',
1538 'ajax' => true,
1539 ),
1540 'core_competency_delete_competency_framework' => array(
1541 'classname' => 'core_competency\external',
1542 'methodname' => 'delete_competency_framework',
1543 'classpath' => '',
1544 'description' => 'Delete a competency framework.',
1545 'type' => 'write',
1546 'capabilities' => 'moodle/competency:competencymanage',
1547 'ajax' => true,
1548 ),
1549 'core_competency_update_competency_framework' => array(
1550 'classname' => 'core_competency\external',
1551 'methodname' => 'update_competency_framework',
1552 'classpath' => '',
1553 'description' => 'Update a competency framework.',
1554 'type' => 'write',
1555 'capabilities' => 'moodle/competency:competencymanage',
1556 'ajax' => true,
1557 ),
1558 'core_competency_list_competency_frameworks' => array(
1559 'classname' => 'core_competency\external',
1560 'methodname' => 'list_competency_frameworks',
1561 'classpath' => '',
1562 'description' => 'Load a list of a competency frameworks.',
1563 'type' => 'read',
1564 'capabilities' => 'moodle/competency:competencyview',
1565 'ajax' => true,
1566 ),
1567 'core_competency_count_competency_frameworks' => array(
1568 'classname' => 'core_competency\external',
1569 'methodname' => 'count_competency_frameworks',
1570 'classpath' => '',
1571 'description' => 'Count a list of a competency frameworks.',
1572 'type' => 'read',
1573 'capabilities' => 'moodle/competency:competencyview',
1574 'ajax' => true,
1575 ),
1576 'core_competency_competency_framework_viewed' => array(
1577 'classname' => 'core_competency\external',
1578 'methodname' => 'competency_framework_viewed',
1579 'classpath' => '',
1580 'description' => 'Log event competency framework viewed',
1581 'type' => 'read',
1582 'capabilities' => 'moodle/competency:competencyview',
1583 'ajax' => true,
1584 ),
1585 'core_competency_create_competency' => array(
1586 'classname' => 'core_competency\external',
1587 'methodname' => 'create_competency',
1588 'classpath' => '',
1589 'description' => 'Creates new competencies.',
1590 'type' => 'write',
1591 'capabilities' => 'moodle/competency:competencymanage',
1592 'ajax' => true,
1593 ),
1594 'core_competency_read_competency' => array(
1595 'classname' => 'core_competency\external',
1596 'methodname' => 'read_competency',
1597 'classpath' => '',
1598 'description' => 'Load a summary of a competency.',
1599 'type' => 'read',
1600 'capabilities' => 'moodle/competency:competencyview',
1601 'ajax' => true,
1602 ),
1603 'core_competency_competency_viewed' => array(
1604 'classname' => 'core_competency\external',
1605 'methodname' => 'competency_viewed',
1606 'classpath' => '',
1607 'description' => 'Log event competency viewed',
1608 'type' => 'read',
1609 'capabilities' => 'moodle/competency:competencyview',
1610 'ajax' => true,
3123c2cf 1611 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
1612 ),
1613 'core_competency_delete_competency' => array(
1614 'classname' => 'core_competency\external',
1615 'methodname' => 'delete_competency',
1616 'classpath' => '',
1617 'description' => 'Delete a competency.',
1618 'type' => 'write',
1619 'capabilities' => 'moodle/competency:competencymanage',
1620 'ajax' => true,
1621 ),
1622 'core_competency_update_competency' => array(
1623 'classname' => 'core_competency\external',
1624 'methodname' => 'update_competency',
1625 'classpath' => '',
1626 'description' => 'Update a competency.',
1627 'type' => 'write',
1628 'capabilities' => 'moodle/competency:competencymanage',
1629 'ajax' => true,
1630 ),
1631 'core_competency_list_competencies' => array(
1632 'classname' => 'core_competency\external',
1633 'methodname' => 'list_competencies',
1634 'classpath' => '',
1635 'description' => 'Load a list of a competencies.',
1636 'type' => 'read',
1637 'capabilities' => 'moodle/competency:competencyview',
1638 'ajax' => true,
1639 ),
1640 'core_competency_list_competencies_in_template' => array(
1641 'classname' => 'core_competency\external',
1642 'methodname' => 'list_competencies_in_template',
1643 'classpath' => '',
1644 'description' => 'Load a list of a competencies for a given template.',
1645 'type' => 'read',
1646 'capabilities' => 'moodle/competency:competencyview',
1647 'ajax' => true,
1648 ),
1649 'core_competency_count_competencies' => array(
1650 'classname' => 'core_competency\external',
1651 'methodname' => 'count_competencies',
1652 'classpath' => '',
1653 'description' => 'Count a list of a competencies.',
1654 'type' => 'read',
1655 'capabilities' => 'moodle/competency:competencyview',
1656 'ajax' => true,
1657 ),
1658 'core_competency_count_competencies_in_template' => array(
1659 'classname' => 'core_competency\external',
1660 'methodname' => 'count_competencies_in_template',
1661 'classpath' => '',
1662 'description' => 'Count a list of a competencies for a given template.',
1663 'type' => 'read',
1664 'capabilities' => 'moodle/competency:competencyview',
1665 'ajax' => true,
1666 ),
1667 'core_competency_search_competencies' => array(
1668 'classname' => 'core_competency\external',
1669 'methodname' => 'search_competencies',
1670 'classpath' => '',
1671 'description' => 'Search a list of a competencies.',
1672 'type' => 'read',
1673 'capabilities' => 'moodle/competency:competencyview',
1674 'ajax' => true,
1675 ),
1676 'core_competency_set_parent_competency' => array(
1677 'classname' => 'core_competency\external',
1678 'methodname' => 'set_parent_competency',
1679 'classpath' => '',
1680 'description' => 'Set a new parent for a competency.',
1681 'type' => 'write',
1682 'capabilities' => 'moodle/competency:competencymanage',
1683 'ajax' => true,
1684 ),
1685 'core_competency_move_up_competency' => array(
1686 'classname' => 'core_competency\external',
1687 'methodname' => 'move_up_competency',
1688 'classpath' => '',
1689 'description' => 'Re-order a competency.',
1690 'type' => 'write',
1691 'capabilities' => 'moodle/competency:competencymanage',
1692 'ajax' => true,
1693 ),
1694 'core_competency_move_down_competency' => array(
1695 'classname' => 'core_competency\external',
1696 'methodname' => 'move_down_competency',
1697 'classpath' => '',
1698 'description' => 'Re-order a competency.',
1699 'type' => 'write',
1700 'capabilities' => 'moodle/competency:competencymanage',
1701 'ajax' => true,
1702 ),
1703 'core_competency_list_course_competencies' => array(
1704 'classname' => 'core_competency\external',
1705 'methodname' => 'list_course_competencies',
1706 'classpath' => '',
1707 'description' => 'List the competencies in a course',
1708 'type' => 'read',
1709 'capabilities' => 'moodle/competency:coursecompetencyview',
1710 'ajax' => true,
3123c2cf 1711 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
1712 ),
1713 'core_competency_count_competencies_in_course' => array(
1714 'classname' => 'core_competency\external',
1715 'methodname' => 'count_competencies_in_course',
1716 'classpath' => '',
1717 'description' => 'List the competencies in a course',
1718 'type' => 'read',
1719 'capabilities' => 'moodle/competency:coursecompetencyview',
1720 'ajax' => true,
1721 ),
1722 'core_competency_count_courses_using_competency' => array(
1723 'classname' => 'core_competency\external',
1724 'methodname' => 'count_courses_using_competency',
1725 'classpath' => '',
1726 'description' => 'List the courses using a competency',
1727 'type' => 'read',
1728 'capabilities' => 'moodle/competency:coursecompetencyview',
1729 'ajax' => true,
1730 ),
1731 'core_competency_add_competency_to_course' => array(
1732 'classname' => 'core_competency\external',
1733 'methodname' => 'add_competency_to_course',
1734 'classpath' => '',
1735 'description' => 'Add the competency to a course',
1736 'type' => 'write',
1737 'capabilities' => 'moodle/competency:coursecompetencymanage',
1738 'ajax' => true,
1739 ),
1740 'core_competency_add_competency_to_template' => array(
1741 'classname' => 'core_competency\external',
1742 'methodname' => 'add_competency_to_template',
1743 'classpath' => '',
1744 'description' => 'Add the competency to a template',
1745 'type' => 'write',
1746 'capabilities' => 'moodle/competency:templatemanage',
1747 'ajax' => true,
1748 ),
1749 'core_competency_remove_competency_from_course' => array(
1750 'classname' => 'core_competency\external',
1751 'methodname' => 'remove_competency_from_course',
1752 'classpath' => '',
1753 'description' => 'Remove a competency from a course',
1754 'type' => 'write',
1755 'capabilities' => 'moodle/competency:coursecompetencymanage',
1756 'ajax' => true,
1757 ),
1758 'core_competency_set_course_competency_ruleoutcome' => array(
1759 'classname' => 'core_competency\external',
1760 'methodname' => 'set_course_competency_ruleoutcome',
1761 'classpath' => '',
1762 'description' => 'Modify the ruleoutcome value for course competency',
1763 'type' => 'write',
1764 'capabilities' => 'moodle/competency:coursecompetencymanage',
1765 'ajax' => true,
1766 ),
1767 'core_competency_remove_competency_from_template' => array(
1768 'classname' => 'core_competency\external',
1769 'methodname' => 'remove_competency_from_template',
1770 'classpath' => '',
1771 'description' => 'Remove a competency from a template',
1772 'type' => 'write',
1773 'capabilities' => 'moodle/competency:templatemanage',
1774 'ajax' => true,
1775 ),
1776 'core_competency_reorder_course_competency' => array(
1777 'classname' => 'core_competency\external',
1778 'methodname' => 'reorder_course_competency',
1779 'classpath' => '',
1780 'description' => 'Move a course competency to a new relative sort order.',
1781 'type' => 'write',
1782 'capabilities' => 'moodle/competency:coursecompetencymanage',
1783 'ajax' => true,
1784 ),
1785 'core_competency_reorder_template_competency' => array(
1786 'classname' => 'core_competency\external',
1787 'methodname' => 'reorder_template_competency',
1788 'classpath' => '',
1789 'description' => 'Move a template competency to a new relative sort order.',
1790 'type' => 'write',
1791 'capabilities' => 'moodle/competency:templatemanage',
1792 'ajax' => true,
1793 ),
1794 'core_competency_create_template' => array(
1795 'classname' => 'core_competency\external',
1796 'methodname' => 'create_template',
1797 'classpath' => '',
1798 'description' => 'Creates new learning plan templates.',
1799 'type' => 'write',
1800 'capabilities' => 'moodle/competency:templatemanage',
1801 'ajax' => true,
1802 ),
1803 'core_competency_duplicate_template' => array(
1804 'classname' => 'core_competency\external',
1805 'methodname' => 'duplicate_template',
1806 'classpath' => '',
1807 'description' => 'Duplicate learning plan template.',
1808 'type' => 'write',
1809 'capabilities' => 'moodle/competency:templatemanage',
1810 'ajax' => true,
1811 ),
1812 'core_competency_read_template' => array(
1813 'classname' => 'core_competency\external',
1814 'methodname' => 'read_template',
1815 'classpath' => '',
1816 'description' => 'Load a summary of a learning plan template.',
1817 'type' => 'read',
1818 'capabilities' => 'moodle/competency:templateview',
1819 'ajax' => true,
1820 ),
1821 'core_competency_delete_template' => array(
1822 'classname' => 'core_competency\external',
1823 'methodname' => 'delete_template',
1824 'classpath' => '',
1825 'description' => 'Delete a learning plan template.',
1826 'type' => 'write',
1827 'capabilities' => 'moodle/competency:templatemanage',
1828 'ajax' => true,
1829 ),
1830 'core_competency_update_template' => array(
1831 'classname' => 'core_competency\external',
1832 'methodname' => 'update_template',
1833 'classpath' => '',
1834 'description' => 'Update a learning plan template.',
1835 'type' => 'write',
1836 'capabilities' => 'moodle/competency:templatemanage',
1837 'ajax' => true,
1838 ),
1839 'core_competency_list_templates' => array(
1840 'classname' => 'core_competency\external',
1841 'methodname' => 'list_templates',
1842 'classpath' => '',
1843 'description' => 'Load a list of a learning plan templates.',
1844 'type' => 'read',
1845 'capabilities' => 'moodle/competency:templateview',
1846 'ajax' => true,
1847 ),
1848 'core_competency_list_templates_using_competency' => array(
1849 'classname' => 'core_competency\external',
1850 'methodname' => 'list_templates_using_competency',
1851 'classpath' => '',
1852 'description' => 'Load a list of a learning plan templates for a given competency.',
1853 'type' => 'read',
1854 'capabilities' => 'moodle/competency:templateview',
1855 'ajax' => true,
1856 ),
1857 'core_competency_count_templates' => array(
1858 'classname' => 'core_competency\external',
1859 'methodname' => 'count_templates',
1860 'classpath' => '',
1861 'description' => 'Count a list of a learning plan templates.',
1862 'type' => 'read',
1863 'capabilities' => 'moodle/competency:templateview',
1864 'ajax' => true,
1865 ),
1866 'core_competency_count_templates_using_competency' => array(
1867 'classname' => 'core_competency\external',
1868 'methodname' => 'count_templates_using_competency',
1869 'classpath' => '',
1870 'description' => 'Count a list of a learning plan templates for a given competency.',
1871 'type' => 'read',
1872 'capabilities' => 'moodle/competency:templateview',
1873 'ajax' => true,
1874 ),
1875 'core_competency_create_plan' => array(
1876 'classname' => 'core_competency\external',
1877 'methodname' => 'create_plan',
1878 'classpath' => '',
1879 'description' => 'Creates a learning plan.',
1880 'type' => 'write',
1881 'capabilities' => 'moodle/competency:planmanage',
1882 'ajax' => true,
1883 ),
1884 'core_competency_update_plan' => array(
1885 'classname' => 'core_competency\external',
1886 'methodname' => 'update_plan',
1887 'classpath' => '',
1888 'description' => 'Updates a learning plan.',
1889 'type' => 'write',
1890 'capabilities' => 'moodle/competency:planmanage',
1891 'ajax' => true,
1892 ),
1893 'core_competency_complete_plan' => array(
1894 'classname' => 'core_competency\external',
1895 'methodname' => 'complete_plan',
1896 'classpath' => '',
1897 'description' => 'Complete learning plan.',
1898 'type' => 'write',
1899 'capabilities' => 'moodle/competency:planmanage',
1900 'ajax' => true,
1901 ),
1902 'core_competency_reopen_plan' => array(
1903 'classname' => 'core_competency\external',
1904 'methodname' => 'reopen_plan',
1905 'classpath' => '',
1906 'description' => 'Reopen learning plan.',
1907 'type' => 'write',
1908 'capabilities' => 'moodle/competency:planmanage',
1909 'ajax' => true,
1910 ),
1911 'core_competency_read_plan' => array(
1912 'classname' => 'core_competency\external',
1913 'methodname' => 'read_plan',
1914 'classpath' => '',
1915 'description' => 'Load a learning plan.',
1916 'type' => 'read',
1917 'capabilities' => 'moodle/competency:planviewown',
1918 'ajax' => true,
1919 ),
1920 'core_competency_delete_plan' => array(
1921 'classname' => 'core_competency\external',
1922 'methodname' => 'delete_plan',
1923 'classpath' => '',
1924 'description' => 'Delete a learning plan.',
1925 'type' => 'write',
1926 'capabilities' => 'moodle/competency:planmanage',
1927 'ajax' => true,
1928 ),
1929 'core_competency_list_user_plans' => array(
1930 'classname' => 'core_competency\external',
1931 'methodname' => 'list_user_plans',
1932 'classpath' => '',
1933 'description' => 'List a user\'s learning plans.',
1934 'type' => 'read',
1935 'capabilities' => 'moodle/competency:planviewown',
1936 'ajax' => true,
1937 ),
1938 'core_competency_list_plan_competencies' => array(
1939 'classname' => 'core_competency\external',
1940 'methodname' => 'list_plan_competencies',
1941 'classpath' => '',
1942 'description' => 'List the competencies in a plan',
1943 'type' => 'read',
1944 'capabilities' => 'moodle/competency:planviewown',
1945 'ajax' => true,
1946 ),
1947 'core_competency_add_competency_to_plan' => array(
1948 'classname' => 'core_competency\external',
1949 'methodname' => 'add_competency_to_plan',
1950 'classpath' => '',
1951 'description' => 'Add the competency to a learning plan',
1952 'type' => 'write',
1953 'capabilities' => 'moodle/competency:planmanage',
1954 'ajax' => true,
1955 ),
1956 'core_competency_remove_competency_from_plan' => array(
1957 'classname' => 'core_competency\external',
1958 'methodname' => 'remove_competency_from_plan',
1959 'classpath' => '',
1960 'description' => 'Remove the competency from a learning plan',
1961 'type' => 'write',
1962 'capabilities' => 'moodle/competency:planmanage',
1963 'ajax' => true,
1964 ),
1965 'core_competency_reorder_plan_competency' => array(
1966 'classname' => 'core_competency\external',
1967 'methodname' => 'reorder_plan_competency',
1968 'classpath' => '',
1969 'description' => 'Move a plan competency to a new relative sort order.',
1970 'type' => 'write',
1971 'capabilities' => 'moodle/competency:planmanage',
1972 'ajax' => true,
1973 ),
1974 'core_competency_plan_request_review' => array(
1975 'classname' => 'core_competency\external',
1976 'methodname' => 'plan_request_review',
1977 'classpath' => '',
1978 'description' => 'Request for a plan to be reviewed.',
1979 'type' => 'write',
1980 'capabilities' => 'moodle/competency:planmanagedraft',
1981 'ajax' => true,
1982 ),
1983 'core_competency_plan_start_review' => array(
1984 'classname' => 'core_competency\external',
1985 'methodname' => 'plan_start_review',
1986 'classpath' => '',
1987 'description' => 'Start the review of a plan.',
1988 'type' => 'write',
1989 'capabilities' => 'moodle/competency:planmanage',
1990 'ajax' => true,
1991 ),
1992 'core_competency_plan_stop_review' => array(
1993 'classname' => 'core_competency\external',
1994 'methodname' => 'plan_stop_review',
1995 'classpath' => '',
1996 'description' => 'Stop the review of a plan.',
1997 'type' => 'write',
1998 'capabilities' => 'moodle/competency:planmanage',
1999 'ajax' => true,
2000 ),
2001 'core_competency_plan_cancel_review_request' => array(
2002 'classname' => 'core_competency\external',
2003 'methodname' => 'plan_cancel_review_request',
2004 'classpath' => '',
2005 'description' => 'Cancel the review of a plan.',
2006 'type' => 'write',
2007 'capabilities' => 'moodle/competency:planmanagedraft',
2008 'ajax' => true,
2009 ),
2010 'core_competency_approve_plan' => array(
2011 'classname' => 'core_competency\external',
2012 'methodname' => 'approve_plan',
2013 'classpath' => '',
2014 'description' => 'Approve a plan.',
2015 'type' => 'write',
2016 'capabilities' => 'moodle/competency:planmanage',
2017 'ajax' => true,
2018 ),
2019 'core_competency_unapprove_plan' => array(
2020 'classname' => 'core_competency\external',
2021 'methodname' => 'unapprove_plan',
2022 'classpath' => '',
2023 'description' => 'Unapprove a plan.',
2024 'type' => 'write',
2025 'capabilities' => 'moodle/competency:planmanage',
2026 'ajax' => true,
2027 ),
2028 'core_competency_template_has_related_data' => array(
2029 'classname' => 'core_competency\external',
2030 'methodname' => 'template_has_related_data',
2031 'classpath' => '',
2032 'description' => 'Check if a template has related data',
2033 'type' => 'read',
2034 'capabilities' => 'moodle/competency:templateview',
2035 'ajax' => true,
2036 ),
2037 'core_competency_get_scale_values' => array(
2038 'classname' => 'core_competency\external',
2039 'methodname' => 'get_scale_values',
2040 'classpath' => '',
2041 'description' => 'Fetch the values for a specific scale',
2042 'type' => 'read',
2043 'capabilities' => 'moodle/competency:competencymanage',
2044 'ajax' => true,
3123c2cf 2045 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
2046 ),
2047 'core_competency_add_related_competency' => array(
2048 'classname' => 'core_competency\external',
2049 'methodname' => 'add_related_competency',
2050 'classpath' => '',
2051 'description' => 'Adds a related competency',
2052 'type' => 'write',
2053 'capabilities' => 'moodle/competency:competencymanage',
2054 'ajax' => true,
2055 ),
2056 'core_competency_remove_related_competency' => array(
2057 'classname' => 'core_competency\external',
2058 'methodname' => 'remove_related_competency',
2059 'classpath' => '',
2060 'description' => 'Remove a related competency',
2061 'type' => 'write',
2062 'capabilities' => 'moodle/competency:competencymanage',
2063 'ajax' => true,
2064 ),
2065 'core_competency_read_user_evidence' => array(
2066 'classname' => 'core_competency\external',
2067 'methodname' => 'read_user_evidence',
2068 'classpath' => '',
2069 'description' => 'Read an evidence of prior learning.',
2070 'type' => 'read',
2071 'capabilities' => 'moodle/competency:userevidenceview',
2072 'ajax' => true,
2073 ),
2074 'core_competency_delete_user_evidence' => array(
2075 'classname' => 'core_competency\external',
2076 'methodname' => 'delete_user_evidence',
2077 'classpath' => '',
2078 'description' => 'Delete an evidence of prior learning.',
2079 'type' => 'write',
2080 'capabilities' => 'moodle/competency:userevidencemanageown',
2081 'ajax' => true,
2082 ),
2083 'core_competency_create_user_evidence_competency' => array(
2084 'classname' => 'core_competency\external',
2085 'methodname' => 'create_user_evidence_competency',
2086 'classpath' => '',
2087 'description' => 'Create an evidence of prior learning relationship with a competency.',
2088 'type' => 'read',
2089 'capabilities' => 'moodle/competency:userevidencemanageown, moodle/competency:competencyview',
2090 'ajax' => true,
2091 ),
2092 'core_competency_delete_user_evidence_competency' => array(
2093 'classname' => 'core_competency\external',
2094 'methodname' => 'delete_user_evidence_competency',
2095 'classpath' => '',
2096 'description' => 'Delete an evidence of prior learning relationship with a competency.',
2097 'type' => 'write',
2098 'capabilities' => 'moodle/competency:userevidencemanageown',
2099 'ajax' => true,
2100 ),
2101 'core_competency_user_competency_cancel_review_request' => array(
2102 'classname' => 'core_competency\external',
2103 'methodname' => 'user_competency_cancel_review_request',
2104 'classpath' => '',
2105 'description' => 'Cancel a review request.',
2106 'type' => 'write',
2107 'capabilities' => 'moodle/competency:userevidencemanageown',
2108 'ajax' => true,
2109 ),
2110 'core_competency_user_competency_request_review' => array(
2111 'classname' => 'core_competency\external',
2112 'methodname' => 'user_competency_request_review',
2113 'classpath' => '',
2114 'description' => 'Request a review.',
2115 'type' => 'write',
2116 'capabilities' => 'moodle/competency:userevidencemanageown',
2117 'ajax' => true,
2118 ),
2119 'core_competency_user_competency_start_review' => array(
2120 'classname' => 'core_competency\external',
2121 'methodname' => 'user_competency_start_review',
2122 'classpath' => '',
2123 'description' => 'Start a review.',
2124 'type' => 'write',
2125 'capabilities' => 'moodle/competency:competencygrade',
2126 'ajax' => true,
2127 ),
2128 'core_competency_user_competency_stop_review' => array(
2129 'classname' => 'core_competency\external',
2130 'methodname' => 'user_competency_stop_review',
2131 'classpath' => '',
2132 'description' => 'Stop a review.',
2133 'type' => 'write',
2134 'capabilities' => 'moodle/competency:competencygrade',
2135 'ajax' => true,
2136 ),
2137 'core_competency_user_competency_viewed' => array(
2138 'classname' => 'core_competency\external',
2139 'methodname' => 'user_competency_viewed',
2140 'classpath' => '',
2141 'description' => 'Log the user competency viewed event.',
2142 'type' => 'read',
2143 'capabilities' => 'moodle/competency:usercompetencyview',
2144 'ajax' => true,
3123c2cf 2145 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
2146 ),
2147 'core_competency_user_competency_viewed_in_plan' => array(
2148 'classname' => 'core_competency\external',
2149 'methodname' => 'user_competency_viewed_in_plan',
2150 'classpath' => '',
2151 'description' => 'Log the user competency viewed in plan event.',
2152 'type' => 'read',
2153 'capabilities' => 'moodle/competency:usercompetencyview',
2154 'ajax' => true,
3123c2cf 2155 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
2156 ),
2157 'core_competency_user_competency_viewed_in_course' => array(
2158 'classname' => 'core_competency\external',
2159 'methodname' => 'user_competency_viewed_in_course',
2160 'classpath' => '',
2161 'description' => 'Log the user competency viewed in course event',
2162 'type' => 'read',
2163 'capabilities' => 'moodle/competency:usercompetencyview',
2164 'ajax' => true,
3123c2cf 2165 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
2166 ),
2167 'core_competency_user_competency_plan_viewed' => array(
2168 'classname' => 'core_competency\external',
2169 'methodname' => 'user_competency_plan_viewed',
2170 'classpath' => '',
2171 'description' => 'Log the user competency plan viewed event.',
2172 'type' => 'read',
2173 'capabilities' => 'moodle/competency:usercompetencyview',
2174 'ajax' => true,
3123c2cf 2175 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
2176 ),
2177 'core_competency_grade_competency' => array(
2178 'classname' => 'core_competency\external',
2179 'methodname' => 'grade_competency',
2180 'classpath' => '',
2181 'description' => 'Grade a competency.',
2182 'type' => 'write',
2183 'capabilities' => 'moodle/competency:competencygrade',
2184 'ajax' => true,
2185 ),
2186 'core_competency_grade_competency_in_plan' => array(
2187 'classname' => 'core_competency\external',
2188 'methodname' => 'grade_competency_in_plan',
2189 'classpath' => '',
2190 'description' => 'Grade a competency from the user plan page.',
2191 'type' => 'write',
2192 'capabilities' => 'moodle/competency:competencygrade',
2193 'ajax' => true,
2194 ),
2195 'core_competency_grade_competency_in_course' => array(
2196 'classname' => 'core_competency\external',
2197 'methodname' => 'grade_competency_in_course',
2198 'classpath' => '',
2199 'description' => 'Grade a competency from the course page.',
2200 'type' => 'write',
2201 'capabilities' => 'moodle/competency:competencygrade',
2202 'ajax' => true,
3123c2cf 2203 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
2204 ),
2205 'core_competency_unlink_plan_from_template' => array(
2206 'classname' => 'core_competency\external',
2207 'methodname' => 'unlink_plan_from_template',
2208 'classpath' => '',
2209 'description' => 'Unlink a plan form it template.',
2210 'type' => 'write',
2211 'capabilities' => 'moodle/competency:planmanage',
2212 'ajax' => true,
2213 ),
2214 'core_competency_template_viewed' => array(
2215 'classname' => 'core_competency\external',
2216 'methodname' => 'template_viewed',
2217 'classpath' => '',
2218 'description' => 'Log event template viewed',
2219 'type' => 'read',
2220 'capabilities' => 'moodle/competency:templateview',
2221 'ajax' => true,
2222 ),
2223 'core_competency_request_review_of_user_evidence_linked_competencies' => array(
2224 'classname' => 'core_competency\external',
2225 'methodname' => 'request_review_of_user_evidence_linked_competencies',
2226 'classpath' => '',
2227 'description' => 'Send user evidence competencies in review',
2228 'type' => 'write',
2229 'capabilities' => 'moodle/competency:userevidencemanageown',
2230 'ajax' => true,
2231 ),
2232 'core_competency_update_course_competency_settings' => array(
2233 'classname' => 'core_competency\external',
2234 'methodname' => 'update_course_competency_settings',
2235 'classpath' => '',
2236 'description' => 'Update the course competency settings',
2237 'type' => 'write',
2238 'capabilities' => 'moodle/competency:coursecompetencyconfigure',
2239 'ajax' => true,
2240 ),
1e99f31e
FM
2241 'core_competency_delete_evidence' => array(
2242 'classname' => 'core_competency\external',
2243 'methodname' => 'delete_evidence',
2244 'classpath' => '',
2245 'description' => 'Delete an evidence',
2246 'type' => 'write',
2247 'capabilities' => 'moodle/competency:evidencedelete',
2248 'ajax' => true,
3123c2cf 2249 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1e99f31e 2250 ),
f23e9b6b
CB
2251
2252 'core_webservice_get_site_info' => array(
2253 'classname' => 'core_webservice_external',
2254 'methodname' => 'get_site_info',
2255 'classpath' => 'webservice/externallib.php',
2256 'description' => 'Return some site info / user info / list web service functions',
2257 'type' => 'read',
ee7295ee 2258 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
8446ba36
JL
2259 ),
2260
2261 // Blocks functions.
2262 'core_block_get_course_blocks' => array(
2263 'classname' => 'core_block_external',
2264 'methodname' => 'get_course_blocks',
2265 'description' => 'Returns blocks information for a course.',
2266 'type' => 'read',
2267 'capabilities' => '',
2268 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2269 ),
66ef16d3 2270
0f8b2604
JL
2271 'core_block_get_dashboard_blocks' => array(
2272 'classname' => 'core_block_external',
2273 'methodname' => 'get_dashboard_blocks',
2274 'description' => 'Returns blocks information for the given user dashboard.',
2275 'type' => 'read',
2276 'capabilities' => '',
2277 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2278 ),
2279
66ef16d3
JL
2280 // Filters functions.
2281 'core_filters_get_available_in_context' => array(
2282 'classname' => 'core_filters\external',
2283 'methodname' => 'get_available_in_context',
2284 'description' => 'Returns the filters available in the given contexts.',
2285 'type' => 'read',
2286 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
3cfff885
BB
2287 ),
2288 'core_course_set_favourite_courses' => array(
2289 'classname' => 'core_course_external',
2290 'methodname' => 'set_favourite_courses',
2291 'classpath' => 'course/externallib.php',
2292 'description' => 'Add a list of courses to the list of favourite courses.',
2293 'type' => 'read',
2294 'ajax' => true
66ef16d3 2295 )
9a0df45a 2296);
c1b65883
JM
2297
2298$services = array(
96e0194c 2299 'Moodle mobile web service' => array(
12c52b91 2300 'functions' => array(), // Unused as we add the service in each function definition, third party services would use this.
96e0194c
SH
2301 'enabled' => 0,
2302 'restrictedusers' => 0,
af03513f 2303 'shortname' => MOODLE_OFFICIAL_MOBILE_SERVICE,
106c55fb
DW
2304 'downloadfiles' => 1,
2305 'uploadfiles' => 1
96e0194c
SH
2306 ),
2307);