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