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