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