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