MDL-57502 core_calendar: add calendar event exporters
[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 ),
4529327a
MG
253 'core_course_get_module' => array(
254 'classname' => 'core_course_external',
255 'methodname' => 'get_module',
256 'classpath' => 'course/externallib.php',
257 'description' => 'Returns html with one activity module on course page',
258 'type' => 'read',
259 'ajax' => true,
260 ),
261 'core_course_edit_module' => array(
262 'classname' => 'core_course_external',
263 'methodname' => 'edit_module',
264 'classpath' => 'course/externallib.php',
265 'description' => 'Performs an action on course module (change visibility, duplicate, delete, etc.)',
266 'type' => 'write',
267 'ajax' => true,
268 ),
269 'core_course_edit_section' => array(
270 'classname' => 'core_course_external',
271 'methodname' => 'edit_section',
272 'classpath' => 'course/externallib.php',
273 'description' => 'Performs an action on course section (change visibility, set marker, delete)',
274 'type' => 'write',
275 'ajax' => true,
276 ),
f23e9b6b
CB
277 'core_course_get_courses' => array(
278 'classname' => 'core_course_external',
279 'methodname' => 'get_courses',
280 'classpath' => 'course/externallib.php',
281 'description' => 'Return course details',
282 'type' => 'read',
283 'capabilities' => 'moodle/course:view, moodle/course:update, moodle/course:viewhiddencourses',
5041600d 284 'ajax' => true,
ee7295ee 285 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
7ce23590 286 ),
f23e9b6b
CB
287 'core_course_import_course' => array(
288 'classname' => 'core_course_external',
289 'methodname' => 'import_course',
290 'classpath' => 'course/externallib.php',
291 'description' => 'Import course data from a course into another course. Does not include any user data.',
292 'type' => 'write',
293 'capabilities' => 'moodle/backup:backuptargetimport, moodle/restore:restoretargetimport'
7ce23590 294 ),
f23e9b6b
CB
295 'core_course_search_courses' => array(
296 'classname' => 'core_course_external',
297 'methodname' => 'search_courses',
298 'classpath' => 'course/externallib.php',
299 'description' => 'Search courses by (name, module, block, tag)',
300 'type' => 'read',
5041600d 301 'ajax' => true,
ee7295ee 302 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
7ce23590 303 ),
f23e9b6b
CB
304 'core_course_update_categories' => array(
305 'classname' => 'core_course_external',
306 'methodname' => 'update_categories',
307 'classpath' => 'course/externallib.php',
308 'description' => 'Update categories',
309 'type' => 'write',
310 'capabilities' => 'moodle/category:manage',
7ce23590 311 ),
f23e9b6b
CB
312 'core_course_update_courses' => array(
313 'classname' => 'core_course_external',
314 'methodname' => 'update_courses',
315 'classpath' => 'course/externallib.php',
316 'description' => 'Update courses',
317 'type' => 'write',
318 'capabilities' => 'moodle/course:update, moodle/course:changecategory, moodle/course:changefullname, '
319 . 'moodle/course:changeshortname, moodle/course:changeidnumber, moodle/course:changesummary, moodle/course:visibility'
7ce23590 320 ),
f23e9b6b
CB
321 'core_course_view_course' => array(
322 'classname' => 'core_course_external',
323 'methodname' => 'view_course',
324 'classpath' => 'course/externallib.php',
325 'description' => 'Log that the course was viewed',
326 'type' => 'write',
ee7295ee 327 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
7ce23590 328 ),
7c4e686f
JL
329 'core_course_get_activities_overview' => array(
330 'classname' => 'core_course_external',
331 'methodname' => 'get_activities_overview',
332 'classpath' => 'course/externallib.php',
e9dfeec9
MN
333 'description' => '** DEPRECATED ** Please do not call this function any more.
334 Return activities overview for the given courses.',
7c4e686f
JL
335 'type' => 'read',
336 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
337 ),
c115ff6a
JL
338 'core_course_get_user_navigation_options' => array(
339 'classname' => 'core_course_external',
340 'methodname' => 'get_user_navigation_options',
341 'classpath' => 'course/externallib.php',
342 'description' => 'Return a list of navigation options in a set of courses that are avaialable or not for the current user.',
343 'type' => 'read',
344 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
345 ),
b9050b10
JL
346 'core_course_get_user_administration_options' => array(
347 'classname' => 'core_course_external',
348 'methodname' => 'get_user_administration_options',
349 'classpath' => 'course/externallib.php',
350 'description' => 'Return a list of administration options in a set of courses that are avaialable or not for the current
351 user.',
352 'type' => 'read',
353 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
354 ),
80adabef
JL
355 'core_course_get_courses_by_field' => array(
356 'classname' => 'core_course_external',
357 'methodname' => 'get_courses_by_field',
358 'classpath' => 'course/externallib.php',
359 'description' => 'Get courses matching a specific field (id/s, shortname, idnumber, category)',
360 'type' => 'read',
361 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
362 ),
26659f62
JL
363 'core_course_check_updates' => array(
364 'classname' => 'core_course_external',
365 'methodname' => 'check_updates',
366 'classpath' => 'course/externallib.php',
367 'description' => 'Check if there is updates affecting the user for the given course and contexts.',
368 'type' => 'read',
369 'ajax' => true,
370 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
371 ),
879a8f56
JL
372 'core_course_get_updates_since' => array(
373 'classname' => 'core_course_external',
374 'methodname' => 'get_updates_since',
375 'classpath' => 'course/externallib.php',
376 'description' => 'Check if there are updates affecting the user for the given course since the given time stamp.',
377 'type' => 'read',
378 'ajax' => true,
379 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
380 ),
f23e9b6b
CB
381 'core_enrol_get_course_enrolment_methods' => array(
382 'classname' => 'core_enrol_external',
383 'methodname' => 'get_course_enrolment_methods',
384 'classpath' => 'enrol/externallib.php',
385 'description' => 'Get the list of course enrolment methods',
386 'type' => 'read',
ee7295ee 387 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
5d62e813 388 ),
f23e9b6b
CB
389 'core_enrol_get_enrolled_users' => array(
390 'classname' => 'core_enrol_external',
391 'methodname' => 'get_enrolled_users',
392 'classpath' => 'enrol/externallib.php',
393 'description' => 'Get enrolled users by course id.',
394 'type' => 'read',
395 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, '
ee7295ee
JL
396 . 'moodle/site:accessallgroups',
397 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
7107c2f0 398 ),
f23e9b6b
CB
399 'core_enrol_get_enrolled_users_with_capability' => array(
400 'classname' => 'core_enrol_external',
401 'methodname' => 'get_enrolled_users_with_capability',
402 'classpath' => 'enrol/externallib.php',
403 'description' => 'For each course and capability specified, return a list of the users that are enrolled in the course
404 and have that capability',
405 'type' => 'read',
c0ef63eb 406 ),
f23e9b6b
CB
407 'core_enrol_get_users_courses' => array(
408 'classname' => 'core_enrol_external',
409 'methodname' => 'get_users_courses',
410 'classpath' => 'enrol/externallib.php',
411 'description' => 'Get the list of courses where a user is enrolled in',
412 'type' => 'read',
ee7295ee
JL
413 'capabilities' => 'moodle/course:viewparticipants',
414 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
9857381d 415 ),
f23e9b6b
CB
416 'core_fetch_notifications' => array(
417 'classname' => 'core_external',
418 'methodname' => 'fetch_notifications',
419 'classpath' => 'lib/external/externallib.php',
420 'description' => 'Return a list of notifications for the current session',
421 'type' => 'read',
5041600d
RT
422 'loginrequired' => false,
423 'ajax' => true,
5d1017e1 424 ),
5d1017e1 425 'core_files_get_files' => array(
f23e9b6b
CB
426 'classname' => 'core_files_external',
427 'methodname' => 'get_files',
249c4f60 428 'description' => 'browse moodle files',
f23e9b6b
CB
429 'type' => 'read',
430 'classpath' => 'files/externallib.php',
ee7295ee 431 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
5d1017e1 432 ),
5d1017e1 433 'core_files_upload' => array(
f23e9b6b
CB
434 'classname' => 'core_files_external',
435 'methodname' => 'upload',
249c4f60
DC
436 'description' => 'upload a file to moodle',
437 'type' => 'write',
438 'classpath' => 'files/externallib.php',
439 ),
f23e9b6b
CB
440 'core_get_component_strings' => array(
441 'classname' => 'core_external',
442 'methodname' => 'get_component_strings',
443 'classpath' => 'lib/external/externallib.php',
faeca20d
DM
444 'description' => 'Return all raw strings (with {$a->xxx}), for a specific component ' .
445 '- similar to core get_component_strings(), call',
f23e9b6b 446 'type' => 'read',
5041600d
RT
447 'loginrequired' => false,
448 'ajax' => true,
ee7295ee 449 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
3364dbb5 450 ),
f23e9b6b
CB
451 'core_get_fragment' => array(
452 'classname' => 'core_external',
453 'methodname' => 'get_fragment',
454 'classpath' => 'lib/external/externallib.php',
455 'description' => 'Return a fragment for inclusion, such as a JavaScript page.',
456 'type' => 'read',
5041600d 457 'ajax' => true,
5d1017e1 458 ),
f23e9b6b
CB
459 'core_get_string' => array(
460 'classname' => 'core_external',
461 'methodname' => 'get_string',
462 'classpath' => 'lib/external/externallib.php',
463 'description' => 'Return a translated string - similar to core get_string(), call',
464 'type' => 'read',
5041600d
RT
465 'loginrequired' => false,
466 'ajax' => true,
be9bf94e 467 ),
f23e9b6b
CB
468 'core_get_strings' => array(
469 'classname' => 'core_external',
470 'methodname' => 'get_strings',
471 'classpath' => 'lib/external/externallib.php',
472 'description' => 'Return some translated strings - like several core get_string(), calls',
473 'type' => 'read',
5041600d
RT
474 'loginrequired' => false,
475 'ajax' => true,
5d1017e1 476 ),
88c2941b
RW
477 'core_get_user_dates' => array(
478 'classname' => 'core_external',
479 'methodname' => 'get_user_dates',
480 'classpath' => 'lib/external/externallib.php',
481 'description' => 'Return formatted timestamps',
482 'type' => 'read',
483 'ajax' => true,
484 ),
f23e9b6b
CB
485 'core_grades_get_grades' => array(
486 'classname' => 'core_grades_external',
487 'methodname' => 'get_grades',
aa7e371a
JL
488 'description' => '** DEPRECATED ** Please do not call this function any more.
489 Returns student course total grade and grades for activities.
f23e9b6b
CB
490 This function does not return category or manual items.
491 This function is suitable for managers or teachers not students.',
492 'type' => 'read',
493 'capabilities' => 'moodle/grade:view, moodle/grade:viewall, moodle/grade:viewhidden'
e9b66095 494 ),
f23e9b6b
CB
495 'core_grades_update_grades' => array(
496 'classname' => 'core_grades_external',
497 'methodname' => 'update_grades',
498 'description' => 'Update a grade item and associated student grades.',
499 'type' => 'write',
5d1017e1 500 ),
f23e9b6b
CB
501 'core_grading_get_definitions' => array(
502 'classname' => 'core_grading_external',
503 'methodname' => 'get_definitions',
504 'description' => 'Get grading definitions',
505 'type' => 'read',
e9b66095 506 ),
f23e9b6b
CB
507 'core_grading_get_gradingform_instances' => array(
508 'classname' => 'core_grading_external',
509 'methodname' => 'get_gradingform_instances',
510 'description' => 'Get grading form instances',
511 'type' => 'read',
f2229c68 512 ),
f23e9b6b
CB
513 'core_grading_save_definitions' => array(
514 'classname' => 'core_grading_external',
515 'methodname' => 'save_definitions',
516 'description' => 'Save grading definitions',
517 'type' => 'write',
5d1017e1 518 ),
f23e9b6b
CB
519 'core_group_add_group_members' => array(
520 'classname' => 'core_group_external',
521 'methodname' => 'add_group_members',
522 'classpath' => 'group/externallib.php',
523 'description' => 'Adds group members.',
524 'type' => 'write',
525 'capabilities' => 'moodle/course:managegroups',
6bb31e40 526 ),
f23e9b6b
CB
527 'core_group_assign_grouping' => array(
528 'classname' => 'core_group_external',
529 'methodname' => 'assign_grouping',
530 'classpath' => 'group/externallib.php',
531 'description' => 'Assing groups from groupings',
532 'type' => 'write',
740c354f 533 ),
f23e9b6b
CB
534 'core_group_create_groupings' => array(
535 'classname' => 'core_group_external',
536 'methodname' => 'create_groupings',
537 'classpath' => 'group/externallib.php',
538 'description' => 'Creates new groupings',
539 'type' => 'write',
5d1017e1 540 ),
f23e9b6b
CB
541 'core_group_create_groups' => array(
542 'classname' => 'core_group_external',
543 'methodname' => 'create_groups',
544 'classpath' => 'group/externallib.php',
545 'description' => 'Creates new groups.',
546 'type' => 'write',
547 'capabilities' => 'moodle/course:managegroups'
6bb31e40 548 ),
f23e9b6b
CB
549 'core_group_delete_group_members' => array(
550 'classname' => 'core_group_external',
551 'methodname' => 'delete_group_members',
552 'classpath' => 'group/externallib.php',
553 'description' => 'Deletes group members.',
0a4f3eb2 554 'type' => 'write',
f23e9b6b 555 'capabilities' => 'moodle/course:managegroups'
63a85dc7 556 ),
f23e9b6b
CB
557 'core_group_delete_groupings' => array(
558 'classname' => 'core_group_external',
559 'methodname' => 'delete_groupings',
560 'classpath' => 'group/externallib.php',
561 'description' => 'Deletes all specified groupings.',
79949c1b 562 'type' => 'write',
79949c1b 563 ),
f23e9b6b
CB
564 'core_group_delete_groups' => array(
565 'classname' => 'core_group_external',
566 'methodname' => 'delete_groups',
567 'classpath' => 'group/externallib.php',
568 'description' => 'Deletes all specified groups.',
0a4f3eb2 569 'type' => 'write',
f23e9b6b 570 'capabilities' => 'moodle/course:managegroups'
3dc1d76e 571 ),
f23e9b6b
CB
572 'core_group_get_activity_allowed_groups' => array(
573 'classname' => 'core_group_external',
574 'methodname' => 'get_activity_allowed_groups',
575 'classpath' => 'group/externallib.php',
576 'description' => 'Gets a list of groups that the user is allowed to access within the specified activity.',
577 'type' => 'read',
ee7295ee 578 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
791723c3 579 ),
f23e9b6b
CB
580 'core_group_get_activity_groupmode' => array(
581 'classname' => 'core_group_external',
582 'methodname' => 'get_activity_groupmode',
583 'classpath' => 'group/externallib.php',
584 'description' => 'Returns effective groupmode used in a given activity.',
585 'type' => 'read',
ee7295ee 586 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
c4f7bf29 587 ),
f23e9b6b
CB
588 'core_group_get_course_groupings' => array(
589 'classname' => 'core_group_external',
590 'methodname' => 'get_course_groupings',
591 'classpath' => 'group/externallib.php',
592 'description' => 'Returns all groupings in specified course.',
593 'type' => 'read',
c5158499 594 ),
f23e9b6b
CB
595 'core_group_get_course_groups' => array(
596 'classname' => 'core_group_external',
597 'methodname' => 'get_course_groups',
598 'classpath' => 'group/externallib.php',
599 'description' => 'Returns all groups in specified course.',
600 'type' => 'read',
601 'capabilities' => 'moodle/course:managegroups'
13bb6819 602 ),
f23e9b6b
CB
603 'core_group_get_course_user_groups' => array(
604 'classname' => 'core_group_external',
605 'methodname' => 'get_course_user_groups',
606 'classpath' => 'group/externallib.php',
607 'description' => 'Returns all groups in specified course for the specified user.',
608 'type' => 'read',
ee7295ee
JL
609 'capabilities' => 'moodle/course:managegroups',
610 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
3ec163dd 611 ),
f23e9b6b
CB
612 'core_group_get_group_members' => array(
613 'classname' => 'core_group_external',
614 'methodname' => 'get_group_members',
615 'classpath' => 'group/externallib.php',
616 'description' => 'Returns group members.',
617 'type' => 'read',
618 'capabilities' => 'moodle/course:managegroups'
479a5db1 619 ),
f23e9b6b
CB
620 'core_group_get_groupings' => array(
621 'classname' => 'core_group_external',
622 'methodname' => 'get_groupings',
623 'classpath' => 'group/externallib.php',
624 'description' => 'Returns groupings details.',
625 'type' => 'read',
3ec163dd 626 ),
f23e9b6b
CB
627 'core_group_get_groups' => array(
628 'classname' => 'core_group_external',
629 'methodname' => 'get_groups',
630 'classpath' => 'group/externallib.php',
631 'description' => 'Returns group details.',
632 'type' => 'read',
633 'capabilities' => 'moodle/course:managegroups'
2f951d86 634 ),
f23e9b6b
CB
635 'core_group_unassign_grouping' => array(
636 'classname' => 'core_group_external',
637 'methodname' => 'unassign_grouping',
638 'classpath' => 'group/externallib.php',
639 'description' => 'Unassing groups from groupings',
640 'type' => 'write',
8430d87b 641 ),
f23e9b6b
CB
642 'core_group_update_groupings' => array(
643 'classname' => 'core_group_external',
644 'methodname' => 'update_groupings',
645 'classpath' => 'group/externallib.php',
646 'description' => 'Updates existing groupings',
647 'type' => 'write',
5d1017e1 648 ),
f23e9b6b
CB
649 'core_message_block_contacts' => array(
650 'classname' => 'core_message_external',
651 'methodname' => 'block_contacts',
652 'classpath' => 'message/externallib.php',
653 'description' => 'Block contacts',
654 'type' => 'write',
c6e97f54 655 'ajax' => true,
ee7295ee 656 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
a623b6b8 657 ),
d6731600 658 'core_message_create_contacts' => array(
f23e9b6b
CB
659 'classname' => 'core_message_external',
660 'methodname' => 'create_contacts',
661 'classpath' => 'message/externallib.php',
d6731600 662 'description' => 'Add contacts to the contact list',
f23e9b6b 663 'type' => 'write',
c6e97f54 664 'ajax' => true,
ee7295ee 665 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
12d8c7b2 666 'ajax' => true,
d6731600 667 ),
d6731600 668 'core_message_delete_contacts' => array(
f23e9b6b
CB
669 'classname' => 'core_message_external',
670 'methodname' => 'delete_contacts',
671 'classpath' => 'message/externallib.php',
d6731600 672 'description' => 'Remove contacts from the contact list',
f23e9b6b 673 'type' => 'write',
c6e97f54 674 'ajax' => true,
ee7295ee 675 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
12d8c7b2 676 'ajax' => true,
d6731600 677 ),
dec0cd99
MN
678 'core_message_delete_conversation' => array(
679 'classname' => 'core_message_external',
680 'methodname' => 'delete_conversation',
681 'classpath' => 'message/externallib.php',
682 'description' => 'Deletes a conversation.',
683 'type' => 'write',
684 'capabilities' => 'moodle/site:deleteownmessage',
685 'ajax' => true,
53522c6e 686 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
dec0cd99 687 ),
f23e9b6b
CB
688 'core_message_delete_message' => array(
689 'classname' => 'core_message_external',
690 'methodname' => 'delete_message',
691 'classpath' => 'message/externallib.php',
692 'description' => 'Deletes a message.',
693 'type' => 'write',
ee7295ee 694 'capabilities' => 'moodle/site:deleteownmessage',
3090f52f 695 'ajax' => true,
ee7295ee 696 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
d6731600 697 ),
f23e9b6b
CB
698 'core_message_get_blocked_users' => array(
699 'classname' => 'core_message_external',
700 'methodname' => 'get_blocked_users',
701 'classpath' => 'message/externallib.php',
702 'description' => 'Retrieve a list of users blocked',
703 'type' => 'read',
ee7295ee 704 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
d6731600 705 ),
cd03b8d7
MN
706 'core_message_data_for_messagearea_search_messages' => array(
707 'classname' => 'core_message_external',
708 'methodname' => 'data_for_messagearea_search_messages',
709 'classpath' => 'message/externallib.php',
710 'description' => 'Retrieve the template data for searching for messages',
711 'type' => 'read',
712 'ajax' => true,
53522c6e 713 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
cd03b8d7 714 ),
48e8bdba 715 'core_message_data_for_messagearea_search_users' => array(
cd03b8d7 716 'classname' => 'core_message_external',
48e8bdba 717 'methodname' => 'data_for_messagearea_search_users',
cd03b8d7
MN
718 'classpath' => 'message/externallib.php',
719 'description' => 'Retrieve the template data for searching for people',
720 'type' => 'read',
721 'ajax' => true,
722 ),
48e8bdba 723 'core_message_data_for_messagearea_search_users_in_course' => array(
cd03b8d7 724 'classname' => 'core_message_external',
48e8bdba 725 'methodname' => 'data_for_messagearea_search_users_in_course',
cd03b8d7
MN
726 'classpath' => 'message/externallib.php',
727 'description' => 'Retrieve the template data for searching for people in a course',
728 'type' => 'read',
729 'ajax' => true,
730 ),
9aa012b5
MN
731 'core_message_data_for_messagearea_conversations' => array(
732 'classname' => 'core_message_external',
733 'methodname' => 'data_for_messagearea_conversations',
734 'classpath' => 'message/externallib.php',
735 'description' => 'Retrieve the template data for the conversation list',
736 'type' => 'read',
737 'ajax' => true,
21d9f020 738 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
9aa012b5
MN
739 ),
740 'core_message_data_for_messagearea_contacts' => array(
741 'classname' => 'core_message_external',
742 'methodname' => 'data_for_messagearea_contacts',
743 'classpath' => 'message/externallib.php',
744 'description' => 'Retrieve the template data for the contact list',
745 'type' => 'read',
746 'ajax' => true,
21d9f020 747 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
9aa012b5 748 ),
3cd13828
MN
749 'core_message_data_for_messagearea_messages' => array(
750 'classname' => 'core_message_external',
751 'methodname' => 'data_for_messagearea_messages',
752 'classpath' => 'message/externallib.php',
753 'description' => 'Retrieve the template data for the messages',
754 'type' => 'read',
755 'ajax' => true,
21d9f020 756 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
3cd13828 757 ),
c060cd49
MN
758 'core_message_data_for_messagearea_get_most_recent_message' => array(
759 'classname' => 'core_message_external',
760 'methodname' => 'data_for_messagearea_get_most_recent_message',
761 'classpath' => 'message/externallib.php',
762 'description' => 'Retrieve the template data for the most recent message',
763 'type' => 'read',
764 'ajax' => true,
765 ),
c6e97f54
MN
766 'core_message_data_for_messagearea_get_profile' => array(
767 'classname' => 'core_message_external',
768 'methodname' => 'data_for_messagearea_get_profile',
769 'classpath' => 'message/externallib.php',
770 'description' => 'Retrieve the template data for the users\'s profile',
771 'type' => 'read',
772 'ajax' => true,
773 ),
d6731600 774 'core_message_get_contacts' => array(
f23e9b6b
CB
775 'classname' => 'core_message_external',
776 'methodname' => 'get_contacts',
777 'classpath' => 'message/externallib.php',
d6731600 778 'description' => 'Retrieve the contact list',
f23e9b6b 779 'type' => 'read',
ee7295ee 780 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
d6731600 781 ),
aff9da17 782 'core_message_get_messages' => array(
f23e9b6b
CB
783 'classname' => 'core_message_external',
784 'methodname' => 'get_messages',
785 'classpath' => 'message/externallib.php',
786 'description' => 'Retrieve a list of messages sent and received by a user (conversations, notifications or both)',
787 'type' => 'read',
ee7295ee 788 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
3274d5ca
RW
789 'ajax' => true,
790 ),
8c55bd6c
RW
791 'core_message_get_unread_conversations_count' => array(
792 'classname' => 'core_message_external',
793 'methodname' => 'get_unread_conversations_count',
794 'classpath' => 'message/externallib.php',
795 'description' => 'Retrieve the count of unread conversations for a given user',
796 'type' => 'read',
797 'ajax' => true,
53522c6e 798 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
8c55bd6c 799 ),
3274d5ca
RW
800 'core_message_mark_all_notifications_as_read' => array(
801 'classname' => 'core_message_external',
802 'methodname' => 'mark_all_notifications_as_read',
803 'classpath' => 'message/externallib.php',
8c55bd6c
RW
804 'description' => 'Mark all notifications as read for a given user',
805 'type' => 'write',
806 'ajax' => true,
53522c6e 807 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
8c55bd6c
RW
808 ),
809 'core_message_mark_all_messages_as_read' => array(
810 'classname' => 'core_message_external',
811 'methodname' => 'mark_all_messages_as_read',
812 'classpath' => 'message/externallib.php',
813 'description' => 'Mark all messages as read for a given user',
3274d5ca
RW
814 'type' => 'write',
815 'ajax' => true,
53522c6e 816 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
60ab2e1b 817 ),
a84f89ca 818 'core_message_mark_message_read' => array(
f23e9b6b
CB
819 'classname' => 'core_message_external',
820 'methodname' => 'mark_message_read',
821 'classpath' => 'message/externallib.php',
822 'description' => 'Mark a single message as read, trigger message_viewed event.',
823 'type' => 'write',
ee7295ee 824 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
0b19d048 825 'ajax' => true,
a84f89ca 826 ),
a0eabdd3
RW
827 'core_message_message_processor_config_form' => array(
828 'classname' => 'core_message_external',
829 'methodname' => 'message_processor_config_form',
830 'classpath' => 'message/externallib.php',
831 'description' => 'Process the message processor config form',
832 'type' => 'write',
833 'ajax' => true,
53522c6e 834 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
a0eabdd3 835 ),
8c125526
RW
836 'core_message_get_message_processor' => array(
837 'classname' => 'core_message_external',
838 'methodname' => 'get_message_processor',
839 'classpath' => 'message/externallib.php',
840 'description' => 'Get a message processor',
841 'type' => 'read',
842 'ajax' => true,
843 ),
f23e9b6b
CB
844 'core_message_search_contacts' => array(
845 'classname' => 'core_message_external',
846 'methodname' => 'search_contacts',
847 'classpath' => 'message/externallib.php',
848 'description' => 'Search for contacts',
849 'type' => 'read',
ee7295ee 850 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
419b1128 851 ),
f23e9b6b
CB
852 'core_message_send_instant_messages' => array(
853 'classname' => 'core_message_external',
854 'methodname' => 'send_instant_messages',
855 'classpath' => 'message/externallib.php',
856 'description' => 'Send instant messages',
857 'type' => 'write',
ee7295ee 858 'capabilities' => 'moodle/site:sendmessage',
c060cd49 859 'ajax' => true,
ee7295ee 860 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
f23e9b6b
CB
861 ),
862 'core_message_unblock_contacts' => array(
863 'classname' => 'core_message_external',
864 'methodname' => 'unblock_contacts',
865 'classpath' => 'message/externallib.php',
866 'description' => 'Unblock contacts',
867 'type' => 'write',
c6e97f54 868 'ajax' => true,
ee7295ee 869 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
5d1017e1 870 ),
e86f0cb4
JL
871 'core_message_get_user_notification_preferences' => array(
872 'classname' => 'core_message_external',
873 'methodname' => 'get_user_notification_preferences',
874 'classpath' => 'message/externallib.php',
875 'description' => 'Get the notification preferences for a given user.',
876 'type' => 'read',
877 'capabilities' => 'moodle/user:editownmessageprofile',
878 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
879 ),
2521afd2
JL
880 'core_message_get_user_message_preferences' => array(
881 'classname' => 'core_message_external',
882 'methodname' => 'get_user_message_preferences',
883 'classpath' => 'message/externallib.php',
884 'description' => 'Get the message preferences for a given user.',
885 'type' => 'read',
886 'capabilities' => 'moodle/user:editownmessageprofile',
887 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
888 ),
5d1017e1 889 'core_notes_create_notes' => array(
f23e9b6b
CB
890 'classname' => 'core_notes_external',
891 'methodname' => 'create_notes',
892 'classpath' => 'notes/externallib.php',
8d46dabb 893 'description' => 'Create notes',
f23e9b6b 894 'type' => 'write',
ee7295ee
JL
895 'capabilities' => 'moodle/notes:manage',
896 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
8d46dabb 897 ),
34348b2b 898 'core_notes_delete_notes' => array(
f23e9b6b
CB
899 'classname' => 'core_notes_external',
900 'methodname' => 'delete_notes',
901 'classpath' => 'notes/externallib.php',
34348b2b 902 'description' => 'Delete notes',
f23e9b6b 903 'type' => 'write',
ee7295ee
JL
904 'capabilities' => 'moodle/notes:manage',
905 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
f23e9b6b
CB
906 ),
907 'core_notes_get_course_notes' => array(
908 'classname' => 'core_notes_external',
909 'methodname' => 'get_course_notes',
910 'classpath' => 'notes/externallib.php',
911 'description' => 'Returns all notes in specified course (or site), for the specified user.',
912 'type' => 'read',
ee7295ee
JL
913 'capabilities' => 'moodle/notes:view',
914 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
34348b2b 915 ),
34348b2b 916 'core_notes_get_notes' => array(
f23e9b6b
CB
917 'classname' => 'core_notes_external',
918 'methodname' => 'get_notes',
919 'classpath' => 'notes/externallib.php',
34348b2b 920 'description' => 'Get notes',
f23e9b6b
CB
921 'type' => 'read',
922 'capabilities' => 'moodle/notes:view'
34348b2b 923 ),
34348b2b 924 'core_notes_update_notes' => array(
f23e9b6b
CB
925 'classname' => 'core_notes_external',
926 'methodname' => 'update_notes',
927 'classpath' => 'notes/externallib.php',
34348b2b 928 'description' => 'Update notes',
f23e9b6b
CB
929 'type' => 'write',
930 'capabilities' => 'moodle/notes:manage'
34348b2b 931 ),
a80b5518 932 'core_notes_view_notes' => array(
f23e9b6b
CB
933 'classname' => 'core_notes_external',
934 'methodname' => 'view_notes',
935 'classpath' => 'notes/externallib.php',
936 'description' => 'Simulates the web interface view of notes/index.php: trigger events.',
937 'type' => 'write',
ee7295ee
JL
938 'capabilities' => 'moodle/notes:view',
939 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
9028d9b5 940 ),
f23e9b6b
CB
941 'core_output_load_template' => array(
942 'classname' => 'core\output\external',
943 'methodname' => 'load_template',
944 'description' => 'Load a template for a renderable',
945 'type' => 'read',
5041600d
RT
946 'loginrequired' => false,
947 'ajax' => true,
0ff4ebb4 948 ),
e330b1c2 949 'core_output_load_fontawesome_icon_map' => array(
a26ce248 950 'classname' => 'core\output\external',
e330b1c2 951 'methodname' => 'load_fontawesome_icon_map',
a26ce248
DW
952 'description' => 'Load the mapping of names to icons',
953 'type' => 'read',
954 'loginrequired' => false,
955 'ajax' => true,
956 ),
f23e9b6b
CB
957 // Question related functions.
958 'core_question_update_flag' => array(
959 'classname' => 'core_question_external',
960 'methodname' => 'update_flag',
961 'description' => 'Update the flag state of a question attempt.',
962 'type' => 'write',
963 'capabilities' => 'moodle/question:flag',
ee7295ee 964 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
3f0ea6d8 965 ),
f23e9b6b
CB
966 'core_rating_get_item_ratings' => array(
967 'classname' => 'core_rating_external',
968 'methodname' => 'get_item_ratings',
969 'description' => 'Retrieve all the ratings for an item.',
970 'type' => 'read',
ee7295ee
JL
971 'capabilities' => 'moodle/rating:view',
972 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
5d1017e1 973 ),
afb7799a
JL
974 'core_rating_add_rating' => array(
975 'classname' => 'core_rating_external',
976 'methodname' => 'add_rating',
977 'description' => 'Rates an item.',
978 'type' => 'write',
979 'capabilities' => 'moodle/rating:rate',
980 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
981 ),
f23e9b6b
CB
982 'core_role_assign_roles' => array(
983 'classname' => 'core_role_external',
984 'methodname' => 'assign_roles',
985 'classpath' => 'enrol/externallib.php',
986 'description' => 'Manual role assignments.',
987 'type' => 'write',
988 'capabilities' => 'moodle/role:assign'
0bf486a6 989 ),
f23e9b6b
CB
990 'core_role_unassign_roles' => array(
991 'classname' => 'core_role_external',
992 'methodname' => 'unassign_roles',
993 'classpath' => 'enrol/externallib.php',
994 'description' => 'Manual role unassignments.',
995 'type' => 'write',
996 'capabilities' => 'moodle/role:assign'
11e76602 997 ),
f23e9b6b
CB
998 'core_tag_get_tagindex' => array(
999 'classname' => 'core_tag_external',
1000 'methodname' => 'get_tagindex',
1001 'description' => 'Gets tag index page for one tag and one tag area',
1002 'type' => 'read',
5041600d 1003 'ajax' => true,
11e76602 1004 ),
f23e9b6b
CB
1005 'core_tag_get_tags' => array(
1006 'classname' => 'core_tag_external',
1007 'methodname' => 'get_tags',
1008 'description' => 'Gets tags by their ids',
1009 'type' => 'read',
5041600d 1010 'ajax' => true,
11e76602 1011 ),
f23e9b6b
CB
1012 'core_tag_update_tags' => array(
1013 'classname' => 'core_tag_external',
1014 'methodname' => 'update_tags',
1015 'description' => 'Updates tags',
1016 'type' => 'write',
5041600d 1017 'ajax' => true,
cc73ea07 1018 ),
cdc5f978 1019 'core_update_inplace_editable' => array(
f23e9b6b
CB
1020 'classname' => 'core_external',
1021 'methodname' => 'update_inplace_editable',
1022 'classpath' => 'lib/external/externallib.php',
cdc5f978 1023 'description' => 'Generic service to update title',
f23e9b6b 1024 'type' => 'write',
5041600d
RT
1025 'loginrequired' => true,
1026 'ajax' => true,
c66dc3df 1027 ),
f23e9b6b
CB
1028 'core_user_add_user_device' => array(
1029 'classname' => 'core_user_external',
1030 'methodname' => 'add_user_device',
1031 'classpath' => 'user/externallib.php',
1032 'description' => 'Store mobile user devices information for PUSH Notifications.',
1033 'type' => 'write',
ee7295ee 1034 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
9bdcf579 1035 ),
f23e9b6b
CB
1036 'core_user_add_user_private_files' => array(
1037 'classname' => 'core_user_external',
1038 'methodname' => 'add_user_private_files',
1039 'classpath' => 'user/externallib.php',
1040 'description' => 'Copy files from a draft area to users private files area.',
1041 'type' => 'write',
ee7295ee
JL
1042 'capabilities' => 'moodle/user:manageownfiles',
1043 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
25c49a85 1044 ),
f23e9b6b
CB
1045 'core_user_create_users' => array(
1046 'classname' => 'core_user_external',
1047 'methodname' => 'create_users',
1048 'classpath' => 'user/externallib.php',
1049 'description' => 'Create users.',
1050 'type' => 'write',
1051 'capabilities' => 'moodle/user:create'
23b398fc 1052 ),
f23e9b6b
CB
1053 'core_user_delete_users' => array(
1054 'classname' => 'core_user_external',
1055 'methodname' => 'delete_users',
1056 'classpath' => 'user/externallib.php',
1057 'description' => 'Delete users.',
1058 'type' => 'write',
1059 'capabilities' => 'moodle/user:delete'
6c785afa 1060 ),
f23e9b6b
CB
1061 'core_user_get_course_user_profiles' => array(
1062 'classname' => 'core_user_external',
1063 'methodname' => 'get_course_user_profiles',
1064 'classpath' => 'user/externallib.php',
1065 'description' => 'Get course user profiles (each of the profils matching a course id and a user id),.',
1066 'type' => 'read',
1067 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, '
ee7295ee
JL
1068 . 'moodle/site:accessallgroups',
1069 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
6c785afa 1070 ),
f23e9b6b
CB
1071 'core_user_get_users' => array(
1072 'classname' => 'core_user_external',
1073 'methodname' => 'get_users',
1074 'classpath' => 'user/externallib.php',
1075 'description' => 'search for users matching the parameters',
1076 'type' => 'read',
1077 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update'
db5b6971 1078 ),
f23e9b6b
CB
1079 'core_user_get_users_by_field' => array(
1080 'classname' => 'core_user_external',
1081 'methodname' => 'get_users_by_field',
1082 'classpath' => 'user/externallib.php',
1083 'description' => 'Retrieve users\' information for a specified unique field - If you want to do a user search, use '
1084 . 'core_user_get_users()',
1085 'type' => 'read',
ee7295ee 1086 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update',
5041600d 1087 'ajax' => true,
ee7295ee 1088 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
8e355853 1089 ),
f23e9b6b
CB
1090 'core_user_remove_user_device' => array(
1091 'classname' => 'core_user_external',
1092 'methodname' => 'remove_user_device',
1093 'classpath' => 'user/externallib.php',
1094 'description' => 'Remove a user device from the Moodle database.',
1095 'type' => 'write',
ee7295ee 1096 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
ef4c23cc 1097 ),
c598f278 1098 'core_user_update_users' => array(
a0eabdd3 1099 'classname' => 'core_user_external',
c598f278 1100 'methodname' => 'update_users',
a0eabdd3 1101 'classpath' => 'user/externallib.php',
c598f278 1102 'description' => 'Update users.',
a0eabdd3
RW
1103 'type' => 'write',
1104 'capabilities' => 'moodle/user:update',
1105 'ajax' => true,
1106 ),
c598f278 1107 'core_user_update_user_preferences' => array(
f23e9b6b 1108 'classname' => 'core_user_external',
c598f278 1109 'methodname' => 'update_user_preferences',
f23e9b6b 1110 'classpath' => 'user/externallib.php',
c598f278 1111 'description' => 'Update a user\'s preferences',
f23e9b6b 1112 'type' => 'write',
c598f278 1113 'capabilities' => 'moodle/user:editownmessageprofile, moodle/user:editmessageprofile',
a0eabdd3 1114 'ajax' => true,
6d2f938c 1115 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
c026a28d 1116 ),
f23e9b6b
CB
1117 'core_user_view_user_list' => array(
1118 'classname' => 'core_user_external',
1119 'methodname' => 'view_user_list',
1120 'classpath' => 'user/externallib.php',
1121 'description' => 'Simulates the web-interface view of user/index.php (triggering events),.',
1122 'type' => 'write',
1123 'capabilities' => 'moodle/course:viewparticipants',
ee7295ee 1124 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
7361b968 1125 ),
f23e9b6b
CB
1126 'core_user_view_user_profile' => array(
1127 'classname' => 'core_user_external',
1128 'methodname' => 'view_user_profile',
1129 'classpath' => 'user/externallib.php',
1130 'description' => 'Simulates the web-interface view of user/view.php and user/profile.php (triggering events),.',
1131 'type' => 'write',
1132 'capabilities' => 'moodle/user:viewdetails',
ee7295ee 1133 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
f4fb827e 1134 ),
45fec983
JL
1135 'core_user_get_user_preferences' => array(
1136 'classname' => 'core_user_external',
1137 'methodname' => 'get_user_preferences',
1138 'classpath' => 'user/externallib.php',
1139 'description' => 'Return user preferences.',
1140 'type' => 'read',
1141 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1142 ),
d44e2e42
JL
1143 'core_user_update_picture' => array(
1144 'classname' => 'core_user_external',
1145 'methodname' => 'update_picture',
1146 'classpath' => 'user/externallib.php',
1147 'description' => 'Update or delete the user picture in the site',
1148 'type' => 'write',
1149 'capabilities' => 'moodle/user:editownprofile, moodle/user:editprofile',
1150 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1151 ),
649777fb
JL
1152 'core_user_set_user_preferences' => array(
1153 'classname' => 'core_user_external',
1154 'methodname' => 'set_user_preferences',
1155 'classpath' => 'user/externallib.php',
1156 'description' => 'Set user preferences.',
1157 'type' => 'write',
1158 'capabilities' => 'moodle/site:config',
1159 ),
3e8145a3
JL
1160 'core_user_agree_site_policy' => array(
1161 'classname' => 'core_user_external',
1162 'methodname' => 'agree_site_policy',
1163 'classpath' => 'user/externallib.php',
1164 'description' => 'Agree the site policy for the current user.',
1165 'type' => 'write',
1166 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1167 ),
649777fb 1168
81de839f
FM
1169 // Competencies functions.
1170 'core_competency_create_competency_framework' => array(
1171 'classname' => 'core_competency\external',
1172 'methodname' => 'create_competency_framework',
1173 'classpath' => '',
1174 'description' => 'Creates new competency frameworks.',
1175 'type' => 'write',
1176 'capabilities' => 'moodle/competency:competencymanage',
1177 'ajax' => true,
1178 ),
1179 'core_competency_read_competency_framework' => array(
1180 'classname' => 'core_competency\external',
1181 'methodname' => 'read_competency_framework',
1182 'classpath' => '',
1183 'description' => 'Load a summary of a competency framework.',
1184 'type' => 'read',
1185 'capabilities' => 'moodle/competency:competencyview',
1186 'ajax' => true,
1187 ),
1188 'core_competency_duplicate_competency_framework' => array(
1189 'classname' => 'core_competency\external',
1190 'methodname' => 'duplicate_competency_framework',
1191 'classpath' => '',
1192 'description' => 'Duplicate a competency framework.',
1193 'type' => 'write',
1194 'capabilities' => 'moodle/competency:competencymanage',
1195 'ajax' => true,
1196 ),
1197 'core_competency_delete_competency_framework' => array(
1198 'classname' => 'core_competency\external',
1199 'methodname' => 'delete_competency_framework',
1200 'classpath' => '',
1201 'description' => 'Delete a competency framework.',
1202 'type' => 'write',
1203 'capabilities' => 'moodle/competency:competencymanage',
1204 'ajax' => true,
1205 ),
1206 'core_competency_update_competency_framework' => array(
1207 'classname' => 'core_competency\external',
1208 'methodname' => 'update_competency_framework',
1209 'classpath' => '',
1210 'description' => 'Update a competency framework.',
1211 'type' => 'write',
1212 'capabilities' => 'moodle/competency:competencymanage',
1213 'ajax' => true,
1214 ),
1215 'core_competency_list_competency_frameworks' => array(
1216 'classname' => 'core_competency\external',
1217 'methodname' => 'list_competency_frameworks',
1218 'classpath' => '',
1219 'description' => 'Load a list of a competency frameworks.',
1220 'type' => 'read',
1221 'capabilities' => 'moodle/competency:competencyview',
1222 'ajax' => true,
1223 ),
1224 'core_competency_count_competency_frameworks' => array(
1225 'classname' => 'core_competency\external',
1226 'methodname' => 'count_competency_frameworks',
1227 'classpath' => '',
1228 'description' => 'Count a list of a competency frameworks.',
1229 'type' => 'read',
1230 'capabilities' => 'moodle/competency:competencyview',
1231 'ajax' => true,
1232 ),
1233 'core_competency_competency_framework_viewed' => array(
1234 'classname' => 'core_competency\external',
1235 'methodname' => 'competency_framework_viewed',
1236 'classpath' => '',
1237 'description' => 'Log event competency framework viewed',
1238 'type' => 'read',
1239 'capabilities' => 'moodle/competency:competencyview',
1240 'ajax' => true,
1241 ),
1242 'core_competency_create_competency' => array(
1243 'classname' => 'core_competency\external',
1244 'methodname' => 'create_competency',
1245 'classpath' => '',
1246 'description' => 'Creates new competencies.',
1247 'type' => 'write',
1248 'capabilities' => 'moodle/competency:competencymanage',
1249 'ajax' => true,
1250 ),
1251 'core_competency_read_competency' => array(
1252 'classname' => 'core_competency\external',
1253 'methodname' => 'read_competency',
1254 'classpath' => '',
1255 'description' => 'Load a summary of a competency.',
1256 'type' => 'read',
1257 'capabilities' => 'moodle/competency:competencyview',
1258 'ajax' => true,
1259 ),
1260 'core_competency_competency_viewed' => array(
1261 'classname' => 'core_competency\external',
1262 'methodname' => 'competency_viewed',
1263 'classpath' => '',
1264 'description' => 'Log event competency viewed',
1265 'type' => 'read',
1266 'capabilities' => 'moodle/competency:competencyview',
1267 'ajax' => true,
3123c2cf 1268 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
1269 ),
1270 'core_competency_delete_competency' => array(
1271 'classname' => 'core_competency\external',
1272 'methodname' => 'delete_competency',
1273 'classpath' => '',
1274 'description' => 'Delete a competency.',
1275 'type' => 'write',
1276 'capabilities' => 'moodle/competency:competencymanage',
1277 'ajax' => true,
1278 ),
1279 'core_competency_update_competency' => array(
1280 'classname' => 'core_competency\external',
1281 'methodname' => 'update_competency',
1282 'classpath' => '',
1283 'description' => 'Update a competency.',
1284 'type' => 'write',
1285 'capabilities' => 'moodle/competency:competencymanage',
1286 'ajax' => true,
1287 ),
1288 'core_competency_list_competencies' => array(
1289 'classname' => 'core_competency\external',
1290 'methodname' => 'list_competencies',
1291 'classpath' => '',
1292 'description' => 'Load a list of a competencies.',
1293 'type' => 'read',
1294 'capabilities' => 'moodle/competency:competencyview',
1295 'ajax' => true,
1296 ),
1297 'core_competency_list_competencies_in_template' => array(
1298 'classname' => 'core_competency\external',
1299 'methodname' => 'list_competencies_in_template',
1300 'classpath' => '',
1301 'description' => 'Load a list of a competencies for a given template.',
1302 'type' => 'read',
1303 'capabilities' => 'moodle/competency:competencyview',
1304 'ajax' => true,
1305 ),
1306 'core_competency_count_competencies' => array(
1307 'classname' => 'core_competency\external',
1308 'methodname' => 'count_competencies',
1309 'classpath' => '',
1310 'description' => 'Count a list of a competencies.',
1311 'type' => 'read',
1312 'capabilities' => 'moodle/competency:competencyview',
1313 'ajax' => true,
1314 ),
1315 'core_competency_count_competencies_in_template' => array(
1316 'classname' => 'core_competency\external',
1317 'methodname' => 'count_competencies_in_template',
1318 'classpath' => '',
1319 'description' => 'Count a list of a competencies for a given template.',
1320 'type' => 'read',
1321 'capabilities' => 'moodle/competency:competencyview',
1322 'ajax' => true,
1323 ),
1324 'core_competency_search_competencies' => array(
1325 'classname' => 'core_competency\external',
1326 'methodname' => 'search_competencies',
1327 'classpath' => '',
1328 'description' => 'Search a list of a competencies.',
1329 'type' => 'read',
1330 'capabilities' => 'moodle/competency:competencyview',
1331 'ajax' => true,
1332 ),
1333 'core_competency_set_parent_competency' => array(
1334 'classname' => 'core_competency\external',
1335 'methodname' => 'set_parent_competency',
1336 'classpath' => '',
1337 'description' => 'Set a new parent for a competency.',
1338 'type' => 'write',
1339 'capabilities' => 'moodle/competency:competencymanage',
1340 'ajax' => true,
1341 ),
1342 'core_competency_move_up_competency' => array(
1343 'classname' => 'core_competency\external',
1344 'methodname' => 'move_up_competency',
1345 'classpath' => '',
1346 'description' => 'Re-order a competency.',
1347 'type' => 'write',
1348 'capabilities' => 'moodle/competency:competencymanage',
1349 'ajax' => true,
1350 ),
1351 'core_competency_move_down_competency' => array(
1352 'classname' => 'core_competency\external',
1353 'methodname' => 'move_down_competency',
1354 'classpath' => '',
1355 'description' => 'Re-order a competency.',
1356 'type' => 'write',
1357 'capabilities' => 'moodle/competency:competencymanage',
1358 'ajax' => true,
1359 ),
1360 'core_competency_list_course_competencies' => array(
1361 'classname' => 'core_competency\external',
1362 'methodname' => 'list_course_competencies',
1363 'classpath' => '',
1364 'description' => 'List the competencies in a course',
1365 'type' => 'read',
1366 'capabilities' => 'moodle/competency:coursecompetencyview',
1367 'ajax' => true,
3123c2cf 1368 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
1369 ),
1370 'core_competency_count_competencies_in_course' => array(
1371 'classname' => 'core_competency\external',
1372 'methodname' => 'count_competencies_in_course',
1373 'classpath' => '',
1374 'description' => 'List the competencies in a course',
1375 'type' => 'read',
1376 'capabilities' => 'moodle/competency:coursecompetencyview',
1377 'ajax' => true,
1378 ),
1379 'core_competency_count_courses_using_competency' => array(
1380 'classname' => 'core_competency\external',
1381 'methodname' => 'count_courses_using_competency',
1382 'classpath' => '',
1383 'description' => 'List the courses using a competency',
1384 'type' => 'read',
1385 'capabilities' => 'moodle/competency:coursecompetencyview',
1386 'ajax' => true,
1387 ),
1388 'core_competency_add_competency_to_course' => array(
1389 'classname' => 'core_competency\external',
1390 'methodname' => 'add_competency_to_course',
1391 'classpath' => '',
1392 'description' => 'Add the competency to a course',
1393 'type' => 'write',
1394 'capabilities' => 'moodle/competency:coursecompetencymanage',
1395 'ajax' => true,
1396 ),
1397 'core_competency_add_competency_to_template' => array(
1398 'classname' => 'core_competency\external',
1399 'methodname' => 'add_competency_to_template',
1400 'classpath' => '',
1401 'description' => 'Add the competency to a template',
1402 'type' => 'write',
1403 'capabilities' => 'moodle/competency:templatemanage',
1404 'ajax' => true,
1405 ),
1406 'core_competency_remove_competency_from_course' => array(
1407 'classname' => 'core_competency\external',
1408 'methodname' => 'remove_competency_from_course',
1409 'classpath' => '',
1410 'description' => 'Remove a competency from a course',
1411 'type' => 'write',
1412 'capabilities' => 'moodle/competency:coursecompetencymanage',
1413 'ajax' => true,
1414 ),
1415 'core_competency_set_course_competency_ruleoutcome' => array(
1416 'classname' => 'core_competency\external',
1417 'methodname' => 'set_course_competency_ruleoutcome',
1418 'classpath' => '',
1419 'description' => 'Modify the ruleoutcome value for course competency',
1420 'type' => 'write',
1421 'capabilities' => 'moodle/competency:coursecompetencymanage',
1422 'ajax' => true,
1423 ),
1424 'core_competency_remove_competency_from_template' => array(
1425 'classname' => 'core_competency\external',
1426 'methodname' => 'remove_competency_from_template',
1427 'classpath' => '',
1428 'description' => 'Remove a competency from a template',
1429 'type' => 'write',
1430 'capabilities' => 'moodle/competency:templatemanage',
1431 'ajax' => true,
1432 ),
1433 'core_competency_reorder_course_competency' => array(
1434 'classname' => 'core_competency\external',
1435 'methodname' => 'reorder_course_competency',
1436 'classpath' => '',
1437 'description' => 'Move a course competency to a new relative sort order.',
1438 'type' => 'write',
1439 'capabilities' => 'moodle/competency:coursecompetencymanage',
1440 'ajax' => true,
1441 ),
1442 'core_competency_reorder_template_competency' => array(
1443 'classname' => 'core_competency\external',
1444 'methodname' => 'reorder_template_competency',
1445 'classpath' => '',
1446 'description' => 'Move a template competency to a new relative sort order.',
1447 'type' => 'write',
1448 'capabilities' => 'moodle/competency:templatemanage',
1449 'ajax' => true,
1450 ),
1451 'core_competency_create_template' => array(
1452 'classname' => 'core_competency\external',
1453 'methodname' => 'create_template',
1454 'classpath' => '',
1455 'description' => 'Creates new learning plan templates.',
1456 'type' => 'write',
1457 'capabilities' => 'moodle/competency:templatemanage',
1458 'ajax' => true,
1459 ),
1460 'core_competency_duplicate_template' => array(
1461 'classname' => 'core_competency\external',
1462 'methodname' => 'duplicate_template',
1463 'classpath' => '',
1464 'description' => 'Duplicate learning plan template.',
1465 'type' => 'write',
1466 'capabilities' => 'moodle/competency:templatemanage',
1467 'ajax' => true,
1468 ),
1469 'core_competency_read_template' => array(
1470 'classname' => 'core_competency\external',
1471 'methodname' => 'read_template',
1472 'classpath' => '',
1473 'description' => 'Load a summary of a learning plan template.',
1474 'type' => 'read',
1475 'capabilities' => 'moodle/competency:templateview',
1476 'ajax' => true,
1477 ),
1478 'core_competency_delete_template' => array(
1479 'classname' => 'core_competency\external',
1480 'methodname' => 'delete_template',
1481 'classpath' => '',
1482 'description' => 'Delete a learning plan template.',
1483 'type' => 'write',
1484 'capabilities' => 'moodle/competency:templatemanage',
1485 'ajax' => true,
1486 ),
1487 'core_competency_update_template' => array(
1488 'classname' => 'core_competency\external',
1489 'methodname' => 'update_template',
1490 'classpath' => '',
1491 'description' => 'Update a learning plan template.',
1492 'type' => 'write',
1493 'capabilities' => 'moodle/competency:templatemanage',
1494 'ajax' => true,
1495 ),
1496 'core_competency_list_templates' => array(
1497 'classname' => 'core_competency\external',
1498 'methodname' => 'list_templates',
1499 'classpath' => '',
1500 'description' => 'Load a list of a learning plan templates.',
1501 'type' => 'read',
1502 'capabilities' => 'moodle/competency:templateview',
1503 'ajax' => true,
1504 ),
1505 'core_competency_list_templates_using_competency' => array(
1506 'classname' => 'core_competency\external',
1507 'methodname' => 'list_templates_using_competency',
1508 'classpath' => '',
1509 'description' => 'Load a list of a learning plan templates for a given competency.',
1510 'type' => 'read',
1511 'capabilities' => 'moodle/competency:templateview',
1512 'ajax' => true,
1513 ),
1514 'core_competency_count_templates' => array(
1515 'classname' => 'core_competency\external',
1516 'methodname' => 'count_templates',
1517 'classpath' => '',
1518 'description' => 'Count a list of a learning plan templates.',
1519 'type' => 'read',
1520 'capabilities' => 'moodle/competency:templateview',
1521 'ajax' => true,
1522 ),
1523 'core_competency_count_templates_using_competency' => array(
1524 'classname' => 'core_competency\external',
1525 'methodname' => 'count_templates_using_competency',
1526 'classpath' => '',
1527 'description' => 'Count a list of a learning plan templates for a given competency.',
1528 'type' => 'read',
1529 'capabilities' => 'moodle/competency:templateview',
1530 'ajax' => true,
1531 ),
1532 'core_competency_create_plan' => array(
1533 'classname' => 'core_competency\external',
1534 'methodname' => 'create_plan',
1535 'classpath' => '',
1536 'description' => 'Creates a learning plan.',
1537 'type' => 'write',
1538 'capabilities' => 'moodle/competency:planmanage',
1539 'ajax' => true,
1540 ),
1541 'core_competency_update_plan' => array(
1542 'classname' => 'core_competency\external',
1543 'methodname' => 'update_plan',
1544 'classpath' => '',
1545 'description' => 'Updates a learning plan.',
1546 'type' => 'write',
1547 'capabilities' => 'moodle/competency:planmanage',
1548 'ajax' => true,
1549 ),
1550 'core_competency_complete_plan' => array(
1551 'classname' => 'core_competency\external',
1552 'methodname' => 'complete_plan',
1553 'classpath' => '',
1554 'description' => 'Complete learning plan.',
1555 'type' => 'write',
1556 'capabilities' => 'moodle/competency:planmanage',
1557 'ajax' => true,
1558 ),
1559 'core_competency_reopen_plan' => array(
1560 'classname' => 'core_competency\external',
1561 'methodname' => 'reopen_plan',
1562 'classpath' => '',
1563 'description' => 'Reopen learning plan.',
1564 'type' => 'write',
1565 'capabilities' => 'moodle/competency:planmanage',
1566 'ajax' => true,
1567 ),
1568 'core_competency_read_plan' => array(
1569 'classname' => 'core_competency\external',
1570 'methodname' => 'read_plan',
1571 'classpath' => '',
1572 'description' => 'Load a learning plan.',
1573 'type' => 'read',
1574 'capabilities' => 'moodle/competency:planviewown',
1575 'ajax' => true,
1576 ),
1577 'core_competency_delete_plan' => array(
1578 'classname' => 'core_competency\external',
1579 'methodname' => 'delete_plan',
1580 'classpath' => '',
1581 'description' => 'Delete a learning plan.',
1582 'type' => 'write',
1583 'capabilities' => 'moodle/competency:planmanage',
1584 'ajax' => true,
1585 ),
1586 'core_competency_list_user_plans' => array(
1587 'classname' => 'core_competency\external',
1588 'methodname' => 'list_user_plans',
1589 'classpath' => '',
1590 'description' => 'List a user\'s learning plans.',
1591 'type' => 'read',
1592 'capabilities' => 'moodle/competency:planviewown',
1593 'ajax' => true,
1594 ),
1595 'core_competency_list_plan_competencies' => array(
1596 'classname' => 'core_competency\external',
1597 'methodname' => 'list_plan_competencies',
1598 'classpath' => '',
1599 'description' => 'List the competencies in a plan',
1600 'type' => 'read',
1601 'capabilities' => 'moodle/competency:planviewown',
1602 'ajax' => true,
1603 ),
1604 'core_competency_add_competency_to_plan' => array(
1605 'classname' => 'core_competency\external',
1606 'methodname' => 'add_competency_to_plan',
1607 'classpath' => '',
1608 'description' => 'Add the competency to a learning plan',
1609 'type' => 'write',
1610 'capabilities' => 'moodle/competency:planmanage',
1611 'ajax' => true,
1612 ),
1613 'core_competency_remove_competency_from_plan' => array(
1614 'classname' => 'core_competency\external',
1615 'methodname' => 'remove_competency_from_plan',
1616 'classpath' => '',
1617 'description' => 'Remove the competency from a learning plan',
1618 'type' => 'write',
1619 'capabilities' => 'moodle/competency:planmanage',
1620 'ajax' => true,
1621 ),
1622 'core_competency_reorder_plan_competency' => array(
1623 'classname' => 'core_competency\external',
1624 'methodname' => 'reorder_plan_competency',
1625 'classpath' => '',
1626 'description' => 'Move a plan competency to a new relative sort order.',
1627 'type' => 'write',
1628 'capabilities' => 'moodle/competency:planmanage',
1629 'ajax' => true,
1630 ),
1631 'core_competency_plan_request_review' => array(
1632 'classname' => 'core_competency\external',
1633 'methodname' => 'plan_request_review',
1634 'classpath' => '',
1635 'description' => 'Request for a plan to be reviewed.',
1636 'type' => 'write',
1637 'capabilities' => 'moodle/competency:planmanagedraft',
1638 'ajax' => true,
1639 ),
1640 'core_competency_plan_start_review' => array(
1641 'classname' => 'core_competency\external',
1642 'methodname' => 'plan_start_review',
1643 'classpath' => '',
1644 'description' => 'Start the review of a plan.',
1645 'type' => 'write',
1646 'capabilities' => 'moodle/competency:planmanage',
1647 'ajax' => true,
1648 ),
1649 'core_competency_plan_stop_review' => array(
1650 'classname' => 'core_competency\external',
1651 'methodname' => 'plan_stop_review',
1652 'classpath' => '',
1653 'description' => 'Stop the review of a plan.',
1654 'type' => 'write',
1655 'capabilities' => 'moodle/competency:planmanage',
1656 'ajax' => true,
1657 ),
1658 'core_competency_plan_cancel_review_request' => array(
1659 'classname' => 'core_competency\external',
1660 'methodname' => 'plan_cancel_review_request',
1661 'classpath' => '',
1662 'description' => 'Cancel the review of a plan.',
1663 'type' => 'write',
1664 'capabilities' => 'moodle/competency:planmanagedraft',
1665 'ajax' => true,
1666 ),
1667 'core_competency_approve_plan' => array(
1668 'classname' => 'core_competency\external',
1669 'methodname' => 'approve_plan',
1670 'classpath' => '',
1671 'description' => 'Approve a plan.',
1672 'type' => 'write',
1673 'capabilities' => 'moodle/competency:planmanage',
1674 'ajax' => true,
1675 ),
1676 'core_competency_unapprove_plan' => array(
1677 'classname' => 'core_competency\external',
1678 'methodname' => 'unapprove_plan',
1679 'classpath' => '',
1680 'description' => 'Unapprove a plan.',
1681 'type' => 'write',
1682 'capabilities' => 'moodle/competency:planmanage',
1683 'ajax' => true,
1684 ),
1685 'core_competency_template_has_related_data' => array(
1686 'classname' => 'core_competency\external',
1687 'methodname' => 'template_has_related_data',
1688 'classpath' => '',
1689 'description' => 'Check if a template has related data',
1690 'type' => 'read',
1691 'capabilities' => 'moodle/competency:templateview',
1692 'ajax' => true,
1693 ),
1694 'core_competency_get_scale_values' => array(
1695 'classname' => 'core_competency\external',
1696 'methodname' => 'get_scale_values',
1697 'classpath' => '',
1698 'description' => 'Fetch the values for a specific scale',
1699 'type' => 'read',
1700 'capabilities' => 'moodle/competency:competencymanage',
1701 'ajax' => true,
3123c2cf 1702 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
1703 ),
1704 'core_competency_add_related_competency' => array(
1705 'classname' => 'core_competency\external',
1706 'methodname' => 'add_related_competency',
1707 'classpath' => '',
1708 'description' => 'Adds a related competency',
1709 'type' => 'write',
1710 'capabilities' => 'moodle/competency:competencymanage',
1711 'ajax' => true,
1712 ),
1713 'core_competency_remove_related_competency' => array(
1714 'classname' => 'core_competency\external',
1715 'methodname' => 'remove_related_competency',
1716 'classpath' => '',
1717 'description' => 'Remove a related competency',
1718 'type' => 'write',
1719 'capabilities' => 'moodle/competency:competencymanage',
1720 'ajax' => true,
1721 ),
1722 'core_competency_read_user_evidence' => array(
1723 'classname' => 'core_competency\external',
1724 'methodname' => 'read_user_evidence',
1725 'classpath' => '',
1726 'description' => 'Read an evidence of prior learning.',
1727 'type' => 'read',
1728 'capabilities' => 'moodle/competency:userevidenceview',
1729 'ajax' => true,
1730 ),
1731 'core_competency_delete_user_evidence' => array(
1732 'classname' => 'core_competency\external',
1733 'methodname' => 'delete_user_evidence',
1734 'classpath' => '',
1735 'description' => 'Delete an evidence of prior learning.',
1736 'type' => 'write',
1737 'capabilities' => 'moodle/competency:userevidencemanageown',
1738 'ajax' => true,
1739 ),
1740 'core_competency_create_user_evidence_competency' => array(
1741 'classname' => 'core_competency\external',
1742 'methodname' => 'create_user_evidence_competency',
1743 'classpath' => '',
1744 'description' => 'Create an evidence of prior learning relationship with a competency.',
1745 'type' => 'read',
1746 'capabilities' => 'moodle/competency:userevidencemanageown, moodle/competency:competencyview',
1747 'ajax' => true,
1748 ),
1749 'core_competency_delete_user_evidence_competency' => array(
1750 'classname' => 'core_competency\external',
1751 'methodname' => 'delete_user_evidence_competency',
1752 'classpath' => '',
1753 'description' => 'Delete an evidence of prior learning relationship with a competency.',
1754 'type' => 'write',
1755 'capabilities' => 'moodle/competency:userevidencemanageown',
1756 'ajax' => true,
1757 ),
1758 'core_competency_user_competency_cancel_review_request' => array(
1759 'classname' => 'core_competency\external',
1760 'methodname' => 'user_competency_cancel_review_request',
1761 'classpath' => '',
1762 'description' => 'Cancel a review request.',
1763 'type' => 'write',
1764 'capabilities' => 'moodle/competency:userevidencemanageown',
1765 'ajax' => true,
1766 ),
1767 'core_competency_user_competency_request_review' => array(
1768 'classname' => 'core_competency\external',
1769 'methodname' => 'user_competency_request_review',
1770 'classpath' => '',
1771 'description' => 'Request a review.',
1772 'type' => 'write',
1773 'capabilities' => 'moodle/competency:userevidencemanageown',
1774 'ajax' => true,
1775 ),
1776 'core_competency_user_competency_start_review' => array(
1777 'classname' => 'core_competency\external',
1778 'methodname' => 'user_competency_start_review',
1779 'classpath' => '',
1780 'description' => 'Start a review.',
1781 'type' => 'write',
1782 'capabilities' => 'moodle/competency:competencygrade',
1783 'ajax' => true,
1784 ),
1785 'core_competency_user_competency_stop_review' => array(
1786 'classname' => 'core_competency\external',
1787 'methodname' => 'user_competency_stop_review',
1788 'classpath' => '',
1789 'description' => 'Stop a review.',
1790 'type' => 'write',
1791 'capabilities' => 'moodle/competency:competencygrade',
1792 'ajax' => true,
1793 ),
1794 'core_competency_user_competency_viewed' => array(
1795 'classname' => 'core_competency\external',
1796 'methodname' => 'user_competency_viewed',
1797 'classpath' => '',
1798 'description' => 'Log the user competency viewed event.',
1799 'type' => 'read',
1800 'capabilities' => 'moodle/competency:usercompetencyview',
1801 'ajax' => true,
3123c2cf 1802 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
1803 ),
1804 'core_competency_user_competency_viewed_in_plan' => array(
1805 'classname' => 'core_competency\external',
1806 'methodname' => 'user_competency_viewed_in_plan',
1807 'classpath' => '',
1808 'description' => 'Log the user competency viewed in plan event.',
1809 'type' => 'read',
1810 'capabilities' => 'moodle/competency:usercompetencyview',
1811 'ajax' => true,
3123c2cf 1812 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
1813 ),
1814 'core_competency_user_competency_viewed_in_course' => array(
1815 'classname' => 'core_competency\external',
1816 'methodname' => 'user_competency_viewed_in_course',
1817 'classpath' => '',
1818 'description' => 'Log the user competency viewed in course event',
1819 'type' => 'read',
1820 'capabilities' => 'moodle/competency:usercompetencyview',
1821 'ajax' => true,
3123c2cf 1822 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
1823 ),
1824 'core_competency_user_competency_plan_viewed' => array(
1825 'classname' => 'core_competency\external',
1826 'methodname' => 'user_competency_plan_viewed',
1827 'classpath' => '',
1828 'description' => 'Log the user competency plan viewed event.',
1829 'type' => 'read',
1830 'capabilities' => 'moodle/competency:usercompetencyview',
1831 'ajax' => true,
3123c2cf 1832 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
1833 ),
1834 'core_competency_grade_competency' => array(
1835 'classname' => 'core_competency\external',
1836 'methodname' => 'grade_competency',
1837 'classpath' => '',
1838 'description' => 'Grade a competency.',
1839 'type' => 'write',
1840 'capabilities' => 'moodle/competency:competencygrade',
1841 'ajax' => true,
1842 ),
1843 'core_competency_grade_competency_in_plan' => array(
1844 'classname' => 'core_competency\external',
1845 'methodname' => 'grade_competency_in_plan',
1846 'classpath' => '',
1847 'description' => 'Grade a competency from the user plan page.',
1848 'type' => 'write',
1849 'capabilities' => 'moodle/competency:competencygrade',
1850 'ajax' => true,
1851 ),
1852 'core_competency_grade_competency_in_course' => array(
1853 'classname' => 'core_competency\external',
1854 'methodname' => 'grade_competency_in_course',
1855 'classpath' => '',
1856 'description' => 'Grade a competency from the course page.',
1857 'type' => 'write',
1858 'capabilities' => 'moodle/competency:competencygrade',
1859 'ajax' => true,
3123c2cf 1860 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
1861 ),
1862 'core_competency_unlink_plan_from_template' => array(
1863 'classname' => 'core_competency\external',
1864 'methodname' => 'unlink_plan_from_template',
1865 'classpath' => '',
1866 'description' => 'Unlink a plan form it template.',
1867 'type' => 'write',
1868 'capabilities' => 'moodle/competency:planmanage',
1869 'ajax' => true,
1870 ),
1871 'core_competency_template_viewed' => array(
1872 'classname' => 'core_competency\external',
1873 'methodname' => 'template_viewed',
1874 'classpath' => '',
1875 'description' => 'Log event template viewed',
1876 'type' => 'read',
1877 'capabilities' => 'moodle/competency:templateview',
1878 'ajax' => true,
1879 ),
1880 'core_competency_request_review_of_user_evidence_linked_competencies' => array(
1881 'classname' => 'core_competency\external',
1882 'methodname' => 'request_review_of_user_evidence_linked_competencies',
1883 'classpath' => '',
1884 'description' => 'Send user evidence competencies in review',
1885 'type' => 'write',
1886 'capabilities' => 'moodle/competency:userevidencemanageown',
1887 'ajax' => true,
1888 ),
1889 'core_competency_update_course_competency_settings' => array(
1890 'classname' => 'core_competency\external',
1891 'methodname' => 'update_course_competency_settings',
1892 'classpath' => '',
1893 'description' => 'Update the course competency settings',
1894 'type' => 'write',
1895 'capabilities' => 'moodle/competency:coursecompetencyconfigure',
1896 'ajax' => true,
1897 ),
1e99f31e
FM
1898 'core_competency_delete_evidence' => array(
1899 'classname' => 'core_competency\external',
1900 'methodname' => 'delete_evidence',
1901 'classpath' => '',
1902 'description' => 'Delete an evidence',
1903 'type' => 'write',
1904 'capabilities' => 'moodle/competency:evidencedelete',
1905 'ajax' => true,
3123c2cf 1906 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1e99f31e 1907 ),
f23e9b6b
CB
1908
1909 'core_webservice_get_site_info' => array(
1910 'classname' => 'core_webservice_external',
1911 'methodname' => 'get_site_info',
1912 'classpath' => 'webservice/externallib.php',
1913 'description' => 'Return some site info / user info / list web service functions',
1914 'type' => 'read',
ee7295ee 1915 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
f23e9b6b 1916 )
9a0df45a 1917);
c1b65883
JM
1918
1919$services = array(
96e0194c 1920 'Moodle mobile web service' => array(
12c52b91 1921 'functions' => array(), // Unused as we add the service in each function definition, third party services would use this.
96e0194c
SH
1922 'enabled' => 0,
1923 'restrictedusers' => 0,
af03513f 1924 'shortname' => MOODLE_OFFICIAL_MOBILE_SERVICE,
106c55fb
DW
1925 'downloadfiles' => 1,
1926 'uploadfiles' => 1
96e0194c
SH
1927 ),
1928);