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