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