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