on-demand release 3.6dev+
[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 ),
60b67bbc 927 'core_message_delete_conversations_by_id' => array(
26f39c88 928 'classname' => 'core_message_external',
60b67bbc 929 'methodname' => 'delete_conversations_by_id',
26f39c88 930 'classpath' => 'message/externallib.php',
60b67bbc 931 'description' => 'Deletes a list of conversations.',
26f39c88
MN
932 'type' => 'write',
933 'capabilities' => 'moodle/site:deleteownmessage',
934 'ajax' => true,
935 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
936 ),
f23e9b6b
CB
937 'core_message_delete_message' => array(
938 'classname' => 'core_message_external',
939 'methodname' => 'delete_message',
940 'classpath' => 'message/externallib.php',
941 'description' => 'Deletes a message.',
942 'type' => 'write',
ee7295ee 943 'capabilities' => 'moodle/site:deleteownmessage',
3090f52f 944 'ajax' => true,
ee7295ee 945 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
d6731600 946 ),
f23e9b6b
CB
947 'core_message_get_blocked_users' => array(
948 'classname' => 'core_message_external',
949 'methodname' => 'get_blocked_users',
950 'classpath' => 'message/externallib.php',
951 'description' => 'Retrieve a list of users blocked',
952 'type' => 'read',
ee7295ee 953 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
d6731600 954 ),
cd03b8d7
MN
955 'core_message_data_for_messagearea_search_messages' => array(
956 'classname' => 'core_message_external',
957 'methodname' => 'data_for_messagearea_search_messages',
958 'classpath' => 'message/externallib.php',
959 'description' => 'Retrieve the template data for searching for messages',
960 'type' => 'read',
961 'ajax' => true,
53522c6e 962 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
cd03b8d7 963 ),
48e8bdba 964 'core_message_data_for_messagearea_search_users' => array(
cd03b8d7 965 'classname' => 'core_message_external',
48e8bdba 966 'methodname' => 'data_for_messagearea_search_users',
cd03b8d7
MN
967 'classpath' => 'message/externallib.php',
968 'description' => 'Retrieve the template data for searching for people',
969 'type' => 'read',
970 'ajax' => true,
971 ),
48e8bdba 972 'core_message_data_for_messagearea_search_users_in_course' => array(
cd03b8d7 973 'classname' => 'core_message_external',
48e8bdba 974 'methodname' => 'data_for_messagearea_search_users_in_course',
cd03b8d7
MN
975 'classpath' => 'message/externallib.php',
976 'description' => 'Retrieve the template data for searching for people in a course',
977 'type' => 'read',
978 'ajax' => true,
979 ),
9aa012b5
MN
980 'core_message_data_for_messagearea_conversations' => array(
981 'classname' => 'core_message_external',
982 'methodname' => 'data_for_messagearea_conversations',
983 'classpath' => 'message/externallib.php',
984 'description' => 'Retrieve the template data for the conversation list',
985 'type' => 'read',
986 'ajax' => true,
21d9f020 987 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
9aa012b5
MN
988 ),
989 'core_message_data_for_messagearea_contacts' => array(
990 'classname' => 'core_message_external',
991 'methodname' => 'data_for_messagearea_contacts',
992 'classpath' => 'message/externallib.php',
993 'description' => 'Retrieve the template data for the contact list',
994 'type' => 'read',
995 'ajax' => true,
21d9f020 996 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
9aa012b5 997 ),
3cd13828
MN
998 'core_message_data_for_messagearea_messages' => array(
999 'classname' => 'core_message_external',
1000 'methodname' => 'data_for_messagearea_messages',
1001 'classpath' => 'message/externallib.php',
1002 'description' => 'Retrieve the template data for the messages',
1003 'type' => 'read',
1004 'ajax' => true,
21d9f020 1005 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
3cd13828 1006 ),
c060cd49
MN
1007 'core_message_data_for_messagearea_get_most_recent_message' => array(
1008 'classname' => 'core_message_external',
1009 'methodname' => 'data_for_messagearea_get_most_recent_message',
1010 'classpath' => 'message/externallib.php',
1011 'description' => 'Retrieve the template data for the most recent message',
1012 'type' => 'read',
1013 'ajax' => true,
1014 ),
c6e97f54
MN
1015 'core_message_data_for_messagearea_get_profile' => array(
1016 'classname' => 'core_message_external',
1017 'methodname' => 'data_for_messagearea_get_profile',
1018 'classpath' => 'message/externallib.php',
1019 'description' => 'Retrieve the template data for the users\'s profile',
1020 'type' => 'read',
1021 'ajax' => true,
1022 ),
d6731600 1023 'core_message_get_contacts' => array(
f23e9b6b
CB
1024 'classname' => 'core_message_external',
1025 'methodname' => 'get_contacts',
1026 'classpath' => 'message/externallib.php',
d6731600 1027 'description' => 'Retrieve the contact list',
f23e9b6b 1028 'type' => 'read',
ee7295ee 1029 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
d6731600 1030 ),
aff9da17 1031 'core_message_get_messages' => array(
f23e9b6b
CB
1032 'classname' => 'core_message_external',
1033 'methodname' => 'get_messages',
1034 'classpath' => 'message/externallib.php',
1035 'description' => 'Retrieve a list of messages sent and received by a user (conversations, notifications or both)',
1036 'type' => 'read',
ee7295ee 1037 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
3274d5ca
RW
1038 'ajax' => true,
1039 ),
8c55bd6c
RW
1040 'core_message_get_unread_conversations_count' => array(
1041 'classname' => 'core_message_external',
1042 'methodname' => 'get_unread_conversations_count',
1043 'classpath' => 'message/externallib.php',
1044 'description' => 'Retrieve the count of unread conversations for a given user',
1045 'type' => 'read',
1046 'ajax' => true,
53522c6e 1047 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
8c55bd6c 1048 ),
3274d5ca
RW
1049 'core_message_mark_all_notifications_as_read' => array(
1050 'classname' => 'core_message_external',
1051 'methodname' => 'mark_all_notifications_as_read',
1052 'classpath' => 'message/externallib.php',
8c55bd6c
RW
1053 'description' => 'Mark all notifications as read for a given user',
1054 'type' => 'write',
1055 'ajax' => true,
53522c6e 1056 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
8c55bd6c
RW
1057 ),
1058 'core_message_mark_all_messages_as_read' => array(
1059 'classname' => 'core_message_external',
1060 'methodname' => 'mark_all_messages_as_read',
1061 'classpath' => 'message/externallib.php',
1062 'description' => 'Mark all messages as read for a given user',
3274d5ca
RW
1063 'type' => 'write',
1064 'ajax' => true,
53522c6e 1065 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
60ab2e1b 1066 ),
a84f89ca 1067 'core_message_mark_message_read' => array(
f23e9b6b
CB
1068 'classname' => 'core_message_external',
1069 'methodname' => 'mark_message_read',
1070 'classpath' => 'message/externallib.php',
1071 'description' => 'Mark a single message as read, trigger message_viewed event.',
1072 'type' => 'write',
ee7295ee 1073 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
0b19d048 1074 'ajax' => true,
a84f89ca 1075 ),
2b595d96
MN
1076 'core_message_mark_notification_read' => array(
1077 'classname' => 'core_message_external',
1078 'methodname' => 'mark_notification_read',
1079 'classpath' => 'message/externallib.php',
1080 'description' => 'Mark a single notification as read, trigger notification_viewed event.',
1081 'type' => 'write',
1082 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1083 'ajax' => true,
1084 ),
a0eabdd3
RW
1085 'core_message_message_processor_config_form' => array(
1086 'classname' => 'core_message_external',
1087 'methodname' => 'message_processor_config_form',
1088 'classpath' => 'message/externallib.php',
1089 'description' => 'Process the message processor config form',
1090 'type' => 'write',
1091 'ajax' => true,
53522c6e 1092 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
a0eabdd3 1093 ),
8c125526
RW
1094 'core_message_get_message_processor' => array(
1095 'classname' => 'core_message_external',
1096 'methodname' => 'get_message_processor',
1097 'classpath' => 'message/externallib.php',
1098 'description' => 'Get a message processor',
1099 'type' => 'read',
1100 'ajax' => true,
1101 ),
f23e9b6b
CB
1102 'core_message_search_contacts' => array(
1103 'classname' => 'core_message_external',
1104 'methodname' => 'search_contacts',
1105 'classpath' => 'message/externallib.php',
1106 'description' => 'Search for contacts',
1107 'type' => 'read',
ee7295ee 1108 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
419b1128 1109 ),
f23e9b6b
CB
1110 'core_message_send_instant_messages' => array(
1111 'classname' => 'core_message_external',
1112 'methodname' => 'send_instant_messages',
1113 'classpath' => 'message/externallib.php',
1114 'description' => 'Send instant messages',
1115 'type' => 'write',
ee7295ee 1116 'capabilities' => 'moodle/site:sendmessage',
c060cd49 1117 'ajax' => true,
ee7295ee 1118 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
f23e9b6b 1119 ),
52284186
MN
1120 'core_message_unblock_user' => array(
1121 'classname' => 'core_message_external',
1122 'methodname' => 'unblock_user',
1123 'classpath' => 'message/externallib.php',
1124 'description' => 'Unblocks a user',
1125 'type' => 'write',
1126 'ajax' => true,
1127 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1128 ),
f23e9b6b
CB
1129 'core_message_unblock_contacts' => array(
1130 'classname' => 'core_message_external',
1131 'methodname' => 'unblock_contacts',
1132 'classpath' => 'message/externallib.php',
0b3eadcd
MN
1133 'description' => '** DEPRECATED ** Please do not call this function any more.
1134 Unblock contacts',
f23e9b6b 1135 'type' => 'write',
c6e97f54 1136 'ajax' => true,
ee7295ee 1137 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
5d1017e1 1138 ),
e86f0cb4
JL
1139 'core_message_get_user_notification_preferences' => array(
1140 'classname' => 'core_message_external',
1141 'methodname' => 'get_user_notification_preferences',
1142 'classpath' => 'message/externallib.php',
1143 'description' => 'Get the notification preferences for a given user.',
1144 'type' => 'read',
1145 'capabilities' => 'moodle/user:editownmessageprofile',
1146 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1147 ),
2521afd2
JL
1148 'core_message_get_user_message_preferences' => array(
1149 'classname' => 'core_message_external',
1150 'methodname' => 'get_user_message_preferences',
1151 'classpath' => 'message/externallib.php',
1152 'description' => 'Get the message preferences for a given user.',
1153 'type' => 'read',
1154 'capabilities' => 'moodle/user:editownmessageprofile',
1155 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1156 ),
5d1017e1 1157 'core_notes_create_notes' => array(
f23e9b6b
CB
1158 'classname' => 'core_notes_external',
1159 'methodname' => 'create_notes',
1160 'classpath' => 'notes/externallib.php',
8d46dabb 1161 'description' => 'Create notes',
f23e9b6b 1162 'type' => 'write',
b5b81de3 1163 'ajax' => true,
ee7295ee
JL
1164 'capabilities' => 'moodle/notes:manage',
1165 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
8d46dabb 1166 ),
34348b2b 1167 'core_notes_delete_notes' => array(
f23e9b6b
CB
1168 'classname' => 'core_notes_external',
1169 'methodname' => 'delete_notes',
1170 'classpath' => 'notes/externallib.php',
34348b2b 1171 'description' => 'Delete notes',
f23e9b6b 1172 'type' => 'write',
ee7295ee
JL
1173 'capabilities' => 'moodle/notes:manage',
1174 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
f23e9b6b
CB
1175 ),
1176 'core_notes_get_course_notes' => array(
1177 'classname' => 'core_notes_external',
1178 'methodname' => 'get_course_notes',
1179 'classpath' => 'notes/externallib.php',
1180 'description' => 'Returns all notes in specified course (or site), for the specified user.',
1181 'type' => 'read',
ee7295ee
JL
1182 'capabilities' => 'moodle/notes:view',
1183 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
34348b2b 1184 ),
34348b2b 1185 'core_notes_get_notes' => array(
f23e9b6b
CB
1186 'classname' => 'core_notes_external',
1187 'methodname' => 'get_notes',
1188 'classpath' => 'notes/externallib.php',
34348b2b 1189 'description' => 'Get notes',
f23e9b6b
CB
1190 'type' => 'read',
1191 'capabilities' => 'moodle/notes:view'
34348b2b 1192 ),
34348b2b 1193 'core_notes_update_notes' => array(
f23e9b6b
CB
1194 'classname' => 'core_notes_external',
1195 'methodname' => 'update_notes',
1196 'classpath' => 'notes/externallib.php',
34348b2b 1197 'description' => 'Update notes',
f23e9b6b
CB
1198 'type' => 'write',
1199 'capabilities' => 'moodle/notes:manage'
34348b2b 1200 ),
a80b5518 1201 'core_notes_view_notes' => array(
f23e9b6b
CB
1202 'classname' => 'core_notes_external',
1203 'methodname' => 'view_notes',
1204 'classpath' => 'notes/externallib.php',
1205 'description' => 'Simulates the web interface view of notes/index.php: trigger events.',
1206 'type' => 'write',
ee7295ee
JL
1207 'capabilities' => 'moodle/notes:view',
1208 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
9028d9b5 1209 ),
f23e9b6b
CB
1210 'core_output_load_template' => array(
1211 'classname' => 'core\output\external',
1212 'methodname' => 'load_template',
1213 'description' => 'Load a template for a renderable',
1214 'type' => 'read',
5041600d
RT
1215 'loginrequired' => false,
1216 'ajax' => true,
0ff4ebb4 1217 ),
e330b1c2 1218 'core_output_load_fontawesome_icon_map' => array(
a26ce248 1219 'classname' => 'core\output\external',
e330b1c2 1220 'methodname' => 'load_fontawesome_icon_map',
a26ce248
DW
1221 'description' => 'Load the mapping of names to icons',
1222 'type' => 'read',
1223 'loginrequired' => false,
1224 'ajax' => true,
1225 ),
f23e9b6b
CB
1226 // Question related functions.
1227 'core_question_update_flag' => array(
1228 'classname' => 'core_question_external',
1229 'methodname' => 'update_flag',
1230 'description' => 'Update the flag state of a question attempt.',
1231 'type' => 'write',
1232 'capabilities' => 'moodle/question:flag',
ee7295ee 1233 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
3f0ea6d8 1234 ),
680d5c5b
SL
1235 'core_question_submit_tags_form' => array(
1236 'classname' => 'core_question_external',
1237 'methodname' => 'submit_tags_form',
1238 'description' => 'Update the question tags.',
1239 'type' => 'write',
1240 'ajax' => true,
1241 ),
6768729e
RW
1242 'core_question_get_random_question_summaries' => array(
1243 'classname' => 'core_question_external',
1244 'methodname' => 'get_random_question_summaries',
1245 'description' => 'Get the random question set for a criteria',
1246 'type' => 'read',
1247 'ajax' => true,
1248 ),
f23e9b6b
CB
1249 'core_rating_get_item_ratings' => array(
1250 'classname' => 'core_rating_external',
1251 'methodname' => 'get_item_ratings',
1252 'description' => 'Retrieve all the ratings for an item.',
1253 'type' => 'read',
ee7295ee
JL
1254 'capabilities' => 'moodle/rating:view',
1255 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
5d1017e1 1256 ),
afb7799a
JL
1257 'core_rating_add_rating' => array(
1258 'classname' => 'core_rating_external',
1259 'methodname' => 'add_rating',
1260 'description' => 'Rates an item.',
1261 'type' => 'write',
1262 'capabilities' => 'moodle/rating:rate',
1263 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1264 ),
f23e9b6b
CB
1265 'core_role_assign_roles' => array(
1266 'classname' => 'core_role_external',
1267 'methodname' => 'assign_roles',
1268 'classpath' => 'enrol/externallib.php',
1269 'description' => 'Manual role assignments.',
1270 'type' => 'write',
1271 'capabilities' => 'moodle/role:assign'
0bf486a6 1272 ),
f23e9b6b
CB
1273 'core_role_unassign_roles' => array(
1274 'classname' => 'core_role_external',
1275 'methodname' => 'unassign_roles',
1276 'classpath' => 'enrol/externallib.php',
1277 'description' => 'Manual role unassignments.',
1278 'type' => 'write',
1279 'capabilities' => 'moodle/role:assign'
11e76602 1280 ),
a6cacdd2 1281 'core_search_get_relevant_users' => array(
1282 'classname' => '\core_search\external',
1283 'methodname' => 'get_relevant_users',
1284 'description' => 'Gets relevant users for a search request.',
1285 'type' => 'read',
1286 'ajax' => true
1287 ),
f23e9b6b
CB
1288 'core_tag_get_tagindex' => array(
1289 'classname' => 'core_tag_external',
1290 'methodname' => 'get_tagindex',
1291 'description' => 'Gets tag index page for one tag and one tag area',
1292 'type' => 'read',
5041600d 1293 'ajax' => true,
11e76602 1294 ),
f23e9b6b
CB
1295 'core_tag_get_tags' => array(
1296 'classname' => 'core_tag_external',
1297 'methodname' => 'get_tags',
1298 'description' => 'Gets tags by their ids',
1299 'type' => 'read',
5041600d 1300 'ajax' => true,
11e76602 1301 ),
f23e9b6b
CB
1302 'core_tag_update_tags' => array(
1303 'classname' => 'core_tag_external',
1304 'methodname' => 'update_tags',
1305 'description' => 'Updates tags',
1306 'type' => 'write',
5041600d 1307 'ajax' => true,
cc73ea07 1308 ),
cdc5f978 1309 'core_update_inplace_editable' => array(
f23e9b6b
CB
1310 'classname' => 'core_external',
1311 'methodname' => 'update_inplace_editable',
1312 'classpath' => 'lib/external/externallib.php',
cdc5f978 1313 'description' => 'Generic service to update title',
f23e9b6b 1314 'type' => 'write',
5041600d
RT
1315 'loginrequired' => true,
1316 'ajax' => true,
c66dc3df 1317 ),
f23e9b6b
CB
1318 'core_user_add_user_device' => array(
1319 'classname' => 'core_user_external',
1320 'methodname' => 'add_user_device',
1321 'classpath' => 'user/externallib.php',
1322 'description' => 'Store mobile user devices information for PUSH Notifications.',
1323 'type' => 'write',
ee7295ee 1324 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
9bdcf579 1325 ),
f23e9b6b
CB
1326 'core_user_add_user_private_files' => array(
1327 'classname' => 'core_user_external',
1328 'methodname' => 'add_user_private_files',
1329 'classpath' => 'user/externallib.php',
1330 'description' => 'Copy files from a draft area to users private files area.',
1331 'type' => 'write',
ee7295ee
JL
1332 'capabilities' => 'moodle/user:manageownfiles',
1333 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
25c49a85 1334 ),
f23e9b6b
CB
1335 'core_user_create_users' => array(
1336 'classname' => 'core_user_external',
1337 'methodname' => 'create_users',
1338 'classpath' => 'user/externallib.php',
1339 'description' => 'Create users.',
1340 'type' => 'write',
1341 'capabilities' => 'moodle/user:create'
23b398fc 1342 ),
f23e9b6b
CB
1343 'core_user_delete_users' => array(
1344 'classname' => 'core_user_external',
1345 'methodname' => 'delete_users',
1346 'classpath' => 'user/externallib.php',
1347 'description' => 'Delete users.',
1348 'type' => 'write',
1349 'capabilities' => 'moodle/user:delete'
6c785afa 1350 ),
f23e9b6b
CB
1351 'core_user_get_course_user_profiles' => array(
1352 'classname' => 'core_user_external',
1353 'methodname' => 'get_course_user_profiles',
1354 'classpath' => 'user/externallib.php',
1355 'description' => 'Get course user profiles (each of the profils matching a course id and a user id),.',
1356 'type' => 'read',
1357 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, '
ee7295ee
JL
1358 . 'moodle/site:accessallgroups',
1359 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
6c785afa 1360 ),
f23e9b6b
CB
1361 'core_user_get_users' => array(
1362 'classname' => 'core_user_external',
1363 'methodname' => 'get_users',
1364 'classpath' => 'user/externallib.php',
1365 'description' => 'search for users matching the parameters',
1366 'type' => 'read',
1367 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update'
db5b6971 1368 ),
f23e9b6b
CB
1369 'core_user_get_users_by_field' => array(
1370 'classname' => 'core_user_external',
1371 'methodname' => 'get_users_by_field',
1372 'classpath' => 'user/externallib.php',
1373 'description' => 'Retrieve users\' information for a specified unique field - If you want to do a user search, use '
1374 . 'core_user_get_users()',
1375 'type' => 'read',
ee7295ee 1376 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update',
5041600d 1377 'ajax' => true,
ee7295ee 1378 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
8e355853 1379 ),
f23e9b6b
CB
1380 'core_user_remove_user_device' => array(
1381 'classname' => 'core_user_external',
1382 'methodname' => 'remove_user_device',
1383 'classpath' => 'user/externallib.php',
1384 'description' => 'Remove a user device from the Moodle database.',
1385 'type' => 'write',
ee7295ee 1386 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
ef4c23cc 1387 ),
c598f278 1388 'core_user_update_users' => array(
a0eabdd3 1389 'classname' => 'core_user_external',
c598f278 1390 'methodname' => 'update_users',
a0eabdd3 1391 'classpath' => 'user/externallib.php',
c598f278 1392 'description' => 'Update users.',
a0eabdd3
RW
1393 'type' => 'write',
1394 'capabilities' => 'moodle/user:update',
1395 'ajax' => true,
1396 ),
c598f278 1397 'core_user_update_user_preferences' => array(
f23e9b6b 1398 'classname' => 'core_user_external',
c598f278 1399 'methodname' => 'update_user_preferences',
f23e9b6b 1400 'classpath' => 'user/externallib.php',
c598f278 1401 'description' => 'Update a user\'s preferences',
f23e9b6b 1402 'type' => 'write',
c598f278 1403 'capabilities' => 'moodle/user:editownmessageprofile, moodle/user:editmessageprofile',
a0eabdd3 1404 'ajax' => true,
6d2f938c 1405 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
c026a28d 1406 ),
f23e9b6b
CB
1407 'core_user_view_user_list' => array(
1408 'classname' => 'core_user_external',
1409 'methodname' => 'view_user_list',
1410 'classpath' => 'user/externallib.php',
1411 'description' => 'Simulates the web-interface view of user/index.php (triggering events),.',
1412 'type' => 'write',
1413 'capabilities' => 'moodle/course:viewparticipants',
ee7295ee 1414 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
7361b968 1415 ),
f23e9b6b
CB
1416 'core_user_view_user_profile' => array(
1417 'classname' => 'core_user_external',
1418 'methodname' => 'view_user_profile',
1419 'classpath' => 'user/externallib.php',
1420 'description' => 'Simulates the web-interface view of user/view.php and user/profile.php (triggering events),.',
1421 'type' => 'write',
1422 'capabilities' => 'moodle/user:viewdetails',
ee7295ee 1423 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
f4fb827e 1424 ),
45fec983
JL
1425 'core_user_get_user_preferences' => array(
1426 'classname' => 'core_user_external',
1427 'methodname' => 'get_user_preferences',
1428 'classpath' => 'user/externallib.php',
1429 'description' => 'Return user preferences.',
1430 'type' => 'read',
1431 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1432 ),
d44e2e42
JL
1433 'core_user_update_picture' => array(
1434 'classname' => 'core_user_external',
1435 'methodname' => 'update_picture',
1436 'classpath' => 'user/externallib.php',
1437 'description' => 'Update or delete the user picture in the site',
1438 'type' => 'write',
1439 'capabilities' => 'moodle/user:editownprofile, moodle/user:editprofile',
1440 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1441 ),
649777fb
JL
1442 'core_user_set_user_preferences' => array(
1443 'classname' => 'core_user_external',
1444 'methodname' => 'set_user_preferences',
1445 'classpath' => 'user/externallib.php',
1446 'description' => 'Set user preferences.',
1447 'type' => 'write',
1448 'capabilities' => 'moodle/site:config',
5226999d 1449 'ajax' => true
649777fb 1450 ),
3e8145a3
JL
1451 'core_user_agree_site_policy' => array(
1452 'classname' => 'core_user_external',
1453 'methodname' => 'agree_site_policy',
1454 'classpath' => 'user/externallib.php',
1455 'description' => 'Agree the site policy for the current user.',
1456 'type' => 'write',
1457 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1458 ),
f74ac6e7
JL
1459 'core_user_get_private_files_info' => array(
1460 'classname' => 'core_user_external',
1461 'methodname' => 'get_private_files_info',
1462 'classpath' => 'user/externallib.php',
1463 'description' => 'Returns general information about files in the user private files area.',
1464 'type' => 'read',
1465 'capabilities' => 'moodle/user:manageownfiles',
1466 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1467 ),
649777fb 1468
81de839f
FM
1469 // Competencies functions.
1470 'core_competency_create_competency_framework' => array(
1471 'classname' => 'core_competency\external',
1472 'methodname' => 'create_competency_framework',
1473 'classpath' => '',
1474 'description' => 'Creates new competency frameworks.',
1475 'type' => 'write',
1476 'capabilities' => 'moodle/competency:competencymanage',
1477 'ajax' => true,
1478 ),
1479 'core_competency_read_competency_framework' => array(
1480 'classname' => 'core_competency\external',
1481 'methodname' => 'read_competency_framework',
1482 'classpath' => '',
1483 'description' => 'Load a summary of a competency framework.',
1484 'type' => 'read',
1485 'capabilities' => 'moodle/competency:competencyview',
1486 'ajax' => true,
1487 ),
1488 'core_competency_duplicate_competency_framework' => array(
1489 'classname' => 'core_competency\external',
1490 'methodname' => 'duplicate_competency_framework',
1491 'classpath' => '',
1492 'description' => 'Duplicate a competency framework.',
1493 'type' => 'write',
1494 'capabilities' => 'moodle/competency:competencymanage',
1495 'ajax' => true,
1496 ),
1497 'core_competency_delete_competency_framework' => array(
1498 'classname' => 'core_competency\external',
1499 'methodname' => 'delete_competency_framework',
1500 'classpath' => '',
1501 'description' => 'Delete a competency framework.',
1502 'type' => 'write',
1503 'capabilities' => 'moodle/competency:competencymanage',
1504 'ajax' => true,
1505 ),
1506 'core_competency_update_competency_framework' => array(
1507 'classname' => 'core_competency\external',
1508 'methodname' => 'update_competency_framework',
1509 'classpath' => '',
1510 'description' => 'Update a competency framework.',
1511 'type' => 'write',
1512 'capabilities' => 'moodle/competency:competencymanage',
1513 'ajax' => true,
1514 ),
1515 'core_competency_list_competency_frameworks' => array(
1516 'classname' => 'core_competency\external',
1517 'methodname' => 'list_competency_frameworks',
1518 'classpath' => '',
1519 'description' => 'Load a list of a competency frameworks.',
1520 'type' => 'read',
1521 'capabilities' => 'moodle/competency:competencyview',
1522 'ajax' => true,
1523 ),
1524 'core_competency_count_competency_frameworks' => array(
1525 'classname' => 'core_competency\external',
1526 'methodname' => 'count_competency_frameworks',
1527 'classpath' => '',
1528 'description' => 'Count a list of a competency frameworks.',
1529 'type' => 'read',
1530 'capabilities' => 'moodle/competency:competencyview',
1531 'ajax' => true,
1532 ),
1533 'core_competency_competency_framework_viewed' => array(
1534 'classname' => 'core_competency\external',
1535 'methodname' => 'competency_framework_viewed',
1536 'classpath' => '',
1537 'description' => 'Log event competency framework viewed',
1538 'type' => 'read',
1539 'capabilities' => 'moodle/competency:competencyview',
1540 'ajax' => true,
1541 ),
1542 'core_competency_create_competency' => array(
1543 'classname' => 'core_competency\external',
1544 'methodname' => 'create_competency',
1545 'classpath' => '',
1546 'description' => 'Creates new competencies.',
1547 'type' => 'write',
1548 'capabilities' => 'moodle/competency:competencymanage',
1549 'ajax' => true,
1550 ),
1551 'core_competency_read_competency' => array(
1552 'classname' => 'core_competency\external',
1553 'methodname' => 'read_competency',
1554 'classpath' => '',
1555 'description' => 'Load a summary of a competency.',
1556 'type' => 'read',
1557 'capabilities' => 'moodle/competency:competencyview',
1558 'ajax' => true,
1559 ),
1560 'core_competency_competency_viewed' => array(
1561 'classname' => 'core_competency\external',
1562 'methodname' => 'competency_viewed',
1563 'classpath' => '',
1564 'description' => 'Log event competency viewed',
1565 'type' => 'read',
1566 'capabilities' => 'moodle/competency:competencyview',
1567 'ajax' => true,
3123c2cf 1568 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
1569 ),
1570 'core_competency_delete_competency' => array(
1571 'classname' => 'core_competency\external',
1572 'methodname' => 'delete_competency',
1573 'classpath' => '',
1574 'description' => 'Delete a competency.',
1575 'type' => 'write',
1576 'capabilities' => 'moodle/competency:competencymanage',
1577 'ajax' => true,
1578 ),
1579 'core_competency_update_competency' => array(
1580 'classname' => 'core_competency\external',
1581 'methodname' => 'update_competency',
1582 'classpath' => '',
1583 'description' => 'Update a competency.',
1584 'type' => 'write',
1585 'capabilities' => 'moodle/competency:competencymanage',
1586 'ajax' => true,
1587 ),
1588 'core_competency_list_competencies' => array(
1589 'classname' => 'core_competency\external',
1590 'methodname' => 'list_competencies',
1591 'classpath' => '',
1592 'description' => 'Load a list of a competencies.',
1593 'type' => 'read',
1594 'capabilities' => 'moodle/competency:competencyview',
1595 'ajax' => true,
1596 ),
1597 'core_competency_list_competencies_in_template' => array(
1598 'classname' => 'core_competency\external',
1599 'methodname' => 'list_competencies_in_template',
1600 'classpath' => '',
1601 'description' => 'Load a list of a competencies for a given template.',
1602 'type' => 'read',
1603 'capabilities' => 'moodle/competency:competencyview',
1604 'ajax' => true,
1605 ),
1606 'core_competency_count_competencies' => array(
1607 'classname' => 'core_competency\external',
1608 'methodname' => 'count_competencies',
1609 'classpath' => '',
1610 'description' => 'Count a list of a competencies.',
1611 'type' => 'read',
1612 'capabilities' => 'moodle/competency:competencyview',
1613 'ajax' => true,
1614 ),
1615 'core_competency_count_competencies_in_template' => array(
1616 'classname' => 'core_competency\external',
1617 'methodname' => 'count_competencies_in_template',
1618 'classpath' => '',
1619 'description' => 'Count a list of a competencies for a given template.',
1620 'type' => 'read',
1621 'capabilities' => 'moodle/competency:competencyview',
1622 'ajax' => true,
1623 ),
1624 'core_competency_search_competencies' => array(
1625 'classname' => 'core_competency\external',
1626 'methodname' => 'search_competencies',
1627 'classpath' => '',
1628 'description' => 'Search a list of a competencies.',
1629 'type' => 'read',
1630 'capabilities' => 'moodle/competency:competencyview',
1631 'ajax' => true,
1632 ),
1633 'core_competency_set_parent_competency' => array(
1634 'classname' => 'core_competency\external',
1635 'methodname' => 'set_parent_competency',
1636 'classpath' => '',
1637 'description' => 'Set a new parent for a competency.',
1638 'type' => 'write',
1639 'capabilities' => 'moodle/competency:competencymanage',
1640 'ajax' => true,
1641 ),
1642 'core_competency_move_up_competency' => array(
1643 'classname' => 'core_competency\external',
1644 'methodname' => 'move_up_competency',
1645 'classpath' => '',
1646 'description' => 'Re-order a competency.',
1647 'type' => 'write',
1648 'capabilities' => 'moodle/competency:competencymanage',
1649 'ajax' => true,
1650 ),
1651 'core_competency_move_down_competency' => array(
1652 'classname' => 'core_competency\external',
1653 'methodname' => 'move_down_competency',
1654 'classpath' => '',
1655 'description' => 'Re-order a competency.',
1656 'type' => 'write',
1657 'capabilities' => 'moodle/competency:competencymanage',
1658 'ajax' => true,
1659 ),
1660 'core_competency_list_course_competencies' => array(
1661 'classname' => 'core_competency\external',
1662 'methodname' => 'list_course_competencies',
1663 'classpath' => '',
1664 'description' => 'List the competencies in a course',
1665 'type' => 'read',
1666 'capabilities' => 'moodle/competency:coursecompetencyview',
1667 'ajax' => true,
3123c2cf 1668 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
1669 ),
1670 'core_competency_count_competencies_in_course' => array(
1671 'classname' => 'core_competency\external',
1672 'methodname' => 'count_competencies_in_course',
1673 'classpath' => '',
1674 'description' => 'List the competencies in a course',
1675 'type' => 'read',
1676 'capabilities' => 'moodle/competency:coursecompetencyview',
1677 'ajax' => true,
1678 ),
1679 'core_competency_count_courses_using_competency' => array(
1680 'classname' => 'core_competency\external',
1681 'methodname' => 'count_courses_using_competency',
1682 'classpath' => '',
1683 'description' => 'List the courses using a competency',
1684 'type' => 'read',
1685 'capabilities' => 'moodle/competency:coursecompetencyview',
1686 'ajax' => true,
1687 ),
1688 'core_competency_add_competency_to_course' => array(
1689 'classname' => 'core_competency\external',
1690 'methodname' => 'add_competency_to_course',
1691 'classpath' => '',
1692 'description' => 'Add the competency to a course',
1693 'type' => 'write',
1694 'capabilities' => 'moodle/competency:coursecompetencymanage',
1695 'ajax' => true,
1696 ),
1697 'core_competency_add_competency_to_template' => array(
1698 'classname' => 'core_competency\external',
1699 'methodname' => 'add_competency_to_template',
1700 'classpath' => '',
1701 'description' => 'Add the competency to a template',
1702 'type' => 'write',
1703 'capabilities' => 'moodle/competency:templatemanage',
1704 'ajax' => true,
1705 ),
1706 'core_competency_remove_competency_from_course' => array(
1707 'classname' => 'core_competency\external',
1708 'methodname' => 'remove_competency_from_course',
1709 'classpath' => '',
1710 'description' => 'Remove a competency from a course',
1711 'type' => 'write',
1712 'capabilities' => 'moodle/competency:coursecompetencymanage',
1713 'ajax' => true,
1714 ),
1715 'core_competency_set_course_competency_ruleoutcome' => array(
1716 'classname' => 'core_competency\external',
1717 'methodname' => 'set_course_competency_ruleoutcome',
1718 'classpath' => '',
1719 'description' => 'Modify the ruleoutcome value for course competency',
1720 'type' => 'write',
1721 'capabilities' => 'moodle/competency:coursecompetencymanage',
1722 'ajax' => true,
1723 ),
1724 'core_competency_remove_competency_from_template' => array(
1725 'classname' => 'core_competency\external',
1726 'methodname' => 'remove_competency_from_template',
1727 'classpath' => '',
1728 'description' => 'Remove a competency from a template',
1729 'type' => 'write',
1730 'capabilities' => 'moodle/competency:templatemanage',
1731 'ajax' => true,
1732 ),
1733 'core_competency_reorder_course_competency' => array(
1734 'classname' => 'core_competency\external',
1735 'methodname' => 'reorder_course_competency',
1736 'classpath' => '',
1737 'description' => 'Move a course competency to a new relative sort order.',
1738 'type' => 'write',
1739 'capabilities' => 'moodle/competency:coursecompetencymanage',
1740 'ajax' => true,
1741 ),
1742 'core_competency_reorder_template_competency' => array(
1743 'classname' => 'core_competency\external',
1744 'methodname' => 'reorder_template_competency',
1745 'classpath' => '',
1746 'description' => 'Move a template competency to a new relative sort order.',
1747 'type' => 'write',
1748 'capabilities' => 'moodle/competency:templatemanage',
1749 'ajax' => true,
1750 ),
1751 'core_competency_create_template' => array(
1752 'classname' => 'core_competency\external',
1753 'methodname' => 'create_template',
1754 'classpath' => '',
1755 'description' => 'Creates new learning plan templates.',
1756 'type' => 'write',
1757 'capabilities' => 'moodle/competency:templatemanage',
1758 'ajax' => true,
1759 ),
1760 'core_competency_duplicate_template' => array(
1761 'classname' => 'core_competency\external',
1762 'methodname' => 'duplicate_template',
1763 'classpath' => '',
1764 'description' => 'Duplicate learning plan template.',
1765 'type' => 'write',
1766 'capabilities' => 'moodle/competency:templatemanage',
1767 'ajax' => true,
1768 ),
1769 'core_competency_read_template' => array(
1770 'classname' => 'core_competency\external',
1771 'methodname' => 'read_template',
1772 'classpath' => '',
1773 'description' => 'Load a summary of a learning plan template.',
1774 'type' => 'read',
1775 'capabilities' => 'moodle/competency:templateview',
1776 'ajax' => true,
1777 ),
1778 'core_competency_delete_template' => array(
1779 'classname' => 'core_competency\external',
1780 'methodname' => 'delete_template',
1781 'classpath' => '',
1782 'description' => 'Delete a learning plan template.',
1783 'type' => 'write',
1784 'capabilities' => 'moodle/competency:templatemanage',
1785 'ajax' => true,
1786 ),
1787 'core_competency_update_template' => array(
1788 'classname' => 'core_competency\external',
1789 'methodname' => 'update_template',
1790 'classpath' => '',
1791 'description' => 'Update a learning plan template.',
1792 'type' => 'write',
1793 'capabilities' => 'moodle/competency:templatemanage',
1794 'ajax' => true,
1795 ),
1796 'core_competency_list_templates' => array(
1797 'classname' => 'core_competency\external',
1798 'methodname' => 'list_templates',
1799 'classpath' => '',
1800 'description' => 'Load a list of a learning plan templates.',
1801 'type' => 'read',
1802 'capabilities' => 'moodle/competency:templateview',
1803 'ajax' => true,
1804 ),
1805 'core_competency_list_templates_using_competency' => array(
1806 'classname' => 'core_competency\external',
1807 'methodname' => 'list_templates_using_competency',
1808 'classpath' => '',
1809 'description' => 'Load a list of a learning plan templates for a given competency.',
1810 'type' => 'read',
1811 'capabilities' => 'moodle/competency:templateview',
1812 'ajax' => true,
1813 ),
1814 'core_competency_count_templates' => array(
1815 'classname' => 'core_competency\external',
1816 'methodname' => 'count_templates',
1817 'classpath' => '',
1818 'description' => 'Count a list of a learning plan templates.',
1819 'type' => 'read',
1820 'capabilities' => 'moodle/competency:templateview',
1821 'ajax' => true,
1822 ),
1823 'core_competency_count_templates_using_competency' => array(
1824 'classname' => 'core_competency\external',
1825 'methodname' => 'count_templates_using_competency',
1826 'classpath' => '',
1827 'description' => 'Count a list of a learning plan templates for a given competency.',
1828 'type' => 'read',
1829 'capabilities' => 'moodle/competency:templateview',
1830 'ajax' => true,
1831 ),
1832 'core_competency_create_plan' => array(
1833 'classname' => 'core_competency\external',
1834 'methodname' => 'create_plan',
1835 'classpath' => '',
1836 'description' => 'Creates a learning plan.',
1837 'type' => 'write',
1838 'capabilities' => 'moodle/competency:planmanage',
1839 'ajax' => true,
1840 ),
1841 'core_competency_update_plan' => array(
1842 'classname' => 'core_competency\external',
1843 'methodname' => 'update_plan',
1844 'classpath' => '',
1845 'description' => 'Updates a learning plan.',
1846 'type' => 'write',
1847 'capabilities' => 'moodle/competency:planmanage',
1848 'ajax' => true,
1849 ),
1850 'core_competency_complete_plan' => array(
1851 'classname' => 'core_competency\external',
1852 'methodname' => 'complete_plan',
1853 'classpath' => '',
1854 'description' => 'Complete learning plan.',
1855 'type' => 'write',
1856 'capabilities' => 'moodle/competency:planmanage',
1857 'ajax' => true,
1858 ),
1859 'core_competency_reopen_plan' => array(
1860 'classname' => 'core_competency\external',
1861 'methodname' => 'reopen_plan',
1862 'classpath' => '',
1863 'description' => 'Reopen learning plan.',
1864 'type' => 'write',
1865 'capabilities' => 'moodle/competency:planmanage',
1866 'ajax' => true,
1867 ),
1868 'core_competency_read_plan' => array(
1869 'classname' => 'core_competency\external',
1870 'methodname' => 'read_plan',
1871 'classpath' => '',
1872 'description' => 'Load a learning plan.',
1873 'type' => 'read',
1874 'capabilities' => 'moodle/competency:planviewown',
1875 'ajax' => true,
1876 ),
1877 'core_competency_delete_plan' => array(
1878 'classname' => 'core_competency\external',
1879 'methodname' => 'delete_plan',
1880 'classpath' => '',
1881 'description' => 'Delete a learning plan.',
1882 'type' => 'write',
1883 'capabilities' => 'moodle/competency:planmanage',
1884 'ajax' => true,
1885 ),
1886 'core_competency_list_user_plans' => array(
1887 'classname' => 'core_competency\external',
1888 'methodname' => 'list_user_plans',
1889 'classpath' => '',
1890 'description' => 'List a user\'s learning plans.',
1891 'type' => 'read',
1892 'capabilities' => 'moodle/competency:planviewown',
1893 'ajax' => true,
1894 ),
1895 'core_competency_list_plan_competencies' => array(
1896 'classname' => 'core_competency\external',
1897 'methodname' => 'list_plan_competencies',
1898 'classpath' => '',
1899 'description' => 'List the competencies in a plan',
1900 'type' => 'read',
1901 'capabilities' => 'moodle/competency:planviewown',
1902 'ajax' => true,
1903 ),
1904 'core_competency_add_competency_to_plan' => array(
1905 'classname' => 'core_competency\external',
1906 'methodname' => 'add_competency_to_plan',
1907 'classpath' => '',
1908 'description' => 'Add the competency to a learning plan',
1909 'type' => 'write',
1910 'capabilities' => 'moodle/competency:planmanage',
1911 'ajax' => true,
1912 ),
1913 'core_competency_remove_competency_from_plan' => array(
1914 'classname' => 'core_competency\external',
1915 'methodname' => 'remove_competency_from_plan',
1916 'classpath' => '',
1917 'description' => 'Remove the competency from a learning plan',
1918 'type' => 'write',
1919 'capabilities' => 'moodle/competency:planmanage',
1920 'ajax' => true,
1921 ),
1922 'core_competency_reorder_plan_competency' => array(
1923 'classname' => 'core_competency\external',
1924 'methodname' => 'reorder_plan_competency',
1925 'classpath' => '',
1926 'description' => 'Move a plan competency to a new relative sort order.',
1927 'type' => 'write',
1928 'capabilities' => 'moodle/competency:planmanage',
1929 'ajax' => true,
1930 ),
1931 'core_competency_plan_request_review' => array(
1932 'classname' => 'core_competency\external',
1933 'methodname' => 'plan_request_review',
1934 'classpath' => '',
1935 'description' => 'Request for a plan to be reviewed.',
1936 'type' => 'write',
1937 'capabilities' => 'moodle/competency:planmanagedraft',
1938 'ajax' => true,
1939 ),
1940 'core_competency_plan_start_review' => array(
1941 'classname' => 'core_competency\external',
1942 'methodname' => 'plan_start_review',
1943 'classpath' => '',
1944 'description' => 'Start the review of a plan.',
1945 'type' => 'write',
1946 'capabilities' => 'moodle/competency:planmanage',
1947 'ajax' => true,
1948 ),
1949 'core_competency_plan_stop_review' => array(
1950 'classname' => 'core_competency\external',
1951 'methodname' => 'plan_stop_review',
1952 'classpath' => '',
1953 'description' => 'Stop the review of a plan.',
1954 'type' => 'write',
1955 'capabilities' => 'moodle/competency:planmanage',
1956 'ajax' => true,
1957 ),
1958 'core_competency_plan_cancel_review_request' => array(
1959 'classname' => 'core_competency\external',
1960 'methodname' => 'plan_cancel_review_request',
1961 'classpath' => '',
1962 'description' => 'Cancel the review of a plan.',
1963 'type' => 'write',
1964 'capabilities' => 'moodle/competency:planmanagedraft',
1965 'ajax' => true,
1966 ),
1967 'core_competency_approve_plan' => array(
1968 'classname' => 'core_competency\external',
1969 'methodname' => 'approve_plan',
1970 'classpath' => '',
1971 'description' => 'Approve a plan.',
1972 'type' => 'write',
1973 'capabilities' => 'moodle/competency:planmanage',
1974 'ajax' => true,
1975 ),
1976 'core_competency_unapprove_plan' => array(
1977 'classname' => 'core_competency\external',
1978 'methodname' => 'unapprove_plan',
1979 'classpath' => '',
1980 'description' => 'Unapprove a plan.',
1981 'type' => 'write',
1982 'capabilities' => 'moodle/competency:planmanage',
1983 'ajax' => true,
1984 ),
1985 'core_competency_template_has_related_data' => array(
1986 'classname' => 'core_competency\external',
1987 'methodname' => 'template_has_related_data',
1988 'classpath' => '',
1989 'description' => 'Check if a template has related data',
1990 'type' => 'read',
1991 'capabilities' => 'moodle/competency:templateview',
1992 'ajax' => true,
1993 ),
1994 'core_competency_get_scale_values' => array(
1995 'classname' => 'core_competency\external',
1996 'methodname' => 'get_scale_values',
1997 'classpath' => '',
1998 'description' => 'Fetch the values for a specific scale',
1999 'type' => 'read',
2000 'capabilities' => 'moodle/competency:competencymanage',
2001 'ajax' => true,
3123c2cf 2002 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
2003 ),
2004 'core_competency_add_related_competency' => array(
2005 'classname' => 'core_competency\external',
2006 'methodname' => 'add_related_competency',
2007 'classpath' => '',
2008 'description' => 'Adds a related competency',
2009 'type' => 'write',
2010 'capabilities' => 'moodle/competency:competencymanage',
2011 'ajax' => true,
2012 ),
2013 'core_competency_remove_related_competency' => array(
2014 'classname' => 'core_competency\external',
2015 'methodname' => 'remove_related_competency',
2016 'classpath' => '',
2017 'description' => 'Remove a related competency',
2018 'type' => 'write',
2019 'capabilities' => 'moodle/competency:competencymanage',
2020 'ajax' => true,
2021 ),
2022 'core_competency_read_user_evidence' => array(
2023 'classname' => 'core_competency\external',
2024 'methodname' => 'read_user_evidence',
2025 'classpath' => '',
2026 'description' => 'Read an evidence of prior learning.',
2027 'type' => 'read',
2028 'capabilities' => 'moodle/competency:userevidenceview',
2029 'ajax' => true,
2030 ),
2031 'core_competency_delete_user_evidence' => array(
2032 'classname' => 'core_competency\external',
2033 'methodname' => 'delete_user_evidence',
2034 'classpath' => '',
2035 'description' => 'Delete an evidence of prior learning.',
2036 'type' => 'write',
2037 'capabilities' => 'moodle/competency:userevidencemanageown',
2038 'ajax' => true,
2039 ),
2040 'core_competency_create_user_evidence_competency' => array(
2041 'classname' => 'core_competency\external',
2042 'methodname' => 'create_user_evidence_competency',
2043 'classpath' => '',
2044 'description' => 'Create an evidence of prior learning relationship with a competency.',
2045 'type' => 'read',
2046 'capabilities' => 'moodle/competency:userevidencemanageown, moodle/competency:competencyview',
2047 'ajax' => true,
2048 ),
2049 'core_competency_delete_user_evidence_competency' => array(
2050 'classname' => 'core_competency\external',
2051 'methodname' => 'delete_user_evidence_competency',
2052 'classpath' => '',
2053 'description' => 'Delete an evidence of prior learning relationship with a competency.',
2054 'type' => 'write',
2055 'capabilities' => 'moodle/competency:userevidencemanageown',
2056 'ajax' => true,
2057 ),
2058 'core_competency_user_competency_cancel_review_request' => array(
2059 'classname' => 'core_competency\external',
2060 'methodname' => 'user_competency_cancel_review_request',
2061 'classpath' => '',
2062 'description' => 'Cancel a review request.',
2063 'type' => 'write',
2064 'capabilities' => 'moodle/competency:userevidencemanageown',
2065 'ajax' => true,
2066 ),
2067 'core_competency_user_competency_request_review' => array(
2068 'classname' => 'core_competency\external',
2069 'methodname' => 'user_competency_request_review',
2070 'classpath' => '',
2071 'description' => 'Request a review.',
2072 'type' => 'write',
2073 'capabilities' => 'moodle/competency:userevidencemanageown',
2074 'ajax' => true,
2075 ),
2076 'core_competency_user_competency_start_review' => array(
2077 'classname' => 'core_competency\external',
2078 'methodname' => 'user_competency_start_review',
2079 'classpath' => '',
2080 'description' => 'Start a review.',
2081 'type' => 'write',
2082 'capabilities' => 'moodle/competency:competencygrade',
2083 'ajax' => true,
2084 ),
2085 'core_competency_user_competency_stop_review' => array(
2086 'classname' => 'core_competency\external',
2087 'methodname' => 'user_competency_stop_review',
2088 'classpath' => '',
2089 'description' => 'Stop a review.',
2090 'type' => 'write',
2091 'capabilities' => 'moodle/competency:competencygrade',
2092 'ajax' => true,
2093 ),
2094 'core_competency_user_competency_viewed' => array(
2095 'classname' => 'core_competency\external',
2096 'methodname' => 'user_competency_viewed',
2097 'classpath' => '',
2098 'description' => 'Log the user competency viewed 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_plan' => array(
2105 'classname' => 'core_competency\external',
2106 'methodname' => 'user_competency_viewed_in_plan',
2107 'classpath' => '',
2108 'description' => 'Log the user competency viewed in plan 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_viewed_in_course' => array(
2115 'classname' => 'core_competency\external',
2116 'methodname' => 'user_competency_viewed_in_course',
2117 'classpath' => '',
2118 'description' => 'Log the user competency viewed in course 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_user_competency_plan_viewed' => array(
2125 'classname' => 'core_competency\external',
2126 'methodname' => 'user_competency_plan_viewed',
2127 'classpath' => '',
2128 'description' => 'Log the user competency plan viewed event.',
2129 'type' => 'read',
2130 'capabilities' => 'moodle/competency:usercompetencyview',
2131 'ajax' => true,
3123c2cf 2132 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
2133 ),
2134 'core_competency_grade_competency' => array(
2135 'classname' => 'core_competency\external',
2136 'methodname' => 'grade_competency',
2137 'classpath' => '',
2138 'description' => 'Grade a competency.',
2139 'type' => 'write',
2140 'capabilities' => 'moodle/competency:competencygrade',
2141 'ajax' => true,
2142 ),
2143 'core_competency_grade_competency_in_plan' => array(
2144 'classname' => 'core_competency\external',
2145 'methodname' => 'grade_competency_in_plan',
2146 'classpath' => '',
2147 'description' => 'Grade a competency from the user plan page.',
2148 'type' => 'write',
2149 'capabilities' => 'moodle/competency:competencygrade',
2150 'ajax' => true,
2151 ),
2152 'core_competency_grade_competency_in_course' => array(
2153 'classname' => 'core_competency\external',
2154 'methodname' => 'grade_competency_in_course',
2155 'classpath' => '',
2156 'description' => 'Grade a competency from the course page.',
2157 'type' => 'write',
2158 'capabilities' => 'moodle/competency:competencygrade',
2159 'ajax' => true,
3123c2cf 2160 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
2161 ),
2162 'core_competency_unlink_plan_from_template' => array(
2163 'classname' => 'core_competency\external',
2164 'methodname' => 'unlink_plan_from_template',
2165 'classpath' => '',
2166 'description' => 'Unlink a plan form it template.',
2167 'type' => 'write',
2168 'capabilities' => 'moodle/competency:planmanage',
2169 'ajax' => true,
2170 ),
2171 'core_competency_template_viewed' => array(
2172 'classname' => 'core_competency\external',
2173 'methodname' => 'template_viewed',
2174 'classpath' => '',
2175 'description' => 'Log event template viewed',
2176 'type' => 'read',
2177 'capabilities' => 'moodle/competency:templateview',
2178 'ajax' => true,
2179 ),
2180 'core_competency_request_review_of_user_evidence_linked_competencies' => array(
2181 'classname' => 'core_competency\external',
2182 'methodname' => 'request_review_of_user_evidence_linked_competencies',
2183 'classpath' => '',
2184 'description' => 'Send user evidence competencies in review',
2185 'type' => 'write',
2186 'capabilities' => 'moodle/competency:userevidencemanageown',
2187 'ajax' => true,
2188 ),
2189 'core_competency_update_course_competency_settings' => array(
2190 'classname' => 'core_competency\external',
2191 'methodname' => 'update_course_competency_settings',
2192 'classpath' => '',
2193 'description' => 'Update the course competency settings',
2194 'type' => 'write',
2195 'capabilities' => 'moodle/competency:coursecompetencyconfigure',
2196 'ajax' => true,
2197 ),
1e99f31e
FM
2198 'core_competency_delete_evidence' => array(
2199 'classname' => 'core_competency\external',
2200 'methodname' => 'delete_evidence',
2201 'classpath' => '',
2202 'description' => 'Delete an evidence',
2203 'type' => 'write',
2204 'capabilities' => 'moodle/competency:evidencedelete',
2205 'ajax' => true,
3123c2cf 2206 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1e99f31e 2207 ),
f23e9b6b
CB
2208
2209 'core_webservice_get_site_info' => array(
2210 'classname' => 'core_webservice_external',
2211 'methodname' => 'get_site_info',
2212 'classpath' => 'webservice/externallib.php',
2213 'description' => 'Return some site info / user info / list web service functions',
2214 'type' => 'read',
ee7295ee 2215 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
8446ba36
JL
2216 ),
2217
2218 // Blocks functions.
2219 'core_block_get_course_blocks' => array(
2220 'classname' => 'core_block_external',
2221 'methodname' => 'get_course_blocks',
2222 'description' => 'Returns blocks information for a course.',
2223 'type' => 'read',
2224 'capabilities' => '',
2225 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2226 ),
66ef16d3 2227
0f8b2604
JL
2228 'core_block_get_dashboard_blocks' => array(
2229 'classname' => 'core_block_external',
2230 'methodname' => 'get_dashboard_blocks',
2231 'description' => 'Returns blocks information for the given user dashboard.',
2232 'type' => 'read',
2233 'capabilities' => '',
2234 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2235 ),
2236
66ef16d3
JL
2237 // Filters functions.
2238 'core_filters_get_available_in_context' => array(
2239 'classname' => 'core_filters\external',
2240 'methodname' => 'get_available_in_context',
2241 'description' => 'Returns the filters available in the given contexts.',
2242 'type' => 'read',
2243 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2244 )
9a0df45a 2245);
c1b65883
JM
2246
2247$services = array(
96e0194c 2248 'Moodle mobile web service' => array(
12c52b91 2249 'functions' => array(), // Unused as we add the service in each function definition, third party services would use this.
96e0194c
SH
2250 'enabled' => 0,
2251 'restrictedusers' => 0,
af03513f 2252 'shortname' => MOODLE_OFFICIAL_MOBILE_SERVICE,
106c55fb
DW
2253 'downloadfiles' => 1,
2254 'uploadfiles' => 1
96e0194c
SH
2255 ),
2256);