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