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