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