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