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