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