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