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