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