MDL-59382 calendar: rename repository and events
[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 ),
58c20c81
JP
485 'core_enrol_edit_user_enrolment' => array(
486 'classname' => 'core_enrol_external',
487 'methodname' => 'edit_user_enrolment',
488 'classpath' => 'enrol/externallib.php',
489 'description' => 'External function that updates a given user enrolment',
490 'type' => 'write',
491 'ajax' => true,
492 ),
f23e9b6b
CB
493 'core_fetch_notifications' => array(
494 'classname' => 'core_external',
495 'methodname' => 'fetch_notifications',
496 'classpath' => 'lib/external/externallib.php',
497 'description' => 'Return a list of notifications for the current session',
498 'type' => 'read',
5041600d
RT
499 'loginrequired' => false,
500 'ajax' => true,
5d1017e1 501 ),
5d1017e1 502 'core_files_get_files' => array(
f23e9b6b
CB
503 'classname' => 'core_files_external',
504 'methodname' => 'get_files',
249c4f60 505 'description' => 'browse moodle files',
f23e9b6b
CB
506 'type' => 'read',
507 'classpath' => 'files/externallib.php',
ee7295ee 508 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
5d1017e1 509 ),
5d1017e1 510 'core_files_upload' => array(
f23e9b6b
CB
511 'classname' => 'core_files_external',
512 'methodname' => 'upload',
249c4f60
DC
513 'description' => 'upload a file to moodle',
514 'type' => 'write',
515 'classpath' => 'files/externallib.php',
516 ),
8b493eb0
DM
517 'core_form_get_filetypes_browser_data' => array(
518 'classname' => 'core_form\external',
519 'methodname' => 'get_filetypes_browser_data',
520 'classpath' => '',
521 'description' => 'Provides data for the filetypes element browser.',
522 'type' => 'read',
523 'loginrequired' => false,
524 'ajax' => true,
525 ),
f23e9b6b
CB
526 'core_get_component_strings' => array(
527 'classname' => 'core_external',
528 'methodname' => 'get_component_strings',
529 'classpath' => 'lib/external/externallib.php',
faeca20d
DM
530 'description' => 'Return all raw strings (with {$a->xxx}), for a specific component ' .
531 '- similar to core get_component_strings(), call',
f23e9b6b 532 'type' => 'read',
5041600d
RT
533 'loginrequired' => false,
534 'ajax' => true,
ee7295ee 535 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
3364dbb5 536 ),
f23e9b6b
CB
537 'core_get_fragment' => array(
538 'classname' => 'core_external',
539 'methodname' => 'get_fragment',
540 'classpath' => 'lib/external/externallib.php',
541 'description' => 'Return a fragment for inclusion, such as a JavaScript page.',
542 'type' => 'read',
5041600d 543 'ajax' => true,
5d1017e1 544 ),
f23e9b6b
CB
545 'core_get_string' => array(
546 'classname' => 'core_external',
547 'methodname' => 'get_string',
548 'classpath' => 'lib/external/externallib.php',
549 'description' => 'Return a translated string - similar to core get_string(), call',
550 'type' => 'read',
5041600d
RT
551 'loginrequired' => false,
552 'ajax' => true,
be9bf94e 553 ),
f23e9b6b
CB
554 'core_get_strings' => array(
555 'classname' => 'core_external',
556 'methodname' => 'get_strings',
557 'classpath' => 'lib/external/externallib.php',
558 'description' => 'Return some translated strings - like several core get_string(), calls',
559 'type' => 'read',
5041600d
RT
560 'loginrequired' => false,
561 'ajax' => true,
5d1017e1 562 ),
88c2941b
RW
563 'core_get_user_dates' => array(
564 'classname' => 'core_external',
565 'methodname' => 'get_user_dates',
566 'classpath' => 'lib/external/externallib.php',
567 'description' => 'Return formatted timestamps',
568 'type' => 'read',
569 'ajax' => true,
570 ),
f23e9b6b
CB
571 'core_grades_get_grades' => array(
572 'classname' => 'core_grades_external',
573 'methodname' => 'get_grades',
aa7e371a
JL
574 'description' => '** DEPRECATED ** Please do not call this function any more.
575 Returns student course total grade and grades for activities.
f23e9b6b
CB
576 This function does not return category or manual items.
577 This function is suitable for managers or teachers not students.',
578 'type' => 'read',
579 'capabilities' => 'moodle/grade:view, moodle/grade:viewall, moodle/grade:viewhidden'
e9b66095 580 ),
f23e9b6b
CB
581 'core_grades_update_grades' => array(
582 'classname' => 'core_grades_external',
583 'methodname' => 'update_grades',
584 'description' => 'Update a grade item and associated student grades.',
585 'type' => 'write',
5d1017e1 586 ),
f23e9b6b
CB
587 'core_grading_get_definitions' => array(
588 'classname' => 'core_grading_external',
589 'methodname' => 'get_definitions',
590 'description' => 'Get grading definitions',
591 'type' => 'read',
e9b66095 592 ),
f23e9b6b
CB
593 'core_grading_get_gradingform_instances' => array(
594 'classname' => 'core_grading_external',
595 'methodname' => 'get_gradingform_instances',
596 'description' => 'Get grading form instances',
597 'type' => 'read',
f2229c68 598 ),
f23e9b6b
CB
599 'core_grading_save_definitions' => array(
600 'classname' => 'core_grading_external',
601 'methodname' => 'save_definitions',
602 'description' => 'Save grading definitions',
603 'type' => 'write',
5d1017e1 604 ),
f23e9b6b
CB
605 'core_group_add_group_members' => array(
606 'classname' => 'core_group_external',
607 'methodname' => 'add_group_members',
608 'classpath' => 'group/externallib.php',
609 'description' => 'Adds group members.',
610 'type' => 'write',
611 'capabilities' => 'moodle/course:managegroups',
6bb31e40 612 ),
f23e9b6b
CB
613 'core_group_assign_grouping' => array(
614 'classname' => 'core_group_external',
615 'methodname' => 'assign_grouping',
616 'classpath' => 'group/externallib.php',
617 'description' => 'Assing groups from groupings',
618 'type' => 'write',
740c354f 619 ),
f23e9b6b
CB
620 'core_group_create_groupings' => array(
621 'classname' => 'core_group_external',
622 'methodname' => 'create_groupings',
623 'classpath' => 'group/externallib.php',
624 'description' => 'Creates new groupings',
625 'type' => 'write',
5d1017e1 626 ),
f23e9b6b
CB
627 'core_group_create_groups' => array(
628 'classname' => 'core_group_external',
629 'methodname' => 'create_groups',
630 'classpath' => 'group/externallib.php',
631 'description' => 'Creates new groups.',
632 'type' => 'write',
633 'capabilities' => 'moodle/course:managegroups'
6bb31e40 634 ),
f23e9b6b
CB
635 'core_group_delete_group_members' => array(
636 'classname' => 'core_group_external',
637 'methodname' => 'delete_group_members',
638 'classpath' => 'group/externallib.php',
639 'description' => 'Deletes group members.',
0a4f3eb2 640 'type' => 'write',
f23e9b6b 641 'capabilities' => 'moodle/course:managegroups'
63a85dc7 642 ),
f23e9b6b
CB
643 'core_group_delete_groupings' => array(
644 'classname' => 'core_group_external',
645 'methodname' => 'delete_groupings',
646 'classpath' => 'group/externallib.php',
647 'description' => 'Deletes all specified groupings.',
79949c1b 648 'type' => 'write',
79949c1b 649 ),
f23e9b6b
CB
650 'core_group_delete_groups' => array(
651 'classname' => 'core_group_external',
652 'methodname' => 'delete_groups',
653 'classpath' => 'group/externallib.php',
654 'description' => 'Deletes all specified groups.',
0a4f3eb2 655 'type' => 'write',
f23e9b6b 656 'capabilities' => 'moodle/course:managegroups'
3dc1d76e 657 ),
f23e9b6b
CB
658 'core_group_get_activity_allowed_groups' => array(
659 'classname' => 'core_group_external',
660 'methodname' => 'get_activity_allowed_groups',
661 'classpath' => 'group/externallib.php',
662 'description' => 'Gets a list of groups that the user is allowed to access within the specified activity.',
663 'type' => 'read',
ee7295ee 664 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
791723c3 665 ),
f23e9b6b
CB
666 'core_group_get_activity_groupmode' => array(
667 'classname' => 'core_group_external',
668 'methodname' => 'get_activity_groupmode',
669 'classpath' => 'group/externallib.php',
670 'description' => 'Returns effective groupmode used in a given activity.',
671 'type' => 'read',
ee7295ee 672 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
c4f7bf29 673 ),
f23e9b6b
CB
674 'core_group_get_course_groupings' => array(
675 'classname' => 'core_group_external',
676 'methodname' => 'get_course_groupings',
677 'classpath' => 'group/externallib.php',
678 'description' => 'Returns all groupings in specified course.',
679 'type' => 'read',
c5158499 680 ),
f23e9b6b
CB
681 'core_group_get_course_groups' => array(
682 'classname' => 'core_group_external',
683 'methodname' => 'get_course_groups',
684 'classpath' => 'group/externallib.php',
685 'description' => 'Returns all groups in specified course.',
686 'type' => 'read',
687 'capabilities' => 'moodle/course:managegroups'
13bb6819 688 ),
f23e9b6b
CB
689 'core_group_get_course_user_groups' => array(
690 'classname' => 'core_group_external',
691 'methodname' => 'get_course_user_groups',
692 'classpath' => 'group/externallib.php',
693 'description' => 'Returns all groups in specified course for the specified user.',
694 'type' => 'read',
ee7295ee
JL
695 'capabilities' => 'moodle/course:managegroups',
696 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
3ec163dd 697 ),
f23e9b6b
CB
698 'core_group_get_group_members' => array(
699 'classname' => 'core_group_external',
700 'methodname' => 'get_group_members',
701 'classpath' => 'group/externallib.php',
702 'description' => 'Returns group members.',
703 'type' => 'read',
704 'capabilities' => 'moodle/course:managegroups'
479a5db1 705 ),
f23e9b6b
CB
706 'core_group_get_groupings' => array(
707 'classname' => 'core_group_external',
708 'methodname' => 'get_groupings',
709 'classpath' => 'group/externallib.php',
710 'description' => 'Returns groupings details.',
711 'type' => 'read',
3ec163dd 712 ),
f23e9b6b
CB
713 'core_group_get_groups' => array(
714 'classname' => 'core_group_external',
715 'methodname' => 'get_groups',
716 'classpath' => 'group/externallib.php',
717 'description' => 'Returns group details.',
718 'type' => 'read',
719 'capabilities' => 'moodle/course:managegroups'
2f951d86 720 ),
f23e9b6b
CB
721 'core_group_unassign_grouping' => array(
722 'classname' => 'core_group_external',
723 'methodname' => 'unassign_grouping',
724 'classpath' => 'group/externallib.php',
725 'description' => 'Unassing groups from groupings',
726 'type' => 'write',
8430d87b 727 ),
f23e9b6b
CB
728 'core_group_update_groupings' => array(
729 'classname' => 'core_group_external',
730 'methodname' => 'update_groupings',
731 'classpath' => 'group/externallib.php',
732 'description' => 'Updates existing groupings',
733 'type' => 'write',
5d1017e1 734 ),
f23e9b6b
CB
735 'core_message_block_contacts' => array(
736 'classname' => 'core_message_external',
737 'methodname' => 'block_contacts',
738 'classpath' => 'message/externallib.php',
739 'description' => 'Block contacts',
740 'type' => 'write',
c6e97f54 741 'ajax' => true,
ee7295ee 742 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
a623b6b8 743 ),
d6731600 744 'core_message_create_contacts' => array(
f23e9b6b
CB
745 'classname' => 'core_message_external',
746 'methodname' => 'create_contacts',
747 'classpath' => 'message/externallib.php',
d6731600 748 'description' => 'Add contacts to the contact list',
f23e9b6b 749 'type' => 'write',
c6e97f54 750 'ajax' => true,
ee7295ee 751 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
12d8c7b2 752 'ajax' => true,
d6731600 753 ),
d6731600 754 'core_message_delete_contacts' => array(
f23e9b6b
CB
755 'classname' => 'core_message_external',
756 'methodname' => 'delete_contacts',
757 'classpath' => 'message/externallib.php',
d6731600 758 'description' => 'Remove contacts from the contact list',
f23e9b6b 759 'type' => 'write',
c6e97f54 760 'ajax' => true,
ee7295ee 761 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
12d8c7b2 762 'ajax' => true,
d6731600 763 ),
dec0cd99
MN
764 'core_message_delete_conversation' => array(
765 'classname' => 'core_message_external',
766 'methodname' => 'delete_conversation',
767 'classpath' => 'message/externallib.php',
768 'description' => 'Deletes a conversation.',
769 'type' => 'write',
770 'capabilities' => 'moodle/site:deleteownmessage',
771 'ajax' => true,
53522c6e 772 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
dec0cd99 773 ),
f23e9b6b
CB
774 'core_message_delete_message' => array(
775 'classname' => 'core_message_external',
776 'methodname' => 'delete_message',
777 'classpath' => 'message/externallib.php',
778 'description' => 'Deletes a message.',
779 'type' => 'write',
ee7295ee 780 'capabilities' => 'moodle/site:deleteownmessage',
3090f52f 781 'ajax' => true,
ee7295ee 782 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
d6731600 783 ),
f23e9b6b
CB
784 'core_message_get_blocked_users' => array(
785 'classname' => 'core_message_external',
786 'methodname' => 'get_blocked_users',
787 'classpath' => 'message/externallib.php',
788 'description' => 'Retrieve a list of users blocked',
789 'type' => 'read',
ee7295ee 790 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
d6731600 791 ),
cd03b8d7
MN
792 'core_message_data_for_messagearea_search_messages' => array(
793 'classname' => 'core_message_external',
794 'methodname' => 'data_for_messagearea_search_messages',
795 'classpath' => 'message/externallib.php',
796 'description' => 'Retrieve the template data for searching for messages',
797 'type' => 'read',
798 'ajax' => true,
53522c6e 799 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
cd03b8d7 800 ),
48e8bdba 801 'core_message_data_for_messagearea_search_users' => array(
cd03b8d7 802 'classname' => 'core_message_external',
48e8bdba 803 'methodname' => 'data_for_messagearea_search_users',
cd03b8d7
MN
804 'classpath' => 'message/externallib.php',
805 'description' => 'Retrieve the template data for searching for people',
806 'type' => 'read',
807 'ajax' => true,
808 ),
48e8bdba 809 'core_message_data_for_messagearea_search_users_in_course' => array(
cd03b8d7 810 'classname' => 'core_message_external',
48e8bdba 811 'methodname' => 'data_for_messagearea_search_users_in_course',
cd03b8d7
MN
812 'classpath' => 'message/externallib.php',
813 'description' => 'Retrieve the template data for searching for people in a course',
814 'type' => 'read',
815 'ajax' => true,
816 ),
9aa012b5
MN
817 'core_message_data_for_messagearea_conversations' => array(
818 'classname' => 'core_message_external',
819 'methodname' => 'data_for_messagearea_conversations',
820 'classpath' => 'message/externallib.php',
821 'description' => 'Retrieve the template data for the conversation list',
822 'type' => 'read',
823 'ajax' => true,
21d9f020 824 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
9aa012b5
MN
825 ),
826 'core_message_data_for_messagearea_contacts' => array(
827 'classname' => 'core_message_external',
828 'methodname' => 'data_for_messagearea_contacts',
829 'classpath' => 'message/externallib.php',
830 'description' => 'Retrieve the template data for the contact list',
831 'type' => 'read',
832 'ajax' => true,
21d9f020 833 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
9aa012b5 834 ),
3cd13828
MN
835 'core_message_data_for_messagearea_messages' => array(
836 'classname' => 'core_message_external',
837 'methodname' => 'data_for_messagearea_messages',
838 'classpath' => 'message/externallib.php',
839 'description' => 'Retrieve the template data for the messages',
840 'type' => 'read',
841 'ajax' => true,
21d9f020 842 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
3cd13828 843 ),
c060cd49
MN
844 'core_message_data_for_messagearea_get_most_recent_message' => array(
845 'classname' => 'core_message_external',
846 'methodname' => 'data_for_messagearea_get_most_recent_message',
847 'classpath' => 'message/externallib.php',
848 'description' => 'Retrieve the template data for the most recent message',
849 'type' => 'read',
850 'ajax' => true,
851 ),
c6e97f54
MN
852 'core_message_data_for_messagearea_get_profile' => array(
853 'classname' => 'core_message_external',
854 'methodname' => 'data_for_messagearea_get_profile',
855 'classpath' => 'message/externallib.php',
856 'description' => 'Retrieve the template data for the users\'s profile',
857 'type' => 'read',
858 'ajax' => true,
859 ),
d6731600 860 'core_message_get_contacts' => array(
f23e9b6b
CB
861 'classname' => 'core_message_external',
862 'methodname' => 'get_contacts',
863 'classpath' => 'message/externallib.php',
d6731600 864 'description' => 'Retrieve the contact list',
f23e9b6b 865 'type' => 'read',
ee7295ee 866 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
d6731600 867 ),
aff9da17 868 'core_message_get_messages' => array(
f23e9b6b
CB
869 'classname' => 'core_message_external',
870 'methodname' => 'get_messages',
871 'classpath' => 'message/externallib.php',
872 'description' => 'Retrieve a list of messages sent and received by a user (conversations, notifications or both)',
873 'type' => 'read',
ee7295ee 874 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
3274d5ca
RW
875 'ajax' => true,
876 ),
8c55bd6c
RW
877 'core_message_get_unread_conversations_count' => array(
878 'classname' => 'core_message_external',
879 'methodname' => 'get_unread_conversations_count',
880 'classpath' => 'message/externallib.php',
881 'description' => 'Retrieve the count of unread conversations for a given user',
882 'type' => 'read',
883 'ajax' => true,
53522c6e 884 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
8c55bd6c 885 ),
3274d5ca
RW
886 'core_message_mark_all_notifications_as_read' => array(
887 'classname' => 'core_message_external',
888 'methodname' => 'mark_all_notifications_as_read',
889 'classpath' => 'message/externallib.php',
8c55bd6c
RW
890 'description' => 'Mark all notifications as read for a given user',
891 'type' => 'write',
892 'ajax' => true,
53522c6e 893 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
8c55bd6c
RW
894 ),
895 'core_message_mark_all_messages_as_read' => array(
896 'classname' => 'core_message_external',
897 'methodname' => 'mark_all_messages_as_read',
898 'classpath' => 'message/externallib.php',
899 'description' => 'Mark all messages as read for a given user',
3274d5ca
RW
900 'type' => 'write',
901 'ajax' => true,
53522c6e 902 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
60ab2e1b 903 ),
a84f89ca 904 'core_message_mark_message_read' => array(
f23e9b6b
CB
905 'classname' => 'core_message_external',
906 'methodname' => 'mark_message_read',
907 'classpath' => 'message/externallib.php',
908 'description' => 'Mark a single message as read, trigger message_viewed event.',
909 'type' => 'write',
ee7295ee 910 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
0b19d048 911 'ajax' => true,
a84f89ca 912 ),
a0eabdd3
RW
913 'core_message_message_processor_config_form' => array(
914 'classname' => 'core_message_external',
915 'methodname' => 'message_processor_config_form',
916 'classpath' => 'message/externallib.php',
917 'description' => 'Process the message processor config form',
918 'type' => 'write',
919 'ajax' => true,
53522c6e 920 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
a0eabdd3 921 ),
8c125526
RW
922 'core_message_get_message_processor' => array(
923 'classname' => 'core_message_external',
924 'methodname' => 'get_message_processor',
925 'classpath' => 'message/externallib.php',
926 'description' => 'Get a message processor',
927 'type' => 'read',
928 'ajax' => true,
929 ),
f23e9b6b
CB
930 'core_message_search_contacts' => array(
931 'classname' => 'core_message_external',
932 'methodname' => 'search_contacts',
933 'classpath' => 'message/externallib.php',
934 'description' => 'Search for contacts',
935 'type' => 'read',
ee7295ee 936 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
419b1128 937 ),
f23e9b6b
CB
938 'core_message_send_instant_messages' => array(
939 'classname' => 'core_message_external',
940 'methodname' => 'send_instant_messages',
941 'classpath' => 'message/externallib.php',
942 'description' => 'Send instant messages',
943 'type' => 'write',
ee7295ee 944 'capabilities' => 'moodle/site:sendmessage',
c060cd49 945 'ajax' => true,
ee7295ee 946 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
f23e9b6b
CB
947 ),
948 'core_message_unblock_contacts' => array(
949 'classname' => 'core_message_external',
950 'methodname' => 'unblock_contacts',
951 'classpath' => 'message/externallib.php',
952 'description' => 'Unblock contacts',
953 'type' => 'write',
c6e97f54 954 'ajax' => true,
ee7295ee 955 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
5d1017e1 956 ),
e86f0cb4
JL
957 'core_message_get_user_notification_preferences' => array(
958 'classname' => 'core_message_external',
959 'methodname' => 'get_user_notification_preferences',
960 'classpath' => 'message/externallib.php',
961 'description' => 'Get the notification preferences for a given user.',
962 'type' => 'read',
963 'capabilities' => 'moodle/user:editownmessageprofile',
964 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
965 ),
2521afd2
JL
966 'core_message_get_user_message_preferences' => array(
967 'classname' => 'core_message_external',
968 'methodname' => 'get_user_message_preferences',
969 'classpath' => 'message/externallib.php',
970 'description' => 'Get the message preferences for a given user.',
971 'type' => 'read',
972 'capabilities' => 'moodle/user:editownmessageprofile',
973 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
974 ),
5d1017e1 975 'core_notes_create_notes' => array(
f23e9b6b
CB
976 'classname' => 'core_notes_external',
977 'methodname' => 'create_notes',
978 'classpath' => 'notes/externallib.php',
8d46dabb 979 'description' => 'Create notes',
f23e9b6b 980 'type' => 'write',
ee7295ee
JL
981 'capabilities' => 'moodle/notes:manage',
982 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
8d46dabb 983 ),
34348b2b 984 'core_notes_delete_notes' => array(
f23e9b6b
CB
985 'classname' => 'core_notes_external',
986 'methodname' => 'delete_notes',
987 'classpath' => 'notes/externallib.php',
34348b2b 988 'description' => 'Delete notes',
f23e9b6b 989 'type' => 'write',
ee7295ee
JL
990 'capabilities' => 'moodle/notes:manage',
991 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
f23e9b6b
CB
992 ),
993 'core_notes_get_course_notes' => array(
994 'classname' => 'core_notes_external',
995 'methodname' => 'get_course_notes',
996 'classpath' => 'notes/externallib.php',
997 'description' => 'Returns all notes in specified course (or site), for the specified user.',
998 'type' => 'read',
ee7295ee
JL
999 'capabilities' => 'moodle/notes:view',
1000 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
34348b2b 1001 ),
34348b2b 1002 'core_notes_get_notes' => array(
f23e9b6b
CB
1003 'classname' => 'core_notes_external',
1004 'methodname' => 'get_notes',
1005 'classpath' => 'notes/externallib.php',
34348b2b 1006 'description' => 'Get notes',
f23e9b6b
CB
1007 'type' => 'read',
1008 'capabilities' => 'moodle/notes:view'
34348b2b 1009 ),
34348b2b 1010 'core_notes_update_notes' => array(
f23e9b6b
CB
1011 'classname' => 'core_notes_external',
1012 'methodname' => 'update_notes',
1013 'classpath' => 'notes/externallib.php',
34348b2b 1014 'description' => 'Update notes',
f23e9b6b
CB
1015 'type' => 'write',
1016 'capabilities' => 'moodle/notes:manage'
34348b2b 1017 ),
a80b5518 1018 'core_notes_view_notes' => array(
f23e9b6b
CB
1019 'classname' => 'core_notes_external',
1020 'methodname' => 'view_notes',
1021 'classpath' => 'notes/externallib.php',
1022 'description' => 'Simulates the web interface view of notes/index.php: trigger events.',
1023 'type' => 'write',
ee7295ee
JL
1024 'capabilities' => 'moodle/notes:view',
1025 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
9028d9b5 1026 ),
f23e9b6b
CB
1027 'core_output_load_template' => array(
1028 'classname' => 'core\output\external',
1029 'methodname' => 'load_template',
1030 'description' => 'Load a template for a renderable',
1031 'type' => 'read',
5041600d
RT
1032 'loginrequired' => false,
1033 'ajax' => true,
0ff4ebb4 1034 ),
e330b1c2 1035 'core_output_load_fontawesome_icon_map' => array(
a26ce248 1036 'classname' => 'core\output\external',
e330b1c2 1037 'methodname' => 'load_fontawesome_icon_map',
a26ce248
DW
1038 'description' => 'Load the mapping of names to icons',
1039 'type' => 'read',
1040 'loginrequired' => false,
1041 'ajax' => true,
1042 ),
f23e9b6b
CB
1043 // Question related functions.
1044 'core_question_update_flag' => array(
1045 'classname' => 'core_question_external',
1046 'methodname' => 'update_flag',
1047 'description' => 'Update the flag state of a question attempt.',
1048 'type' => 'write',
1049 'capabilities' => 'moodle/question:flag',
ee7295ee 1050 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
3f0ea6d8 1051 ),
f23e9b6b
CB
1052 'core_rating_get_item_ratings' => array(
1053 'classname' => 'core_rating_external',
1054 'methodname' => 'get_item_ratings',
1055 'description' => 'Retrieve all the ratings for an item.',
1056 'type' => 'read',
ee7295ee
JL
1057 'capabilities' => 'moodle/rating:view',
1058 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
5d1017e1 1059 ),
afb7799a
JL
1060 'core_rating_add_rating' => array(
1061 'classname' => 'core_rating_external',
1062 'methodname' => 'add_rating',
1063 'description' => 'Rates an item.',
1064 'type' => 'write',
1065 'capabilities' => 'moodle/rating:rate',
1066 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1067 ),
f23e9b6b
CB
1068 'core_role_assign_roles' => array(
1069 'classname' => 'core_role_external',
1070 'methodname' => 'assign_roles',
1071 'classpath' => 'enrol/externallib.php',
1072 'description' => 'Manual role assignments.',
1073 'type' => 'write',
1074 'capabilities' => 'moodle/role:assign'
0bf486a6 1075 ),
f23e9b6b
CB
1076 'core_role_unassign_roles' => array(
1077 'classname' => 'core_role_external',
1078 'methodname' => 'unassign_roles',
1079 'classpath' => 'enrol/externallib.php',
1080 'description' => 'Manual role unassignments.',
1081 'type' => 'write',
1082 'capabilities' => 'moodle/role:assign'
11e76602 1083 ),
f23e9b6b
CB
1084 'core_tag_get_tagindex' => array(
1085 'classname' => 'core_tag_external',
1086 'methodname' => 'get_tagindex',
1087 'description' => 'Gets tag index page for one tag and one tag area',
1088 'type' => 'read',
5041600d 1089 'ajax' => true,
11e76602 1090 ),
f23e9b6b
CB
1091 'core_tag_get_tags' => array(
1092 'classname' => 'core_tag_external',
1093 'methodname' => 'get_tags',
1094 'description' => 'Gets tags by their ids',
1095 'type' => 'read',
5041600d 1096 'ajax' => true,
11e76602 1097 ),
f23e9b6b
CB
1098 'core_tag_update_tags' => array(
1099 'classname' => 'core_tag_external',
1100 'methodname' => 'update_tags',
1101 'description' => 'Updates tags',
1102 'type' => 'write',
5041600d 1103 'ajax' => true,
cc73ea07 1104 ),
cdc5f978 1105 'core_update_inplace_editable' => array(
f23e9b6b
CB
1106 'classname' => 'core_external',
1107 'methodname' => 'update_inplace_editable',
1108 'classpath' => 'lib/external/externallib.php',
cdc5f978 1109 'description' => 'Generic service to update title',
f23e9b6b 1110 'type' => 'write',
5041600d
RT
1111 'loginrequired' => true,
1112 'ajax' => true,
c66dc3df 1113 ),
f23e9b6b
CB
1114 'core_user_add_user_device' => array(
1115 'classname' => 'core_user_external',
1116 'methodname' => 'add_user_device',
1117 'classpath' => 'user/externallib.php',
1118 'description' => 'Store mobile user devices information for PUSH Notifications.',
1119 'type' => 'write',
ee7295ee 1120 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
9bdcf579 1121 ),
f23e9b6b
CB
1122 'core_user_add_user_private_files' => array(
1123 'classname' => 'core_user_external',
1124 'methodname' => 'add_user_private_files',
1125 'classpath' => 'user/externallib.php',
1126 'description' => 'Copy files from a draft area to users private files area.',
1127 'type' => 'write',
ee7295ee
JL
1128 'capabilities' => 'moodle/user:manageownfiles',
1129 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
25c49a85 1130 ),
f23e9b6b
CB
1131 'core_user_create_users' => array(
1132 'classname' => 'core_user_external',
1133 'methodname' => 'create_users',
1134 'classpath' => 'user/externallib.php',
1135 'description' => 'Create users.',
1136 'type' => 'write',
1137 'capabilities' => 'moodle/user:create'
23b398fc 1138 ),
f23e9b6b
CB
1139 'core_user_delete_users' => array(
1140 'classname' => 'core_user_external',
1141 'methodname' => 'delete_users',
1142 'classpath' => 'user/externallib.php',
1143 'description' => 'Delete users.',
1144 'type' => 'write',
1145 'capabilities' => 'moodle/user:delete'
6c785afa 1146 ),
f23e9b6b
CB
1147 'core_user_get_course_user_profiles' => array(
1148 'classname' => 'core_user_external',
1149 'methodname' => 'get_course_user_profiles',
1150 'classpath' => 'user/externallib.php',
1151 'description' => 'Get course user profiles (each of the profils matching a course id and a user id),.',
1152 'type' => 'read',
1153 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, '
ee7295ee
JL
1154 . 'moodle/site:accessallgroups',
1155 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
6c785afa 1156 ),
f23e9b6b
CB
1157 'core_user_get_users' => array(
1158 'classname' => 'core_user_external',
1159 'methodname' => 'get_users',
1160 'classpath' => 'user/externallib.php',
1161 'description' => 'search for users matching the parameters',
1162 'type' => 'read',
1163 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update'
db5b6971 1164 ),
f23e9b6b
CB
1165 'core_user_get_users_by_field' => array(
1166 'classname' => 'core_user_external',
1167 'methodname' => 'get_users_by_field',
1168 'classpath' => 'user/externallib.php',
1169 'description' => 'Retrieve users\' information for a specified unique field - If you want to do a user search, use '
1170 . 'core_user_get_users()',
1171 'type' => 'read',
ee7295ee 1172 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update',
5041600d 1173 'ajax' => true,
ee7295ee 1174 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
8e355853 1175 ),
f23e9b6b
CB
1176 'core_user_remove_user_device' => array(
1177 'classname' => 'core_user_external',
1178 'methodname' => 'remove_user_device',
1179 'classpath' => 'user/externallib.php',
1180 'description' => 'Remove a user device from the Moodle database.',
1181 'type' => 'write',
ee7295ee 1182 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
ef4c23cc 1183 ),
c598f278 1184 'core_user_update_users' => array(
a0eabdd3 1185 'classname' => 'core_user_external',
c598f278 1186 'methodname' => 'update_users',
a0eabdd3 1187 'classpath' => 'user/externallib.php',
c598f278 1188 'description' => 'Update users.',
a0eabdd3
RW
1189 'type' => 'write',
1190 'capabilities' => 'moodle/user:update',
1191 'ajax' => true,
1192 ),
c598f278 1193 'core_user_update_user_preferences' => array(
f23e9b6b 1194 'classname' => 'core_user_external',
c598f278 1195 'methodname' => 'update_user_preferences',
f23e9b6b 1196 'classpath' => 'user/externallib.php',
c598f278 1197 'description' => 'Update a user\'s preferences',
f23e9b6b 1198 'type' => 'write',
c598f278 1199 'capabilities' => 'moodle/user:editownmessageprofile, moodle/user:editmessageprofile',
a0eabdd3 1200 'ajax' => true,
6d2f938c 1201 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
c026a28d 1202 ),
f23e9b6b
CB
1203 'core_user_view_user_list' => array(
1204 'classname' => 'core_user_external',
1205 'methodname' => 'view_user_list',
1206 'classpath' => 'user/externallib.php',
1207 'description' => 'Simulates the web-interface view of user/index.php (triggering events),.',
1208 'type' => 'write',
1209 'capabilities' => 'moodle/course:viewparticipants',
ee7295ee 1210 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
7361b968 1211 ),
f23e9b6b
CB
1212 'core_user_view_user_profile' => array(
1213 'classname' => 'core_user_external',
1214 'methodname' => 'view_user_profile',
1215 'classpath' => 'user/externallib.php',
1216 'description' => 'Simulates the web-interface view of user/view.php and user/profile.php (triggering events),.',
1217 'type' => 'write',
1218 'capabilities' => 'moodle/user:viewdetails',
ee7295ee 1219 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
f4fb827e 1220 ),
45fec983
JL
1221 'core_user_get_user_preferences' => array(
1222 'classname' => 'core_user_external',
1223 'methodname' => 'get_user_preferences',
1224 'classpath' => 'user/externallib.php',
1225 'description' => 'Return user preferences.',
1226 'type' => 'read',
1227 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1228 ),
d44e2e42
JL
1229 'core_user_update_picture' => array(
1230 'classname' => 'core_user_external',
1231 'methodname' => 'update_picture',
1232 'classpath' => 'user/externallib.php',
1233 'description' => 'Update or delete the user picture in the site',
1234 'type' => 'write',
1235 'capabilities' => 'moodle/user:editownprofile, moodle/user:editprofile',
1236 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1237 ),
649777fb
JL
1238 'core_user_set_user_preferences' => array(
1239 'classname' => 'core_user_external',
1240 'methodname' => 'set_user_preferences',
1241 'classpath' => 'user/externallib.php',
1242 'description' => 'Set user preferences.',
1243 'type' => 'write',
1244 'capabilities' => 'moodle/site:config',
1245 ),
3e8145a3
JL
1246 'core_user_agree_site_policy' => array(
1247 'classname' => 'core_user_external',
1248 'methodname' => 'agree_site_policy',
1249 'classpath' => 'user/externallib.php',
1250 'description' => 'Agree the site policy for the current user.',
1251 'type' => 'write',
1252 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1253 ),
f74ac6e7
JL
1254 'core_user_get_private_files_info' => array(
1255 'classname' => 'core_user_external',
1256 'methodname' => 'get_private_files_info',
1257 'classpath' => 'user/externallib.php',
1258 'description' => 'Returns general information about files in the user private files area.',
1259 'type' => 'read',
1260 'capabilities' => 'moodle/user:manageownfiles',
1261 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1262 ),
649777fb 1263
81de839f
FM
1264 // Competencies functions.
1265 'core_competency_create_competency_framework' => array(
1266 'classname' => 'core_competency\external',
1267 'methodname' => 'create_competency_framework',
1268 'classpath' => '',
1269 'description' => 'Creates new competency frameworks.',
1270 'type' => 'write',
1271 'capabilities' => 'moodle/competency:competencymanage',
1272 'ajax' => true,
1273 ),
1274 'core_competency_read_competency_framework' => array(
1275 'classname' => 'core_competency\external',
1276 'methodname' => 'read_competency_framework',
1277 'classpath' => '',
1278 'description' => 'Load a summary of a competency framework.',
1279 'type' => 'read',
1280 'capabilities' => 'moodle/competency:competencyview',
1281 'ajax' => true,
1282 ),
1283 'core_competency_duplicate_competency_framework' => array(
1284 'classname' => 'core_competency\external',
1285 'methodname' => 'duplicate_competency_framework',
1286 'classpath' => '',
1287 'description' => 'Duplicate a competency framework.',
1288 'type' => 'write',
1289 'capabilities' => 'moodle/competency:competencymanage',
1290 'ajax' => true,
1291 ),
1292 'core_competency_delete_competency_framework' => array(
1293 'classname' => 'core_competency\external',
1294 'methodname' => 'delete_competency_framework',
1295 'classpath' => '',
1296 'description' => 'Delete a competency framework.',
1297 'type' => 'write',
1298 'capabilities' => 'moodle/competency:competencymanage',
1299 'ajax' => true,
1300 ),
1301 'core_competency_update_competency_framework' => array(
1302 'classname' => 'core_competency\external',
1303 'methodname' => 'update_competency_framework',
1304 'classpath' => '',
1305 'description' => 'Update a competency framework.',
1306 'type' => 'write',
1307 'capabilities' => 'moodle/competency:competencymanage',
1308 'ajax' => true,
1309 ),
1310 'core_competency_list_competency_frameworks' => array(
1311 'classname' => 'core_competency\external',
1312 'methodname' => 'list_competency_frameworks',
1313 'classpath' => '',
1314 'description' => 'Load a list of a competency frameworks.',
1315 'type' => 'read',
1316 'capabilities' => 'moodle/competency:competencyview',
1317 'ajax' => true,
1318 ),
1319 'core_competency_count_competency_frameworks' => array(
1320 'classname' => 'core_competency\external',
1321 'methodname' => 'count_competency_frameworks',
1322 'classpath' => '',
1323 'description' => 'Count a list of a competency frameworks.',
1324 'type' => 'read',
1325 'capabilities' => 'moodle/competency:competencyview',
1326 'ajax' => true,
1327 ),
1328 'core_competency_competency_framework_viewed' => array(
1329 'classname' => 'core_competency\external',
1330 'methodname' => 'competency_framework_viewed',
1331 'classpath' => '',
1332 'description' => 'Log event competency framework viewed',
1333 'type' => 'read',
1334 'capabilities' => 'moodle/competency:competencyview',
1335 'ajax' => true,
1336 ),
1337 'core_competency_create_competency' => array(
1338 'classname' => 'core_competency\external',
1339 'methodname' => 'create_competency',
1340 'classpath' => '',
1341 'description' => 'Creates new competencies.',
1342 'type' => 'write',
1343 'capabilities' => 'moodle/competency:competencymanage',
1344 'ajax' => true,
1345 ),
1346 'core_competency_read_competency' => array(
1347 'classname' => 'core_competency\external',
1348 'methodname' => 'read_competency',
1349 'classpath' => '',
1350 'description' => 'Load a summary of a competency.',
1351 'type' => 'read',
1352 'capabilities' => 'moodle/competency:competencyview',
1353 'ajax' => true,
1354 ),
1355 'core_competency_competency_viewed' => array(
1356 'classname' => 'core_competency\external',
1357 'methodname' => 'competency_viewed',
1358 'classpath' => '',
1359 'description' => 'Log event competency viewed',
1360 'type' => 'read',
1361 'capabilities' => 'moodle/competency:competencyview',
1362 'ajax' => true,
3123c2cf 1363 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
1364 ),
1365 'core_competency_delete_competency' => array(
1366 'classname' => 'core_competency\external',
1367 'methodname' => 'delete_competency',
1368 'classpath' => '',
1369 'description' => 'Delete a competency.',
1370 'type' => 'write',
1371 'capabilities' => 'moodle/competency:competencymanage',
1372 'ajax' => true,
1373 ),
1374 'core_competency_update_competency' => array(
1375 'classname' => 'core_competency\external',
1376 'methodname' => 'update_competency',
1377 'classpath' => '',
1378 'description' => 'Update a competency.',
1379 'type' => 'write',
1380 'capabilities' => 'moodle/competency:competencymanage',
1381 'ajax' => true,
1382 ),
1383 'core_competency_list_competencies' => array(
1384 'classname' => 'core_competency\external',
1385 'methodname' => 'list_competencies',
1386 'classpath' => '',
1387 'description' => 'Load a list of a competencies.',
1388 'type' => 'read',
1389 'capabilities' => 'moodle/competency:competencyview',
1390 'ajax' => true,
1391 ),
1392 'core_competency_list_competencies_in_template' => array(
1393 'classname' => 'core_competency\external',
1394 'methodname' => 'list_competencies_in_template',
1395 'classpath' => '',
1396 'description' => 'Load a list of a competencies for a given template.',
1397 'type' => 'read',
1398 'capabilities' => 'moodle/competency:competencyview',
1399 'ajax' => true,
1400 ),
1401 'core_competency_count_competencies' => array(
1402 'classname' => 'core_competency\external',
1403 'methodname' => 'count_competencies',
1404 'classpath' => '',
1405 'description' => 'Count a list of a competencies.',
1406 'type' => 'read',
1407 'capabilities' => 'moodle/competency:competencyview',
1408 'ajax' => true,
1409 ),
1410 'core_competency_count_competencies_in_template' => array(
1411 'classname' => 'core_competency\external',
1412 'methodname' => 'count_competencies_in_template',
1413 'classpath' => '',
1414 'description' => 'Count a list of a competencies for a given template.',
1415 'type' => 'read',
1416 'capabilities' => 'moodle/competency:competencyview',
1417 'ajax' => true,
1418 ),
1419 'core_competency_search_competencies' => array(
1420 'classname' => 'core_competency\external',
1421 'methodname' => 'search_competencies',
1422 'classpath' => '',
1423 'description' => 'Search a list of a competencies.',
1424 'type' => 'read',
1425 'capabilities' => 'moodle/competency:competencyview',
1426 'ajax' => true,
1427 ),
1428 'core_competency_set_parent_competency' => array(
1429 'classname' => 'core_competency\external',
1430 'methodname' => 'set_parent_competency',
1431 'classpath' => '',
1432 'description' => 'Set a new parent for a competency.',
1433 'type' => 'write',
1434 'capabilities' => 'moodle/competency:competencymanage',
1435 'ajax' => true,
1436 ),
1437 'core_competency_move_up_competency' => array(
1438 'classname' => 'core_competency\external',
1439 'methodname' => 'move_up_competency',
1440 'classpath' => '',
1441 'description' => 'Re-order a competency.',
1442 'type' => 'write',
1443 'capabilities' => 'moodle/competency:competencymanage',
1444 'ajax' => true,
1445 ),
1446 'core_competency_move_down_competency' => array(
1447 'classname' => 'core_competency\external',
1448 'methodname' => 'move_down_competency',
1449 'classpath' => '',
1450 'description' => 'Re-order a competency.',
1451 'type' => 'write',
1452 'capabilities' => 'moodle/competency:competencymanage',
1453 'ajax' => true,
1454 ),
1455 'core_competency_list_course_competencies' => array(
1456 'classname' => 'core_competency\external',
1457 'methodname' => 'list_course_competencies',
1458 'classpath' => '',
1459 'description' => 'List the competencies in a course',
1460 'type' => 'read',
1461 'capabilities' => 'moodle/competency:coursecompetencyview',
1462 'ajax' => true,
3123c2cf 1463 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
1464 ),
1465 'core_competency_count_competencies_in_course' => array(
1466 'classname' => 'core_competency\external',
1467 'methodname' => 'count_competencies_in_course',
1468 'classpath' => '',
1469 'description' => 'List the competencies in a course',
1470 'type' => 'read',
1471 'capabilities' => 'moodle/competency:coursecompetencyview',
1472 'ajax' => true,
1473 ),
1474 'core_competency_count_courses_using_competency' => array(
1475 'classname' => 'core_competency\external',
1476 'methodname' => 'count_courses_using_competency',
1477 'classpath' => '',
1478 'description' => 'List the courses using a competency',
1479 'type' => 'read',
1480 'capabilities' => 'moodle/competency:coursecompetencyview',
1481 'ajax' => true,
1482 ),
1483 'core_competency_add_competency_to_course' => array(
1484 'classname' => 'core_competency\external',
1485 'methodname' => 'add_competency_to_course',
1486 'classpath' => '',
1487 'description' => 'Add the competency to a course',
1488 'type' => 'write',
1489 'capabilities' => 'moodle/competency:coursecompetencymanage',
1490 'ajax' => true,
1491 ),
1492 'core_competency_add_competency_to_template' => array(
1493 'classname' => 'core_competency\external',
1494 'methodname' => 'add_competency_to_template',
1495 'classpath' => '',
1496 'description' => 'Add the competency to a template',
1497 'type' => 'write',
1498 'capabilities' => 'moodle/competency:templatemanage',
1499 'ajax' => true,
1500 ),
1501 'core_competency_remove_competency_from_course' => array(
1502 'classname' => 'core_competency\external',
1503 'methodname' => 'remove_competency_from_course',
1504 'classpath' => '',
1505 'description' => 'Remove a competency from a course',
1506 'type' => 'write',
1507 'capabilities' => 'moodle/competency:coursecompetencymanage',
1508 'ajax' => true,
1509 ),
1510 'core_competency_set_course_competency_ruleoutcome' => array(
1511 'classname' => 'core_competency\external',
1512 'methodname' => 'set_course_competency_ruleoutcome',
1513 'classpath' => '',
1514 'description' => 'Modify the ruleoutcome value for course competency',
1515 'type' => 'write',
1516 'capabilities' => 'moodle/competency:coursecompetencymanage',
1517 'ajax' => true,
1518 ),
1519 'core_competency_remove_competency_from_template' => array(
1520 'classname' => 'core_competency\external',
1521 'methodname' => 'remove_competency_from_template',
1522 'classpath' => '',
1523 'description' => 'Remove a competency from a template',
1524 'type' => 'write',
1525 'capabilities' => 'moodle/competency:templatemanage',
1526 'ajax' => true,
1527 ),
1528 'core_competency_reorder_course_competency' => array(
1529 'classname' => 'core_competency\external',
1530 'methodname' => 'reorder_course_competency',
1531 'classpath' => '',
1532 'description' => 'Move a course competency to a new relative sort order.',
1533 'type' => 'write',
1534 'capabilities' => 'moodle/competency:coursecompetencymanage',
1535 'ajax' => true,
1536 ),
1537 'core_competency_reorder_template_competency' => array(
1538 'classname' => 'core_competency\external',
1539 'methodname' => 'reorder_template_competency',
1540 'classpath' => '',
1541 'description' => 'Move a template competency to a new relative sort order.',
1542 'type' => 'write',
1543 'capabilities' => 'moodle/competency:templatemanage',
1544 'ajax' => true,
1545 ),
1546 'core_competency_create_template' => array(
1547 'classname' => 'core_competency\external',
1548 'methodname' => 'create_template',
1549 'classpath' => '',
1550 'description' => 'Creates new learning plan templates.',
1551 'type' => 'write',
1552 'capabilities' => 'moodle/competency:templatemanage',
1553 'ajax' => true,
1554 ),
1555 'core_competency_duplicate_template' => array(
1556 'classname' => 'core_competency\external',
1557 'methodname' => 'duplicate_template',
1558 'classpath' => '',
1559 'description' => 'Duplicate learning plan template.',
1560 'type' => 'write',
1561 'capabilities' => 'moodle/competency:templatemanage',
1562 'ajax' => true,
1563 ),
1564 'core_competency_read_template' => array(
1565 'classname' => 'core_competency\external',
1566 'methodname' => 'read_template',
1567 'classpath' => '',
1568 'description' => 'Load a summary of a learning plan template.',
1569 'type' => 'read',
1570 'capabilities' => 'moodle/competency:templateview',
1571 'ajax' => true,
1572 ),
1573 'core_competency_delete_template' => array(
1574 'classname' => 'core_competency\external',
1575 'methodname' => 'delete_template',
1576 'classpath' => '',
1577 'description' => 'Delete a learning plan template.',
1578 'type' => 'write',
1579 'capabilities' => 'moodle/competency:templatemanage',
1580 'ajax' => true,
1581 ),
1582 'core_competency_update_template' => array(
1583 'classname' => 'core_competency\external',
1584 'methodname' => 'update_template',
1585 'classpath' => '',
1586 'description' => 'Update a learning plan template.',
1587 'type' => 'write',
1588 'capabilities' => 'moodle/competency:templatemanage',
1589 'ajax' => true,
1590 ),
1591 'core_competency_list_templates' => array(
1592 'classname' => 'core_competency\external',
1593 'methodname' => 'list_templates',
1594 'classpath' => '',
1595 'description' => 'Load a list of a learning plan templates.',
1596 'type' => 'read',
1597 'capabilities' => 'moodle/competency:templateview',
1598 'ajax' => true,
1599 ),
1600 'core_competency_list_templates_using_competency' => array(
1601 'classname' => 'core_competency\external',
1602 'methodname' => 'list_templates_using_competency',
1603 'classpath' => '',
1604 'description' => 'Load a list of a learning plan templates for a given competency.',
1605 'type' => 'read',
1606 'capabilities' => 'moodle/competency:templateview',
1607 'ajax' => true,
1608 ),
1609 'core_competency_count_templates' => array(
1610 'classname' => 'core_competency\external',
1611 'methodname' => 'count_templates',
1612 'classpath' => '',
1613 'description' => 'Count a list of a learning plan templates.',
1614 'type' => 'read',
1615 'capabilities' => 'moodle/competency:templateview',
1616 'ajax' => true,
1617 ),
1618 'core_competency_count_templates_using_competency' => array(
1619 'classname' => 'core_competency\external',
1620 'methodname' => 'count_templates_using_competency',
1621 'classpath' => '',
1622 'description' => 'Count a list of a learning plan templates for a given competency.',
1623 'type' => 'read',
1624 'capabilities' => 'moodle/competency:templateview',
1625 'ajax' => true,
1626 ),
1627 'core_competency_create_plan' => array(
1628 'classname' => 'core_competency\external',
1629 'methodname' => 'create_plan',
1630 'classpath' => '',
1631 'description' => 'Creates a learning plan.',
1632 'type' => 'write',
1633 'capabilities' => 'moodle/competency:planmanage',
1634 'ajax' => true,
1635 ),
1636 'core_competency_update_plan' => array(
1637 'classname' => 'core_competency\external',
1638 'methodname' => 'update_plan',
1639 'classpath' => '',
1640 'description' => 'Updates a learning plan.',
1641 'type' => 'write',
1642 'capabilities' => 'moodle/competency:planmanage',
1643 'ajax' => true,
1644 ),
1645 'core_competency_complete_plan' => array(
1646 'classname' => 'core_competency\external',
1647 'methodname' => 'complete_plan',
1648 'classpath' => '',
1649 'description' => 'Complete learning plan.',
1650 'type' => 'write',
1651 'capabilities' => 'moodle/competency:planmanage',
1652 'ajax' => true,
1653 ),
1654 'core_competency_reopen_plan' => array(
1655 'classname' => 'core_competency\external',
1656 'methodname' => 'reopen_plan',
1657 'classpath' => '',
1658 'description' => 'Reopen learning plan.',
1659 'type' => 'write',
1660 'capabilities' => 'moodle/competency:planmanage',
1661 'ajax' => true,
1662 ),
1663 'core_competency_read_plan' => array(
1664 'classname' => 'core_competency\external',
1665 'methodname' => 'read_plan',
1666 'classpath' => '',
1667 'description' => 'Load a learning plan.',
1668 'type' => 'read',
1669 'capabilities' => 'moodle/competency:planviewown',
1670 'ajax' => true,
1671 ),
1672 'core_competency_delete_plan' => array(
1673 'classname' => 'core_competency\external',
1674 'methodname' => 'delete_plan',
1675 'classpath' => '',
1676 'description' => 'Delete a learning plan.',
1677 'type' => 'write',
1678 'capabilities' => 'moodle/competency:planmanage',
1679 'ajax' => true,
1680 ),
1681 'core_competency_list_user_plans' => array(
1682 'classname' => 'core_competency\external',
1683 'methodname' => 'list_user_plans',
1684 'classpath' => '',
1685 'description' => 'List a user\'s learning plans.',
1686 'type' => 'read',
1687 'capabilities' => 'moodle/competency:planviewown',
1688 'ajax' => true,
1689 ),
1690 'core_competency_list_plan_competencies' => array(
1691 'classname' => 'core_competency\external',
1692 'methodname' => 'list_plan_competencies',
1693 'classpath' => '',
1694 'description' => 'List the competencies in a plan',
1695 'type' => 'read',
1696 'capabilities' => 'moodle/competency:planviewown',
1697 'ajax' => true,
1698 ),
1699 'core_competency_add_competency_to_plan' => array(
1700 'classname' => 'core_competency\external',
1701 'methodname' => 'add_competency_to_plan',
1702 'classpath' => '',
1703 'description' => 'Add the competency to a learning plan',
1704 'type' => 'write',
1705 'capabilities' => 'moodle/competency:planmanage',
1706 'ajax' => true,
1707 ),
1708 'core_competency_remove_competency_from_plan' => array(
1709 'classname' => 'core_competency\external',
1710 'methodname' => 'remove_competency_from_plan',
1711 'classpath' => '',
1712 'description' => 'Remove the competency from a learning plan',
1713 'type' => 'write',
1714 'capabilities' => 'moodle/competency:planmanage',
1715 'ajax' => true,
1716 ),
1717 'core_competency_reorder_plan_competency' => array(
1718 'classname' => 'core_competency\external',
1719 'methodname' => 'reorder_plan_competency',
1720 'classpath' => '',
1721 'description' => 'Move a plan competency to a new relative sort order.',
1722 'type' => 'write',
1723 'capabilities' => 'moodle/competency:planmanage',
1724 'ajax' => true,
1725 ),
1726 'core_competency_plan_request_review' => array(
1727 'classname' => 'core_competency\external',
1728 'methodname' => 'plan_request_review',
1729 'classpath' => '',
1730 'description' => 'Request for a plan to be reviewed.',
1731 'type' => 'write',
1732 'capabilities' => 'moodle/competency:planmanagedraft',
1733 'ajax' => true,
1734 ),
1735 'core_competency_plan_start_review' => array(
1736 'classname' => 'core_competency\external',
1737 'methodname' => 'plan_start_review',
1738 'classpath' => '',
1739 'description' => 'Start the review of a plan.',
1740 'type' => 'write',
1741 'capabilities' => 'moodle/competency:planmanage',
1742 'ajax' => true,
1743 ),
1744 'core_competency_plan_stop_review' => array(
1745 'classname' => 'core_competency\external',
1746 'methodname' => 'plan_stop_review',
1747 'classpath' => '',
1748 'description' => 'Stop the review of a plan.',
1749 'type' => 'write',
1750 'capabilities' => 'moodle/competency:planmanage',
1751 'ajax' => true,
1752 ),
1753 'core_competency_plan_cancel_review_request' => array(
1754 'classname' => 'core_competency\external',
1755 'methodname' => 'plan_cancel_review_request',
1756 'classpath' => '',
1757 'description' => 'Cancel the review of a plan.',
1758 'type' => 'write',
1759 'capabilities' => 'moodle/competency:planmanagedraft',
1760 'ajax' => true,
1761 ),
1762 'core_competency_approve_plan' => array(
1763 'classname' => 'core_competency\external',
1764 'methodname' => 'approve_plan',
1765 'classpath' => '',
1766 'description' => 'Approve a plan.',
1767 'type' => 'write',
1768 'capabilities' => 'moodle/competency:planmanage',
1769 'ajax' => true,
1770 ),
1771 'core_competency_unapprove_plan' => array(
1772 'classname' => 'core_competency\external',
1773 'methodname' => 'unapprove_plan',
1774 'classpath' => '',
1775 'description' => 'Unapprove a plan.',
1776 'type' => 'write',
1777 'capabilities' => 'moodle/competency:planmanage',
1778 'ajax' => true,
1779 ),
1780 'core_competency_template_has_related_data' => array(
1781 'classname' => 'core_competency\external',
1782 'methodname' => 'template_has_related_data',
1783 'classpath' => '',
1784 'description' => 'Check if a template has related data',
1785 'type' => 'read',
1786 'capabilities' => 'moodle/competency:templateview',
1787 'ajax' => true,
1788 ),
1789 'core_competency_get_scale_values' => array(
1790 'classname' => 'core_competency\external',
1791 'methodname' => 'get_scale_values',
1792 'classpath' => '',
1793 'description' => 'Fetch the values for a specific scale',
1794 'type' => 'read',
1795 'capabilities' => 'moodle/competency:competencymanage',
1796 'ajax' => true,
3123c2cf 1797 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
1798 ),
1799 'core_competency_add_related_competency' => array(
1800 'classname' => 'core_competency\external',
1801 'methodname' => 'add_related_competency',
1802 'classpath' => '',
1803 'description' => 'Adds a related competency',
1804 'type' => 'write',
1805 'capabilities' => 'moodle/competency:competencymanage',
1806 'ajax' => true,
1807 ),
1808 'core_competency_remove_related_competency' => array(
1809 'classname' => 'core_competency\external',
1810 'methodname' => 'remove_related_competency',
1811 'classpath' => '',
1812 'description' => 'Remove a related competency',
1813 'type' => 'write',
1814 'capabilities' => 'moodle/competency:competencymanage',
1815 'ajax' => true,
1816 ),
1817 'core_competency_read_user_evidence' => array(
1818 'classname' => 'core_competency\external',
1819 'methodname' => 'read_user_evidence',
1820 'classpath' => '',
1821 'description' => 'Read an evidence of prior learning.',
1822 'type' => 'read',
1823 'capabilities' => 'moodle/competency:userevidenceview',
1824 'ajax' => true,
1825 ),
1826 'core_competency_delete_user_evidence' => array(
1827 'classname' => 'core_competency\external',
1828 'methodname' => 'delete_user_evidence',
1829 'classpath' => '',
1830 'description' => 'Delete an evidence of prior learning.',
1831 'type' => 'write',
1832 'capabilities' => 'moodle/competency:userevidencemanageown',
1833 'ajax' => true,
1834 ),
1835 'core_competency_create_user_evidence_competency' => array(
1836 'classname' => 'core_competency\external',
1837 'methodname' => 'create_user_evidence_competency',
1838 'classpath' => '',
1839 'description' => 'Create an evidence of prior learning relationship with a competency.',
1840 'type' => 'read',
1841 'capabilities' => 'moodle/competency:userevidencemanageown, moodle/competency:competencyview',
1842 'ajax' => true,
1843 ),
1844 'core_competency_delete_user_evidence_competency' => array(
1845 'classname' => 'core_competency\external',
1846 'methodname' => 'delete_user_evidence_competency',
1847 'classpath' => '',
1848 'description' => 'Delete an evidence of prior learning relationship with a competency.',
1849 'type' => 'write',
1850 'capabilities' => 'moodle/competency:userevidencemanageown',
1851 'ajax' => true,
1852 ),
1853 'core_competency_user_competency_cancel_review_request' => array(
1854 'classname' => 'core_competency\external',
1855 'methodname' => 'user_competency_cancel_review_request',
1856 'classpath' => '',
1857 'description' => 'Cancel a review request.',
1858 'type' => 'write',
1859 'capabilities' => 'moodle/competency:userevidencemanageown',
1860 'ajax' => true,
1861 ),
1862 'core_competency_user_competency_request_review' => array(
1863 'classname' => 'core_competency\external',
1864 'methodname' => 'user_competency_request_review',
1865 'classpath' => '',
1866 'description' => 'Request a review.',
1867 'type' => 'write',
1868 'capabilities' => 'moodle/competency:userevidencemanageown',
1869 'ajax' => true,
1870 ),
1871 'core_competency_user_competency_start_review' => array(
1872 'classname' => 'core_competency\external',
1873 'methodname' => 'user_competency_start_review',
1874 'classpath' => '',
1875 'description' => 'Start a review.',
1876 'type' => 'write',
1877 'capabilities' => 'moodle/competency:competencygrade',
1878 'ajax' => true,
1879 ),
1880 'core_competency_user_competency_stop_review' => array(
1881 'classname' => 'core_competency\external',
1882 'methodname' => 'user_competency_stop_review',
1883 'classpath' => '',
1884 'description' => 'Stop a review.',
1885 'type' => 'write',
1886 'capabilities' => 'moodle/competency:competencygrade',
1887 'ajax' => true,
1888 ),
1889 'core_competency_user_competency_viewed' => array(
1890 'classname' => 'core_competency\external',
1891 'methodname' => 'user_competency_viewed',
1892 'classpath' => '',
1893 'description' => 'Log the user competency viewed event.',
1894 'type' => 'read',
1895 'capabilities' => 'moodle/competency:usercompetencyview',
1896 'ajax' => true,
3123c2cf 1897 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
1898 ),
1899 'core_competency_user_competency_viewed_in_plan' => array(
1900 'classname' => 'core_competency\external',
1901 'methodname' => 'user_competency_viewed_in_plan',
1902 'classpath' => '',
1903 'description' => 'Log the user competency viewed in plan event.',
1904 'type' => 'read',
1905 'capabilities' => 'moodle/competency:usercompetencyview',
1906 'ajax' => true,
3123c2cf 1907 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
1908 ),
1909 'core_competency_user_competency_viewed_in_course' => array(
1910 'classname' => 'core_competency\external',
1911 'methodname' => 'user_competency_viewed_in_course',
1912 'classpath' => '',
1913 'description' => 'Log the user competency viewed in course event',
1914 'type' => 'read',
1915 'capabilities' => 'moodle/competency:usercompetencyview',
1916 'ajax' => true,
3123c2cf 1917 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
1918 ),
1919 'core_competency_user_competency_plan_viewed' => array(
1920 'classname' => 'core_competency\external',
1921 'methodname' => 'user_competency_plan_viewed',
1922 'classpath' => '',
1923 'description' => 'Log the user competency plan viewed event.',
1924 'type' => 'read',
1925 'capabilities' => 'moodle/competency:usercompetencyview',
1926 'ajax' => true,
3123c2cf 1927 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
1928 ),
1929 'core_competency_grade_competency' => array(
1930 'classname' => 'core_competency\external',
1931 'methodname' => 'grade_competency',
1932 'classpath' => '',
1933 'description' => 'Grade a competency.',
1934 'type' => 'write',
1935 'capabilities' => 'moodle/competency:competencygrade',
1936 'ajax' => true,
1937 ),
1938 'core_competency_grade_competency_in_plan' => array(
1939 'classname' => 'core_competency\external',
1940 'methodname' => 'grade_competency_in_plan',
1941 'classpath' => '',
1942 'description' => 'Grade a competency from the user plan page.',
1943 'type' => 'write',
1944 'capabilities' => 'moodle/competency:competencygrade',
1945 'ajax' => true,
1946 ),
1947 'core_competency_grade_competency_in_course' => array(
1948 'classname' => 'core_competency\external',
1949 'methodname' => 'grade_competency_in_course',
1950 'classpath' => '',
1951 'description' => 'Grade a competency from the course page.',
1952 'type' => 'write',
1953 'capabilities' => 'moodle/competency:competencygrade',
1954 'ajax' => true,
3123c2cf 1955 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
81de839f
FM
1956 ),
1957 'core_competency_unlink_plan_from_template' => array(
1958 'classname' => 'core_competency\external',
1959 'methodname' => 'unlink_plan_from_template',
1960 'classpath' => '',
1961 'description' => 'Unlink a plan form it template.',
1962 'type' => 'write',
1963 'capabilities' => 'moodle/competency:planmanage',
1964 'ajax' => true,
1965 ),
1966 'core_competency_template_viewed' => array(
1967 'classname' => 'core_competency\external',
1968 'methodname' => 'template_viewed',
1969 'classpath' => '',
1970 'description' => 'Log event template viewed',
1971 'type' => 'read',
1972 'capabilities' => 'moodle/competency:templateview',
1973 'ajax' => true,
1974 ),
1975 'core_competency_request_review_of_user_evidence_linked_competencies' => array(
1976 'classname' => 'core_competency\external',
1977 'methodname' => 'request_review_of_user_evidence_linked_competencies',
1978 'classpath' => '',
1979 'description' => 'Send user evidence competencies in review',
1980 'type' => 'write',
1981 'capabilities' => 'moodle/competency:userevidencemanageown',
1982 'ajax' => true,
1983 ),
1984 'core_competency_update_course_competency_settings' => array(
1985 'classname' => 'core_competency\external',
1986 'methodname' => 'update_course_competency_settings',
1987 'classpath' => '',
1988 'description' => 'Update the course competency settings',
1989 'type' => 'write',
1990 'capabilities' => 'moodle/competency:coursecompetencyconfigure',
1991 'ajax' => true,
1992 ),
1e99f31e
FM
1993 'core_competency_delete_evidence' => array(
1994 'classname' => 'core_competency\external',
1995 'methodname' => 'delete_evidence',
1996 'classpath' => '',
1997 'description' => 'Delete an evidence',
1998 'type' => 'write',
1999 'capabilities' => 'moodle/competency:evidencedelete',
2000 'ajax' => true,
3123c2cf 2001 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1e99f31e 2002 ),
f23e9b6b
CB
2003
2004 'core_webservice_get_site_info' => array(
2005 'classname' => 'core_webservice_external',
2006 'methodname' => 'get_site_info',
2007 'classpath' => 'webservice/externallib.php',
2008 'description' => 'Return some site info / user info / list web service functions',
2009 'type' => 'read',
ee7295ee 2010 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
8446ba36
JL
2011 ),
2012
2013 // Blocks functions.
2014 'core_block_get_course_blocks' => array(
2015 'classname' => 'core_block_external',
2016 'methodname' => 'get_course_blocks',
2017 'description' => 'Returns blocks information for a course.',
2018 'type' => 'read',
2019 'capabilities' => '',
2020 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2021 ),
9a0df45a 2022);
c1b65883
JM
2023
2024$services = array(
96e0194c 2025 'Moodle mobile web service' => array(
12c52b91 2026 'functions' => array(), // Unused as we add the service in each function definition, third party services would use this.
96e0194c
SH
2027 'enabled' => 0,
2028 'restrictedusers' => 0,
af03513f 2029 'shortname' => MOODLE_OFFICIAL_MOBILE_SERVICE,
106c55fb
DW
2030 'downloadfiles' => 1,
2031 'uploadfiles' => 1
96e0194c
SH
2032 ),
2033);