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