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