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