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