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