MDL-53888 mod_url: Choose a link option now works.
[moodle.git] / lib / db / services.php
... / ...
CommitLineData
1<?php
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
17
18/**
19 * Core external functions and service definitions.
20 *
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 *
30 * @package core_webservice
31 * @category webservice
32 * @copyright 2009 Petr Skodak
33 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
34 */
35
36$functions = array(
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',
42 'capabilities' => 'moodle/badges:viewotherbadges',
43 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
44 ),
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'
52 ),
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'
60 ),
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',
67 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
68 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
69 ),
70 'core_cohort_add_cohort_members' => array(
71 'classname' => 'core_cohort_external',
72 'methodname' => 'add_cohort_members',
73 'classpath' => 'cohort/externallib.php',
74 'description' => 'Adds cohort members.',
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'
85 ),
86 'core_cohort_delete_cohort_members' => array(
87 'classname' => 'core_cohort_external',
88 'methodname' => 'delete_cohort_members',
89 'classpath' => 'cohort/externallib.php',
90 'description' => 'Deletes cohort members.',
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'
101 ),
102 'core_cohort_get_cohort_members' => array(
103 'classname' => 'core_cohort_external',
104 'methodname' => 'get_cohort_members',
105 'classpath' => 'cohort/externallib.php',
106 'description' => 'Returns cohort members.',
107 'type' => 'read',
108 'capabilities' => 'moodle/cohort:view'
109 ),
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'
117 ),
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'
125 ),
126 'core_comment_get_comments' => array(
127 'classname' => 'core_comment_external',
128 'methodname' => 'get_comments',
129 'description' => 'Returns comments.',
130 'type' => 'read',
131 'capabilities' => 'moodle/comment:view',
132 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
133 ),
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',
139 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
140 ),
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',
146 'capabilities' => 'report/completion:view',
147 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
148 ),
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',
154 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
155 ),
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',
161 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
162 ),
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'
170 ),
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'
178 ),
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'
186 ),
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'
194 ),
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'
202 ),
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'
210 ),
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'
218 ),
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',
225 'capabilities' => 'moodle/course:update, moodle/course:viewhiddencourses',
226 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
227 ),
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',
234 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
235 ),
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',
242 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
243 ),
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',
251 'ajax' => true,
252 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
253 ),
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'
261 ),
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',
268 'ajax' => true,
269 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
270 ),
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',
278 ),
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'
287 ),
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',
294 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
295 ),
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',
302 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
303 ),
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, '
311 . 'moodle/site:accessallgroups',
312 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
313 ),
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',
321 ),
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',
328 'capabilities' => 'moodle/course:viewparticipants',
329 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
330 ),
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',
337 'loginrequired' => false,
338 'ajax' => true,
339 ),
340 'core_files_get_files' => array(
341 'classname' => 'core_files_external',
342 'methodname' => 'get_files',
343 'description' => 'browse moodle files',
344 'type' => 'read',
345 'classpath' => 'files/externallib.php',
346 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
347 ),
348 'core_files_upload' => array(
349 'classname' => 'core_files_external',
350 'methodname' => 'upload',
351 'description' => 'upload a file to moodle',
352 'type' => 'write',
353 'classpath' => 'files/externallib.php',
354 ),
355 'core_get_component_strings' => array(
356 'classname' => 'core_external',
357 'methodname' => 'get_component_strings',
358 'classpath' => 'lib/external/externallib.php',
359 'description' => 'Return all raw strings (with {$a->xxx}), for a specific component ' .
360 '- similar to core get_component_strings(), call',
361 'type' => 'read',
362 'loginrequired' => false,
363 'ajax' => true,
364 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
365 ),
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',
372 'ajax' => true,
373 ),
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',
380 'loginrequired' => false,
381 'ajax' => true,
382 ),
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',
389 'loginrequired' => false,
390 'ajax' => true,
391 ),
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'
400 ),
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',
406 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
407 ),
408 'core_grading_get_definitions' => array(
409 'classname' => 'core_grading_external',
410 'methodname' => 'get_definitions',
411 'description' => 'Get grading definitions',
412 'type' => 'read',
413 ),
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',
419 ),
420 'core_grading_save_definitions' => array(
421 'classname' => 'core_grading_external',
422 'methodname' => 'save_definitions',
423 'description' => 'Save grading definitions',
424 'type' => 'write',
425 ),
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',
433 ),
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',
440 ),
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',
447 ),
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'
455 ),
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'
463 ),
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.',
469 'type' => 'write',
470 ),
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'
478 ),
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',
485 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
486 ),
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',
493 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
494 ),
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',
501 ),
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'
509 ),
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',
516 'capabilities' => 'moodle/course:managegroups',
517 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
518 ),
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'
526 ),
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',
533 ),
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'
541 ),
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',
548 ),
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',
555 ),
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',
562 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
563 ),
564 'core_message_create_contacts' => array(
565 'classname' => 'core_message_external',
566 'methodname' => 'create_contacts',
567 'classpath' => 'message/externallib.php',
568 'description' => 'Add contacts to the contact list',
569 'type' => 'write',
570 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
571 ),
572 'core_message_delete_contacts' => array(
573 'classname' => 'core_message_external',
574 'methodname' => 'delete_contacts',
575 'classpath' => 'message/externallib.php',
576 'description' => 'Remove contacts from the contact list',
577 'type' => 'write',
578 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
579 ),
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',
586 'capabilities' => 'moodle/site:deleteownmessage',
587 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
588 ),
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',
595 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
596 ),
597 'core_message_get_contacts' => array(
598 'classname' => 'core_message_external',
599 'methodname' => 'get_contacts',
600 'classpath' => 'message/externallib.php',
601 'description' => 'Retrieve the contact list',
602 'type' => 'read',
603 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
604 ),
605 'core_message_get_messages' => array(
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',
611 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
612 ),
613 'core_message_mark_message_read' => array(
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',
619 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
620 ),
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',
627 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
628 ),
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',
635 'capabilities' => 'moodle/site:sendmessage',
636 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
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',
644 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
645 ),
646 'core_notes_create_notes' => array(
647 'classname' => 'core_notes_external',
648 'methodname' => 'create_notes',
649 'classpath' => 'notes/externallib.php',
650 'description' => 'Create notes',
651 'type' => 'write',
652 'capabilities' => 'moodle/notes:manage',
653 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
654 ),
655 'core_notes_delete_notes' => array(
656 'classname' => 'core_notes_external',
657 'methodname' => 'delete_notes',
658 'classpath' => 'notes/externallib.php',
659 'description' => 'Delete notes',
660 'type' => 'write',
661 'capabilities' => 'moodle/notes:manage',
662 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
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',
670 'capabilities' => 'moodle/notes:view',
671 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
672 ),
673 'core_notes_get_notes' => array(
674 'classname' => 'core_notes_external',
675 'methodname' => 'get_notes',
676 'classpath' => 'notes/externallib.php',
677 'description' => 'Get notes',
678 'type' => 'read',
679 'capabilities' => 'moodle/notes:view'
680 ),
681 'core_notes_update_notes' => array(
682 'classname' => 'core_notes_external',
683 'methodname' => 'update_notes',
684 'classpath' => 'notes/externallib.php',
685 'description' => 'Update notes',
686 'type' => 'write',
687 'capabilities' => 'moodle/notes:manage'
688 ),
689 'core_notes_view_notes' => array(
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',
695 'capabilities' => 'moodle/notes:view',
696 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
697 ),
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',
703 'loginrequired' => false,
704 'ajax' => true,
705 ),
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',
713 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
714 ),
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',
720 'capabilities' => 'moodle/rating:view',
721 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
722 ),
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'
730 ),
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'
738 ),
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',
744 'ajax' => true,
745 ),
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',
751 'ajax' => true,
752 ),
753 'core_tag_update_tags' => array(
754 'classname' => 'core_tag_external',
755 'methodname' => 'update_tags',
756 'description' => 'Updates tags',
757 'type' => 'write',
758 'ajax' => true,
759 ),
760 'core_update_inplace_editable' => array(
761 'classname' => 'core_external',
762 'methodname' => 'update_inplace_editable',
763 'classpath' => 'lib/external/externallib.php',
764 'description' => 'Generic service to update title',
765 'type' => 'write',
766 'loginrequired' => true,
767 'ajax' => true,
768 ),
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',
775 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
776 ),
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',
783 'capabilities' => 'moodle/user:manageownfiles',
784 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
785 ),
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'
793 ),
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'
801 ),
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, '
809 . 'moodle/site:accessallgroups',
810 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
811 ),
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'
819 ),
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',
827 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update',
828 'ajax' => true,
829 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
830 ),
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',
837 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
838 ),
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',
846 ),
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',
854 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
855 ),
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',
863 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
864 ),
865
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 ),
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 ),
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',
1603 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1604 )
1605);
1606
1607$services = array(
1608 'Moodle mobile web service' => array(
1609 'functions' => array(), // Unused as we add the service in each function definition, third party services would use this.
1610 'enabled' => 0,
1611 'restrictedusers' => 0,
1612 'shortname' => MOODLE_OFFICIAL_MOBILE_SERVICE,
1613 'downloadfiles' => 1,
1614 'uploadfiles' => 1
1615 ),
1616);