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