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