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