MDL-57975 javascript: add sessionstorage.js
[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 ),
f23e9b6b
CB
476 'core_grades_get_grades' => array(
477 'classname' => 'core_grades_external',
478 'methodname' => 'get_grades',
aa7e371a
JL
479 'description' => '** DEPRECATED ** Please do not call this function any more.
480 Returns student course total grade and grades for activities.
f23e9b6b
CB
481 This function does not return category or manual items.
482 This function is suitable for managers or teachers not students.',
483 'type' => 'read',
484 'capabilities' => 'moodle/grade:view, moodle/grade:viewall, moodle/grade:viewhidden'
e9b66095 485 ),
f23e9b6b
CB
486 'core_grades_update_grades' => array(
487 'classname' => 'core_grades_external',
488 'methodname' => 'update_grades',
489 'description' => 'Update a grade item and associated student grades.',
490 'type' => 'write',
5d1017e1 491 ),
f23e9b6b
CB
492 'core_grading_get_definitions' => array(
493 'classname' => 'core_grading_external',
494 'methodname' => 'get_definitions',
495 'description' => 'Get grading definitions',
496 'type' => 'read',
e9b66095 497 ),
f23e9b6b
CB
498 'core_grading_get_gradingform_instances' => array(
499 'classname' => 'core_grading_external',
500 'methodname' => 'get_gradingform_instances',
501 'description' => 'Get grading form instances',
502 'type' => 'read',
f2229c68 503 ),
f23e9b6b
CB
504 'core_grading_save_definitions' => array(
505 'classname' => 'core_grading_external',
506 'methodname' => 'save_definitions',
507 'description' => 'Save grading definitions',
508 'type' => 'write',
5d1017e1 509 ),
f23e9b6b
CB
510 'core_group_add_group_members' => array(
511 'classname' => 'core_group_external',
512 'methodname' => 'add_group_members',
513 'classpath' => 'group/externallib.php',
514 'description' => 'Adds group members.',
515 'type' => 'write',
516 'capabilities' => 'moodle/course:managegroups',
6bb31e40 517 ),
f23e9b6b
CB
518 'core_group_assign_grouping' => array(
519 'classname' => 'core_group_external',
520 'methodname' => 'assign_grouping',
521 'classpath' => 'group/externallib.php',
522 'description' => 'Assing groups from groupings',
523 'type' => 'write',
740c354f 524 ),
f23e9b6b
CB
525 'core_group_create_groupings' => array(
526 'classname' => 'core_group_external',
527 'methodname' => 'create_groupings',
528 'classpath' => 'group/externallib.php',
529 'description' => 'Creates new groupings',
530 'type' => 'write',
5d1017e1 531 ),
f23e9b6b
CB
532 'core_group_create_groups' => array(
533 'classname' => 'core_group_external',
534 'methodname' => 'create_groups',
535 'classpath' => 'group/externallib.php',
536 'description' => 'Creates new groups.',
537 'type' => 'write',
538 'capabilities' => 'moodle/course:managegroups'
6bb31e40 539 ),
f23e9b6b
CB
540 'core_group_delete_group_members' => array(
541 'classname' => 'core_group_external',
542 'methodname' => 'delete_group_members',
543 'classpath' => 'group/externallib.php',
544 'description' => 'Deletes group members.',
0a4f3eb2 545 'type' => 'write',
f23e9b6b 546 'capabilities' => 'moodle/course:managegroups'
63a85dc7 547 ),
f23e9b6b
CB
548 'core_group_delete_groupings' => array(
549 'classname' => 'core_group_external',
550 'methodname' => 'delete_groupings',
551 'classpath' => 'group/externallib.php',
552 'description' => 'Deletes all specified groupings.',
79949c1b 553 'type' => 'write',
79949c1b 554 ),
f23e9b6b
CB
555 'core_group_delete_groups' => array(
556 'classname' => 'core_group_external',
557 'methodname' => 'delete_groups',
558 'classpath' => 'group/externallib.php',
559 'description' => 'Deletes all specified groups.',
0a4f3eb2 560 'type' => 'write',
f23e9b6b 561 'capabilities' => 'moodle/course:managegroups'
3dc1d76e 562 ),
f23e9b6b
CB
563 'core_group_get_activity_allowed_groups' => array(
564 'classname' => 'core_group_external',
565 'methodname' => 'get_activity_allowed_groups',
566 'classpath' => 'group/externallib.php',
567 'description' => 'Gets a list of groups that the user is allowed to access within the specified activity.',
568 'type' => 'read',
ee7295ee 569 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
791723c3 570 ),
f23e9b6b
CB
571 'core_group_get_activity_groupmode' => array(
572 'classname' => 'core_group_external',
573 'methodname' => 'get_activity_groupmode',
574 'classpath' => 'group/externallib.php',
575 'description' => 'Returns effective groupmode used in a given activity.',
576 'type' => 'read',
ee7295ee 577 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
c4f7bf29 578 ),
f23e9b6b
CB
579 'core_group_get_course_groupings' => array(
580 'classname' => 'core_group_external',
581 'methodname' => 'get_course_groupings',
582 'classpath' => 'group/externallib.php',
583 'description' => 'Returns all groupings in specified course.',
584 'type' => 'read',
c5158499 585 ),
f23e9b6b
CB
586 'core_group_get_course_groups' => array(
587 'classname' => 'core_group_external',
588 'methodname' => 'get_course_groups',
589 'classpath' => 'group/externallib.php',
590 'description' => 'Returns all groups in specified course.',
591 'type' => 'read',
592 'capabilities' => 'moodle/course:managegroups'
13bb6819 593 ),
f23e9b6b
CB
594 'core_group_get_course_user_groups' => array(
595 'classname' => 'core_group_external',
596 'methodname' => 'get_course_user_groups',
597 'classpath' => 'group/externallib.php',
598 'description' => 'Returns all groups in specified course for the specified user.',
599 'type' => 'read',
ee7295ee
JL
600 'capabilities' => 'moodle/course:managegroups',
601 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
3ec163dd 602 ),
f23e9b6b
CB
603 'core_group_get_group_members' => array(
604 'classname' => 'core_group_external',
605 'methodname' => 'get_group_members',
606 'classpath' => 'group/externallib.php',
607 'description' => 'Returns group members.',
608 'type' => 'read',
609 'capabilities' => 'moodle/course:managegroups'
479a5db1 610 ),
f23e9b6b
CB
611 'core_group_get_groupings' => array(
612 'classname' => 'core_group_external',
613 'methodname' => 'get_groupings',
614 'classpath' => 'group/externallib.php',
615 'description' => 'Returns groupings details.',
616 'type' => 'read',
3ec163dd 617 ),
f23e9b6b
CB
618 'core_group_get_groups' => array(
619 'classname' => 'core_group_external',
620 'methodname' => 'get_groups',
621 'classpath' => 'group/externallib.php',
622 'description' => 'Returns group details.',
623 'type' => 'read',
624 'capabilities' => 'moodle/course:managegroups'
2f951d86 625 ),
f23e9b6b
CB
626 'core_group_unassign_grouping' => array(
627 'classname' => 'core_group_external',
628 'methodname' => 'unassign_grouping',
629 'classpath' => 'group/externallib.php',
630 'description' => 'Unassing groups from groupings',
631 'type' => 'write',
8430d87b 632 ),
f23e9b6b
CB
633 'core_group_update_groupings' => array(
634 'classname' => 'core_group_external',
635 'methodname' => 'update_groupings',
636 'classpath' => 'group/externallib.php',
637 'description' => 'Updates existing groupings',
638 'type' => 'write',
5d1017e1 639 ),
f23e9b6b
CB
640 'core_message_block_contacts' => array(
641 'classname' => 'core_message_external',
642 'methodname' => 'block_contacts',
643 'classpath' => 'message/externallib.php',
644 'description' => 'Block contacts',
645 'type' => 'write',
c6e97f54 646 'ajax' => true,
ee7295ee 647 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
a623b6b8 648 ),
d6731600 649 'core_message_create_contacts' => array(
f23e9b6b
CB
650 'classname' => 'core_message_external',
651 'methodname' => 'create_contacts',
652 'classpath' => 'message/externallib.php',
d6731600 653 'description' => 'Add contacts to the contact list',
f23e9b6b 654 'type' => 'write',
c6e97f54 655 'ajax' => true,
ee7295ee 656 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
12d8c7b2 657 'ajax' => true,
d6731600 658 ),
d6731600 659 'core_message_delete_contacts' => array(
f23e9b6b
CB
660 'classname' => 'core_message_external',
661 'methodname' => 'delete_contacts',
662 'classpath' => 'message/externallib.php',
d6731600 663 'description' => 'Remove contacts from the contact list',
f23e9b6b 664 'type' => 'write',
c6e97f54 665 'ajax' => true,
ee7295ee 666 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
12d8c7b2 667 'ajax' => true,
d6731600 668 ),
dec0cd99
MN
669 'core_message_delete_conversation' => array(
670 'classname' => 'core_message_external',
671 'methodname' => 'delete_conversation',
672 'classpath' => 'message/externallib.php',
673 'description' => 'Deletes a conversation.',
674 'type' => 'write',
675 'capabilities' => 'moodle/site:deleteownmessage',
676 'ajax' => true,
53522c6e 677 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
dec0cd99 678 ),
f23e9b6b
CB
679 'core_message_delete_message' => array(
680 'classname' => 'core_message_external',
681 'methodname' => 'delete_message',
682 'classpath' => 'message/externallib.php',
683 'description' => 'Deletes a message.',
684 'type' => 'write',
ee7295ee 685 'capabilities' => 'moodle/site:deleteownmessage',
3090f52f 686 'ajax' => true,
ee7295ee 687 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
d6731600 688 ),
f23e9b6b
CB
689 'core_message_get_blocked_users' => array(
690 'classname' => 'core_message_external',
691 'methodname' => 'get_blocked_users',
692 'classpath' => 'message/externallib.php',
693 'description' => 'Retrieve a list of users blocked',
694 'type' => 'read',
ee7295ee 695 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
d6731600 696 ),
cd03b8d7
MN
697 'core_message_data_for_messagearea_search_messages' => array(
698 'classname' => 'core_message_external',
699 'methodname' => 'data_for_messagearea_search_messages',
700 'classpath' => 'message/externallib.php',
701 'description' => 'Retrieve the template data for searching for messages',
702 'type' => 'read',
703 'ajax' => true,
53522c6e 704 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
cd03b8d7 705 ),
48e8bdba 706 'core_message_data_for_messagearea_search_users' => array(
cd03b8d7 707 'classname' => 'core_message_external',
48e8bdba 708 'methodname' => 'data_for_messagearea_search_users',
cd03b8d7
MN
709 'classpath' => 'message/externallib.php',
710 'description' => 'Retrieve the template data for searching for people',
711 'type' => 'read',
712 'ajax' => true,
713 ),
48e8bdba 714 'core_message_data_for_messagearea_search_users_in_course' => array(
cd03b8d7 715 'classname' => 'core_message_external',
48e8bdba 716 'methodname' => 'data_for_messagearea_search_users_in_course',
cd03b8d7
MN
717 'classpath' => 'message/externallib.php',
718 'description' => 'Retrieve the template data for searching for people in a course',
719 'type' => 'read',
720 'ajax' => true,
721 ),
9aa012b5
MN
722 'core_message_data_for_messagearea_conversations' => array(
723 'classname' => 'core_message_external',
724 'methodname' => 'data_for_messagearea_conversations',
725 'classpath' => 'message/externallib.php',
726 'description' => 'Retrieve the template data for the conversation list',
727 'type' => 'read',
728 'ajax' => true,
21d9f020 729 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
9aa012b5
MN
730 ),
731 'core_message_data_for_messagearea_contacts' => array(
732 'classname' => 'core_message_external',
733 'methodname' => 'data_for_messagearea_contacts',
734 'classpath' => 'message/externallib.php',
735 'description' => 'Retrieve the template data for the contact list',
736 'type' => 'read',
737 'ajax' => true,
21d9f020 738 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
9aa012b5 739 ),
3cd13828
MN
740 'core_message_data_for_messagearea_messages' => array(
741 'classname' => 'core_message_external',
742 'methodname' => 'data_for_messagearea_messages',
743 'classpath' => 'message/externallib.php',
744 'description' => 'Retrieve the template data for the messages',
745 'type' => 'read',
746 'ajax' => true,
21d9f020 747 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
3cd13828 748 ),
c060cd49
MN
749 'core_message_data_for_messagearea_get_most_recent_message' => array(
750 'classname' => 'core_message_external',
751 'methodname' => 'data_for_messagearea_get_most_recent_message',
752 'classpath' => 'message/externallib.php',
753 'description' => 'Retrieve the template data for the most recent message',
754 'type' => 'read',
755 'ajax' => true,
756 ),
c6e97f54
MN
757 'core_message_data_for_messagearea_get_profile' => array(
758 'classname' => 'core_message_external',
759 'methodname' => 'data_for_messagearea_get_profile',
760 'classpath' => 'message/externallib.php',
761 'description' => 'Retrieve the template data for the users\'s profile',
762 'type' => 'read',
763 'ajax' => true,
764 ),
d6731600 765 'core_message_get_contacts' => array(
f23e9b6b
CB
766 'classname' => 'core_message_external',
767 'methodname' => 'get_contacts',
768 'classpath' => 'message/externallib.php',
d6731600 769 'description' => 'Retrieve the contact list',
f23e9b6b 770 'type' => 'read',
ee7295ee 771 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
d6731600 772 ),
aff9da17 773 'core_message_get_messages' => array(
f23e9b6b
CB
774 'classname' => 'core_message_external',
775 'methodname' => 'get_messages',
776 'classpath' => 'message/externallib.php',
777 'description' => 'Retrieve a list of messages sent and received by a user (conversations, notifications or both)',
778 'type' => 'read',
ee7295ee 779 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
3274d5ca
RW
780 'ajax' => true,
781 ),
8c55bd6c
RW
782 'core_message_get_unread_conversations_count' => array(
783 'classname' => 'core_message_external',
784 'methodname' => 'get_unread_conversations_count',
785 'classpath' => 'message/externallib.php',
786 'description' => 'Retrieve the count of unread conversations for a given user',
787 'type' => 'read',
788 'ajax' => true,
53522c6e 789 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
8c55bd6c 790 ),
3274d5ca
RW
791 'core_message_mark_all_notifications_as_read' => array(
792 'classname' => 'core_message_external',
793 'methodname' => 'mark_all_notifications_as_read',
794 'classpath' => 'message/externallib.php',
8c55bd6c
RW
795 'description' => 'Mark all notifications as read for a given user',
796 'type' => 'write',
797 'ajax' => true,
53522c6e 798 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
8c55bd6c
RW
799 ),
800 'core_message_mark_all_messages_as_read' => array(
801 'classname' => 'core_message_external',
802 'methodname' => 'mark_all_messages_as_read',
803 'classpath' => 'message/externallib.php',
804 'description' => 'Mark all messages as read for a given user',
3274d5ca
RW
805 'type' => 'write',
806 'ajax' => true,
53522c6e 807 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
60ab2e1b 808 ),
a84f89ca 809 'core_message_mark_message_read' => array(
f23e9b6b
CB
810 'classname' => 'core_message_external',
811 'methodname' => 'mark_message_read',
812 'classpath' => 'message/externallib.php',
813 'description' => 'Mark a single message as read, trigger message_viewed event.',
814 'type' => 'write',
ee7295ee 815 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
0b19d048 816 'ajax' => true,
a84f89ca 817 ),
a0eabdd3
RW
818 'core_message_message_processor_config_form' => array(
819 'classname' => 'core_message_external',
820 'methodname' => 'message_processor_config_form',
821 'classpath' => 'message/externallib.php',
822 'description' => 'Process the message processor config form',
823 'type' => 'write',
824 'ajax' => true,
53522c6e 825 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
a0eabdd3 826 ),
8c125526
RW
827 'core_message_get_message_processor' => array(
828 'classname' => 'core_message_external',
829 'methodname' => 'get_message_processor',
830 'classpath' => 'message/externallib.php',
831 'description' => 'Get a message processor',
832 'type' => 'read',
833 'ajax' => true,
834 ),
f23e9b6b
CB
835 'core_message_search_contacts' => array(
836 'classname' => 'core_message_external',
837 'methodname' => 'search_contacts',
838 'classpath' => 'message/externallib.php',
839 'description' => 'Search for contacts',
840 'type' => 'read',
ee7295ee 841 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
419b1128 842 ),
f23e9b6b
CB
843 'core_message_send_instant_messages' => array(
844 'classname' => 'core_message_external',
845 'methodname' => 'send_instant_messages',
846 'classpath' => 'message/externallib.php',
847 'description' => 'Send instant messages',
848 'type' => 'write',
ee7295ee 849 'capabilities' => 'moodle/site:sendmessage',
c060cd49 850 'ajax' => true,
ee7295ee 851 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
f23e9b6b
CB
852 ),
853 'core_message_unblock_contacts' => array(
854 'classname' => 'core_message_external',
855 'methodname' => 'unblock_contacts',
856 'classpath' => 'message/externallib.php',
857 'description' => 'Unblock contacts',
858 'type' => 'write',
c6e97f54 859 'ajax' => true,
ee7295ee 860 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
5d1017e1 861 ),
e86f0cb4
JL
862 'core_message_get_user_notification_preferences' => array(
863 'classname' => 'core_message_external',
864 'methodname' => 'get_user_notification_preferences',
865 'classpath' => 'message/externallib.php',
866 'description' => 'Get the notification preferences for a given user.',
867 'type' => 'read',
868 'capabilities' => 'moodle/user:editownmessageprofile',
869 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
870 ),
2521afd2
JL
871 'core_message_get_user_message_preferences' => array(
872 'classname' => 'core_message_external',
873 'methodname' => 'get_user_message_preferences',
874 'classpath' => 'message/externallib.php',
875 'description' => 'Get the message preferences for a given user.',
876 'type' => 'read',
877 'capabilities' => 'moodle/user:editownmessageprofile',
878 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
879 ),
5d1017e1 880 'core_notes_create_notes' => array(
f23e9b6b
CB
881 'classname' => 'core_notes_external',
882 'methodname' => 'create_notes',
883 'classpath' => 'notes/externallib.php',
8d46dabb 884 'description' => 'Create notes',
f23e9b6b 885 'type' => 'write',
ee7295ee
JL
886 'capabilities' => 'moodle/notes:manage',
887 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
8d46dabb 888 ),
34348b2b 889 'core_notes_delete_notes' => array(
f23e9b6b
CB
890 'classname' => 'core_notes_external',
891 'methodname' => 'delete_notes',
892 'classpath' => 'notes/externallib.php',
34348b2b 893 'description' => 'Delete notes',
f23e9b6b 894 'type' => 'write',
ee7295ee
JL
895 'capabilities' => 'moodle/notes:manage',
896 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
f23e9b6b
CB
897 ),
898 'core_notes_get_course_notes' => array(
899 'classname' => 'core_notes_external',
900 'methodname' => 'get_course_notes',
901 'classpath' => 'notes/externallib.php',
902 'description' => 'Returns all notes in specified course (or site), for the specified user.',
903 'type' => 'read',
ee7295ee
JL
904 'capabilities' => 'moodle/notes:view',
905 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
34348b2b 906 ),
34348b2b 907 'core_notes_get_notes' => array(
f23e9b6b
CB
908 'classname' => 'core_notes_external',
909 'methodname' => 'get_notes',
910 'classpath' => 'notes/externallib.php',
34348b2b 911 'description' => 'Get notes',
f23e9b6b
CB
912 'type' => 'read',
913 'capabilities' => 'moodle/notes:view'
34348b2b 914 ),
34348b2b 915 'core_notes_update_notes' => array(
f23e9b6b
CB
916 'classname' => 'core_notes_external',
917 'methodname' => 'update_notes',
918 'classpath' => 'notes/externallib.php',
34348b2b 919 'description' => 'Update notes',
f23e9b6b
CB
920 'type' => 'write',
921 'capabilities' => 'moodle/notes:manage'
34348b2b 922 ),
a80b5518 923 'core_notes_view_notes' => array(
f23e9b6b
CB
924 'classname' => 'core_notes_external',
925 'methodname' => 'view_notes',
926 'classpath' => 'notes/externallib.php',
927 'description' => 'Simulates the web interface view of notes/index.php: trigger events.',
928 'type' => 'write',
ee7295ee
JL
929 'capabilities' => 'moodle/notes:view',
930 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
9028d9b5 931 ),
f23e9b6b
CB
932 'core_output_load_template' => array(
933 'classname' => 'core\output\external',
934 'methodname' => 'load_template',
935 'description' => 'Load a template for a renderable',
936 'type' => 'read',
5041600d
RT
937 'loginrequired' => false,
938 'ajax' => true,
0ff4ebb4 939 ),
f23e9b6b
CB
940 // Question related functions.
941 'core_question_update_flag' => array(
942 'classname' => 'core_question_external',
943 'methodname' => 'update_flag',
944 'description' => 'Update the flag state of a question attempt.',
945 'type' => 'write',
946 'capabilities' => 'moodle/question:flag',
ee7295ee 947 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
3f0ea6d8 948 ),
f23e9b6b
CB
949 'core_rating_get_item_ratings' => array(
950 'classname' => 'core_rating_external',
951 'methodname' => 'get_item_ratings',
952 'description' => 'Retrieve all the ratings for an item.',
953 'type' => 'read',
ee7295ee
JL
954 'capabilities' => 'moodle/rating:view',
955 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
5d1017e1 956 ),
afb7799a
JL
957 'core_rating_add_rating' => array(
958 'classname' => 'core_rating_external',
959 'methodname' => 'add_rating',
960 'description' => 'Rates an item.',
961 'type' => 'write',
962 'capabilities' => 'moodle/rating:rate',
963 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
964 ),
f23e9b6b
CB
965 'core_role_assign_roles' => array(
966 'classname' => 'core_role_external',
967 'methodname' => 'assign_roles',
968 'classpath' => 'enrol/externallib.php',
969 'description' => 'Manual role assignments.',
970 'type' => 'write',
971 'capabilities' => 'moodle/role:assign'
0bf486a6 972 ),
f23e9b6b
CB
973 'core_role_unassign_roles' => array(
974 'classname' => 'core_role_external',
975 'methodname' => 'unassign_roles',
976 'classpath' => 'enrol/externallib.php',
977 'description' => 'Manual role unassignments.',
978 'type' => 'write',
979 'capabilities' => 'moodle/role:assign'
11e76602 980 ),
f23e9b6b
CB
981 'core_tag_get_tagindex' => array(
982 'classname' => 'core_tag_external',
983 'methodname' => 'get_tagindex',
984 'description' => 'Gets tag index page for one tag and one tag area',
985 'type' => 'read',
5041600d 986 'ajax' => true,
11e76602 987 ),
f23e9b6b
CB
988 'core_tag_get_tags' => array(
989 'classname' => 'core_tag_external',
990 'methodname' => 'get_tags',
991 'description' => 'Gets tags by their ids',
992 'type' => 'read',
5041600d 993 'ajax' => true,
11e76602 994 ),
f23e9b6b
CB
995 'core_tag_update_tags' => array(
996 'classname' => 'core_tag_external',
997 'methodname' => 'update_tags',
998 'description' => 'Updates tags',
999 'type' => 'write',
5041600d 1000 'ajax' => true,
cc73ea07 1001 ),
cdc5f978 1002 'core_update_inplace_editable' => array(
f23e9b6b
CB
1003 'classname' => 'core_external',
1004 'methodname' => 'update_inplace_editable',
1005 'classpath' => 'lib/external/externallib.php',
cdc5f978 1006 'description' => 'Generic service to update title',
f23e9b6b 1007 'type' => 'write',
5041600d
RT
1008 'loginrequired' => true,
1009 'ajax' => true,
c66dc3df 1010 ),
f23e9b6b
CB
1011 'core_user_add_user_device' => array(
1012 'classname' => 'core_user_external',
1013 'methodname' => 'add_user_device',
1014 'classpath' => 'user/externallib.php',
1015 'description' => 'Store mobile user devices information for PUSH Notifications.',
1016 'type' => 'write',
ee7295ee 1017 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
9bdcf579 1018 ),
f23e9b6b
CB
1019 'core_user_add_user_private_files' => array(
1020 'classname' => 'core_user_external',
1021 'methodname' => 'add_user_private_files',
1022 'classpath' => 'user/externallib.php',
1023 'description' => 'Copy files from a draft area to users private files area.',
1024 'type' => 'write',
ee7295ee
JL
1025 'capabilities' => 'moodle/user:manageownfiles',
1026 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
25c49a85 1027 ),
f23e9b6b
CB
1028 'core_user_create_users' => array(
1029 'classname' => 'core_user_external',
1030 'methodname' => 'create_users',
1031 'classpath' => 'user/externallib.php',
1032 'description' => 'Create users.',
1033 'type' => 'write',
1034 'capabilities' => 'moodle/user:create'
23b398fc 1035 ),
f23e9b6b
CB
1036 'core_user_delete_users' => array(
1037 'classname' => 'core_user_external',
1038 'methodname' => 'delete_users',
1039 'classpath' => 'user/externallib.php',
1040 'description' => 'Delete users.',
1041 'type' => 'write',
1042 'capabilities' => 'moodle/user:delete'
6c785afa 1043 ),
f23e9b6b
CB
1044 'core_user_get_course_user_profiles' => array(
1045 'classname' => 'core_user_external',
1046 'methodname' => 'get_course_user_profiles',
1047 'classpath' => 'user/externallib.php',
1048 'description' => 'Get course user profiles (each of the profils matching a course id and a user id),.',
1049 'type' => 'read',
1050 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, '
ee7295ee
JL
1051 . 'moodle/site:accessallgroups',
1052 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
6c785afa 1053 ),
f23e9b6b
CB
1054 'core_user_get_users' => array(
1055 'classname' => 'core_user_external',
1056 'methodname' => 'get_users',
1057 'classpath' => 'user/externallib.php',
1058 'description' => 'search for users matching the parameters',
1059 'type' => 'read',
1060 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update'
db5b6971 1061 ),
f23e9b6b
CB
1062 'core_user_get_users_by_field' => array(
1063 'classname' => 'core_user_external',
1064 'methodname' => 'get_users_by_field',
1065 'classpath' => 'user/externallib.php',
1066 'description' => 'Retrieve users\' information for a specified unique field - If you want to do a user search, use '
1067 . 'core_user_get_users()',
1068 'type' => 'read',
ee7295ee 1069 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update',
5041600d 1070 'ajax' => true,
ee7295ee 1071 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
8e355853 1072 ),
f23e9b6b
CB
1073 'core_user_remove_user_device' => array(
1074 'classname' => 'core_user_external',
1075 'methodname' => 'remove_user_device',
1076 'classpath' => 'user/externallib.php',
1077 'description' => 'Remove a user device from the Moodle database.',
1078 'type' => 'write',
ee7295ee 1079 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
ef4c23cc 1080 ),
c598f278 1081 'core_user_update_users' => array(
a0eabdd3 1082 'classname' => 'core_user_external',
c598f278 1083 'methodname' => 'update_users',
a0eabdd3 1084 'classpath' => 'user/externallib.php',
c598f278 1085 'description' => 'Update users.',
a0eabdd3
RW
1086 'type' => 'write',
1087 'capabilities' => 'moodle/user:update',
1088 'ajax' => true,
1089 ),
c598f278 1090 'core_user_update_user_preferences' => array(
f23e9b6b 1091 'classname' => 'core_user_external',
c598f278 1092 'methodname' => 'update_user_preferences',
f23e9b6b 1093 'classpath' => 'user/externallib.php',
c598f278 1094 'description' => 'Update a user\'s preferences',
f23e9b6b 1095 'type' => 'write',
c598f278 1096 'capabilities' => 'moodle/user:editownmessageprofile, moodle/user:editmessageprofile',
a0eabdd3 1097 'ajax' => true,
6d2f938c 1098 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
c026a28d 1099 ),
f23e9b6b
CB
1100 'core_user_view_user_list' => array(
1101 'classname' => 'core_user_external',
1102 'methodname' => 'view_user_list',
1103 'classpath' => 'user/externallib.php',
1104 'description' => 'Simulates the web-interface view of user/index.php (triggering events),.',
1105 'type' => 'write',
1106 'capabilities' => 'moodle/course:viewparticipants',
ee7295ee 1107 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
7361b968 1108 ),
f23e9b6b
CB
1109 'core_user_view_user_profile' => array(
1110 'classname' => 'core_user_external',
1111 'methodname' => 'view_user_profile',
1112 'classpath' => 'user/externallib.php',
1113 'description' => 'Simulates the web-interface view of user/view.php and user/profile.php (triggering events),.',
1114 'type' => 'write',
1115 'capabilities' => 'moodle/user:viewdetails',
ee7295ee 1116 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
f4fb827e 1117 ),
45fec983
JL
1118 'core_user_get_user_preferences' => array(
1119 'classname' => 'core_user_external',
1120 'methodname' => 'get_user_preferences',
1121 'classpath' => 'user/externallib.php',
1122 'description' => 'Return user preferences.',
1123 'type' => 'read',
1124 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1125 ),
d44e2e42
JL
1126 'core_user_update_picture' => array(
1127 'classname' => 'core_user_external',
1128 'methodname' => 'update_picture',
1129 'classpath' => 'user/externallib.php',
1130 'description' => 'Update or delete the user picture in the site',
1131 'type' => 'write',
1132 'capabilities' => 'moodle/user:editownprofile, moodle/user:editprofile',
1133 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1134 ),
649777fb
JL
1135 'core_user_set_user_preferences' => array(
1136 'classname' => 'core_user_external',
1137 'methodname' => 'set_user_preferences',
1138 'classpath' => 'user/externallib.php',
1139 'description' => 'Set user preferences.',
1140 'type' => 'write',
1141 'capabilities' => 'moodle/site:config',
1142 ),
3e8145a3
JL
1143 'core_user_agree_site_policy' => array(
1144 'classname' => 'core_user_external',
1145 'methodname' => 'agree_site_policy',
1146 'classpath' => 'user/externallib.php',
1147 'description' => 'Agree the site policy for the current user.',
1148 'type' => 'write',
1149 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1150 ),
649777fb 1151
81de839f
FM
1152 // Competencies functions.
1153 'core_competency_create_competency_framework' => array(
1154 'classname' => 'core_competency\external',
1155 'methodname' => 'create_competency_framework',
1156 'classpath' => '',
1157 'description' => 'Creates new competency frameworks.',
1158 'type' => 'write',
1159 'capabilities' => 'moodle/competency:competencymanage',
1160 'ajax' => true,
1161 ),
1162 'core_competency_read_competency_framework' => array(
1163 'classname' => 'core_competency\external',
1164 'methodname' => 'read_competency_framework',
1165 'classpath' => '',
1166 'description' => 'Load a summary of a competency framework.',
1167 'type' => 'read',
1168 'capabilities' => 'moodle/competency:competencyview',
1169 'ajax' => true,
1170 ),
1171 'core_competency_duplicate_competency_framework' => array(
1172 'classname' => 'core_competency\external',
1173 'methodname' => 'duplicate_competency_framework',
1174 'classpath' => '',
1175 'description' => 'Duplicate a competency framework.',
1176 'type' => 'write',
1177 'capabilities' => 'moodle/competency:competencymanage',
1178 'ajax' => true,
1179 ),
1180 'core_competency_delete_competency_framework' => array(
1181 'classname' => 'core_competency\external',
1182 'methodname' => 'delete_competency_framework',
1183 'classpath' => '',
1184 'description' => 'Delete a competency framework.',
1185 'type' => 'write',
1186 'capabilities' => 'moodle/competency:competencymanage',
1187 'ajax' => true,
1188 ),
1189 'core_competency_update_competency_framework' => array(
1190 'classname' => 'core_competency\external',
1191 'methodname' => 'update_competency_framework',
1192 'classpath' => '',
1193 'description' => 'Update a competency framework.',
1194 'type' => 'write',
1195 'capabilities' => 'moodle/competency:competencymanage',
1196 'ajax' => true,
1197 ),
1198 'core_competency_list_competency_frameworks' => array(
1199 'classname' => 'core_competency\external',
1200 'methodname' => 'list_competency_frameworks',
1201 'classpath' => '',
1202 'description' => 'Load a list of a competency frameworks.',
1203 'type' => 'read',
1204 'capabilities' => 'moodle/competency:competencyview',
1205 'ajax' => true,
1206 ),
1207 'core_competency_count_competency_frameworks' => array(
1208 'classname' => 'core_competency\external',
1209 'methodname' => 'count_competency_frameworks',
1210 'classpath' => '',
1211 'description' => 'Count a list of a competency frameworks.',
1212 'type' => 'read',
1213 'capabilities' => 'moodle/competency:competencyview',
1214 'ajax' => true,
1215 ),
1216 'core_competency_competency_framework_viewed' => array(
1217 'classname' => 'core_competency\external',
1218 'methodname' => 'competency_framework_viewed',
1219 'classpath' => '',
1220 'description' => 'Log event competency framework viewed',
1221 'type' => 'read',
1222 'capabilities' => 'moodle/competency:competencyview',
1223 'ajax' => true,
1224 ),
1225 'core_competency_create_competency' => array(
1226 'classname' => 'core_competency\external',
1227 'methodname' => 'create_competency',
1228 'classpath' => '',
1229 'description' => 'Creates new competencies.',
1230 'type' => 'write',
1231 'capabilities' => 'moodle/competency:competencymanage',
1232 'ajax' => true,
1233 ),
1234 'core_competency_read_competency' => array(
1235 'classname' => 'core_competency\external',
1236 'methodname' => 'read_competency',
1237 'classpath' => '',
1238 'description' => 'Load a summary of a competency.',
1239 'type' => 'read',
1240 'capabilities' => 'moodle/competency:competencyview',
1241 'ajax' => true,
1242 ),
1243 'core_competency_competency_viewed' => array(
1244 'classname' => 'core_competency\external',
1245 'methodname' => 'competency_viewed',
1246 'classpath' => '',
1247 'description' => 'Log event competency viewed',
1248 'type' => 'read',
1249 'capabilities' => 'moodle/competency:competencyview',
1250 'ajax' => true,
3123c2cf 1251 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
1252 ),
1253 'core_competency_delete_competency' => array(
1254 'classname' => 'core_competency\external',
1255 'methodname' => 'delete_competency',
1256 'classpath' => '',
1257 'description' => 'Delete a competency.',
1258 'type' => 'write',
1259 'capabilities' => 'moodle/competency:competencymanage',
1260 'ajax' => true,
1261 ),
1262 'core_competency_update_competency' => array(
1263 'classname' => 'core_competency\external',
1264 'methodname' => 'update_competency',
1265 'classpath' => '',
1266 'description' => 'Update a competency.',
1267 'type' => 'write',
1268 'capabilities' => 'moodle/competency:competencymanage',
1269 'ajax' => true,
1270 ),
1271 'core_competency_list_competencies' => array(
1272 'classname' => 'core_competency\external',
1273 'methodname' => 'list_competencies',
1274 'classpath' => '',
1275 'description' => 'Load a list of a competencies.',
1276 'type' => 'read',
1277 'capabilities' => 'moodle/competency:competencyview',
1278 'ajax' => true,
1279 ),
1280 'core_competency_list_competencies_in_template' => array(
1281 'classname' => 'core_competency\external',
1282 'methodname' => 'list_competencies_in_template',
1283 'classpath' => '',
1284 'description' => 'Load a list of a competencies for a given template.',
1285 'type' => 'read',
1286 'capabilities' => 'moodle/competency:competencyview',
1287 'ajax' => true,
1288 ),
1289 'core_competency_count_competencies' => array(
1290 'classname' => 'core_competency\external',
1291 'methodname' => 'count_competencies',
1292 'classpath' => '',
1293 'description' => 'Count a list of a competencies.',
1294 'type' => 'read',
1295 'capabilities' => 'moodle/competency:competencyview',
1296 'ajax' => true,
1297 ),
1298 'core_competency_count_competencies_in_template' => array(
1299 'classname' => 'core_competency\external',
1300 'methodname' => 'count_competencies_in_template',
1301 'classpath' => '',
1302 'description' => 'Count a list of a competencies for a given template.',
1303 'type' => 'read',
1304 'capabilities' => 'moodle/competency:competencyview',
1305 'ajax' => true,
1306 ),
1307 'core_competency_search_competencies' => array(
1308 'classname' => 'core_competency\external',
1309 'methodname' => 'search_competencies',
1310 'classpath' => '',
1311 'description' => 'Search a list of a competencies.',
1312 'type' => 'read',
1313 'capabilities' => 'moodle/competency:competencyview',
1314 'ajax' => true,
1315 ),
1316 'core_competency_set_parent_competency' => array(
1317 'classname' => 'core_competency\external',
1318 'methodname' => 'set_parent_competency',
1319 'classpath' => '',
1320 'description' => 'Set a new parent for a competency.',
1321 'type' => 'write',
1322 'capabilities' => 'moodle/competency:competencymanage',
1323 'ajax' => true,
1324 ),
1325 'core_competency_move_up_competency' => array(
1326 'classname' => 'core_competency\external',
1327 'methodname' => 'move_up_competency',
1328 'classpath' => '',
1329 'description' => 'Re-order a competency.',
1330 'type' => 'write',
1331 'capabilities' => 'moodle/competency:competencymanage',
1332 'ajax' => true,
1333 ),
1334 'core_competency_move_down_competency' => array(
1335 'classname' => 'core_competency\external',
1336 'methodname' => 'move_down_competency',
1337 'classpath' => '',
1338 'description' => 'Re-order a competency.',
1339 'type' => 'write',
1340 'capabilities' => 'moodle/competency:competencymanage',
1341 'ajax' => true,
1342 ),
1343 'core_competency_list_course_competencies' => array(
1344 'classname' => 'core_competency\external',
1345 'methodname' => 'list_course_competencies',
1346 'classpath' => '',
1347 'description' => 'List the competencies in a course',
1348 'type' => 'read',
1349 'capabilities' => 'moodle/competency:coursecompetencyview',
1350 'ajax' => true,
3123c2cf 1351 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
1352 ),
1353 'core_competency_count_competencies_in_course' => array(
1354 'classname' => 'core_competency\external',
1355 'methodname' => 'count_competencies_in_course',
1356 'classpath' => '',
1357 'description' => 'List the competencies in a course',
1358 'type' => 'read',
1359 'capabilities' => 'moodle/competency:coursecompetencyview',
1360 'ajax' => true,
1361 ),
1362 'core_competency_count_courses_using_competency' => array(
1363 'classname' => 'core_competency\external',
1364 'methodname' => 'count_courses_using_competency',
1365 'classpath' => '',
1366 'description' => 'List the courses using a competency',
1367 'type' => 'read',
1368 'capabilities' => 'moodle/competency:coursecompetencyview',
1369 'ajax' => true,
1370 ),
1371 'core_competency_add_competency_to_course' => array(
1372 'classname' => 'core_competency\external',
1373 'methodname' => 'add_competency_to_course',
1374 'classpath' => '',
1375 'description' => 'Add the competency to a course',
1376 'type' => 'write',
1377 'capabilities' => 'moodle/competency:coursecompetencymanage',
1378 'ajax' => true,
1379 ),
1380 'core_competency_add_competency_to_template' => array(
1381 'classname' => 'core_competency\external',
1382 'methodname' => 'add_competency_to_template',
1383 'classpath' => '',
1384 'description' => 'Add the competency to a template',
1385 'type' => 'write',
1386 'capabilities' => 'moodle/competency:templatemanage',
1387 'ajax' => true,
1388 ),
1389 'core_competency_remove_competency_from_course' => array(
1390 'classname' => 'core_competency\external',
1391 'methodname' => 'remove_competency_from_course',
1392 'classpath' => '',
1393 'description' => 'Remove a competency from a course',
1394 'type' => 'write',
1395 'capabilities' => 'moodle/competency:coursecompetencymanage',
1396 'ajax' => true,
1397 ),
1398 'core_competency_set_course_competency_ruleoutcome' => array(
1399 'classname' => 'core_competency\external',
1400 'methodname' => 'set_course_competency_ruleoutcome',
1401 'classpath' => '',
1402 'description' => 'Modify the ruleoutcome value for course competency',
1403 'type' => 'write',
1404 'capabilities' => 'moodle/competency:coursecompetencymanage',
1405 'ajax' => true,
1406 ),
1407 'core_competency_remove_competency_from_template' => array(
1408 'classname' => 'core_competency\external',
1409 'methodname' => 'remove_competency_from_template',
1410 'classpath' => '',
1411 'description' => 'Remove a competency from a template',
1412 'type' => 'write',
1413 'capabilities' => 'moodle/competency:templatemanage',
1414 'ajax' => true,
1415 ),
1416 'core_competency_reorder_course_competency' => array(
1417 'classname' => 'core_competency\external',
1418 'methodname' => 'reorder_course_competency',
1419 'classpath' => '',
1420 'description' => 'Move a course competency to a new relative sort order.',
1421 'type' => 'write',
1422 'capabilities' => 'moodle/competency:coursecompetencymanage',
1423 'ajax' => true,
1424 ),
1425 'core_competency_reorder_template_competency' => array(
1426 'classname' => 'core_competency\external',
1427 'methodname' => 'reorder_template_competency',
1428 'classpath' => '',
1429 'description' => 'Move a template competency to a new relative sort order.',
1430 'type' => 'write',
1431 'capabilities' => 'moodle/competency:templatemanage',
1432 'ajax' => true,
1433 ),
1434 'core_competency_create_template' => array(
1435 'classname' => 'core_competency\external',
1436 'methodname' => 'create_template',
1437 'classpath' => '',
1438 'description' => 'Creates new learning plan templates.',
1439 'type' => 'write',
1440 'capabilities' => 'moodle/competency:templatemanage',
1441 'ajax' => true,
1442 ),
1443 'core_competency_duplicate_template' => array(
1444 'classname' => 'core_competency\external',
1445 'methodname' => 'duplicate_template',
1446 'classpath' => '',
1447 'description' => 'Duplicate learning plan template.',
1448 'type' => 'write',
1449 'capabilities' => 'moodle/competency:templatemanage',
1450 'ajax' => true,
1451 ),
1452 'core_competency_read_template' => array(
1453 'classname' => 'core_competency\external',
1454 'methodname' => 'read_template',
1455 'classpath' => '',
1456 'description' => 'Load a summary of a learning plan template.',
1457 'type' => 'read',
1458 'capabilities' => 'moodle/competency:templateview',
1459 'ajax' => true,
1460 ),
1461 'core_competency_delete_template' => array(
1462 'classname' => 'core_competency\external',
1463 'methodname' => 'delete_template',
1464 'classpath' => '',
1465 'description' => 'Delete a learning plan template.',
1466 'type' => 'write',
1467 'capabilities' => 'moodle/competency:templatemanage',
1468 'ajax' => true,
1469 ),
1470 'core_competency_update_template' => array(
1471 'classname' => 'core_competency\external',
1472 'methodname' => 'update_template',
1473 'classpath' => '',
1474 'description' => 'Update a learning plan template.',
1475 'type' => 'write',
1476 'capabilities' => 'moodle/competency:templatemanage',
1477 'ajax' => true,
1478 ),
1479 'core_competency_list_templates' => array(
1480 'classname' => 'core_competency\external',
1481 'methodname' => 'list_templates',
1482 'classpath' => '',
1483 'description' => 'Load a list of a learning plan templates.',
1484 'type' => 'read',
1485 'capabilities' => 'moodle/competency:templateview',
1486 'ajax' => true,
1487 ),
1488 'core_competency_list_templates_using_competency' => array(
1489 'classname' => 'core_competency\external',
1490 'methodname' => 'list_templates_using_competency',
1491 'classpath' => '',
1492 'description' => 'Load a list of a learning plan templates for a given competency.',
1493 'type' => 'read',
1494 'capabilities' => 'moodle/competency:templateview',
1495 'ajax' => true,
1496 ),
1497 'core_competency_count_templates' => array(
1498 'classname' => 'core_competency\external',
1499 'methodname' => 'count_templates',
1500 'classpath' => '',
1501 'description' => 'Count a list of a learning plan templates.',
1502 'type' => 'read',
1503 'capabilities' => 'moodle/competency:templateview',
1504 'ajax' => true,
1505 ),
1506 'core_competency_count_templates_using_competency' => array(
1507 'classname' => 'core_competency\external',
1508 'methodname' => 'count_templates_using_competency',
1509 'classpath' => '',
1510 'description' => 'Count a list of a learning plan templates for a given competency.',
1511 'type' => 'read',
1512 'capabilities' => 'moodle/competency:templateview',
1513 'ajax' => true,
1514 ),
1515 'core_competency_create_plan' => array(
1516 'classname' => 'core_competency\external',
1517 'methodname' => 'create_plan',
1518 'classpath' => '',
1519 'description' => 'Creates a learning plan.',
1520 'type' => 'write',
1521 'capabilities' => 'moodle/competency:planmanage',
1522 'ajax' => true,
1523 ),
1524 'core_competency_update_plan' => array(
1525 'classname' => 'core_competency\external',
1526 'methodname' => 'update_plan',
1527 'classpath' => '',
1528 'description' => 'Updates a learning plan.',
1529 'type' => 'write',
1530 'capabilities' => 'moodle/competency:planmanage',
1531 'ajax' => true,
1532 ),
1533 'core_competency_complete_plan' => array(
1534 'classname' => 'core_competency\external',
1535 'methodname' => 'complete_plan',
1536 'classpath' => '',
1537 'description' => 'Complete learning plan.',
1538 'type' => 'write',
1539 'capabilities' => 'moodle/competency:planmanage',
1540 'ajax' => true,
1541 ),
1542 'core_competency_reopen_plan' => array(
1543 'classname' => 'core_competency\external',
1544 'methodname' => 'reopen_plan',
1545 'classpath' => '',
1546 'description' => 'Reopen learning plan.',
1547 'type' => 'write',
1548 'capabilities' => 'moodle/competency:planmanage',
1549 'ajax' => true,
1550 ),
1551 'core_competency_read_plan' => array(
1552 'classname' => 'core_competency\external',
1553 'methodname' => 'read_plan',
1554 'classpath' => '',
1555 'description' => 'Load a learning plan.',
1556 'type' => 'read',
1557 'capabilities' => 'moodle/competency:planviewown',
1558 'ajax' => true,
1559 ),
1560 'core_competency_delete_plan' => array(
1561 'classname' => 'core_competency\external',
1562 'methodname' => 'delete_plan',
1563 'classpath' => '',
1564 'description' => 'Delete a learning plan.',
1565 'type' => 'write',
1566 'capabilities' => 'moodle/competency:planmanage',
1567 'ajax' => true,
1568 ),
1569 'core_competency_list_user_plans' => array(
1570 'classname' => 'core_competency\external',
1571 'methodname' => 'list_user_plans',
1572 'classpath' => '',
1573 'description' => 'List a user\'s learning plans.',
1574 'type' => 'read',
1575 'capabilities' => 'moodle/competency:planviewown',
1576 'ajax' => true,
1577 ),
1578 'core_competency_list_plan_competencies' => array(
1579 'classname' => 'core_competency\external',
1580 'methodname' => 'list_plan_competencies',
1581 'classpath' => '',
1582 'description' => 'List the competencies in a plan',
1583 'type' => 'read',
1584 'capabilities' => 'moodle/competency:planviewown',
1585 'ajax' => true,
1586 ),
1587 'core_competency_add_competency_to_plan' => array(
1588 'classname' => 'core_competency\external',
1589 'methodname' => 'add_competency_to_plan',
1590 'classpath' => '',
1591 'description' => 'Add the competency to a learning plan',
1592 'type' => 'write',
1593 'capabilities' => 'moodle/competency:planmanage',
1594 'ajax' => true,
1595 ),
1596 'core_competency_remove_competency_from_plan' => array(
1597 'classname' => 'core_competency\external',
1598 'methodname' => 'remove_competency_from_plan',
1599 'classpath' => '',
1600 'description' => 'Remove the competency from a learning plan',
1601 'type' => 'write',
1602 'capabilities' => 'moodle/competency:planmanage',
1603 'ajax' => true,
1604 ),
1605 'core_competency_reorder_plan_competency' => array(
1606 'classname' => 'core_competency\external',
1607 'methodname' => 'reorder_plan_competency',
1608 'classpath' => '',
1609 'description' => 'Move a plan competency to a new relative sort order.',
1610 'type' => 'write',
1611 'capabilities' => 'moodle/competency:planmanage',
1612 'ajax' => true,
1613 ),
1614 'core_competency_plan_request_review' => array(
1615 'classname' => 'core_competency\external',
1616 'methodname' => 'plan_request_review',
1617 'classpath' => '',
1618 'description' => 'Request for a plan to be reviewed.',
1619 'type' => 'write',
1620 'capabilities' => 'moodle/competency:planmanagedraft',
1621 'ajax' => true,
1622 ),
1623 'core_competency_plan_start_review' => array(
1624 'classname' => 'core_competency\external',
1625 'methodname' => 'plan_start_review',
1626 'classpath' => '',
1627 'description' => 'Start the review of a plan.',
1628 'type' => 'write',
1629 'capabilities' => 'moodle/competency:planmanage',
1630 'ajax' => true,
1631 ),
1632 'core_competency_plan_stop_review' => array(
1633 'classname' => 'core_competency\external',
1634 'methodname' => 'plan_stop_review',
1635 'classpath' => '',
1636 'description' => 'Stop the review of a plan.',
1637 'type' => 'write',
1638 'capabilities' => 'moodle/competency:planmanage',
1639 'ajax' => true,
1640 ),
1641 'core_competency_plan_cancel_review_request' => array(
1642 'classname' => 'core_competency\external',
1643 'methodname' => 'plan_cancel_review_request',
1644 'classpath' => '',
1645 'description' => 'Cancel the review of a plan.',
1646 'type' => 'write',
1647 'capabilities' => 'moodle/competency:planmanagedraft',
1648 'ajax' => true,
1649 ),
1650 'core_competency_approve_plan' => array(
1651 'classname' => 'core_competency\external',
1652 'methodname' => 'approve_plan',
1653 'classpath' => '',
1654 'description' => 'Approve a plan.',
1655 'type' => 'write',
1656 'capabilities' => 'moodle/competency:planmanage',
1657 'ajax' => true,
1658 ),
1659 'core_competency_unapprove_plan' => array(
1660 'classname' => 'core_competency\external',
1661 'methodname' => 'unapprove_plan',
1662 'classpath' => '',
1663 'description' => 'Unapprove a plan.',
1664 'type' => 'write',
1665 'capabilities' => 'moodle/competency:planmanage',
1666 'ajax' => true,
1667 ),
1668 'core_competency_template_has_related_data' => array(
1669 'classname' => 'core_competency\external',
1670 'methodname' => 'template_has_related_data',
1671 'classpath' => '',
1672 'description' => 'Check if a template has related data',
1673 'type' => 'read',
1674 'capabilities' => 'moodle/competency:templateview',
1675 'ajax' => true,
1676 ),
1677 'core_competency_get_scale_values' => array(
1678 'classname' => 'core_competency\external',
1679 'methodname' => 'get_scale_values',
1680 'classpath' => '',
1681 'description' => 'Fetch the values for a specific scale',
1682 'type' => 'read',
1683 'capabilities' => 'moodle/competency:competencymanage',
1684 'ajax' => true,
3123c2cf 1685 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
1686 ),
1687 'core_competency_add_related_competency' => array(
1688 'classname' => 'core_competency\external',
1689 'methodname' => 'add_related_competency',
1690 'classpath' => '',
1691 'description' => 'Adds a related competency',
1692 'type' => 'write',
1693 'capabilities' => 'moodle/competency:competencymanage',
1694 'ajax' => true,
1695 ),
1696 'core_competency_remove_related_competency' => array(
1697 'classname' => 'core_competency\external',
1698 'methodname' => 'remove_related_competency',
1699 'classpath' => '',
1700 'description' => 'Remove a related competency',
1701 'type' => 'write',
1702 'capabilities' => 'moodle/competency:competencymanage',
1703 'ajax' => true,
1704 ),
1705 'core_competency_read_user_evidence' => array(
1706 'classname' => 'core_competency\external',
1707 'methodname' => 'read_user_evidence',
1708 'classpath' => '',
1709 'description' => 'Read an evidence of prior learning.',
1710 'type' => 'read',
1711 'capabilities' => 'moodle/competency:userevidenceview',
1712 'ajax' => true,
1713 ),
1714 'core_competency_delete_user_evidence' => array(
1715 'classname' => 'core_competency\external',
1716 'methodname' => 'delete_user_evidence',
1717 'classpath' => '',
1718 'description' => 'Delete an evidence of prior learning.',
1719 'type' => 'write',
1720 'capabilities' => 'moodle/competency:userevidencemanageown',
1721 'ajax' => true,
1722 ),
1723 'core_competency_create_user_evidence_competency' => array(
1724 'classname' => 'core_competency\external',
1725 'methodname' => 'create_user_evidence_competency',
1726 'classpath' => '',
1727 'description' => 'Create an evidence of prior learning relationship with a competency.',
1728 'type' => 'read',
1729 'capabilities' => 'moodle/competency:userevidencemanageown, moodle/competency:competencyview',
1730 'ajax' => true,
1731 ),
1732 'core_competency_delete_user_evidence_competency' => array(
1733 'classname' => 'core_competency\external',
1734 'methodname' => 'delete_user_evidence_competency',
1735 'classpath' => '',
1736 'description' => 'Delete an evidence of prior learning relationship with a competency.',
1737 'type' => 'write',
1738 'capabilities' => 'moodle/competency:userevidencemanageown',
1739 'ajax' => true,
1740 ),
1741 'core_competency_user_competency_cancel_review_request' => array(
1742 'classname' => 'core_competency\external',
1743 'methodname' => 'user_competency_cancel_review_request',
1744 'classpath' => '',
1745 'description' => 'Cancel a review request.',
1746 'type' => 'write',
1747 'capabilities' => 'moodle/competency:userevidencemanageown',
1748 'ajax' => true,
1749 ),
1750 'core_competency_user_competency_request_review' => array(
1751 'classname' => 'core_competency\external',
1752 'methodname' => 'user_competency_request_review',
1753 'classpath' => '',
1754 'description' => 'Request a review.',
1755 'type' => 'write',
1756 'capabilities' => 'moodle/competency:userevidencemanageown',
1757 'ajax' => true,
1758 ),
1759 'core_competency_user_competency_start_review' => array(
1760 'classname' => 'core_competency\external',
1761 'methodname' => 'user_competency_start_review',
1762 'classpath' => '',
1763 'description' => 'Start a review.',
1764 'type' => 'write',
1765 'capabilities' => 'moodle/competency:competencygrade',
1766 'ajax' => true,
1767 ),
1768 'core_competency_user_competency_stop_review' => array(
1769 'classname' => 'core_competency\external',
1770 'methodname' => 'user_competency_stop_review',
1771 'classpath' => '',
1772 'description' => 'Stop a review.',
1773 'type' => 'write',
1774 'capabilities' => 'moodle/competency:competencygrade',
1775 'ajax' => true,
1776 ),
1777 'core_competency_user_competency_viewed' => array(
1778 'classname' => 'core_competency\external',
1779 'methodname' => 'user_competency_viewed',
1780 'classpath' => '',
1781 'description' => 'Log the user competency viewed event.',
1782 'type' => 'read',
1783 'capabilities' => 'moodle/competency:usercompetencyview',
1784 'ajax' => true,
3123c2cf 1785 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
1786 ),
1787 'core_competency_user_competency_viewed_in_plan' => array(
1788 'classname' => 'core_competency\external',
1789 'methodname' => 'user_competency_viewed_in_plan',
1790 'classpath' => '',
1791 'description' => 'Log the user competency viewed in plan event.',
1792 'type' => 'read',
1793 'capabilities' => 'moodle/competency:usercompetencyview',
1794 'ajax' => true,
3123c2cf 1795 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
1796 ),
1797 'core_competency_user_competency_viewed_in_course' => array(
1798 'classname' => 'core_competency\external',
1799 'methodname' => 'user_competency_viewed_in_course',
1800 'classpath' => '',
1801 'description' => 'Log the user competency viewed in course event',
1802 'type' => 'read',
1803 'capabilities' => 'moodle/competency:usercompetencyview',
1804 'ajax' => true,
3123c2cf 1805 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
1806 ),
1807 'core_competency_user_competency_plan_viewed' => array(
1808 'classname' => 'core_competency\external',
1809 'methodname' => 'user_competency_plan_viewed',
1810 'classpath' => '',
1811 'description' => 'Log the user competency plan viewed event.',
1812 'type' => 'read',
1813 'capabilities' => 'moodle/competency:usercompetencyview',
1814 'ajax' => true,
3123c2cf 1815 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
1816 ),
1817 'core_competency_grade_competency' => array(
1818 'classname' => 'core_competency\external',
1819 'methodname' => 'grade_competency',
1820 'classpath' => '',
1821 'description' => 'Grade a competency.',
1822 'type' => 'write',
1823 'capabilities' => 'moodle/competency:competencygrade',
1824 'ajax' => true,
1825 ),
1826 'core_competency_grade_competency_in_plan' => array(
1827 'classname' => 'core_competency\external',
1828 'methodname' => 'grade_competency_in_plan',
1829 'classpath' => '',
1830 'description' => 'Grade a competency from the user plan page.',
1831 'type' => 'write',
1832 'capabilities' => 'moodle/competency:competencygrade',
1833 'ajax' => true,
1834 ),
1835 'core_competency_grade_competency_in_course' => array(
1836 'classname' => 'core_competency\external',
1837 'methodname' => 'grade_competency_in_course',
1838 'classpath' => '',
1839 'description' => 'Grade a competency from the course page.',
1840 'type' => 'write',
1841 'capabilities' => 'moodle/competency:competencygrade',
1842 'ajax' => true,
3123c2cf 1843 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
1844 ),
1845 'core_competency_unlink_plan_from_template' => array(
1846 'classname' => 'core_competency\external',
1847 'methodname' => 'unlink_plan_from_template',
1848 'classpath' => '',
1849 'description' => 'Unlink a plan form it template.',
1850 'type' => 'write',
1851 'capabilities' => 'moodle/competency:planmanage',
1852 'ajax' => true,
1853 ),
1854 'core_competency_template_viewed' => array(
1855 'classname' => 'core_competency\external',
1856 'methodname' => 'template_viewed',
1857 'classpath' => '',
1858 'description' => 'Log event template viewed',
1859 'type' => 'read',
1860 'capabilities' => 'moodle/competency:templateview',
1861 'ajax' => true,
1862 ),
1863 'core_competency_request_review_of_user_evidence_linked_competencies' => array(
1864 'classname' => 'core_competency\external',
1865 'methodname' => 'request_review_of_user_evidence_linked_competencies',
1866 'classpath' => '',
1867 'description' => 'Send user evidence competencies in review',
1868 'type' => 'write',
1869 'capabilities' => 'moodle/competency:userevidencemanageown',
1870 'ajax' => true,
1871 ),
1872 'core_competency_update_course_competency_settings' => array(
1873 'classname' => 'core_competency\external',
1874 'methodname' => 'update_course_competency_settings',
1875 'classpath' => '',
1876 'description' => 'Update the course competency settings',
1877 'type' => 'write',
1878 'capabilities' => 'moodle/competency:coursecompetencyconfigure',
1879 'ajax' => true,
1880 ),
1e99f31e
FM
1881 'core_competency_delete_evidence' => array(
1882 'classname' => 'core_competency\external',
1883 'methodname' => 'delete_evidence',
1884 'classpath' => '',
1885 'description' => 'Delete an evidence',
1886 'type' => 'write',
1887 'capabilities' => 'moodle/competency:evidencedelete',
1888 'ajax' => true,
3123c2cf 1889 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1e99f31e 1890 ),
f23e9b6b
CB
1891
1892 'core_webservice_get_site_info' => array(
1893 'classname' => 'core_webservice_external',
1894 'methodname' => 'get_site_info',
1895 'classpath' => 'webservice/externallib.php',
1896 'description' => 'Return some site info / user info / list web service functions',
1897 'type' => 'read',
ee7295ee 1898 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
f23e9b6b 1899 )
9a0df45a 1900);
c1b65883
JM
1901
1902$services = array(
96e0194c 1903 'Moodle mobile web service' => array(
12c52b91 1904 'functions' => array(), // Unused as we add the service in each function definition, third party services would use this.
96e0194c
SH
1905 'enabled' => 0,
1906 'restrictedusers' => 0,
af03513f 1907 'shortname' => MOODLE_OFFICIAL_MOBILE_SERVICE,
106c55fb
DW
1908 'downloadfiles' => 1,
1909 'uploadfiles' => 1
96e0194c
SH
1910 ),
1911);