MDL-54700 message: added toggle contact button to user profile
[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),
12d8c7b2 615 'ajax' => true,
d6731600 616 ),
d6731600 617 'core_message_delete_contacts' => array(
f23e9b6b
CB
618 'classname' => 'core_message_external',
619 'methodname' => 'delete_contacts',
620 'classpath' => 'message/externallib.php',
d6731600 621 'description' => 'Remove contacts from the contact list',
f23e9b6b 622 'type' => 'write',
c6e97f54 623 'ajax' => true,
ee7295ee 624 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
12d8c7b2 625 'ajax' => true,
d6731600 626 ),
dec0cd99
MN
627 'core_message_delete_conversation' => array(
628 'classname' => 'core_message_external',
629 'methodname' => 'delete_conversation',
630 'classpath' => 'message/externallib.php',
631 'description' => 'Deletes a conversation.',
632 'type' => 'write',
633 'capabilities' => 'moodle/site:deleteownmessage',
634 'ajax' => true,
635 ),
f23e9b6b
CB
636 'core_message_delete_message' => array(
637 'classname' => 'core_message_external',
638 'methodname' => 'delete_message',
639 'classpath' => 'message/externallib.php',
640 'description' => 'Deletes a message.',
641 'type' => 'write',
ee7295ee 642 'capabilities' => 'moodle/site:deleteownmessage',
3090f52f 643 'ajax' => true,
ee7295ee 644 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
d6731600 645 ),
f23e9b6b
CB
646 'core_message_get_blocked_users' => array(
647 'classname' => 'core_message_external',
648 'methodname' => 'get_blocked_users',
649 'classpath' => 'message/externallib.php',
650 'description' => 'Retrieve a list of users blocked',
651 'type' => 'read',
ee7295ee 652 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
d6731600 653 ),
9aa012b5
MN
654 'core_message_data_for_messagearea_conversations' => array(
655 'classname' => 'core_message_external',
656 'methodname' => 'data_for_messagearea_conversations',
657 'classpath' => 'message/externallib.php',
658 'description' => 'Retrieve the template data for the conversation list',
659 'type' => 'read',
660 'ajax' => true,
661 ),
662 'core_message_data_for_messagearea_contacts' => array(
663 'classname' => 'core_message_external',
664 'methodname' => 'data_for_messagearea_contacts',
665 'classpath' => 'message/externallib.php',
666 'description' => 'Retrieve the template data for the contact list',
667 'type' => 'read',
668 'ajax' => true,
669 ),
3cd13828
MN
670 'core_message_data_for_messagearea_messages' => array(
671 'classname' => 'core_message_external',
672 'methodname' => 'data_for_messagearea_messages',
673 'classpath' => 'message/externallib.php',
674 'description' => 'Retrieve the template data for the messages',
675 'type' => 'read',
676 'ajax' => true,
677 ),
c060cd49
MN
678 'core_message_data_for_messagearea_get_most_recent_message' => array(
679 'classname' => 'core_message_external',
680 'methodname' => 'data_for_messagearea_get_most_recent_message',
681 'classpath' => 'message/externallib.php',
682 'description' => 'Retrieve the template data for the most recent message',
683 'type' => 'read',
684 'ajax' => true,
685 ),
c6e97f54
MN
686 'core_message_data_for_messagearea_get_profile' => array(
687 'classname' => 'core_message_external',
688 'methodname' => 'data_for_messagearea_get_profile',
689 'classpath' => 'message/externallib.php',
690 'description' => 'Retrieve the template data for the users\'s profile',
691 'type' => 'read',
692 'ajax' => true,
693 ),
d6731600 694 'core_message_get_contacts' => array(
f23e9b6b
CB
695 'classname' => 'core_message_external',
696 'methodname' => 'get_contacts',
697 'classpath' => 'message/externallib.php',
d6731600 698 'description' => 'Retrieve the contact list',
f23e9b6b 699 'type' => 'read',
ee7295ee 700 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
d6731600 701 ),
aff9da17 702 'core_message_get_messages' => array(
f23e9b6b
CB
703 'classname' => 'core_message_external',
704 'methodname' => 'get_messages',
705 'classpath' => 'message/externallib.php',
706 'description' => 'Retrieve a list of messages sent and received by a user (conversations, notifications or both)',
707 'type' => 'read',
ee7295ee 708 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
60ab2e1b 709 ),
a84f89ca 710 'core_message_mark_message_read' => array(
f23e9b6b
CB
711 'classname' => 'core_message_external',
712 'methodname' => 'mark_message_read',
713 'classpath' => 'message/externallib.php',
714 'description' => 'Mark a single message as read, trigger message_viewed event.',
715 'type' => 'write',
ee7295ee 716 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
a84f89ca 717 ),
f23e9b6b
CB
718 'core_message_search_contacts' => array(
719 'classname' => 'core_message_external',
720 'methodname' => 'search_contacts',
721 'classpath' => 'message/externallib.php',
722 'description' => 'Search for contacts',
723 'type' => 'read',
ee7295ee 724 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
419b1128 725 ),
f23e9b6b
CB
726 'core_message_send_instant_messages' => array(
727 'classname' => 'core_message_external',
728 'methodname' => 'send_instant_messages',
729 'classpath' => 'message/externallib.php',
730 'description' => 'Send instant messages',
731 'type' => 'write',
ee7295ee 732 'capabilities' => 'moodle/site:sendmessage',
c060cd49 733 'ajax' => true,
ee7295ee 734 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
f23e9b6b
CB
735 ),
736 'core_message_unblock_contacts' => array(
737 'classname' => 'core_message_external',
738 'methodname' => 'unblock_contacts',
739 'classpath' => 'message/externallib.php',
740 'description' => 'Unblock contacts',
741 'type' => 'write',
c6e97f54 742 'ajax' => true,
ee7295ee 743 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
5d1017e1 744 ),
5d1017e1 745 'core_notes_create_notes' => array(
f23e9b6b
CB
746 'classname' => 'core_notes_external',
747 'methodname' => 'create_notes',
748 'classpath' => 'notes/externallib.php',
8d46dabb 749 'description' => 'Create notes',
f23e9b6b 750 'type' => 'write',
ee7295ee
JL
751 'capabilities' => 'moodle/notes:manage',
752 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
8d46dabb 753 ),
34348b2b 754 'core_notes_delete_notes' => array(
f23e9b6b
CB
755 'classname' => 'core_notes_external',
756 'methodname' => 'delete_notes',
757 'classpath' => 'notes/externallib.php',
34348b2b 758 'description' => 'Delete notes',
f23e9b6b 759 'type' => 'write',
ee7295ee
JL
760 'capabilities' => 'moodle/notes:manage',
761 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
f23e9b6b
CB
762 ),
763 'core_notes_get_course_notes' => array(
764 'classname' => 'core_notes_external',
765 'methodname' => 'get_course_notes',
766 'classpath' => 'notes/externallib.php',
767 'description' => 'Returns all notes in specified course (or site), for the specified user.',
768 'type' => 'read',
ee7295ee
JL
769 'capabilities' => 'moodle/notes:view',
770 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
34348b2b 771 ),
34348b2b 772 'core_notes_get_notes' => array(
f23e9b6b
CB
773 'classname' => 'core_notes_external',
774 'methodname' => 'get_notes',
775 'classpath' => 'notes/externallib.php',
34348b2b 776 'description' => 'Get notes',
f23e9b6b
CB
777 'type' => 'read',
778 'capabilities' => 'moodle/notes:view'
34348b2b 779 ),
34348b2b 780 'core_notes_update_notes' => array(
f23e9b6b
CB
781 'classname' => 'core_notes_external',
782 'methodname' => 'update_notes',
783 'classpath' => 'notes/externallib.php',
34348b2b 784 'description' => 'Update notes',
f23e9b6b
CB
785 'type' => 'write',
786 'capabilities' => 'moodle/notes:manage'
34348b2b 787 ),
a80b5518 788 'core_notes_view_notes' => array(
f23e9b6b
CB
789 'classname' => 'core_notes_external',
790 'methodname' => 'view_notes',
791 'classpath' => 'notes/externallib.php',
792 'description' => 'Simulates the web interface view of notes/index.php: trigger events.',
793 'type' => 'write',
ee7295ee
JL
794 'capabilities' => 'moodle/notes:view',
795 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
9028d9b5 796 ),
f23e9b6b
CB
797 'core_output_load_template' => array(
798 'classname' => 'core\output\external',
799 'methodname' => 'load_template',
800 'description' => 'Load a template for a renderable',
801 'type' => 'read',
5041600d
RT
802 'loginrequired' => false,
803 'ajax' => true,
0ff4ebb4 804 ),
f23e9b6b
CB
805 // Question related functions.
806 'core_question_update_flag' => array(
807 'classname' => 'core_question_external',
808 'methodname' => 'update_flag',
809 'description' => 'Update the flag state of a question attempt.',
810 'type' => 'write',
811 'capabilities' => 'moodle/question:flag',
ee7295ee 812 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
3f0ea6d8 813 ),
f23e9b6b
CB
814 'core_rating_get_item_ratings' => array(
815 'classname' => 'core_rating_external',
816 'methodname' => 'get_item_ratings',
817 'description' => 'Retrieve all the ratings for an item.',
818 'type' => 'read',
ee7295ee
JL
819 'capabilities' => 'moodle/rating:view',
820 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
5d1017e1 821 ),
afb7799a
JL
822 'core_rating_add_rating' => array(
823 'classname' => 'core_rating_external',
824 'methodname' => 'add_rating',
825 'description' => 'Rates an item.',
826 'type' => 'write',
827 'capabilities' => 'moodle/rating:rate',
828 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
829 ),
f23e9b6b
CB
830 'core_role_assign_roles' => array(
831 'classname' => 'core_role_external',
832 'methodname' => 'assign_roles',
833 'classpath' => 'enrol/externallib.php',
834 'description' => 'Manual role assignments.',
835 'type' => 'write',
836 'capabilities' => 'moodle/role:assign'
0bf486a6 837 ),
f23e9b6b
CB
838 'core_role_unassign_roles' => array(
839 'classname' => 'core_role_external',
840 'methodname' => 'unassign_roles',
841 'classpath' => 'enrol/externallib.php',
842 'description' => 'Manual role unassignments.',
843 'type' => 'write',
844 'capabilities' => 'moodle/role:assign'
11e76602 845 ),
f23e9b6b
CB
846 'core_tag_get_tagindex' => array(
847 'classname' => 'core_tag_external',
848 'methodname' => 'get_tagindex',
849 'description' => 'Gets tag index page for one tag and one tag area',
850 'type' => 'read',
5041600d 851 'ajax' => true,
11e76602 852 ),
f23e9b6b
CB
853 'core_tag_get_tags' => array(
854 'classname' => 'core_tag_external',
855 'methodname' => 'get_tags',
856 'description' => 'Gets tags by their ids',
857 'type' => 'read',
5041600d 858 'ajax' => true,
11e76602 859 ),
f23e9b6b
CB
860 'core_tag_update_tags' => array(
861 'classname' => 'core_tag_external',
862 'methodname' => 'update_tags',
863 'description' => 'Updates tags',
864 'type' => 'write',
5041600d 865 'ajax' => true,
cc73ea07 866 ),
cdc5f978 867 'core_update_inplace_editable' => array(
f23e9b6b
CB
868 'classname' => 'core_external',
869 'methodname' => 'update_inplace_editable',
870 'classpath' => 'lib/external/externallib.php',
cdc5f978 871 'description' => 'Generic service to update title',
f23e9b6b 872 'type' => 'write',
5041600d
RT
873 'loginrequired' => true,
874 'ajax' => true,
c66dc3df 875 ),
f23e9b6b
CB
876 'core_user_add_user_device' => array(
877 'classname' => 'core_user_external',
878 'methodname' => 'add_user_device',
879 'classpath' => 'user/externallib.php',
880 'description' => 'Store mobile user devices information for PUSH Notifications.',
881 'type' => 'write',
ee7295ee 882 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
9bdcf579 883 ),
f23e9b6b
CB
884 'core_user_add_user_private_files' => array(
885 'classname' => 'core_user_external',
886 'methodname' => 'add_user_private_files',
887 'classpath' => 'user/externallib.php',
888 'description' => 'Copy files from a draft area to users private files area.',
889 'type' => 'write',
ee7295ee
JL
890 'capabilities' => 'moodle/user:manageownfiles',
891 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
25c49a85 892 ),
f23e9b6b
CB
893 'core_user_create_users' => array(
894 'classname' => 'core_user_external',
895 'methodname' => 'create_users',
896 'classpath' => 'user/externallib.php',
897 'description' => 'Create users.',
898 'type' => 'write',
899 'capabilities' => 'moodle/user:create'
23b398fc 900 ),
f23e9b6b
CB
901 'core_user_delete_users' => array(
902 'classname' => 'core_user_external',
903 'methodname' => 'delete_users',
904 'classpath' => 'user/externallib.php',
905 'description' => 'Delete users.',
906 'type' => 'write',
907 'capabilities' => 'moodle/user:delete'
6c785afa 908 ),
f23e9b6b
CB
909 'core_user_get_course_user_profiles' => array(
910 'classname' => 'core_user_external',
911 'methodname' => 'get_course_user_profiles',
912 'classpath' => 'user/externallib.php',
913 'description' => 'Get course user profiles (each of the profils matching a course id and a user id),.',
914 'type' => 'read',
915 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, '
ee7295ee
JL
916 . 'moodle/site:accessallgroups',
917 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
6c785afa 918 ),
f23e9b6b
CB
919 'core_user_get_users' => array(
920 'classname' => 'core_user_external',
921 'methodname' => 'get_users',
922 'classpath' => 'user/externallib.php',
923 'description' => 'search for users matching the parameters',
924 'type' => 'read',
925 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update'
db5b6971 926 ),
f23e9b6b
CB
927 'core_user_get_users_by_field' => array(
928 'classname' => 'core_user_external',
929 'methodname' => 'get_users_by_field',
930 'classpath' => 'user/externallib.php',
931 'description' => 'Retrieve users\' information for a specified unique field - If you want to do a user search, use '
932 . 'core_user_get_users()',
933 'type' => 'read',
ee7295ee 934 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update',
5041600d 935 'ajax' => true,
ee7295ee 936 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
8e355853 937 ),
f23e9b6b
CB
938 'core_user_remove_user_device' => array(
939 'classname' => 'core_user_external',
940 'methodname' => 'remove_user_device',
941 'classpath' => 'user/externallib.php',
942 'description' => 'Remove a user device from the Moodle database.',
943 'type' => 'write',
ee7295ee 944 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
ef4c23cc 945 ),
f23e9b6b
CB
946 'core_user_update_users' => array(
947 'classname' => 'core_user_external',
948 'methodname' => 'update_users',
949 'classpath' => 'user/externallib.php',
950 'description' => 'Update users.',
951 'type' => 'write',
952 'capabilities' => 'moodle/user:update',
c026a28d 953 ),
f23e9b6b
CB
954 'core_user_view_user_list' => array(
955 'classname' => 'core_user_external',
956 'methodname' => 'view_user_list',
957 'classpath' => 'user/externallib.php',
958 'description' => 'Simulates the web-interface view of user/index.php (triggering events),.',
959 'type' => 'write',
960 'capabilities' => 'moodle/course:viewparticipants',
ee7295ee 961 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
7361b968 962 ),
f23e9b6b
CB
963 'core_user_view_user_profile' => array(
964 'classname' => 'core_user_external',
965 'methodname' => 'view_user_profile',
966 'classpath' => 'user/externallib.php',
967 'description' => 'Simulates the web-interface view of user/view.php and user/profile.php (triggering events),.',
968 'type' => 'write',
969 'capabilities' => 'moodle/user:viewdetails',
ee7295ee 970 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
f4fb827e 971 ),
45fec983
JL
972 'core_user_get_user_preferences' => array(
973 'classname' => 'core_user_external',
974 'methodname' => 'get_user_preferences',
975 'classpath' => 'user/externallib.php',
976 'description' => 'Return user preferences.',
977 'type' => 'read',
978 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
979 ),
d44e2e42
JL
980 'core_user_update_picture' => array(
981 'classname' => 'core_user_external',
982 'methodname' => 'update_picture',
983 'classpath' => 'user/externallib.php',
984 'description' => 'Update or delete the user picture in the site',
985 'type' => 'write',
986 'capabilities' => 'moodle/user:editownprofile, moodle/user:editprofile',
987 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
988 ),
649777fb
JL
989 'core_user_set_user_preferences' => array(
990 'classname' => 'core_user_external',
991 'methodname' => 'set_user_preferences',
992 'classpath' => 'user/externallib.php',
993 'description' => 'Set user preferences.',
994 'type' => 'write',
995 'capabilities' => 'moodle/site:config',
996 ),
3e8145a3
JL
997 'core_user_agree_site_policy' => array(
998 'classname' => 'core_user_external',
999 'methodname' => 'agree_site_policy',
1000 'classpath' => 'user/externallib.php',
1001 'description' => 'Agree the site policy for the current user.',
1002 'type' => 'write',
1003 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1004 ),
649777fb 1005
81de839f
FM
1006 // Competencies functions.
1007 'core_competency_create_competency_framework' => array(
1008 'classname' => 'core_competency\external',
1009 'methodname' => 'create_competency_framework',
1010 'classpath' => '',
1011 'description' => 'Creates new competency frameworks.',
1012 'type' => 'write',
1013 'capabilities' => 'moodle/competency:competencymanage',
1014 'ajax' => true,
1015 ),
1016 'core_competency_read_competency_framework' => array(
1017 'classname' => 'core_competency\external',
1018 'methodname' => 'read_competency_framework',
1019 'classpath' => '',
1020 'description' => 'Load a summary of a competency framework.',
1021 'type' => 'read',
1022 'capabilities' => 'moodle/competency:competencyview',
1023 'ajax' => true,
1024 ),
1025 'core_competency_duplicate_competency_framework' => array(
1026 'classname' => 'core_competency\external',
1027 'methodname' => 'duplicate_competency_framework',
1028 'classpath' => '',
1029 'description' => 'Duplicate a competency framework.',
1030 'type' => 'write',
1031 'capabilities' => 'moodle/competency:competencymanage',
1032 'ajax' => true,
1033 ),
1034 'core_competency_delete_competency_framework' => array(
1035 'classname' => 'core_competency\external',
1036 'methodname' => 'delete_competency_framework',
1037 'classpath' => '',
1038 'description' => 'Delete a competency framework.',
1039 'type' => 'write',
1040 'capabilities' => 'moodle/competency:competencymanage',
1041 'ajax' => true,
1042 ),
1043 'core_competency_update_competency_framework' => array(
1044 'classname' => 'core_competency\external',
1045 'methodname' => 'update_competency_framework',
1046 'classpath' => '',
1047 'description' => 'Update a competency framework.',
1048 'type' => 'write',
1049 'capabilities' => 'moodle/competency:competencymanage',
1050 'ajax' => true,
1051 ),
1052 'core_competency_list_competency_frameworks' => array(
1053 'classname' => 'core_competency\external',
1054 'methodname' => 'list_competency_frameworks',
1055 'classpath' => '',
1056 'description' => 'Load a list of a competency frameworks.',
1057 'type' => 'read',
1058 'capabilities' => 'moodle/competency:competencyview',
1059 'ajax' => true,
1060 ),
1061 'core_competency_count_competency_frameworks' => array(
1062 'classname' => 'core_competency\external',
1063 'methodname' => 'count_competency_frameworks',
1064 'classpath' => '',
1065 'description' => 'Count a list of a competency frameworks.',
1066 'type' => 'read',
1067 'capabilities' => 'moodle/competency:competencyview',
1068 'ajax' => true,
1069 ),
1070 'core_competency_competency_framework_viewed' => array(
1071 'classname' => 'core_competency\external',
1072 'methodname' => 'competency_framework_viewed',
1073 'classpath' => '',
1074 'description' => 'Log event competency framework viewed',
1075 'type' => 'read',
1076 'capabilities' => 'moodle/competency:competencyview',
1077 'ajax' => true,
1078 ),
1079 'core_competency_create_competency' => array(
1080 'classname' => 'core_competency\external',
1081 'methodname' => 'create_competency',
1082 'classpath' => '',
1083 'description' => 'Creates new competencies.',
1084 'type' => 'write',
1085 'capabilities' => 'moodle/competency:competencymanage',
1086 'ajax' => true,
1087 ),
1088 'core_competency_read_competency' => array(
1089 'classname' => 'core_competency\external',
1090 'methodname' => 'read_competency',
1091 'classpath' => '',
1092 'description' => 'Load a summary of a competency.',
1093 'type' => 'read',
1094 'capabilities' => 'moodle/competency:competencyview',
1095 'ajax' => true,
1096 ),
1097 'core_competency_competency_viewed' => array(
1098 'classname' => 'core_competency\external',
1099 'methodname' => 'competency_viewed',
1100 'classpath' => '',
1101 'description' => 'Log event competency viewed',
1102 'type' => 'read',
1103 'capabilities' => 'moodle/competency:competencyview',
1104 'ajax' => true,
3123c2cf 1105 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
1106 ),
1107 'core_competency_delete_competency' => array(
1108 'classname' => 'core_competency\external',
1109 'methodname' => 'delete_competency',
1110 'classpath' => '',
1111 'description' => 'Delete a competency.',
1112 'type' => 'write',
1113 'capabilities' => 'moodle/competency:competencymanage',
1114 'ajax' => true,
1115 ),
1116 'core_competency_update_competency' => array(
1117 'classname' => 'core_competency\external',
1118 'methodname' => 'update_competency',
1119 'classpath' => '',
1120 'description' => 'Update a competency.',
1121 'type' => 'write',
1122 'capabilities' => 'moodle/competency:competencymanage',
1123 'ajax' => true,
1124 ),
1125 'core_competency_list_competencies' => array(
1126 'classname' => 'core_competency\external',
1127 'methodname' => 'list_competencies',
1128 'classpath' => '',
1129 'description' => 'Load a list of a competencies.',
1130 'type' => 'read',
1131 'capabilities' => 'moodle/competency:competencyview',
1132 'ajax' => true,
1133 ),
1134 'core_competency_list_competencies_in_template' => array(
1135 'classname' => 'core_competency\external',
1136 'methodname' => 'list_competencies_in_template',
1137 'classpath' => '',
1138 'description' => 'Load a list of a competencies for a given template.',
1139 'type' => 'read',
1140 'capabilities' => 'moodle/competency:competencyview',
1141 'ajax' => true,
1142 ),
1143 'core_competency_count_competencies' => array(
1144 'classname' => 'core_competency\external',
1145 'methodname' => 'count_competencies',
1146 'classpath' => '',
1147 'description' => 'Count a list of a competencies.',
1148 'type' => 'read',
1149 'capabilities' => 'moodle/competency:competencyview',
1150 'ajax' => true,
1151 ),
1152 'core_competency_count_competencies_in_template' => array(
1153 'classname' => 'core_competency\external',
1154 'methodname' => 'count_competencies_in_template',
1155 'classpath' => '',
1156 'description' => 'Count a list of a competencies for a given template.',
1157 'type' => 'read',
1158 'capabilities' => 'moodle/competency:competencyview',
1159 'ajax' => true,
1160 ),
1161 'core_competency_search_competencies' => array(
1162 'classname' => 'core_competency\external',
1163 'methodname' => 'search_competencies',
1164 'classpath' => '',
1165 'description' => 'Search a list of a competencies.',
1166 'type' => 'read',
1167 'capabilities' => 'moodle/competency:competencyview',
1168 'ajax' => true,
1169 ),
1170 'core_competency_set_parent_competency' => array(
1171 'classname' => 'core_competency\external',
1172 'methodname' => 'set_parent_competency',
1173 'classpath' => '',
1174 'description' => 'Set a new parent for a competency.',
1175 'type' => 'write',
1176 'capabilities' => 'moodle/competency:competencymanage',
1177 'ajax' => true,
1178 ),
1179 'core_competency_move_up_competency' => array(
1180 'classname' => 'core_competency\external',
1181 'methodname' => 'move_up_competency',
1182 'classpath' => '',
1183 'description' => 'Re-order a competency.',
1184 'type' => 'write',
1185 'capabilities' => 'moodle/competency:competencymanage',
1186 'ajax' => true,
1187 ),
1188 'core_competency_move_down_competency' => array(
1189 'classname' => 'core_competency\external',
1190 'methodname' => 'move_down_competency',
1191 'classpath' => '',
1192 'description' => 'Re-order a competency.',
1193 'type' => 'write',
1194 'capabilities' => 'moodle/competency:competencymanage',
1195 'ajax' => true,
1196 ),
1197 'core_competency_list_course_competencies' => array(
1198 'classname' => 'core_competency\external',
1199 'methodname' => 'list_course_competencies',
1200 'classpath' => '',
1201 'description' => 'List the competencies in a course',
1202 'type' => 'read',
1203 'capabilities' => 'moodle/competency:coursecompetencyview',
1204 'ajax' => true,
3123c2cf 1205 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
1206 ),
1207 'core_competency_count_competencies_in_course' => array(
1208 'classname' => 'core_competency\external',
1209 'methodname' => 'count_competencies_in_course',
1210 'classpath' => '',
1211 'description' => 'List the competencies in a course',
1212 'type' => 'read',
1213 'capabilities' => 'moodle/competency:coursecompetencyview',
1214 'ajax' => true,
1215 ),
1216 'core_competency_count_courses_using_competency' => array(
1217 'classname' => 'core_competency\external',
1218 'methodname' => 'count_courses_using_competency',
1219 'classpath' => '',
1220 'description' => 'List the courses using a competency',
1221 'type' => 'read',
1222 'capabilities' => 'moodle/competency:coursecompetencyview',
1223 'ajax' => true,
1224 ),
1225 'core_competency_add_competency_to_course' => array(
1226 'classname' => 'core_competency\external',
1227 'methodname' => 'add_competency_to_course',
1228 'classpath' => '',
1229 'description' => 'Add the competency to a course',
1230 'type' => 'write',
1231 'capabilities' => 'moodle/competency:coursecompetencymanage',
1232 'ajax' => true,
1233 ),
1234 'core_competency_add_competency_to_template' => array(
1235 'classname' => 'core_competency\external',
1236 'methodname' => 'add_competency_to_template',
1237 'classpath' => '',
1238 'description' => 'Add the competency to a template',
1239 'type' => 'write',
1240 'capabilities' => 'moodle/competency:templatemanage',
1241 'ajax' => true,
1242 ),
1243 'core_competency_remove_competency_from_course' => array(
1244 'classname' => 'core_competency\external',
1245 'methodname' => 'remove_competency_from_course',
1246 'classpath' => '',
1247 'description' => 'Remove a competency from a course',
1248 'type' => 'write',
1249 'capabilities' => 'moodle/competency:coursecompetencymanage',
1250 'ajax' => true,
1251 ),
1252 'core_competency_set_course_competency_ruleoutcome' => array(
1253 'classname' => 'core_competency\external',
1254 'methodname' => 'set_course_competency_ruleoutcome',
1255 'classpath' => '',
1256 'description' => 'Modify the ruleoutcome value for course competency',
1257 'type' => 'write',
1258 'capabilities' => 'moodle/competency:coursecompetencymanage',
1259 'ajax' => true,
1260 ),
1261 'core_competency_remove_competency_from_template' => array(
1262 'classname' => 'core_competency\external',
1263 'methodname' => 'remove_competency_from_template',
1264 'classpath' => '',
1265 'description' => 'Remove a competency from a template',
1266 'type' => 'write',
1267 'capabilities' => 'moodle/competency:templatemanage',
1268 'ajax' => true,
1269 ),
1270 'core_competency_reorder_course_competency' => array(
1271 'classname' => 'core_competency\external',
1272 'methodname' => 'reorder_course_competency',
1273 'classpath' => '',
1274 'description' => 'Move a course competency to a new relative sort order.',
1275 'type' => 'write',
1276 'capabilities' => 'moodle/competency:coursecompetencymanage',
1277 'ajax' => true,
1278 ),
1279 'core_competency_reorder_template_competency' => array(
1280 'classname' => 'core_competency\external',
1281 'methodname' => 'reorder_template_competency',
1282 'classpath' => '',
1283 'description' => 'Move a template competency to a new relative sort order.',
1284 'type' => 'write',
1285 'capabilities' => 'moodle/competency:templatemanage',
1286 'ajax' => true,
1287 ),
1288 'core_competency_create_template' => array(
1289 'classname' => 'core_competency\external',
1290 'methodname' => 'create_template',
1291 'classpath' => '',
1292 'description' => 'Creates new learning plan templates.',
1293 'type' => 'write',
1294 'capabilities' => 'moodle/competency:templatemanage',
1295 'ajax' => true,
1296 ),
1297 'core_competency_duplicate_template' => array(
1298 'classname' => 'core_competency\external',
1299 'methodname' => 'duplicate_template',
1300 'classpath' => '',
1301 'description' => 'Duplicate learning plan template.',
1302 'type' => 'write',
1303 'capabilities' => 'moodle/competency:templatemanage',
1304 'ajax' => true,
1305 ),
1306 'core_competency_read_template' => array(
1307 'classname' => 'core_competency\external',
1308 'methodname' => 'read_template',
1309 'classpath' => '',
1310 'description' => 'Load a summary of a learning plan template.',
1311 'type' => 'read',
1312 'capabilities' => 'moodle/competency:templateview',
1313 'ajax' => true,
1314 ),
1315 'core_competency_delete_template' => array(
1316 'classname' => 'core_competency\external',
1317 'methodname' => 'delete_template',
1318 'classpath' => '',
1319 'description' => 'Delete a learning plan template.',
1320 'type' => 'write',
1321 'capabilities' => 'moodle/competency:templatemanage',
1322 'ajax' => true,
1323 ),
1324 'core_competency_update_template' => array(
1325 'classname' => 'core_competency\external',
1326 'methodname' => 'update_template',
1327 'classpath' => '',
1328 'description' => 'Update a learning plan template.',
1329 'type' => 'write',
1330 'capabilities' => 'moodle/competency:templatemanage',
1331 'ajax' => true,
1332 ),
1333 'core_competency_list_templates' => array(
1334 'classname' => 'core_competency\external',
1335 'methodname' => 'list_templates',
1336 'classpath' => '',
1337 'description' => 'Load a list of a learning plan templates.',
1338 'type' => 'read',
1339 'capabilities' => 'moodle/competency:templateview',
1340 'ajax' => true,
1341 ),
1342 'core_competency_list_templates_using_competency' => array(
1343 'classname' => 'core_competency\external',
1344 'methodname' => 'list_templates_using_competency',
1345 'classpath' => '',
1346 'description' => 'Load a list of a learning plan templates for a given competency.',
1347 'type' => 'read',
1348 'capabilities' => 'moodle/competency:templateview',
1349 'ajax' => true,
1350 ),
1351 'core_competency_count_templates' => array(
1352 'classname' => 'core_competency\external',
1353 'methodname' => 'count_templates',
1354 'classpath' => '',
1355 'description' => 'Count a list of a learning plan templates.',
1356 'type' => 'read',
1357 'capabilities' => 'moodle/competency:templateview',
1358 'ajax' => true,
1359 ),
1360 'core_competency_count_templates_using_competency' => array(
1361 'classname' => 'core_competency\external',
1362 'methodname' => 'count_templates_using_competency',
1363 'classpath' => '',
1364 'description' => 'Count a list of a learning plan templates for a given competency.',
1365 'type' => 'read',
1366 'capabilities' => 'moodle/competency:templateview',
1367 'ajax' => true,
1368 ),
1369 'core_competency_create_plan' => array(
1370 'classname' => 'core_competency\external',
1371 'methodname' => 'create_plan',
1372 'classpath' => '',
1373 'description' => 'Creates a learning plan.',
1374 'type' => 'write',
1375 'capabilities' => 'moodle/competency:planmanage',
1376 'ajax' => true,
1377 ),
1378 'core_competency_update_plan' => array(
1379 'classname' => 'core_competency\external',
1380 'methodname' => 'update_plan',
1381 'classpath' => '',
1382 'description' => 'Updates a learning plan.',
1383 'type' => 'write',
1384 'capabilities' => 'moodle/competency:planmanage',
1385 'ajax' => true,
1386 ),
1387 'core_competency_complete_plan' => array(
1388 'classname' => 'core_competency\external',
1389 'methodname' => 'complete_plan',
1390 'classpath' => '',
1391 'description' => 'Complete learning plan.',
1392 'type' => 'write',
1393 'capabilities' => 'moodle/competency:planmanage',
1394 'ajax' => true,
1395 ),
1396 'core_competency_reopen_plan' => array(
1397 'classname' => 'core_competency\external',
1398 'methodname' => 'reopen_plan',
1399 'classpath' => '',
1400 'description' => 'Reopen learning plan.',
1401 'type' => 'write',
1402 'capabilities' => 'moodle/competency:planmanage',
1403 'ajax' => true,
1404 ),
1405 'core_competency_read_plan' => array(
1406 'classname' => 'core_competency\external',
1407 'methodname' => 'read_plan',
1408 'classpath' => '',
1409 'description' => 'Load a learning plan.',
1410 'type' => 'read',
1411 'capabilities' => 'moodle/competency:planviewown',
1412 'ajax' => true,
1413 ),
1414 'core_competency_delete_plan' => array(
1415 'classname' => 'core_competency\external',
1416 'methodname' => 'delete_plan',
1417 'classpath' => '',
1418 'description' => 'Delete a learning plan.',
1419 'type' => 'write',
1420 'capabilities' => 'moodle/competency:planmanage',
1421 'ajax' => true,
1422 ),
1423 'core_competency_list_user_plans' => array(
1424 'classname' => 'core_competency\external',
1425 'methodname' => 'list_user_plans',
1426 'classpath' => '',
1427 'description' => 'List a user\'s learning plans.',
1428 'type' => 'read',
1429 'capabilities' => 'moodle/competency:planviewown',
1430 'ajax' => true,
1431 ),
1432 'core_competency_list_plan_competencies' => array(
1433 'classname' => 'core_competency\external',
1434 'methodname' => 'list_plan_competencies',
1435 'classpath' => '',
1436 'description' => 'List the competencies in a plan',
1437 'type' => 'read',
1438 'capabilities' => 'moodle/competency:planviewown',
1439 'ajax' => true,
1440 ),
1441 'core_competency_add_competency_to_plan' => array(
1442 'classname' => 'core_competency\external',
1443 'methodname' => 'add_competency_to_plan',
1444 'classpath' => '',
1445 'description' => 'Add the competency to a learning plan',
1446 'type' => 'write',
1447 'capabilities' => 'moodle/competency:planmanage',
1448 'ajax' => true,
1449 ),
1450 'core_competency_remove_competency_from_plan' => array(
1451 'classname' => 'core_competency\external',
1452 'methodname' => 'remove_competency_from_plan',
1453 'classpath' => '',
1454 'description' => 'Remove the competency from a learning plan',
1455 'type' => 'write',
1456 'capabilities' => 'moodle/competency:planmanage',
1457 'ajax' => true,
1458 ),
1459 'core_competency_reorder_plan_competency' => array(
1460 'classname' => 'core_competency\external',
1461 'methodname' => 'reorder_plan_competency',
1462 'classpath' => '',
1463 'description' => 'Move a plan competency to a new relative sort order.',
1464 'type' => 'write',
1465 'capabilities' => 'moodle/competency:planmanage',
1466 'ajax' => true,
1467 ),
1468 'core_competency_plan_request_review' => array(
1469 'classname' => 'core_competency\external',
1470 'methodname' => 'plan_request_review',
1471 'classpath' => '',
1472 'description' => 'Request for a plan to be reviewed.',
1473 'type' => 'write',
1474 'capabilities' => 'moodle/competency:planmanagedraft',
1475 'ajax' => true,
1476 ),
1477 'core_competency_plan_start_review' => array(
1478 'classname' => 'core_competency\external',
1479 'methodname' => 'plan_start_review',
1480 'classpath' => '',
1481 'description' => 'Start the review of a plan.',
1482 'type' => 'write',
1483 'capabilities' => 'moodle/competency:planmanage',
1484 'ajax' => true,
1485 ),
1486 'core_competency_plan_stop_review' => array(
1487 'classname' => 'core_competency\external',
1488 'methodname' => 'plan_stop_review',
1489 'classpath' => '',
1490 'description' => 'Stop the review of a plan.',
1491 'type' => 'write',
1492 'capabilities' => 'moodle/competency:planmanage',
1493 'ajax' => true,
1494 ),
1495 'core_competency_plan_cancel_review_request' => array(
1496 'classname' => 'core_competency\external',
1497 'methodname' => 'plan_cancel_review_request',
1498 'classpath' => '',
1499 'description' => 'Cancel the review of a plan.',
1500 'type' => 'write',
1501 'capabilities' => 'moodle/competency:planmanagedraft',
1502 'ajax' => true,
1503 ),
1504 'core_competency_approve_plan' => array(
1505 'classname' => 'core_competency\external',
1506 'methodname' => 'approve_plan',
1507 'classpath' => '',
1508 'description' => 'Approve a plan.',
1509 'type' => 'write',
1510 'capabilities' => 'moodle/competency:planmanage',
1511 'ajax' => true,
1512 ),
1513 'core_competency_unapprove_plan' => array(
1514 'classname' => 'core_competency\external',
1515 'methodname' => 'unapprove_plan',
1516 'classpath' => '',
1517 'description' => 'Unapprove a plan.',
1518 'type' => 'write',
1519 'capabilities' => 'moodle/competency:planmanage',
1520 'ajax' => true,
1521 ),
1522 'core_competency_template_has_related_data' => array(
1523 'classname' => 'core_competency\external',
1524 'methodname' => 'template_has_related_data',
1525 'classpath' => '',
1526 'description' => 'Check if a template has related data',
1527 'type' => 'read',
1528 'capabilities' => 'moodle/competency:templateview',
1529 'ajax' => true,
1530 ),
1531 'core_competency_get_scale_values' => array(
1532 'classname' => 'core_competency\external',
1533 'methodname' => 'get_scale_values',
1534 'classpath' => '',
1535 'description' => 'Fetch the values for a specific scale',
1536 'type' => 'read',
1537 'capabilities' => 'moodle/competency:competencymanage',
1538 'ajax' => true,
3123c2cf 1539 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
1540 ),
1541 'core_competency_add_related_competency' => array(
1542 'classname' => 'core_competency\external',
1543 'methodname' => 'add_related_competency',
1544 'classpath' => '',
1545 'description' => 'Adds a related competency',
1546 'type' => 'write',
1547 'capabilities' => 'moodle/competency:competencymanage',
1548 'ajax' => true,
1549 ),
1550 'core_competency_remove_related_competency' => array(
1551 'classname' => 'core_competency\external',
1552 'methodname' => 'remove_related_competency',
1553 'classpath' => '',
1554 'description' => 'Remove a related competency',
1555 'type' => 'write',
1556 'capabilities' => 'moodle/competency:competencymanage',
1557 'ajax' => true,
1558 ),
1559 'core_competency_read_user_evidence' => array(
1560 'classname' => 'core_competency\external',
1561 'methodname' => 'read_user_evidence',
1562 'classpath' => '',
1563 'description' => 'Read an evidence of prior learning.',
1564 'type' => 'read',
1565 'capabilities' => 'moodle/competency:userevidenceview',
1566 'ajax' => true,
1567 ),
1568 'core_competency_delete_user_evidence' => array(
1569 'classname' => 'core_competency\external',
1570 'methodname' => 'delete_user_evidence',
1571 'classpath' => '',
1572 'description' => 'Delete an evidence of prior learning.',
1573 'type' => 'write',
1574 'capabilities' => 'moodle/competency:userevidencemanageown',
1575 'ajax' => true,
1576 ),
1577 'core_competency_create_user_evidence_competency' => array(
1578 'classname' => 'core_competency\external',
1579 'methodname' => 'create_user_evidence_competency',
1580 'classpath' => '',
1581 'description' => 'Create an evidence of prior learning relationship with a competency.',
1582 'type' => 'read',
1583 'capabilities' => 'moodle/competency:userevidencemanageown, moodle/competency:competencyview',
1584 'ajax' => true,
1585 ),
1586 'core_competency_delete_user_evidence_competency' => array(
1587 'classname' => 'core_competency\external',
1588 'methodname' => 'delete_user_evidence_competency',
1589 'classpath' => '',
1590 'description' => 'Delete an evidence of prior learning relationship with a competency.',
1591 'type' => 'write',
1592 'capabilities' => 'moodle/competency:userevidencemanageown',
1593 'ajax' => true,
1594 ),
1595 'core_competency_user_competency_cancel_review_request' => array(
1596 'classname' => 'core_competency\external',
1597 'methodname' => 'user_competency_cancel_review_request',
1598 'classpath' => '',
1599 'description' => 'Cancel a review request.',
1600 'type' => 'write',
1601 'capabilities' => 'moodle/competency:userevidencemanageown',
1602 'ajax' => true,
1603 ),
1604 'core_competency_user_competency_request_review' => array(
1605 'classname' => 'core_competency\external',
1606 'methodname' => 'user_competency_request_review',
1607 'classpath' => '',
1608 'description' => 'Request a review.',
1609 'type' => 'write',
1610 'capabilities' => 'moodle/competency:userevidencemanageown',
1611 'ajax' => true,
1612 ),
1613 'core_competency_user_competency_start_review' => array(
1614 'classname' => 'core_competency\external',
1615 'methodname' => 'user_competency_start_review',
1616 'classpath' => '',
1617 'description' => 'Start a review.',
1618 'type' => 'write',
1619 'capabilities' => 'moodle/competency:competencygrade',
1620 'ajax' => true,
1621 ),
1622 'core_competency_user_competency_stop_review' => array(
1623 'classname' => 'core_competency\external',
1624 'methodname' => 'user_competency_stop_review',
1625 'classpath' => '',
1626 'description' => 'Stop a review.',
1627 'type' => 'write',
1628 'capabilities' => 'moodle/competency:competencygrade',
1629 'ajax' => true,
1630 ),
1631 'core_competency_user_competency_viewed' => array(
1632 'classname' => 'core_competency\external',
1633 'methodname' => 'user_competency_viewed',
1634 'classpath' => '',
1635 'description' => 'Log the user competency viewed event.',
1636 'type' => 'read',
1637 'capabilities' => 'moodle/competency:usercompetencyview',
1638 'ajax' => true,
3123c2cf 1639 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
1640 ),
1641 'core_competency_user_competency_viewed_in_plan' => array(
1642 'classname' => 'core_competency\external',
1643 'methodname' => 'user_competency_viewed_in_plan',
1644 'classpath' => '',
1645 'description' => 'Log the user competency viewed in plan event.',
1646 'type' => 'read',
1647 'capabilities' => 'moodle/competency:usercompetencyview',
1648 'ajax' => true,
3123c2cf 1649 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
1650 ),
1651 'core_competency_user_competency_viewed_in_course' => array(
1652 'classname' => 'core_competency\external',
1653 'methodname' => 'user_competency_viewed_in_course',
1654 'classpath' => '',
1655 'description' => 'Log the user competency viewed in course event',
1656 'type' => 'read',
1657 'capabilities' => 'moodle/competency:usercompetencyview',
1658 'ajax' => true,
3123c2cf 1659 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
1660 ),
1661 'core_competency_user_competency_plan_viewed' => array(
1662 'classname' => 'core_competency\external',
1663 'methodname' => 'user_competency_plan_viewed',
1664 'classpath' => '',
1665 'description' => 'Log the user competency plan viewed event.',
1666 'type' => 'read',
1667 'capabilities' => 'moodle/competency:usercompetencyview',
1668 'ajax' => true,
3123c2cf 1669 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
1670 ),
1671 'core_competency_grade_competency' => array(
1672 'classname' => 'core_competency\external',
1673 'methodname' => 'grade_competency',
1674 'classpath' => '',
1675 'description' => 'Grade a competency.',
1676 'type' => 'write',
1677 'capabilities' => 'moodle/competency:competencygrade',
1678 'ajax' => true,
1679 ),
1680 'core_competency_grade_competency_in_plan' => array(
1681 'classname' => 'core_competency\external',
1682 'methodname' => 'grade_competency_in_plan',
1683 'classpath' => '',
1684 'description' => 'Grade a competency from the user plan page.',
1685 'type' => 'write',
1686 'capabilities' => 'moodle/competency:competencygrade',
1687 'ajax' => true,
1688 ),
1689 'core_competency_grade_competency_in_course' => array(
1690 'classname' => 'core_competency\external',
1691 'methodname' => 'grade_competency_in_course',
1692 'classpath' => '',
1693 'description' => 'Grade a competency from the course page.',
1694 'type' => 'write',
1695 'capabilities' => 'moodle/competency:competencygrade',
1696 'ajax' => true,
3123c2cf 1697 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
1698 ),
1699 'core_competency_unlink_plan_from_template' => array(
1700 'classname' => 'core_competency\external',
1701 'methodname' => 'unlink_plan_from_template',
1702 'classpath' => '',
1703 'description' => 'Unlink a plan form it template.',
1704 'type' => 'write',
1705 'capabilities' => 'moodle/competency:planmanage',
1706 'ajax' => true,
1707 ),
1708 'core_competency_template_viewed' => array(
1709 'classname' => 'core_competency\external',
1710 'methodname' => 'template_viewed',
1711 'classpath' => '',
1712 'description' => 'Log event template viewed',
1713 'type' => 'read',
1714 'capabilities' => 'moodle/competency:templateview',
1715 'ajax' => true,
1716 ),
1717 'core_competency_request_review_of_user_evidence_linked_competencies' => array(
1718 'classname' => 'core_competency\external',
1719 'methodname' => 'request_review_of_user_evidence_linked_competencies',
1720 'classpath' => '',
1721 'description' => 'Send user evidence competencies in review',
1722 'type' => 'write',
1723 'capabilities' => 'moodle/competency:userevidencemanageown',
1724 'ajax' => true,
1725 ),
1726 'core_competency_update_course_competency_settings' => array(
1727 'classname' => 'core_competency\external',
1728 'methodname' => 'update_course_competency_settings',
1729 'classpath' => '',
1730 'description' => 'Update the course competency settings',
1731 'type' => 'write',
1732 'capabilities' => 'moodle/competency:coursecompetencyconfigure',
1733 'ajax' => true,
1734 ),
1e99f31e
FM
1735 'core_competency_delete_evidence' => array(
1736 'classname' => 'core_competency\external',
1737 'methodname' => 'delete_evidence',
1738 'classpath' => '',
1739 'description' => 'Delete an evidence',
1740 'type' => 'write',
1741 'capabilities' => 'moodle/competency:evidencedelete',
1742 'ajax' => true,
3123c2cf 1743 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1e99f31e 1744 ),
f23e9b6b
CB
1745
1746 'core_webservice_get_site_info' => array(
1747 'classname' => 'core_webservice_external',
1748 'methodname' => 'get_site_info',
1749 'classpath' => 'webservice/externallib.php',
1750 'description' => 'Return some site info / user info / list web service functions',
1751 'type' => 'read',
ee7295ee 1752 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
f23e9b6b 1753 )
9a0df45a 1754);
c1b65883
JM
1755
1756$services = array(
96e0194c 1757 'Moodle mobile web service' => array(
12c52b91 1758 'functions' => array(), // Unused as we add the service in each function definition, third party services would use this.
96e0194c
SH
1759 'enabled' => 0,
1760 'restrictedusers' => 0,
af03513f 1761 'shortname' => MOODLE_OFFICIAL_MOBILE_SERVICE,
106c55fb
DW
1762 'downloadfiles' => 1,
1763 'uploadfiles' => 1
96e0194c
SH
1764 ),
1765);