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