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