Commit | Line | Data |
---|---|---|
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 | ), | |
b6f70a37 JL |
45 | 'core_auth_request_password_reset' => array( |
46 | 'classname' => 'core_auth_external', | |
47 | 'methodname' => 'request_password_reset', | |
48 | 'description' => 'Requests a password reset.', | |
49 | 'type' => 'write', | |
50 | 'ajax' => true, | |
51 | 'loginrequired' => false, | |
52 | ), | |
25dbbdf9 MG |
53 | 'core_auth_is_minor' => array( |
54 | 'classname' => 'core_auth_external', | |
55 | 'methodname' => 'is_minor', | |
56 | 'description' => 'Requests a check if a user is a digital minor.', | |
57 | 'type' => 'read', | |
1f7565c1 JL |
58 | 'ajax' => true, |
59 | 'loginrequired' => false, | |
60 | ), | |
61 | 'core_auth_is_age_digital_consent_verification_enabled' => array( | |
62 | 'classname' => 'core_auth_external', | |
63 | 'methodname' => 'is_age_digital_consent_verification_enabled', | |
64 | 'description' => 'Checks if age digital consent verification is enabled.', | |
65 | 'type' => 'read', | |
66 | 'ajax' => true, | |
25dbbdf9 MG |
67 | 'loginrequired' => false, |
68 | ), | |
6f793705 JL |
69 | 'core_auth_resend_confirmation_email' => array( |
70 | 'classname' => 'core_auth_external', | |
71 | 'methodname' => 'resend_confirmation_email', | |
72 | 'description' => 'Resend confirmation email.', | |
73 | 'type' => 'write', | |
74 | 'ajax' => true, | |
75 | 'loginrequired' => false, | |
76 | ), | |
f23e9b6b CB |
77 | 'core_badges_get_user_badges' => array( |
78 | 'classname' => 'core_badges_external', | |
79 | 'methodname' => 'get_user_badges', | |
80 | 'description' => 'Returns the list of badges awarded to a user.', | |
81 | 'type' => 'read', | |
ee7295ee JL |
82 | 'capabilities' => 'moodle/badges:viewotherbadges', |
83 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
088645e2 | 84 | ), |
bb96ff71 JL |
85 | 'core_blog_get_entries' => array( |
86 | 'classname' => 'core_blog\external', | |
87 | 'methodname' => 'get_entries', | |
88 | 'description' => 'Returns blog entries.', | |
89 | 'type' => 'read', | |
90 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
91 | 'ajax' => true, | |
92 | 'loginrequired' => false, | |
93 | ), | |
ca48cc91 JL |
94 | 'core_blog_view_entries' => array( |
95 | 'classname' => 'core_blog\external', | |
96 | 'methodname' => 'view_entries', | |
97 | 'description' => 'Trigger the blog_entries_viewed event.', | |
98 | 'type' => 'read', | |
99 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
100 | 'ajax' => true, | |
101 | 'loginrequired' => false, | |
102 | ), | |
695c5726 AN |
103 | 'core_calendar_get_calendar_monthly_view' => array( |
104 | 'classname' => 'core_calendar_external', | |
105 | 'methodname' => 'get_calendar_monthly_view', | |
106 | 'description' => 'Fetch the monthly view data for a calendar', | |
107 | 'classpath' => 'calendar/externallib.php', | |
3ea4f446 AN |
108 | 'type' => 'read', |
109 | 'capabilities' => '', | |
110 | 'ajax' => true, | |
111 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
112 | ), | |
113 | 'core_calendar_get_calendar_day_view' => array( | |
114 | 'classname' => 'core_calendar_external', | |
115 | 'methodname' => 'get_calendar_day_view', | |
116 | 'description' => 'Fetch the day view data for a calendar', | |
117 | 'classpath' => 'calendar/externallib.php', | |
695c5726 AN |
118 | 'type' => 'read', |
119 | 'capabilities' => '', | |
120 | 'ajax' => true, | |
121 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
122 | ), | |
e8306438 SL |
123 | 'core_calendar_get_calendar_upcoming_view' => array( |
124 | 'classname' => 'core_calendar_external', | |
125 | 'methodname' => 'get_calendar_upcoming_view', | |
126 | 'description' => 'Fetch the upcoming view data for a calendar', | |
127 | 'classpath' => 'calendar/externallib.php', | |
128 | 'type' => 'read', | |
129 | 'capabilities' => '', | |
130 | 'ajax' => true, | |
131 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
132 | ), | |
c6fb9310 RW |
133 | 'core_calendar_update_event_start_day' => array( |
134 | 'classname' => 'core_calendar_external', | |
135 | 'methodname' => 'update_event_start_day', | |
136 | 'description' => 'Update the start day (but not time) for an event.', | |
137 | 'classpath' => 'calendar/externallib.php', | |
138 | 'type' => 'write', | |
139 | 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries', | |
140 | 'ajax' => true, | |
141 | ), | |
f23e9b6b CB |
142 | 'core_calendar_create_calendar_events' => array( |
143 | 'classname' => 'core_calendar_external', | |
144 | 'methodname' => 'create_calendar_events', | |
145 | 'description' => 'Create calendar events', | |
146 | 'classpath' => 'calendar/externallib.php', | |
147 | 'type' => 'write', | |
e453ed68 JL |
148 | 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries', |
149 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
088645e2 | 150 | ), |
f23e9b6b CB |
151 | 'core_calendar_delete_calendar_events' => array( |
152 | 'classname' => 'core_calendar_external', | |
153 | 'methodname' => 'delete_calendar_events', | |
154 | 'description' => 'Delete calendar events', | |
155 | 'classpath' => 'calendar/externallib.php', | |
156 | 'type' => 'write', | |
e453ed68 | 157 | 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries', |
542f5afa | 158 | 'ajax' => true, |
e453ed68 | 159 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
088645e2 | 160 | ), |
f23e9b6b CB |
161 | 'core_calendar_get_calendar_events' => array( |
162 | 'classname' => 'core_calendar_external', | |
163 | 'methodname' => 'get_calendar_events', | |
164 | 'description' => 'Get calendar events', | |
165 | 'classpath' => 'calendar/externallib.php', | |
166 | 'type' => 'read', | |
ee7295ee JL |
167 | 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries', |
168 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
088645e2 | 169 | ), |
c0f877fa MN |
170 | 'core_calendar_get_action_events_by_timesort' => array( |
171 | 'classname' => 'core_calendar_external', | |
172 | 'methodname' => 'get_calendar_action_events_by_timesort', | |
173 | 'description' => 'Get calendar action events by tiemsort', | |
174 | 'classpath' => 'calendar/externallib.php', | |
175 | 'type' => 'read', | |
176 | 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries', | |
60774b28 | 177 | 'ajax' => true, |
569d091b | 178 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
60774b28 RW |
179 | ), |
180 | 'core_calendar_get_action_events_by_course' => array( | |
181 | 'classname' => 'core_calendar_external', | |
182 | 'methodname' => 'get_calendar_action_events_by_course', | |
183 | 'description' => 'Get calendar action events by course', | |
184 | 'classpath' => 'calendar/externallib.php', | |
185 | 'type' => 'read', | |
186 | 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries', | |
9b8e5057 | 187 | 'ajax' => true, |
569d091b | 188 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
9b8e5057 RW |
189 | ), |
190 | 'core_calendar_get_action_events_by_courses' => array( | |
191 | 'classname' => 'core_calendar_external', | |
192 | 'methodname' => 'get_calendar_action_events_by_courses', | |
193 | 'description' => 'Get calendar action events by courses', | |
194 | 'classpath' => 'calendar/externallib.php', | |
195 | 'type' => 'read', | |
196 | 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries', | |
c0f877fa | 197 | 'ajax' => true, |
569d091b | 198 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
c0f877fa | 199 | ), |
5813d1b9 SL |
200 | 'core_calendar_get_calendar_event_by_id' => array( |
201 | 'classname' => 'core_calendar_external', | |
202 | 'methodname' => 'get_calendar_event_by_id', | |
203 | 'description' => 'Get calendar event by id', | |
204 | 'classpath' => 'calendar/externallib.php', | |
205 | 'type' => 'read', | |
206 | 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries', | |
207 | 'ajax' => true, | |
208 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
209 | ), | |
aa091225 RW |
210 | 'core_calendar_submit_create_update_form' => array( |
211 | 'classname' => 'core_calendar_external', | |
212 | 'methodname' => 'submit_create_update_form', | |
213 | 'description' => 'Submit form data for event form', | |
214 | 'classpath' => 'calendar/externallib.php', | |
215 | 'type' => 'write', | |
216 | 'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries', | |
217 | 'ajax' => true, | |
218 | ), | |
088645e2 | 219 | 'core_cohort_add_cohort_members' => array( |
f23e9b6b CB |
220 | 'classname' => 'core_cohort_external', |
221 | 'methodname' => 'add_cohort_members', | |
222 | 'classpath' => 'cohort/externallib.php', | |
088645e2 | 223 | 'description' => 'Adds cohort members.', |
f23e9b6b CB |
224 | 'type' => 'write', |
225 | 'capabilities' => 'moodle/cohort:assign' | |
226 | ), | |
227 | 'core_cohort_create_cohorts' => array( | |
228 | 'classname' => 'core_cohort_external', | |
229 | 'methodname' => 'create_cohorts', | |
230 | 'classpath' => 'cohort/externallib.php', | |
231 | 'description' => 'Creates new cohorts.', | |
232 | 'type' => 'write', | |
233 | 'capabilities' => 'moodle/cohort:manage' | |
088645e2 | 234 | ), |
088645e2 | 235 | 'core_cohort_delete_cohort_members' => array( |
f23e9b6b CB |
236 | 'classname' => 'core_cohort_external', |
237 | 'methodname' => 'delete_cohort_members', | |
238 | 'classpath' => 'cohort/externallib.php', | |
088645e2 | 239 | 'description' => 'Deletes cohort members.', |
0a4f3eb2 | 240 | 'type' => 'write', |
f23e9b6b CB |
241 | 'capabilities' => 'moodle/cohort:assign' |
242 | ), | |
243 | 'core_cohort_delete_cohorts' => array( | |
244 | 'classname' => 'core_cohort_external', | |
245 | 'methodname' => 'delete_cohorts', | |
246 | 'classpath' => 'cohort/externallib.php', | |
247 | 'description' => 'Deletes all specified cohorts.', | |
0a4f3eb2 | 248 | 'type' => 'write', |
f23e9b6b | 249 | 'capabilities' => 'moodle/cohort:manage' |
088645e2 | 250 | ), |
088645e2 | 251 | 'core_cohort_get_cohort_members' => array( |
f23e9b6b CB |
252 | 'classname' => 'core_cohort_external', |
253 | 'methodname' => 'get_cohort_members', | |
254 | 'classpath' => 'cohort/externallib.php', | |
088645e2 | 255 | 'description' => 'Returns cohort members.', |
f23e9b6b CB |
256 | 'type' => 'read', |
257 | 'capabilities' => 'moodle/cohort:view' | |
e77a0f36 | 258 | ), |
a60e8ba5 DW |
259 | 'core_cohort_search_cohorts' => array( |
260 | 'classname' => 'core_cohort_external', | |
261 | 'methodname' => 'search_cohorts', | |
262 | 'classpath' => 'cohort/externallib.php', | |
263 | 'description' => 'Search for cohorts.', | |
264 | 'type' => 'read', | |
265 | 'ajax' => true, | |
266 | 'capabilities' => 'moodle/cohort:view' | |
267 | ), | |
f23e9b6b CB |
268 | 'core_cohort_get_cohorts' => array( |
269 | 'classname' => 'core_cohort_external', | |
270 | 'methodname' => 'get_cohorts', | |
271 | 'classpath' => 'cohort/externallib.php', | |
272 | 'description' => 'Returns cohort details.', | |
273 | 'type' => 'read', | |
274 | 'capabilities' => 'moodle/cohort:view' | |
d3549931 | 275 | ), |
f23e9b6b CB |
276 | 'core_cohort_update_cohorts' => array( |
277 | 'classname' => 'core_cohort_external', | |
278 | 'methodname' => 'update_cohorts', | |
279 | 'classpath' => 'cohort/externallib.php', | |
280 | 'description' => 'Updates existing cohorts.', | |
281 | 'type' => 'write', | |
282 | 'capabilities' => 'moodle/cohort:manage' | |
d3549931 | 283 | ), |
f23e9b6b CB |
284 | 'core_comment_get_comments' => array( |
285 | 'classname' => 'core_comment_external', | |
286 | 'methodname' => 'get_comments', | |
287 | 'description' => 'Returns comments.', | |
288 | 'type' => 'read', | |
ee7295ee JL |
289 | 'capabilities' => 'moodle/comment:view', |
290 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
5d1017e1 | 291 | ), |
f23e9b6b CB |
292 | 'core_completion_get_activities_completion_status' => array( |
293 | 'classname' => 'core_completion_external', | |
294 | 'methodname' => 'get_activities_completion_status', | |
295 | 'description' => 'Return the activities completion status for a user in a course.', | |
296 | 'type' => 'read', | |
ee7295ee | 297 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
9a0df45a | 298 | ), |
f23e9b6b CB |
299 | 'core_completion_get_course_completion_status' => array( |
300 | 'classname' => 'core_completion_external', | |
301 | 'methodname' => 'get_course_completion_status', | |
302 | 'description' => 'Returns course completion status.', | |
303 | 'type' => 'read', | |
ee7295ee JL |
304 | 'capabilities' => 'report/completion:view', |
305 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
5d1017e1 | 306 | ), |
f23e9b6b CB |
307 | 'core_completion_mark_course_self_completed' => array( |
308 | 'classname' => 'core_completion_external', | |
309 | 'methodname' => 'mark_course_self_completed', | |
310 | 'description' => 'Update the course completion status for the current user (if course self-completion is enabled).', | |
311 | 'type' => 'write', | |
ee7295ee | 312 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
9a0df45a | 313 | ), |
f23e9b6b CB |
314 | 'core_completion_update_activity_completion_status_manually' => array( |
315 | 'classname' => 'core_completion_external', | |
316 | 'methodname' => 'update_activity_completion_status_manually', | |
317 | 'description' => 'Update completion status for the current user in an activity, only for activities with manual tracking.', | |
318 | 'type' => 'write', | |
ee7295ee | 319 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
5d1017e1 | 320 | ), |
a39918da EEAK |
321 | 'core_completion_override_activity_completion_status' => array( |
322 | 'classname' => 'core_completion_external', | |
323 | 'methodname' => 'override_activity_completion_status', | |
324 | 'description' => 'Update completion status for a user in an activity by overriding it.', | |
325 | 'type' => 'write', | |
326 | 'capabilities' => 'moodle/course:overridecompletion', | |
327 | 'ajax' => true, | |
328 | ), | |
f23e9b6b CB |
329 | 'core_course_create_categories' => array( |
330 | 'classname' => 'core_course_external', | |
331 | 'methodname' => 'create_categories', | |
332 | 'classpath' => 'course/externallib.php', | |
333 | 'description' => 'Create course categories', | |
334 | 'type' => 'write', | |
335 | 'capabilities' => 'moodle/category:manage' | |
246f6da2 | 336 | ), |
f23e9b6b CB |
337 | 'core_course_create_courses' => array( |
338 | 'classname' => 'core_course_external', | |
339 | 'methodname' => 'create_courses', | |
340 | 'classpath' => 'course/externallib.php', | |
341 | 'description' => 'Create new courses', | |
342 | 'type' => 'write', | |
343 | 'capabilities' => 'moodle/course:create, moodle/course:visibility' | |
5d1017e1 | 344 | ), |
f23e9b6b CB |
345 | 'core_course_delete_categories' => array( |
346 | 'classname' => 'core_course_external', | |
347 | 'methodname' => 'delete_categories', | |
348 | 'classpath' => 'course/externallib.php', | |
349 | 'description' => 'Delete course categories', | |
350 | 'type' => 'write', | |
351 | 'capabilities' => 'moodle/category:manage' | |
9a0df45a | 352 | ), |
f23e9b6b CB |
353 | 'core_course_delete_courses' => array( |
354 | 'classname' => 'core_course_external', | |
355 | 'methodname' => 'delete_courses', | |
356 | 'classpath' => 'course/externallib.php', | |
357 | 'description' => 'Deletes all specified courses', | |
358 | 'type' => 'write', | |
359 | 'capabilities' => 'moodle/course:delete' | |
5d1017e1 | 360 | ), |
f23e9b6b CB |
361 | 'core_course_delete_modules' => array( |
362 | 'classname' => 'core_course_external', | |
363 | 'methodname' => 'delete_modules', | |
364 | 'classpath' => 'course/externallib.php', | |
365 | 'description' => 'Deletes all specified module instances', | |
366 | 'type' => 'write', | |
367 | 'capabilities' => 'moodle/course:manageactivities' | |
9a0df45a | 368 | ), |
f23e9b6b CB |
369 | 'core_course_duplicate_course' => array( |
370 | 'classname' => 'core_course_external', | |
371 | 'methodname' => 'duplicate_course', | |
372 | 'classpath' => 'course/externallib.php', | |
67adb4d8 | 373 | 'description' => 'Duplicate an existing course (creating a new one).', |
f23e9b6b CB |
374 | 'type' => 'write', |
375 | 'capabilities' => 'moodle/backup:backupcourse, moodle/restore:restorecourse, moodle/course:create' | |
5d1017e1 | 376 | ), |
f23e9b6b CB |
377 | 'core_course_get_categories' => array( |
378 | 'classname' => 'core_course_external', | |
379 | 'methodname' => 'get_categories', | |
380 | 'classpath' => 'course/externallib.php', | |
381 | 'description' => 'Return category details', | |
382 | 'type' => 'read', | |
331e038b JL |
383 | 'capabilities' => 'moodle/category:viewhiddencategories', |
384 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
9a0df45a | 385 | ), |
f23e9b6b CB |
386 | 'core_course_get_contents' => array( |
387 | 'classname' => 'core_course_external', | |
388 | 'methodname' => 'get_course_contents', | |
389 | 'classpath' => 'course/externallib.php', | |
390 | 'description' => 'Get course contents', | |
391 | 'type' => 'read', | |
ee7295ee JL |
392 | 'capabilities' => 'moodle/course:update, moodle/course:viewhiddencourses', |
393 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
9a0df45a | 394 | ), |
f23e9b6b CB |
395 | 'core_course_get_course_module' => array( |
396 | 'classname' => 'core_course_external', | |
397 | 'methodname' => 'get_course_module', | |
398 | 'classpath' => 'course/externallib.php', | |
399 | 'description' => 'Return information about a course module', | |
400 | 'type' => 'read', | |
ee7295ee | 401 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
5d1017e1 | 402 | ), |
f23e9b6b CB |
403 | 'core_course_get_course_module_by_instance' => array( |
404 | 'classname' => 'core_course_external', | |
405 | 'methodname' => 'get_course_module_by_instance', | |
406 | 'classpath' => 'course/externallib.php', | |
407 | 'description' => 'Return information about a given module name and instance id', | |
408 | 'type' => 'read', | |
ee7295ee | 409 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
7ce23590 | 410 | ), |
4529327a MG |
411 | 'core_course_get_module' => array( |
412 | 'classname' => 'core_course_external', | |
413 | 'methodname' => 'get_module', | |
414 | 'classpath' => 'course/externallib.php', | |
415 | 'description' => 'Returns html with one activity module on course page', | |
416 | 'type' => 'read', | |
417 | 'ajax' => true, | |
418 | ), | |
419 | 'core_course_edit_module' => array( | |
420 | 'classname' => 'core_course_external', | |
421 | 'methodname' => 'edit_module', | |
422 | 'classpath' => 'course/externallib.php', | |
423 | 'description' => 'Performs an action on course module (change visibility, duplicate, delete, etc.)', | |
424 | 'type' => 'write', | |
425 | 'ajax' => true, | |
426 | ), | |
427 | 'core_course_edit_section' => array( | |
428 | 'classname' => 'core_course_external', | |
429 | 'methodname' => 'edit_section', | |
430 | 'classpath' => 'course/externallib.php', | |
431 | 'description' => 'Performs an action on course section (change visibility, set marker, delete)', | |
432 | 'type' => 'write', | |
433 | 'ajax' => true, | |
434 | ), | |
f23e9b6b CB |
435 | 'core_course_get_courses' => array( |
436 | 'classname' => 'core_course_external', | |
437 | 'methodname' => 'get_courses', | |
438 | 'classpath' => 'course/externallib.php', | |
439 | 'description' => 'Return course details', | |
440 | 'type' => 'read', | |
441 | 'capabilities' => 'moodle/course:view, moodle/course:update, moodle/course:viewhiddencourses', | |
5041600d | 442 | 'ajax' => true, |
ee7295ee | 443 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
7ce23590 | 444 | ), |
f23e9b6b CB |
445 | 'core_course_import_course' => array( |
446 | 'classname' => 'core_course_external', | |
447 | 'methodname' => 'import_course', | |
448 | 'classpath' => 'course/externallib.php', | |
449 | 'description' => 'Import course data from a course into another course. Does not include any user data.', | |
450 | 'type' => 'write', | |
451 | 'capabilities' => 'moodle/backup:backuptargetimport, moodle/restore:restoretargetimport' | |
7ce23590 | 452 | ), |
f23e9b6b CB |
453 | 'core_course_search_courses' => array( |
454 | 'classname' => 'core_course_external', | |
455 | 'methodname' => 'search_courses', | |
456 | 'classpath' => 'course/externallib.php', | |
457 | 'description' => 'Search courses by (name, module, block, tag)', | |
458 | 'type' => 'read', | |
5041600d | 459 | 'ajax' => true, |
ee7295ee | 460 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
7ce23590 | 461 | ), |
f23e9b6b CB |
462 | 'core_course_update_categories' => array( |
463 | 'classname' => 'core_course_external', | |
464 | 'methodname' => 'update_categories', | |
465 | 'classpath' => 'course/externallib.php', | |
466 | 'description' => 'Update categories', | |
467 | 'type' => 'write', | |
468 | 'capabilities' => 'moodle/category:manage', | |
7ce23590 | 469 | ), |
f23e9b6b CB |
470 | 'core_course_update_courses' => array( |
471 | 'classname' => 'core_course_external', | |
472 | 'methodname' => 'update_courses', | |
473 | 'classpath' => 'course/externallib.php', | |
474 | 'description' => 'Update courses', | |
475 | 'type' => 'write', | |
476 | 'capabilities' => 'moodle/course:update, moodle/course:changecategory, moodle/course:changefullname, ' | |
477 | . 'moodle/course:changeshortname, moodle/course:changeidnumber, moodle/course:changesummary, moodle/course:visibility' | |
7ce23590 | 478 | ), |
f23e9b6b CB |
479 | 'core_course_view_course' => array( |
480 | 'classname' => 'core_course_external', | |
481 | 'methodname' => 'view_course', | |
482 | 'classpath' => 'course/externallib.php', | |
483 | 'description' => 'Log that the course was viewed', | |
484 | 'type' => 'write', | |
ee7295ee | 485 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
7ce23590 | 486 | ), |
7c4e686f JL |
487 | 'core_course_get_activities_overview' => array( |
488 | 'classname' => 'core_course_external', | |
489 | 'methodname' => 'get_activities_overview', | |
490 | 'classpath' => 'course/externallib.php', | |
e9dfeec9 MN |
491 | 'description' => '** DEPRECATED ** Please do not call this function any more. |
492 | Return activities overview for the given courses.', | |
7c4e686f JL |
493 | 'type' => 'read', |
494 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
495 | ), | |
c115ff6a JL |
496 | 'core_course_get_user_navigation_options' => array( |
497 | 'classname' => 'core_course_external', | |
498 | 'methodname' => 'get_user_navigation_options', | |
499 | 'classpath' => 'course/externallib.php', | |
500 | 'description' => 'Return a list of navigation options in a set of courses that are avaialable or not for the current user.', | |
501 | 'type' => 'read', | |
502 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
503 | ), | |
b9050b10 JL |
504 | 'core_course_get_user_administration_options' => array( |
505 | 'classname' => 'core_course_external', | |
506 | 'methodname' => 'get_user_administration_options', | |
507 | 'classpath' => 'course/externallib.php', | |
508 | 'description' => 'Return a list of administration options in a set of courses that are avaialable or not for the current | |
509 | user.', | |
510 | 'type' => 'read', | |
511 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
512 | ), | |
80adabef JL |
513 | 'core_course_get_courses_by_field' => array( |
514 | 'classname' => 'core_course_external', | |
515 | 'methodname' => 'get_courses_by_field', | |
516 | 'classpath' => 'course/externallib.php', | |
517 | 'description' => 'Get courses matching a specific field (id/s, shortname, idnumber, category)', | |
518 | 'type' => 'read', | |
519 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
520 | ), | |
26659f62 JL |
521 | 'core_course_check_updates' => array( |
522 | 'classname' => 'core_course_external', | |
523 | 'methodname' => 'check_updates', | |
524 | 'classpath' => 'course/externallib.php', | |
525 | 'description' => 'Check if there is updates affecting the user for the given course and contexts.', | |
526 | 'type' => 'read', | |
527 | 'ajax' => true, | |
528 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
529 | ), | |
879a8f56 JL |
530 | 'core_course_get_updates_since' => array( |
531 | 'classname' => 'core_course_external', | |
532 | 'methodname' => 'get_updates_since', | |
533 | 'classpath' => 'course/externallib.php', | |
534 | 'description' => 'Check if there are updates affecting the user for the given course since the given time stamp.', | |
535 | 'type' => 'read', | |
536 | 'ajax' => true, | |
537 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
538 | ), | |
2c1d19fd RW |
539 | 'core_course_get_enrolled_courses_by_timeline_classification' => array( |
540 | 'classname' => 'core_course_external', | |
541 | 'methodname' => 'get_enrolled_courses_by_timeline_classification', | |
542 | 'classpath' => 'course/externallib.php', | |
543 | 'description' => 'List of enrolled courses for the given timeline classification (past, inprogress, or future).', | |
544 | 'type' => 'read', | |
b9508423 JL |
545 | 'ajax' => true, |
546 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
2c1d19fd | 547 | ), |
98a52c80 VD |
548 | 'core_course_get_recent_courses' => array( |
549 | 'classname' => 'core_course_external', | |
550 | 'methodname' => 'get_recent_courses', | |
551 | 'classpath' => 'course/externallib.php', | |
552 | 'description' => 'List of courses a user has accessed most recently.', | |
553 | 'type' => 'read', | |
b9508423 JL |
554 | 'ajax' => true, |
555 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
556 | ), | |
557 | 'core_course_set_favourite_courses' => array( | |
558 | 'classname' => 'core_course_external', | |
559 | 'methodname' => 'set_favourite_courses', | |
560 | 'classpath' => 'course/externallib.php', | |
561 | 'description' => 'Add a list of courses to the list of favourite courses.', | |
562 | 'type' => 'read', | |
563 | 'ajax' => true, | |
564 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
98a52c80 | 565 | ), |
f23e9b6b CB |
566 | 'core_enrol_get_course_enrolment_methods' => array( |
567 | 'classname' => 'core_enrol_external', | |
568 | 'methodname' => 'get_course_enrolment_methods', | |
569 | 'classpath' => 'enrol/externallib.php', | |
570 | 'description' => 'Get the list of course enrolment methods', | |
571 | 'type' => 'read', | |
ee7295ee | 572 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
5d62e813 | 573 | ), |
f23e9b6b CB |
574 | 'core_enrol_get_enrolled_users' => array( |
575 | 'classname' => 'core_enrol_external', | |
576 | 'methodname' => 'get_enrolled_users', | |
577 | 'classpath' => 'enrol/externallib.php', | |
578 | 'description' => 'Get enrolled users by course id.', | |
579 | 'type' => 'read', | |
580 | 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, ' | |
ee7295ee JL |
581 | . 'moodle/site:accessallgroups', |
582 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
7107c2f0 | 583 | ), |
f23e9b6b CB |
584 | 'core_enrol_get_enrolled_users_with_capability' => array( |
585 | 'classname' => 'core_enrol_external', | |
586 | 'methodname' => 'get_enrolled_users_with_capability', | |
587 | 'classpath' => 'enrol/externallib.php', | |
588 | 'description' => 'For each course and capability specified, return a list of the users that are enrolled in the course | |
589 | and have that capability', | |
590 | 'type' => 'read', | |
c0ef63eb | 591 | ), |
a60e8ba5 DW |
592 | 'core_enrol_get_potential_users' => array( |
593 | 'classname' => 'core_enrol_external', | |
594 | 'methodname' => 'get_potential_users', | |
595 | 'classpath' => 'enrol/externallib.php', | |
596 | 'description' => 'Get the list of potential users to enrol', | |
0fa35b1a | 597 | 'ajax' => true, |
a60e8ba5 DW |
598 | 'type' => 'read', |
599 | 'capabilities' => 'moodle/course:enrolreview' | |
600 | ), | |
f23e9b6b CB |
601 | 'core_enrol_get_users_courses' => array( |
602 | 'classname' => 'core_enrol_external', | |
603 | 'methodname' => 'get_users_courses', | |
604 | 'classpath' => 'enrol/externallib.php', | |
605 | 'description' => 'Get the list of courses where a user is enrolled in', | |
606 | 'type' => 'read', | |
ee7295ee JL |
607 | 'capabilities' => 'moodle/course:viewparticipants', |
608 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
9857381d | 609 | ), |
58c20c81 JP |
610 | 'core_enrol_edit_user_enrolment' => array( |
611 | 'classname' => 'core_enrol_external', | |
612 | 'methodname' => 'edit_user_enrolment', | |
613 | 'classpath' => 'enrol/externallib.php', | |
614 | 'description' => 'External function that updates a given user enrolment', | |
615 | 'type' => 'write', | |
616 | 'ajax' => true, | |
617 | ), | |
c8351261 MG |
618 | 'core_enrol_unenrol_user_enrolment' => array( |
619 | 'classname' => 'core_enrol_external', | |
620 | 'methodname' => 'unenrol_user_enrolment', | |
621 | 'classpath' => 'enrol/externallib.php', | |
622 | 'description' => 'External function that unenrols a given user enrolment', | |
623 | 'type' => 'write', | |
624 | 'ajax' => true, | |
625 | ), | |
f23e9b6b CB |
626 | 'core_fetch_notifications' => array( |
627 | 'classname' => 'core_external', | |
628 | 'methodname' => 'fetch_notifications', | |
629 | 'classpath' => 'lib/external/externallib.php', | |
630 | 'description' => 'Return a list of notifications for the current session', | |
631 | 'type' => 'read', | |
5041600d RT |
632 | 'loginrequired' => false, |
633 | 'ajax' => true, | |
5d1017e1 | 634 | ), |
5d1017e1 | 635 | 'core_files_get_files' => array( |
f23e9b6b CB |
636 | 'classname' => 'core_files_external', |
637 | 'methodname' => 'get_files', | |
249c4f60 | 638 | 'description' => 'browse moodle files', |
f23e9b6b CB |
639 | 'type' => 'read', |
640 | 'classpath' => 'files/externallib.php', | |
ee7295ee | 641 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
5d1017e1 | 642 | ), |
5d1017e1 | 643 | 'core_files_upload' => array( |
f23e9b6b CB |
644 | 'classname' => 'core_files_external', |
645 | 'methodname' => 'upload', | |
249c4f60 DC |
646 | 'description' => 'upload a file to moodle', |
647 | 'type' => 'write', | |
648 | 'classpath' => 'files/externallib.php', | |
649 | ), | |
8b493eb0 DM |
650 | 'core_form_get_filetypes_browser_data' => array( |
651 | 'classname' => 'core_form\external', | |
652 | 'methodname' => 'get_filetypes_browser_data', | |
653 | 'classpath' => '', | |
654 | 'description' => 'Provides data for the filetypes element browser.', | |
655 | 'type' => 'read', | |
656 | 'loginrequired' => false, | |
657 | 'ajax' => true, | |
658 | ), | |
f23e9b6b CB |
659 | 'core_get_component_strings' => array( |
660 | 'classname' => 'core_external', | |
661 | 'methodname' => 'get_component_strings', | |
662 | 'classpath' => 'lib/external/externallib.php', | |
faeca20d DM |
663 | 'description' => 'Return all raw strings (with {$a->xxx}), for a specific component ' . |
664 | '- similar to core get_component_strings(), call', | |
f23e9b6b | 665 | 'type' => 'read', |
5041600d RT |
666 | 'loginrequired' => false, |
667 | 'ajax' => true, | |
ee7295ee | 668 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
3364dbb5 | 669 | ), |
f23e9b6b CB |
670 | 'core_get_fragment' => array( |
671 | 'classname' => 'core_external', | |
672 | 'methodname' => 'get_fragment', | |
673 | 'classpath' => 'lib/external/externallib.php', | |
674 | 'description' => 'Return a fragment for inclusion, such as a JavaScript page.', | |
675 | 'type' => 'read', | |
5041600d | 676 | 'ajax' => true, |
5d1017e1 | 677 | ), |
f23e9b6b CB |
678 | 'core_get_string' => array( |
679 | 'classname' => 'core_external', | |
680 | 'methodname' => 'get_string', | |
681 | 'classpath' => 'lib/external/externallib.php', | |
682 | 'description' => 'Return a translated string - similar to core get_string(), call', | |
683 | 'type' => 'read', | |
5041600d RT |
684 | 'loginrequired' => false, |
685 | 'ajax' => true, | |
be9bf94e | 686 | ), |
f23e9b6b CB |
687 | 'core_get_strings' => array( |
688 | 'classname' => 'core_external', | |
689 | 'methodname' => 'get_strings', | |
690 | 'classpath' => 'lib/external/externallib.php', | |
691 | 'description' => 'Return some translated strings - like several core get_string(), calls', | |
692 | 'type' => 'read', | |
5041600d RT |
693 | 'loginrequired' => false, |
694 | 'ajax' => true, | |
5d1017e1 | 695 | ), |
88c2941b RW |
696 | 'core_get_user_dates' => array( |
697 | 'classname' => 'core_external', | |
698 | 'methodname' => 'get_user_dates', | |
699 | 'classpath' => 'lib/external/externallib.php', | |
700 | 'description' => 'Return formatted timestamps', | |
701 | 'type' => 'read', | |
702 | 'ajax' => true, | |
703 | ), | |
f23e9b6b CB |
704 | 'core_grades_get_grades' => array( |
705 | 'classname' => 'core_grades_external', | |
706 | 'methodname' => 'get_grades', | |
aa7e371a JL |
707 | 'description' => '** DEPRECATED ** Please do not call this function any more. |
708 | Returns student course total grade and grades for activities. | |
f23e9b6b CB |
709 | This function does not return category or manual items. |
710 | This function is suitable for managers or teachers not students.', | |
711 | 'type' => 'read', | |
712 | 'capabilities' => 'moodle/grade:view, moodle/grade:viewall, moodle/grade:viewhidden' | |
e9b66095 | 713 | ), |
f23e9b6b CB |
714 | 'core_grades_update_grades' => array( |
715 | 'classname' => 'core_grades_external', | |
716 | 'methodname' => 'update_grades', | |
717 | 'description' => 'Update a grade item and associated student grades.', | |
718 | 'type' => 'write', | |
5d1017e1 | 719 | ), |
f23e9b6b CB |
720 | 'core_grading_get_definitions' => array( |
721 | 'classname' => 'core_grading_external', | |
722 | 'methodname' => 'get_definitions', | |
723 | 'description' => 'Get grading definitions', | |
724 | 'type' => 'read', | |
e9b66095 | 725 | ), |
f23e9b6b CB |
726 | 'core_grading_get_gradingform_instances' => array( |
727 | 'classname' => 'core_grading_external', | |
728 | 'methodname' => 'get_gradingform_instances', | |
729 | 'description' => 'Get grading form instances', | |
730 | 'type' => 'read', | |
f2229c68 | 731 | ), |
f23e9b6b CB |
732 | 'core_grading_save_definitions' => array( |
733 | 'classname' => 'core_grading_external', | |
734 | 'methodname' => 'save_definitions', | |
735 | 'description' => 'Save grading definitions', | |
736 | 'type' => 'write', | |
5d1017e1 | 737 | ), |
f23e9b6b CB |
738 | 'core_group_add_group_members' => array( |
739 | 'classname' => 'core_group_external', | |
740 | 'methodname' => 'add_group_members', | |
741 | 'classpath' => 'group/externallib.php', | |
742 | 'description' => 'Adds group members.', | |
743 | 'type' => 'write', | |
744 | 'capabilities' => 'moodle/course:managegroups', | |
6bb31e40 | 745 | ), |
f23e9b6b CB |
746 | 'core_group_assign_grouping' => array( |
747 | 'classname' => 'core_group_external', | |
748 | 'methodname' => 'assign_grouping', | |
749 | 'classpath' => 'group/externallib.php', | |
750 | 'description' => 'Assing groups from groupings', | |
751 | 'type' => 'write', | |
740c354f | 752 | ), |
f23e9b6b CB |
753 | 'core_group_create_groupings' => array( |
754 | 'classname' => 'core_group_external', | |
755 | 'methodname' => 'create_groupings', | |
756 | 'classpath' => 'group/externallib.php', | |
757 | 'description' => 'Creates new groupings', | |
758 | 'type' => 'write', | |
5d1017e1 | 759 | ), |
f23e9b6b CB |
760 | 'core_group_create_groups' => array( |
761 | 'classname' => 'core_group_external', | |
762 | 'methodname' => 'create_groups', | |
763 | 'classpath' => 'group/externallib.php', | |
764 | 'description' => 'Creates new groups.', | |
765 | 'type' => 'write', | |
766 | 'capabilities' => 'moodle/course:managegroups' | |
6bb31e40 | 767 | ), |
f23e9b6b CB |
768 | 'core_group_delete_group_members' => array( |
769 | 'classname' => 'core_group_external', | |
770 | 'methodname' => 'delete_group_members', | |
771 | 'classpath' => 'group/externallib.php', | |
772 | 'description' => 'Deletes group members.', | |
0a4f3eb2 | 773 | 'type' => 'write', |
f23e9b6b | 774 | 'capabilities' => 'moodle/course:managegroups' |
63a85dc7 | 775 | ), |
f23e9b6b CB |
776 | 'core_group_delete_groupings' => array( |
777 | 'classname' => 'core_group_external', | |
778 | 'methodname' => 'delete_groupings', | |
779 | 'classpath' => 'group/externallib.php', | |
780 | 'description' => 'Deletes all specified groupings.', | |
79949c1b | 781 | 'type' => 'write', |
79949c1b | 782 | ), |
f23e9b6b CB |
783 | 'core_group_delete_groups' => array( |
784 | 'classname' => 'core_group_external', | |
785 | 'methodname' => 'delete_groups', | |
786 | 'classpath' => 'group/externallib.php', | |
787 | 'description' => 'Deletes all specified groups.', | |
0a4f3eb2 | 788 | 'type' => 'write', |
f23e9b6b | 789 | 'capabilities' => 'moodle/course:managegroups' |
3dc1d76e | 790 | ), |
f23e9b6b CB |
791 | 'core_group_get_activity_allowed_groups' => array( |
792 | 'classname' => 'core_group_external', | |
793 | 'methodname' => 'get_activity_allowed_groups', | |
794 | 'classpath' => 'group/externallib.php', | |
795 | 'description' => 'Gets a list of groups that the user is allowed to access within the specified activity.', | |
796 | 'type' => 'read', | |
ee7295ee | 797 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
791723c3 | 798 | ), |
f23e9b6b CB |
799 | 'core_group_get_activity_groupmode' => array( |
800 | 'classname' => 'core_group_external', | |
801 | 'methodname' => 'get_activity_groupmode', | |
802 | 'classpath' => 'group/externallib.php', | |
803 | 'description' => 'Returns effective groupmode used in a given activity.', | |
804 | 'type' => 'read', | |
ee7295ee | 805 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
c4f7bf29 | 806 | ), |
f23e9b6b CB |
807 | 'core_group_get_course_groupings' => array( |
808 | 'classname' => 'core_group_external', | |
809 | 'methodname' => 'get_course_groupings', | |
810 | 'classpath' => 'group/externallib.php', | |
811 | 'description' => 'Returns all groupings in specified course.', | |
812 | 'type' => 'read', | |
c5158499 | 813 | ), |
f23e9b6b CB |
814 | 'core_group_get_course_groups' => array( |
815 | 'classname' => 'core_group_external', | |
816 | 'methodname' => 'get_course_groups', | |
817 | 'classpath' => 'group/externallib.php', | |
818 | 'description' => 'Returns all groups in specified course.', | |
819 | 'type' => 'read', | |
dfc609e5 | 820 | 'ajax' => true, |
f23e9b6b | 821 | 'capabilities' => 'moodle/course:managegroups' |
13bb6819 | 822 | ), |
f23e9b6b CB |
823 | 'core_group_get_course_user_groups' => array( |
824 | 'classname' => 'core_group_external', | |
825 | 'methodname' => 'get_course_user_groups', | |
826 | 'classpath' => 'group/externallib.php', | |
827 | 'description' => 'Returns all groups in specified course for the specified user.', | |
828 | 'type' => 'read', | |
ee7295ee JL |
829 | 'capabilities' => 'moodle/course:managegroups', |
830 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
3ec163dd | 831 | ), |
f23e9b6b CB |
832 | 'core_group_get_group_members' => array( |
833 | 'classname' => 'core_group_external', | |
834 | 'methodname' => 'get_group_members', | |
835 | 'classpath' => 'group/externallib.php', | |
836 | 'description' => 'Returns group members.', | |
837 | 'type' => 'read', | |
838 | 'capabilities' => 'moodle/course:managegroups' | |
479a5db1 | 839 | ), |
f23e9b6b CB |
840 | 'core_group_get_groupings' => array( |
841 | 'classname' => 'core_group_external', | |
842 | 'methodname' => 'get_groupings', | |
843 | 'classpath' => 'group/externallib.php', | |
844 | 'description' => 'Returns groupings details.', | |
845 | 'type' => 'read', | |
3ec163dd | 846 | ), |
f23e9b6b CB |
847 | 'core_group_get_groups' => array( |
848 | 'classname' => 'core_group_external', | |
849 | 'methodname' => 'get_groups', | |
850 | 'classpath' => 'group/externallib.php', | |
851 | 'description' => 'Returns group details.', | |
852 | 'type' => 'read', | |
853 | 'capabilities' => 'moodle/course:managegroups' | |
2f951d86 | 854 | ), |
f23e9b6b CB |
855 | 'core_group_unassign_grouping' => array( |
856 | 'classname' => 'core_group_external', | |
857 | 'methodname' => 'unassign_grouping', | |
858 | 'classpath' => 'group/externallib.php', | |
859 | 'description' => 'Unassing groups from groupings', | |
860 | 'type' => 'write', | |
8430d87b | 861 | ), |
f23e9b6b CB |
862 | 'core_group_update_groupings' => array( |
863 | 'classname' => 'core_group_external', | |
864 | 'methodname' => 'update_groupings', | |
865 | 'classpath' => 'group/externallib.php', | |
866 | 'description' => 'Updates existing groupings', | |
867 | 'type' => 'write', | |
5d1017e1 | 868 | ), |
474dd887 R |
869 | 'core_group_update_groups' => array( |
870 | 'classname' => 'core_group_external', | |
871 | 'methodname' => 'update_groups', | |
872 | 'classpath' => 'group/externallib.php', | |
873 | 'description' => 'Updates existing groups.', | |
874 | 'type' => 'write', | |
875 | 'capabilities' => 'moodle/course:managegroups' | |
876 | ), | |
086409f6 MN |
877 | 'core_message_mute_conversations' => array( |
878 | 'classname' => 'core_message_external', | |
879 | 'methodname' => 'mute_conversations', | |
880 | 'classpath' => 'message/externallib.php', | |
881 | 'description' => 'Mutes a list of conversations', | |
882 | 'type' => 'write', | |
883 | 'ajax' => true, | |
884 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
885 | ), | |
886 | 'core_message_unmute_conversations' => array( | |
887 | 'classname' => 'core_message_external', | |
888 | 'methodname' => 'unmute_conversations', | |
889 | 'classpath' => 'message/externallib.php', | |
890 | 'description' => 'Unmutes a list of conversations', | |
891 | 'type' => 'write', | |
892 | 'ajax' => true, | |
893 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
894 | ), | |
52284186 MN |
895 | 'core_message_block_user' => array( |
896 | 'classname' => 'core_message_external', | |
897 | 'methodname' => 'block_user', | |
898 | 'classpath' => 'message/externallib.php', | |
899 | 'description' => 'Blocks a user', | |
900 | 'type' => 'write', | |
901 | 'ajax' => true, | |
902 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
903 | ), | |
f23e9b6b CB |
904 | 'core_message_block_contacts' => array( |
905 | 'classname' => 'core_message_external', | |
906 | 'methodname' => 'block_contacts', | |
907 | 'classpath' => 'message/externallib.php', | |
0b3eadcd MN |
908 | 'description' => '** DEPRECATED ** Please do not call this function any more. |
909 | Block contacts', | |
f23e9b6b | 910 | 'type' => 'write', |
c6e97f54 | 911 | 'ajax' => true, |
ee7295ee | 912 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
a623b6b8 | 913 | ), |
d6731600 | 914 | 'core_message_create_contacts' => array( |
f23e9b6b CB |
915 | 'classname' => 'core_message_external', |
916 | 'methodname' => 'create_contacts', | |
917 | 'classpath' => 'message/externallib.php', | |
0b3eadcd MN |
918 | 'description' => '** DEPRECATED ** Please do not call this function any more. |
919 | Add contacts to the contact list', | |
f23e9b6b | 920 | 'type' => 'write', |
c6e97f54 | 921 | 'ajax' => true, |
ee7295ee | 922 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
d6731600 | 923 | ), |
52284186 MN |
924 | 'core_message_get_contact_requests' => array( |
925 | 'classname' => 'core_message_external', | |
926 | 'methodname' => 'get_contact_requests', | |
927 | 'classpath' => 'message/externallib.php', | |
928 | 'description' => 'Returns contact requests for a user', | |
929 | 'type' => 'read', | |
930 | 'ajax' => true, | |
931 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
932 | ), | |
933 | 'core_message_create_contact_request' => array( | |
934 | 'classname' => 'core_message_external', | |
935 | 'methodname' => 'create_contact_request', | |
936 | 'classpath' => 'message/externallib.php', | |
937 | 'description' => 'Creates a contact request', | |
938 | 'type' => 'write', | |
939 | 'ajax' => true, | |
940 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
941 | ), | |
942 | 'core_message_confirm_contact_request' => array( | |
943 | 'classname' => 'core_message_external', | |
944 | 'methodname' => 'confirm_contact_request', | |
945 | 'classpath' => 'message/externallib.php', | |
946 | 'description' => 'Confirms a contact request', | |
947 | 'type' => 'write', | |
948 | 'ajax' => true, | |
949 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
950 | ), | |
951 | 'core_message_decline_contact_request' => array( | |
952 | 'classname' => 'core_message_external', | |
953 | 'methodname' => 'decline_contact_request', | |
954 | 'classpath' => 'message/externallib.php', | |
955 | 'description' => 'Declines a contact request', | |
956 | 'type' => 'write', | |
957 | 'ajax' => true, | |
958 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
959 | ), | |
7d678923 MN |
960 | 'core_message_get_received_contact_requests_count' => array( |
961 | 'classname' => 'core_message_external', | |
962 | 'methodname' => 'get_received_contact_requests_count', | |
963 | 'classpath' => 'message/externallib.php', | |
964 | 'description' => 'Gets the number of received contact requests', | |
965 | 'type' => 'read', | |
966 | 'ajax' => true, | |
967 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
968 | ), | |
d6731600 | 969 | 'core_message_delete_contacts' => array( |
f23e9b6b CB |
970 | 'classname' => 'core_message_external', |
971 | 'methodname' => 'delete_contacts', | |
972 | 'classpath' => 'message/externallib.php', | |
d6731600 | 973 | 'description' => 'Remove contacts from the contact list', |
f23e9b6b | 974 | 'type' => 'write', |
c6e97f54 | 975 | 'ajax' => true, |
ee7295ee | 976 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
d6731600 | 977 | ), |
dec0cd99 MN |
978 | 'core_message_delete_conversation' => array( |
979 | 'classname' => 'core_message_external', | |
980 | 'methodname' => 'delete_conversation', | |
981 | 'classpath' => 'message/externallib.php', | |
fa024820 MN |
982 | 'description' => '** DEPRECATED ** Please do not call this function any more. |
983 | Deletes a conversation.', | |
dec0cd99 MN |
984 | 'type' => 'write', |
985 | 'capabilities' => 'moodle/site:deleteownmessage', | |
986 | 'ajax' => true, | |
53522c6e | 987 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
dec0cd99 | 988 | ), |
60b67bbc | 989 | 'core_message_delete_conversations_by_id' => array( |
26f39c88 | 990 | 'classname' => 'core_message_external', |
60b67bbc | 991 | 'methodname' => 'delete_conversations_by_id', |
26f39c88 | 992 | 'classpath' => 'message/externallib.php', |
60b67bbc | 993 | 'description' => 'Deletes a list of conversations.', |
26f39c88 MN |
994 | 'type' => 'write', |
995 | 'capabilities' => 'moodle/site:deleteownmessage', | |
996 | 'ajax' => true, | |
997 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
998 | ), | |
f23e9b6b CB |
999 | 'core_message_delete_message' => array( |
1000 | 'classname' => 'core_message_external', | |
1001 | 'methodname' => 'delete_message', | |
1002 | 'classpath' => 'message/externallib.php', | |
1003 | 'description' => 'Deletes a message.', | |
1004 | 'type' => 'write', | |
ee7295ee | 1005 | 'capabilities' => 'moodle/site:deleteownmessage', |
3090f52f | 1006 | 'ajax' => true, |
ee7295ee | 1007 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
d6731600 | 1008 | ), |
f23e9b6b CB |
1009 | 'core_message_get_blocked_users' => array( |
1010 | 'classname' => 'core_message_external', | |
1011 | 'methodname' => 'get_blocked_users', | |
1012 | 'classpath' => 'message/externallib.php', | |
1013 | 'description' => 'Retrieve a list of users blocked', | |
1014 | 'type' => 'read', | |
ee7295ee | 1015 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
d6731600 | 1016 | ), |
cd03b8d7 MN |
1017 | 'core_message_data_for_messagearea_search_messages' => array( |
1018 | 'classname' => 'core_message_external', | |
1019 | 'methodname' => 'data_for_messagearea_search_messages', | |
1020 | 'classpath' => 'message/externallib.php', | |
1021 | 'description' => 'Retrieve the template data for searching for messages', | |
1022 | 'type' => 'read', | |
1023 | 'ajax' => true, | |
53522c6e | 1024 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
cd03b8d7 | 1025 | ), |
48e8bdba | 1026 | 'core_message_data_for_messagearea_search_users' => array( |
cd03b8d7 | 1027 | 'classname' => 'core_message_external', |
48e8bdba | 1028 | 'methodname' => 'data_for_messagearea_search_users', |
cd03b8d7 | 1029 | 'classpath' => 'message/externallib.php', |
548cac7d AA |
1030 | 'description' => '** DEPRECATED ** Please do not call this function any more. |
1031 | Retrieve the template data for searching for people', | |
cd03b8d7 MN |
1032 | 'type' => 'read', |
1033 | 'ajax' => true, | |
1034 | ), | |
48e8bdba | 1035 | 'core_message_data_for_messagearea_search_users_in_course' => array( |
cd03b8d7 | 1036 | 'classname' => 'core_message_external', |
48e8bdba | 1037 | 'methodname' => 'data_for_messagearea_search_users_in_course', |
cd03b8d7 | 1038 | 'classpath' => 'message/externallib.php', |
548cac7d AA |
1039 | 'description' => '** DEPRECATED ** Please do not call this function any more. |
1040 | Retrieve the template data for searching for people in a course', | |
1041 | 'type' => 'read', | |
1042 | 'ajax' => true, | |
1043 | ), | |
1044 | 'core_message_message_search_users' => array( | |
1045 | 'classname' => 'core_message_external', | |
1046 | 'methodname' => 'message_search_users', | |
1047 | 'classpath' => 'message/externallib.php', | |
1048 | 'description' => 'Retrieve the data for searching for people', | |
cd03b8d7 MN |
1049 | 'type' => 'read', |
1050 | 'ajax' => true, | |
548cac7d | 1051 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
cd03b8d7 | 1052 | ), |
9aa012b5 MN |
1053 | 'core_message_data_for_messagearea_conversations' => array( |
1054 | 'classname' => 'core_message_external', | |
1055 | 'methodname' => 'data_for_messagearea_conversations', | |
1056 | 'classpath' => 'message/externallib.php', | |
eb35e0b1 JD |
1057 | 'description' => '** DEPRECATED ** Please do not call this function any more. |
1058 | Retrieve the template data for the conversation list', | |
9aa012b5 MN |
1059 | 'type' => 'read', |
1060 | 'ajax' => true, | |
21d9f020 | 1061 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
9aa012b5 MN |
1062 | ), |
1063 | 'core_message_data_for_messagearea_contacts' => array( | |
1064 | 'classname' => 'core_message_external', | |
1065 | 'methodname' => 'data_for_messagearea_contacts', | |
1066 | 'classpath' => 'message/externallib.php', | |
a6049a79 MN |
1067 | 'description' => '** DEPRECATED ** Please do not call this function any more. |
1068 | Retrieve the template data for the contact list', | |
9aa012b5 MN |
1069 | 'type' => 'read', |
1070 | 'ajax' => true, | |
21d9f020 | 1071 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
9aa012b5 | 1072 | ), |
3cd13828 MN |
1073 | 'core_message_data_for_messagearea_messages' => array( |
1074 | 'classname' => 'core_message_external', | |
1075 | 'methodname' => 'data_for_messagearea_messages', | |
1076 | 'classpath' => 'message/externallib.php', | |
a6049a79 MN |
1077 | 'description' => '** DEPRECATED ** Please do not call this function any more. |
1078 | Retrieve the template data for the messages', | |
3cd13828 MN |
1079 | 'type' => 'read', |
1080 | 'ajax' => true, | |
21d9f020 | 1081 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
3cd13828 | 1082 | ), |
c060cd49 MN |
1083 | 'core_message_data_for_messagearea_get_most_recent_message' => array( |
1084 | 'classname' => 'core_message_external', | |
1085 | 'methodname' => 'data_for_messagearea_get_most_recent_message', | |
1086 | 'classpath' => 'message/externallib.php', | |
a6049a79 MN |
1087 | 'description' => '** DEPRECATED ** Please do not call this function any more. |
1088 | Retrieve the template data for the most recent message', | |
c060cd49 MN |
1089 | 'type' => 'read', |
1090 | 'ajax' => true, | |
1091 | ), | |
c6e97f54 MN |
1092 | 'core_message_data_for_messagearea_get_profile' => array( |
1093 | 'classname' => 'core_message_external', | |
1094 | 'methodname' => 'data_for_messagearea_get_profile', | |
1095 | 'classpath' => 'message/externallib.php', | |
a6049a79 MN |
1096 | 'description' => '** DEPRECATED ** Please do not call this function any more. |
1097 | Retrieve the template data for the users\'s profile', | |
c6e97f54 MN |
1098 | 'type' => 'read', |
1099 | 'ajax' => true, | |
1100 | ), | |
d6731600 | 1101 | 'core_message_get_contacts' => array( |
f23e9b6b CB |
1102 | 'classname' => 'core_message_external', |
1103 | 'methodname' => 'get_contacts', | |
1104 | 'classpath' => 'message/externallib.php', | |
f8905537 MN |
1105 | 'description' => '** DEPRECATED ** Please do not call this function any more. |
1106 | Retrieve the contact list', | |
f23e9b6b | 1107 | 'type' => 'read', |
6f31927a JD |
1108 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
1109 | ), | |
c9b0f33f MN |
1110 | 'core_message_get_user_contacts' => array( |
1111 | 'classname' => 'core_message_external', | |
1112 | 'methodname' => 'get_user_contacts', | |
1113 | 'classpath' => 'message/externallib.php', | |
d6731600 | 1114 | 'description' => 'Retrieve the contact list', |
f23e9b6b | 1115 | 'type' => 'read', |
c9b0f33f | 1116 | 'ajax' => true, |
6f31927a JD |
1117 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
1118 | ), | |
1119 | 'core_message_get_conversations' => array( | |
1120 | 'classname' => 'core_message_external', | |
1121 | 'methodname' => 'get_conversations', | |
1122 | 'classpath' => 'message/externallib.php', | |
1123 | 'description' => 'Retrieve a list of conversations for a user', | |
1124 | 'type' => 'read', | |
ee7295ee | 1125 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
b3bbd4a0 | 1126 | 'ajax' => true |
d6731600 | 1127 | ), |
4e313026 RW |
1128 | 'core_message_get_conversation' => array( |
1129 | 'classname' => 'core_message_external', | |
1130 | 'methodname' => 'get_conversation', | |
1131 | 'classpath' => 'message/externallib.php', | |
1132 | 'description' => 'Retrieve a conversation for a user', | |
1133 | 'type' => 'read', | |
569c0bae RW |
1134 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
1135 | 'ajax' => true | |
1136 | ), | |
1137 | 'core_message_get_conversation_between_users' => array( | |
1138 | 'classname' => 'core_message_external', | |
1139 | 'methodname' => 'get_conversation_between_users', | |
1140 | 'classpath' => 'message/externallib.php', | |
1141 | 'description' => 'Retrieve a conversation for a user between another user', | |
1142 | 'type' => 'read', | |
4e313026 RW |
1143 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
1144 | 'ajax' => true | |
1145 | ), | |
aff9da17 | 1146 | 'core_message_get_messages' => array( |
f23e9b6b CB |
1147 | 'classname' => 'core_message_external', |
1148 | 'methodname' => 'get_messages', | |
1149 | 'classpath' => 'message/externallib.php', | |
1150 | 'description' => 'Retrieve a list of messages sent and received by a user (conversations, notifications or both)', | |
1151 | 'type' => 'read', | |
ee7295ee | 1152 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
3274d5ca RW |
1153 | 'ajax' => true, |
1154 | ), | |
28ff6ad1 JD |
1155 | 'core_message_get_conversation_counts' => array( |
1156 | 'classname' => 'core_message_external', | |
1157 | 'methodname' => 'get_conversation_counts', | |
1158 | 'classpath' => 'message/externallib.php', | |
1159 | 'description' => 'Retrieve a list of conversation counts, indexed by type.', | |
1160 | 'type' => 'read', | |
1161 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
1162 | 'ajax' => true, | |
1163 | ), | |
b402a163 JD |
1164 | 'core_message_get_unread_conversation_counts' => array( |
1165 | 'classname' => 'core_message_external', | |
1166 | 'methodname' => 'get_unread_conversation_counts', | |
1167 | 'classpath' => 'message/externallib.php', | |
1168 | 'description' => 'Retrieve a list of unread conversation counts, indexed by type.', | |
1169 | 'type' => 'read', | |
1170 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
1171 | 'ajax' => true, | |
1172 | ), | |
5584c48a MN |
1173 | 'core_message_get_conversation_members' => array( |
1174 | 'classname' => 'core_message_external', | |
1175 | 'methodname' => 'get_conversation_members', | |
1176 | 'classpath' => 'message/externallib.php', | |
1177 | 'description' => 'Retrieve a list of members in a conversation', | |
1178 | 'type' => 'read', | |
1179 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
1180 | 'ajax' => true, | |
1181 | ), | |
8350978a RW |
1182 | 'core_message_get_member_info' => array( |
1183 | 'classname' => 'core_message_external', | |
1184 | 'methodname' => 'get_member_info', | |
1185 | 'classpath' => 'message/externallib.php', | |
1186 | 'description' => 'Retrieve a user message profiles', | |
1187 | 'type' => 'read', | |
1188 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
1189 | 'ajax' => true, | |
1190 | ), | |
8c55bd6c RW |
1191 | 'core_message_get_unread_conversations_count' => array( |
1192 | 'classname' => 'core_message_external', | |
1193 | 'methodname' => 'get_unread_conversations_count', | |
1194 | 'classpath' => 'message/externallib.php', | |
1195 | 'description' => 'Retrieve the count of unread conversations for a given user', | |
1196 | 'type' => 'read', | |
1197 | 'ajax' => true, | |
53522c6e | 1198 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
8c55bd6c | 1199 | ), |
3274d5ca RW |
1200 | 'core_message_mark_all_notifications_as_read' => array( |
1201 | 'classname' => 'core_message_external', | |
1202 | 'methodname' => 'mark_all_notifications_as_read', | |
1203 | 'classpath' => 'message/externallib.php', | |
8c55bd6c RW |
1204 | 'description' => 'Mark all notifications as read for a given user', |
1205 | 'type' => 'write', | |
1206 | 'ajax' => true, | |
53522c6e | 1207 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
8c55bd6c RW |
1208 | ), |
1209 | 'core_message_mark_all_messages_as_read' => array( | |
1210 | 'classname' => 'core_message_external', | |
1211 | 'methodname' => 'mark_all_messages_as_read', | |
1212 | 'classpath' => 'message/externallib.php', | |
e4c30994 MN |
1213 | 'description' => '** DEPRECATED ** Please do not call this function any more. |
1214 | Mark all messages as read for a given user', | |
3274d5ca RW |
1215 | 'type' => 'write', |
1216 | 'ajax' => true, | |
53522c6e | 1217 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
60ab2e1b | 1218 | ), |
09ec5017 MN |
1219 | 'core_message_mark_all_conversation_messages_as_read' => array( |
1220 | 'classname' => 'core_message_external', | |
1221 | 'methodname' => 'mark_all_conversation_messages_as_read', | |
1222 | 'classpath' => 'message/externallib.php', | |
1223 | 'description' => 'Mark all conversation messages as read for a given user', | |
3274d5ca RW |
1224 | 'type' => 'write', |
1225 | 'ajax' => true, | |
53522c6e | 1226 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
60ab2e1b | 1227 | ), |
a84f89ca | 1228 | 'core_message_mark_message_read' => array( |
f23e9b6b CB |
1229 | 'classname' => 'core_message_external', |
1230 | 'methodname' => 'mark_message_read', | |
1231 | 'classpath' => 'message/externallib.php', | |
1232 | 'description' => 'Mark a single message as read, trigger message_viewed event.', | |
1233 | 'type' => 'write', | |
ee7295ee | 1234 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
0b19d048 | 1235 | 'ajax' => true, |
a84f89ca | 1236 | ), |
2b595d96 MN |
1237 | 'core_message_mark_notification_read' => array( |
1238 | 'classname' => 'core_message_external', | |
1239 | 'methodname' => 'mark_notification_read', | |
1240 | 'classpath' => 'message/externallib.php', | |
1241 | 'description' => 'Mark a single notification as read, trigger notification_viewed event.', | |
1242 | 'type' => 'write', | |
1243 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
1244 | 'ajax' => true, | |
1245 | ), | |
a0eabdd3 RW |
1246 | 'core_message_message_processor_config_form' => array( |
1247 | 'classname' => 'core_message_external', | |
1248 | 'methodname' => 'message_processor_config_form', | |
1249 | 'classpath' => 'message/externallib.php', | |
1250 | 'description' => 'Process the message processor config form', | |
1251 | 'type' => 'write', | |
1252 | 'ajax' => true, | |
53522c6e | 1253 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
a0eabdd3 | 1254 | ), |
8c125526 RW |
1255 | 'core_message_get_message_processor' => array( |
1256 | 'classname' => 'core_message_external', | |
1257 | 'methodname' => 'get_message_processor', | |
1258 | 'classpath' => 'message/externallib.php', | |
1259 | 'description' => 'Get a message processor', | |
1260 | 'type' => 'read', | |
1261 | 'ajax' => true, | |
1262 | ), | |
f23e9b6b CB |
1263 | 'core_message_search_contacts' => array( |
1264 | 'classname' => 'core_message_external', | |
1265 | 'methodname' => 'search_contacts', | |
1266 | 'classpath' => 'message/externallib.php', | |
1267 | 'description' => 'Search for contacts', | |
1268 | 'type' => 'read', | |
ee7295ee | 1269 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
419b1128 | 1270 | ), |
f23e9b6b CB |
1271 | 'core_message_send_instant_messages' => array( |
1272 | 'classname' => 'core_message_external', | |
1273 | 'methodname' => 'send_instant_messages', | |
1274 | 'classpath' => 'message/externallib.php', | |
1275 | 'description' => 'Send instant messages', | |
1276 | 'type' => 'write', | |
ee7295ee | 1277 | 'capabilities' => 'moodle/site:sendmessage', |
c060cd49 | 1278 | 'ajax' => true, |
ee7295ee | 1279 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
f23e9b6b | 1280 | ), |
2553e9db JD |
1281 | 'core_message_send_messages_to_conversation' => array( |
1282 | 'classname' => 'core_message_external', | |
1283 | 'methodname' => 'send_messages_to_conversation', | |
1284 | 'classpath' => 'message/externallib.php', | |
1285 | 'description' => 'Send messages to an existing conversation between users', | |
1286 | 'type' => 'write', | |
1287 | 'capabilities' => 'moodle/site:sendmessage', | |
1288 | 'ajax' => true, | |
1289 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
1290 | ), | |
fb04293b SA |
1291 | 'core_message_get_conversation_messages' => array( |
1292 | 'classname' => 'core_message_external', | |
1293 | 'methodname' => 'get_conversation_messages', | |
1294 | 'classpath' => 'message/externallib.php', | |
1295 | 'description' => 'Retrieve the conversation messages and relevant member information', | |
1296 | 'type' => 'read', | |
1297 | 'ajax' => true, | |
1298 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
1299 | ), | |
52284186 MN |
1300 | 'core_message_unblock_user' => array( |
1301 | 'classname' => 'core_message_external', | |
1302 | 'methodname' => 'unblock_user', | |
1303 | 'classpath' => 'message/externallib.php', | |
1304 | 'description' => 'Unblocks a user', | |
1305 | 'type' => 'write', | |
1306 | 'ajax' => true, | |
1307 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
1308 | ), | |
f23e9b6b CB |
1309 | 'core_message_unblock_contacts' => array( |
1310 | 'classname' => 'core_message_external', | |
1311 | 'methodname' => 'unblock_contacts', | |
1312 | 'classpath' => 'message/externallib.php', | |
0b3eadcd MN |
1313 | 'description' => '** DEPRECATED ** Please do not call this function any more. |
1314 | Unblock contacts', | |
f23e9b6b | 1315 | 'type' => 'write', |
c6e97f54 | 1316 | 'ajax' => true, |
ee7295ee | 1317 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
5d1017e1 | 1318 | ), |
e86f0cb4 JL |
1319 | 'core_message_get_user_notification_preferences' => array( |
1320 | 'classname' => 'core_message_external', | |
1321 | 'methodname' => 'get_user_notification_preferences', | |
1322 | 'classpath' => 'message/externallib.php', | |
1323 | 'description' => 'Get the notification preferences for a given user.', | |
1324 | 'type' => 'read', | |
1325 | 'capabilities' => 'moodle/user:editownmessageprofile', | |
1326 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
1327 | ), | |
2521afd2 JL |
1328 | 'core_message_get_user_message_preferences' => array( |
1329 | 'classname' => 'core_message_external', | |
1330 | 'methodname' => 'get_user_message_preferences', | |
1331 | 'classpath' => 'message/externallib.php', | |
1332 | 'description' => 'Get the message preferences for a given user.', | |
1333 | 'type' => 'read', | |
1334 | 'capabilities' => 'moodle/user:editownmessageprofile', | |
1335 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
08ae9a73 | 1336 | 'ajax' => true |
2521afd2 | 1337 | ), |
5b367bae JD |
1338 | 'core_message_set_favourite_conversations' => array( |
1339 | 'classname' => 'core_message_external', | |
1340 | 'methodname' => 'set_favourite_conversations', | |
1341 | 'classpath' => 'message/externallib.php', | |
1342 | 'description' => 'Mark a conversation or group of conversations as favourites/starred conversations.', | |
1343 | 'type' => 'write', | |
9e189a91 | 1344 | 'ajax' => true, |
5b367bae JD |
1345 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
1346 | ), | |
1347 | 'core_message_unset_favourite_conversations' => array( | |
1348 | 'classname' => 'core_message_external', | |
1349 | 'methodname' => 'unset_favourite_conversations', | |
1350 | 'classpath' => 'message/externallib.php', | |
1351 | 'description' => 'Unset a conversation or group of conversations as favourites/starred conversations.', | |
1352 | 'type' => 'write', | |
9e189a91 | 1353 | 'ajax' => true, |
5b367bae JD |
1354 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
1355 | ), | |
5d1017e1 | 1356 | 'core_notes_create_notes' => array( |
f23e9b6b CB |
1357 | 'classname' => 'core_notes_external', |
1358 | 'methodname' => 'create_notes', | |
1359 | 'classpath' => 'notes/externallib.php', | |
8d46dabb | 1360 | 'description' => 'Create notes', |
f23e9b6b | 1361 | 'type' => 'write', |
b5b81de3 | 1362 | 'ajax' => true, |
ee7295ee JL |
1363 | 'capabilities' => 'moodle/notes:manage', |
1364 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
8d46dabb | 1365 | ), |
34348b2b | 1366 | 'core_notes_delete_notes' => array( |
f23e9b6b CB |
1367 | 'classname' => 'core_notes_external', |
1368 | 'methodname' => 'delete_notes', | |
1369 | 'classpath' => 'notes/externallib.php', | |
34348b2b | 1370 | 'description' => 'Delete notes', |
f23e9b6b | 1371 | 'type' => 'write', |
ee7295ee JL |
1372 | 'capabilities' => 'moodle/notes:manage', |
1373 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
f23e9b6b CB |
1374 | ), |
1375 | 'core_notes_get_course_notes' => array( | |
1376 | 'classname' => 'core_notes_external', | |
1377 | 'methodname' => 'get_course_notes', | |
1378 | 'classpath' => 'notes/externallib.php', | |
1379 | 'description' => 'Returns all notes in specified course (or site), for the specified user.', | |
1380 | 'type' => 'read', | |
ee7295ee JL |
1381 | 'capabilities' => 'moodle/notes:view', |
1382 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
34348b2b | 1383 | ), |
34348b2b | 1384 | 'core_notes_get_notes' => array( |
f23e9b6b CB |
1385 | 'classname' => 'core_notes_external', |
1386 | 'methodname' => 'get_notes', | |
1387 | 'classpath' => 'notes/externallib.php', | |
34348b2b | 1388 | 'description' => 'Get notes', |
f23e9b6b CB |
1389 | 'type' => 'read', |
1390 | 'capabilities' => 'moodle/notes:view' | |
34348b2b | 1391 | ), |
34348b2b | 1392 | 'core_notes_update_notes' => array( |
f23e9b6b CB |
1393 | 'classname' => 'core_notes_external', |
1394 | 'methodname' => 'update_notes', | |
1395 | 'classpath' => 'notes/externallib.php', | |
34348b2b | 1396 | 'description' => 'Update notes', |
f23e9b6b CB |
1397 | 'type' => 'write', |
1398 | 'capabilities' => 'moodle/notes:manage' | |
34348b2b | 1399 | ), |
a80b5518 | 1400 | 'core_notes_view_notes' => array( |
f23e9b6b CB |
1401 | 'classname' => 'core_notes_external', |
1402 | 'methodname' => 'view_notes', | |
1403 | 'classpath' => 'notes/externallib.php', | |
1404 | 'description' => 'Simulates the web interface view of notes/index.php: trigger events.', | |
1405 | 'type' => 'write', | |
ee7295ee JL |
1406 | 'capabilities' => 'moodle/notes:view', |
1407 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
9028d9b5 | 1408 | ), |
f23e9b6b CB |
1409 | 'core_output_load_template' => array( |
1410 | 'classname' => 'core\output\external', | |
1411 | 'methodname' => 'load_template', | |
1412 | 'description' => 'Load a template for a renderable', | |
1413 | 'type' => 'read', | |
5041600d RT |
1414 | 'loginrequired' => false, |
1415 | 'ajax' => true, | |
0ff4ebb4 | 1416 | ), |
e0034b5d RW |
1417 | 'core_output_load_template_with_dependencies' => array( |
1418 | 'classname' => 'core\output\external', | |
1419 | 'methodname' => 'load_template_with_dependencies', | |
1420 | 'description' => 'Load a template and its dependencies for a renderable', | |
1421 | 'type' => 'read', | |
1422 | 'loginrequired' => false, | |
1423 | 'ajax' => true, | |
1424 | ), | |
e330b1c2 | 1425 | 'core_output_load_fontawesome_icon_map' => array( |
a26ce248 | 1426 | 'classname' => 'core\output\external', |
e330b1c2 | 1427 | 'methodname' => 'load_fontawesome_icon_map', |
a26ce248 DW |
1428 | 'description' => 'Load the mapping of names to icons', |
1429 | 'type' => 'read', | |
1430 | 'loginrequired' => false, | |
1431 | 'ajax' => true, | |
1432 | ), | |
f23e9b6b CB |
1433 | // Question related functions. |
1434 | 'core_question_update_flag' => array( | |
1435 | 'classname' => 'core_question_external', | |
1436 | 'methodname' => 'update_flag', | |
1437 | 'description' => 'Update the flag state of a question attempt.', | |
1438 | 'type' => 'write', | |
1439 | 'capabilities' => 'moodle/question:flag', | |
ee7295ee | 1440 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
3f0ea6d8 | 1441 | ), |
680d5c5b SL |
1442 | 'core_question_submit_tags_form' => array( |
1443 | 'classname' => 'core_question_external', | |
1444 | 'methodname' => 'submit_tags_form', | |
1445 | 'description' => 'Update the question tags.', | |
1446 | 'type' => 'write', | |
1447 | 'ajax' => true, | |
1448 | ), | |
6768729e RW |
1449 | 'core_question_get_random_question_summaries' => array( |
1450 | 'classname' => 'core_question_external', | |
1451 | 'methodname' => 'get_random_question_summaries', | |
1452 | 'description' => 'Get the random question set for a criteria', | |
1453 | 'type' => 'read', | |
1454 | 'ajax' => true, | |
1455 | ), | |
f23e9b6b CB |
1456 | 'core_rating_get_item_ratings' => array( |
1457 | 'classname' => 'core_rating_external', | |
1458 | 'methodname' => 'get_item_ratings', | |
1459 | 'description' => 'Retrieve all the ratings for an item.', | |
1460 | 'type' => 'read', | |
ee7295ee JL |
1461 | 'capabilities' => 'moodle/rating:view', |
1462 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
5d1017e1 | 1463 | ), |
afb7799a JL |
1464 | 'core_rating_add_rating' => array( |
1465 | 'classname' => 'core_rating_external', | |
1466 | 'methodname' => 'add_rating', | |
1467 | 'description' => 'Rates an item.', | |
1468 | 'type' => 'write', | |
1469 | 'capabilities' => 'moodle/rating:rate', | |
1470 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
1471 | ), | |
f23e9b6b CB |
1472 | 'core_role_assign_roles' => array( |
1473 | 'classname' => 'core_role_external', | |
1474 | 'methodname' => 'assign_roles', | |
1475 | 'classpath' => 'enrol/externallib.php', | |
1476 | 'description' => 'Manual role assignments.', | |
1477 | 'type' => 'write', | |
1478 | 'capabilities' => 'moodle/role:assign' | |
0bf486a6 | 1479 | ), |
f23e9b6b CB |
1480 | 'core_role_unassign_roles' => array( |
1481 | 'classname' => 'core_role_external', | |
1482 | 'methodname' => 'unassign_roles', | |
1483 | 'classpath' => 'enrol/externallib.php', | |
1484 | 'description' => 'Manual role unassignments.', | |
1485 | 'type' => 'write', | |
1486 | 'capabilities' => 'moodle/role:assign' | |
11e76602 | 1487 | ), |
a6cacdd2 | 1488 | 'core_search_get_relevant_users' => array( |
1489 | 'classname' => '\core_search\external', | |
1490 | 'methodname' => 'get_relevant_users', | |
1491 | 'description' => 'Gets relevant users for a search request.', | |
1492 | 'type' => 'read', | |
1493 | 'ajax' => true | |
1494 | ), | |
f23e9b6b CB |
1495 | 'core_tag_get_tagindex' => array( |
1496 | 'classname' => 'core_tag_external', | |
1497 | 'methodname' => 'get_tagindex', | |
1498 | 'description' => 'Gets tag index page for one tag and one tag area', | |
1499 | 'type' => 'read', | |
5041600d | 1500 | 'ajax' => true, |
52fcc0b8 | 1501 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
11e76602 | 1502 | ), |
f23e9b6b CB |
1503 | 'core_tag_get_tags' => array( |
1504 | 'classname' => 'core_tag_external', | |
1505 | 'methodname' => 'get_tags', | |
1506 | 'description' => 'Gets tags by their ids', | |
1507 | 'type' => 'read', | |
5041600d | 1508 | 'ajax' => true, |
11e76602 | 1509 | ), |
f23e9b6b CB |
1510 | 'core_tag_update_tags' => array( |
1511 | 'classname' => 'core_tag_external', | |
1512 | 'methodname' => 'update_tags', | |
1513 | 'description' => 'Updates tags', | |
1514 | 'type' => 'write', | |
5041600d | 1515 | 'ajax' => true, |
cc73ea07 | 1516 | ), |
f1218899 JL |
1517 | 'core_tag_get_tagindex_per_area' => array( |
1518 | 'classname' => 'core_tag_external', | |
1519 | 'methodname' => 'get_tagindex_per_area', | |
1520 | 'description' => 'Gets tag index page per different areas.', | |
1521 | 'type' => 'read', | |
1522 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
1523 | ), | |
07a48837 JL |
1524 | 'core_tag_get_tag_areas' => array( |
1525 | 'classname' => 'core_tag_external', | |
1526 | 'methodname' => 'get_tag_areas', | |
1527 | 'description' => 'Retrieves existing tag areas.', | |
1528 | 'type' => 'read', | |
1529 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
1530 | ), | |
cdc5f978 | 1531 | 'core_update_inplace_editable' => array( |
f23e9b6b CB |
1532 | 'classname' => 'core_external', |
1533 | 'methodname' => 'update_inplace_editable', | |
1534 | 'classpath' => 'lib/external/externallib.php', | |
cdc5f978 | 1535 | 'description' => 'Generic service to update title', |
f23e9b6b | 1536 | 'type' => 'write', |
5041600d RT |
1537 | 'loginrequired' => true, |
1538 | 'ajax' => true, | |
c66dc3df | 1539 | ), |
f23e9b6b CB |
1540 | 'core_user_add_user_device' => array( |
1541 | 'classname' => 'core_user_external', | |
1542 | 'methodname' => 'add_user_device', | |
1543 | 'classpath' => 'user/externallib.php', | |
1544 | 'description' => 'Store mobile user devices information for PUSH Notifications.', | |
1545 | 'type' => 'write', | |
ee7295ee | 1546 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
9bdcf579 | 1547 | ), |
f23e9b6b CB |
1548 | 'core_user_add_user_private_files' => array( |
1549 | 'classname' => 'core_user_external', | |
1550 | 'methodname' => 'add_user_private_files', | |
1551 | 'classpath' => 'user/externallib.php', | |
1552 | 'description' => 'Copy files from a draft area to users private files area.', | |
1553 | 'type' => 'write', | |
ee7295ee JL |
1554 | 'capabilities' => 'moodle/user:manageownfiles', |
1555 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
25c49a85 | 1556 | ), |
f23e9b6b CB |
1557 | 'core_user_create_users' => array( |
1558 | 'classname' => 'core_user_external', | |
1559 | 'methodname' => 'create_users', | |
1560 | 'classpath' => 'user/externallib.php', | |
1561 | 'description' => 'Create users.', | |
1562 | 'type' => 'write', | |
1563 | 'capabilities' => 'moodle/user:create' | |
23b398fc | 1564 | ), |
f23e9b6b CB |
1565 | 'core_user_delete_users' => array( |
1566 | 'classname' => 'core_user_external', | |
1567 | 'methodname' => 'delete_users', | |
1568 | 'classpath' => 'user/externallib.php', | |
1569 | 'description' => 'Delete users.', | |
1570 | 'type' => 'write', | |
1571 | 'capabilities' => 'moodle/user:delete' | |
6c785afa | 1572 | ), |
f23e9b6b CB |
1573 | 'core_user_get_course_user_profiles' => array( |
1574 | 'classname' => 'core_user_external', | |
1575 | 'methodname' => 'get_course_user_profiles', | |
1576 | 'classpath' => 'user/externallib.php', | |
1577 | 'description' => 'Get course user profiles (each of the profils matching a course id and a user id),.', | |
1578 | 'type' => 'read', | |
1579 | 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, ' | |
ee7295ee JL |
1580 | . 'moodle/site:accessallgroups', |
1581 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
6c785afa | 1582 | ), |
f23e9b6b CB |
1583 | 'core_user_get_users' => array( |
1584 | 'classname' => 'core_user_external', | |
1585 | 'methodname' => 'get_users', | |
1586 | 'classpath' => 'user/externallib.php', | |
1587 | 'description' => 'search for users matching the parameters', | |
1588 | 'type' => 'read', | |
1589 | 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update' | |
db5b6971 | 1590 | ), |
f23e9b6b CB |
1591 | 'core_user_get_users_by_field' => array( |
1592 | 'classname' => 'core_user_external', | |
1593 | 'methodname' => 'get_users_by_field', | |
1594 | 'classpath' => 'user/externallib.php', | |
1595 | 'description' => 'Retrieve users\' information for a specified unique field - If you want to do a user search, use ' | |
1596 | . 'core_user_get_users()', | |
1597 | 'type' => 'read', | |
ee7295ee | 1598 | 'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update', |
5041600d | 1599 | 'ajax' => true, |
ee7295ee | 1600 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
8e355853 | 1601 | ), |
f23e9b6b CB |
1602 | 'core_user_remove_user_device' => array( |
1603 | 'classname' => 'core_user_external', | |
1604 | 'methodname' => 'remove_user_device', | |
1605 | 'classpath' => 'user/externallib.php', | |
1606 | 'description' => 'Remove a user device from the Moodle database.', | |
1607 | 'type' => 'write', | |
ee7295ee | 1608 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
ef4c23cc | 1609 | ), |
c598f278 | 1610 | 'core_user_update_users' => array( |
a0eabdd3 | 1611 | 'classname' => 'core_user_external', |
c598f278 | 1612 | 'methodname' => 'update_users', |
a0eabdd3 | 1613 | 'classpath' => 'user/externallib.php', |
c598f278 | 1614 | 'description' => 'Update users.', |
a0eabdd3 RW |
1615 | 'type' => 'write', |
1616 | 'capabilities' => 'moodle/user:update', | |
1617 | 'ajax' => true, | |
1618 | ), | |
c598f278 | 1619 | 'core_user_update_user_preferences' => array( |
f23e9b6b | 1620 | 'classname' => 'core_user_external', |
c598f278 | 1621 | 'methodname' => 'update_user_preferences', |
f23e9b6b | 1622 | 'classpath' => 'user/externallib.php', |
c598f278 | 1623 | 'description' => 'Update a user\'s preferences', |
f23e9b6b | 1624 | 'type' => 'write', |
c598f278 | 1625 | 'capabilities' => 'moodle/user:editownmessageprofile, moodle/user:editmessageprofile', |
a0eabdd3 | 1626 | 'ajax' => true, |
6d2f938c | 1627 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
c026a28d | 1628 | ), |
f23e9b6b CB |
1629 | 'core_user_view_user_list' => array( |
1630 | 'classname' => 'core_user_external', | |
1631 | 'methodname' => 'view_user_list', | |
1632 | 'classpath' => 'user/externallib.php', | |
1633 | 'description' => 'Simulates the web-interface view of user/index.php (triggering events),.', | |
1634 | 'type' => 'write', | |
1635 | 'capabilities' => 'moodle/course:viewparticipants', | |
ee7295ee | 1636 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
7361b968 | 1637 | ), |
f23e9b6b CB |
1638 | 'core_user_view_user_profile' => array( |
1639 | 'classname' => 'core_user_external', | |
1640 | 'methodname' => 'view_user_profile', | |
1641 | 'classpath' => 'user/externallib.php', | |
1642 | 'description' => 'Simulates the web-interface view of user/view.php and user/profile.php (triggering events),.', | |
1643 | 'type' => 'write', | |
1644 | 'capabilities' => 'moodle/user:viewdetails', | |
ee7295ee | 1645 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
f4fb827e | 1646 | ), |
45fec983 JL |
1647 | 'core_user_get_user_preferences' => array( |
1648 | 'classname' => 'core_user_external', | |
1649 | 'methodname' => 'get_user_preferences', | |
1650 | 'classpath' => 'user/externallib.php', | |
1651 | 'description' => 'Return user preferences.', | |
1652 | 'type' => 'read', | |
5005d8cf | 1653 | 'ajax' => true, |
45fec983 JL |
1654 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
1655 | ), | |
d44e2e42 JL |
1656 | 'core_user_update_picture' => array( |
1657 | 'classname' => 'core_user_external', | |
1658 | 'methodname' => 'update_picture', | |
1659 | 'classpath' => 'user/externallib.php', | |
1660 | 'description' => 'Update or delete the user picture in the site', | |
1661 | 'type' => 'write', | |
1662 | 'capabilities' => 'moodle/user:editownprofile, moodle/user:editprofile', | |
1663 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
1664 | ), | |
649777fb JL |
1665 | 'core_user_set_user_preferences' => array( |
1666 | 'classname' => 'core_user_external', | |
1667 | 'methodname' => 'set_user_preferences', | |
1668 | 'classpath' => 'user/externallib.php', | |
1669 | 'description' => 'Set user preferences.', | |
1670 | 'type' => 'write', | |
1671 | 'capabilities' => 'moodle/site:config', | |
2979ca11 JL |
1672 | 'ajax' => true, |
1673 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
649777fb | 1674 | ), |
3e8145a3 JL |
1675 | 'core_user_agree_site_policy' => array( |
1676 | 'classname' => 'core_user_external', | |
1677 | 'methodname' => 'agree_site_policy', | |
1678 | 'classpath' => 'user/externallib.php', | |
1679 | 'description' => 'Agree the site policy for the current user.', | |
1680 | 'type' => 'write', | |
1681 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
1682 | ), | |
f74ac6e7 JL |
1683 | 'core_user_get_private_files_info' => array( |
1684 | 'classname' => 'core_user_external', | |
1685 | 'methodname' => 'get_private_files_info', | |
1686 | 'classpath' => 'user/externallib.php', | |
1687 | 'description' => 'Returns general information about files in the user private files area.', | |
1688 | 'type' => 'read', | |
1689 | 'capabilities' => 'moodle/user:manageownfiles', | |
1690 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
1691 | ), | |
649777fb | 1692 | |
81de839f FM |
1693 | // Competencies functions. |
1694 | 'core_competency_create_competency_framework' => array( | |
1695 | 'classname' => 'core_competency\external', | |
1696 | 'methodname' => 'create_competency_framework', | |
1697 | 'classpath' => '', | |
1698 | 'description' => 'Creates new competency frameworks.', | |
1699 | 'type' => 'write', | |
1700 | 'capabilities' => 'moodle/competency:competencymanage', | |
1701 | 'ajax' => true, | |
1702 | ), | |
1703 | 'core_competency_read_competency_framework' => array( | |
1704 | 'classname' => 'core_competency\external', | |
1705 | 'methodname' => 'read_competency_framework', | |
1706 | 'classpath' => '', | |
1707 | 'description' => 'Load a summary of a competency framework.', | |
1708 | 'type' => 'read', | |
1709 | 'capabilities' => 'moodle/competency:competencyview', | |
1710 | 'ajax' => true, | |
1711 | ), | |
1712 | 'core_competency_duplicate_competency_framework' => array( | |
1713 | 'classname' => 'core_competency\external', | |
1714 | 'methodname' => 'duplicate_competency_framework', | |
1715 | 'classpath' => '', | |
1716 | 'description' => 'Duplicate a competency framework.', | |
1717 | 'type' => 'write', | |
1718 | 'capabilities' => 'moodle/competency:competencymanage', | |
1719 | 'ajax' => true, | |
1720 | ), | |
1721 | 'core_competency_delete_competency_framework' => array( | |
1722 | 'classname' => 'core_competency\external', | |
1723 | 'methodname' => 'delete_competency_framework', | |
1724 | 'classpath' => '', | |
1725 | 'description' => 'Delete a competency framework.', | |
1726 | 'type' => 'write', | |
1727 | 'capabilities' => 'moodle/competency:competencymanage', | |
1728 | 'ajax' => true, | |
1729 | ), | |
1730 | 'core_competency_update_competency_framework' => array( | |
1731 | 'classname' => 'core_competency\external', | |
1732 | 'methodname' => 'update_competency_framework', | |
1733 | 'classpath' => '', | |
1734 | 'description' => 'Update a competency framework.', | |
1735 | 'type' => 'write', | |
1736 | 'capabilities' => 'moodle/competency:competencymanage', | |
1737 | 'ajax' => true, | |
1738 | ), | |
1739 | 'core_competency_list_competency_frameworks' => array( | |
1740 | 'classname' => 'core_competency\external', | |
1741 | 'methodname' => 'list_competency_frameworks', | |
1742 | 'classpath' => '', | |
1743 | 'description' => 'Load a list of a competency frameworks.', | |
1744 | 'type' => 'read', | |
1745 | 'capabilities' => 'moodle/competency:competencyview', | |
1746 | 'ajax' => true, | |
1747 | ), | |
1748 | 'core_competency_count_competency_frameworks' => array( | |
1749 | 'classname' => 'core_competency\external', | |
1750 | 'methodname' => 'count_competency_frameworks', | |
1751 | 'classpath' => '', | |
1752 | 'description' => 'Count a list of a competency frameworks.', | |
1753 | 'type' => 'read', | |
1754 | 'capabilities' => 'moodle/competency:competencyview', | |
1755 | 'ajax' => true, | |
1756 | ), | |
1757 | 'core_competency_competency_framework_viewed' => array( | |
1758 | 'classname' => 'core_competency\external', | |
1759 | 'methodname' => 'competency_framework_viewed', | |
1760 | 'classpath' => '', | |
1761 | 'description' => 'Log event competency framework viewed', | |
1762 | 'type' => 'read', | |
1763 | 'capabilities' => 'moodle/competency:competencyview', | |
1764 | 'ajax' => true, | |
1765 | ), | |
1766 | 'core_competency_create_competency' => array( | |
1767 | 'classname' => 'core_competency\external', | |
1768 | 'methodname' => 'create_competency', | |
1769 | 'classpath' => '', | |
1770 | 'description' => 'Creates new competencies.', | |
1771 | 'type' => 'write', | |
1772 | 'capabilities' => 'moodle/competency:competencymanage', | |
1773 | 'ajax' => true, | |
1774 | ), | |
1775 | 'core_competency_read_competency' => array( | |
1776 | 'classname' => 'core_competency\external', | |
1777 | 'methodname' => 'read_competency', | |
1778 | 'classpath' => '', | |
1779 | 'description' => 'Load a summary of a competency.', | |
1780 | 'type' => 'read', | |
1781 | 'capabilities' => 'moodle/competency:competencyview', | |
1782 | 'ajax' => true, | |
1783 | ), | |
1784 | 'core_competency_competency_viewed' => array( | |
1785 | 'classname' => 'core_competency\external', | |
1786 | 'methodname' => 'competency_viewed', | |
1787 | 'classpath' => '', | |
1788 | 'description' => 'Log event competency viewed', | |
1789 | 'type' => 'read', | |
1790 | 'capabilities' => 'moodle/competency:competencyview', | |
1791 | 'ajax' => true, | |
3123c2cf | 1792 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
81de839f FM |
1793 | ), |
1794 | 'core_competency_delete_competency' => array( | |
1795 | 'classname' => 'core_competency\external', | |
1796 | 'methodname' => 'delete_competency', | |
1797 | 'classpath' => '', | |
1798 | 'description' => 'Delete a competency.', | |
1799 | 'type' => 'write', | |
1800 | 'capabilities' => 'moodle/competency:competencymanage', | |
1801 | 'ajax' => true, | |
1802 | ), | |
1803 | 'core_competency_update_competency' => array( | |
1804 | 'classname' => 'core_competency\external', | |
1805 | 'methodname' => 'update_competency', | |
1806 | 'classpath' => '', | |
1807 | 'description' => 'Update a competency.', | |
1808 | 'type' => 'write', | |
1809 | 'capabilities' => 'moodle/competency:competencymanage', | |
1810 | 'ajax' => true, | |
1811 | ), | |
1812 | 'core_competency_list_competencies' => array( | |
1813 | 'classname' => 'core_competency\external', | |
1814 | 'methodname' => 'list_competencies', | |
1815 | 'classpath' => '', | |
1816 | 'description' => 'Load a list of a competencies.', | |
1817 | 'type' => 'read', | |
1818 | 'capabilities' => 'moodle/competency:competencyview', | |
1819 | 'ajax' => true, | |
1820 | ), | |
1821 | 'core_competency_list_competencies_in_template' => array( | |
1822 | 'classname' => 'core_competency\external', | |
1823 | 'methodname' => 'list_competencies_in_template', | |
1824 | 'classpath' => '', | |
1825 | 'description' => 'Load a list of a competencies for a given template.', | |
1826 | 'type' => 'read', | |
1827 | 'capabilities' => 'moodle/competency:competencyview', | |
1828 | 'ajax' => true, | |
1829 | ), | |
1830 | 'core_competency_count_competencies' => array( | |
1831 | 'classname' => 'core_competency\external', | |
1832 | 'methodname' => 'count_competencies', | |
1833 | 'classpath' => '', | |
1834 | 'description' => 'Count a list of a competencies.', | |
1835 | 'type' => 'read', | |
1836 | 'capabilities' => 'moodle/competency:competencyview', | |
1837 | 'ajax' => true, | |
1838 | ), | |
1839 | 'core_competency_count_competencies_in_template' => array( | |
1840 | 'classname' => 'core_competency\external', | |
1841 | 'methodname' => 'count_competencies_in_template', | |
1842 | 'classpath' => '', | |
1843 | 'description' => 'Count a list of a competencies for a given template.', | |
1844 | 'type' => 'read', | |
1845 | 'capabilities' => 'moodle/competency:competencyview', | |
1846 | 'ajax' => true, | |
1847 | ), | |
1848 | 'core_competency_search_competencies' => array( | |
1849 | 'classname' => 'core_competency\external', | |
1850 | 'methodname' => 'search_competencies', | |
1851 | 'classpath' => '', | |
1852 | 'description' => 'Search a list of a competencies.', | |
1853 | 'type' => 'read', | |
1854 | 'capabilities' => 'moodle/competency:competencyview', | |
1855 | 'ajax' => true, | |
1856 | ), | |
1857 | 'core_competency_set_parent_competency' => array( | |
1858 | 'classname' => 'core_competency\external', | |
1859 | 'methodname' => 'set_parent_competency', | |
1860 | 'classpath' => '', | |
1861 | 'description' => 'Set a new parent for a competency.', | |
1862 | 'type' => 'write', | |
1863 | 'capabilities' => 'moodle/competency:competencymanage', | |
1864 | 'ajax' => true, | |
1865 | ), | |
1866 | 'core_competency_move_up_competency' => array( | |
1867 | 'classname' => 'core_competency\external', | |
1868 | 'methodname' => 'move_up_competency', | |
1869 | 'classpath' => '', | |
1870 | 'description' => 'Re-order a competency.', | |
1871 | 'type' => 'write', | |
1872 | 'capabilities' => 'moodle/competency:competencymanage', | |
1873 | 'ajax' => true, | |
1874 | ), | |
1875 | 'core_competency_move_down_competency' => array( | |
1876 | 'classname' => 'core_competency\external', | |
1877 | 'methodname' => 'move_down_competency', | |
1878 | 'classpath' => '', | |
1879 | 'description' => 'Re-order a competency.', | |
1880 | 'type' => 'write', | |
1881 | 'capabilities' => 'moodle/competency:competencymanage', | |
1882 | 'ajax' => true, | |
1883 | ), | |
1884 | 'core_competency_list_course_competencies' => array( | |
1885 | 'classname' => 'core_competency\external', | |
1886 | 'methodname' => 'list_course_competencies', | |
1887 | 'classpath' => '', | |
1888 | 'description' => 'List the competencies in a course', | |
1889 | 'type' => 'read', | |
1890 | 'capabilities' => 'moodle/competency:coursecompetencyview', | |
1891 | 'ajax' => true, | |
3123c2cf | 1892 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
81de839f FM |
1893 | ), |
1894 | 'core_competency_count_competencies_in_course' => array( | |
1895 | 'classname' => 'core_competency\external', | |
1896 | 'methodname' => 'count_competencies_in_course', | |
1897 | 'classpath' => '', | |
1898 | 'description' => 'List the competencies in a course', | |
1899 | 'type' => 'read', | |
1900 | 'capabilities' => 'moodle/competency:coursecompetencyview', | |
1901 | 'ajax' => true, | |
1902 | ), | |
1903 | 'core_competency_count_courses_using_competency' => array( | |
1904 | 'classname' => 'core_competency\external', | |
1905 | 'methodname' => 'count_courses_using_competency', | |
1906 | 'classpath' => '', | |
1907 | 'description' => 'List the courses using a competency', | |
1908 | 'type' => 'read', | |
1909 | 'capabilities' => 'moodle/competency:coursecompetencyview', | |
1910 | 'ajax' => true, | |
1911 | ), | |
1912 | 'core_competency_add_competency_to_course' => array( | |
1913 | 'classname' => 'core_competency\external', | |
1914 | 'methodname' => 'add_competency_to_course', | |
1915 | 'classpath' => '', | |
1916 | 'description' => 'Add the competency to a course', | |
1917 | 'type' => 'write', | |
1918 | 'capabilities' => 'moodle/competency:coursecompetencymanage', | |
1919 | 'ajax' => true, | |
1920 | ), | |
1921 | 'core_competency_add_competency_to_template' => array( | |
1922 | 'classname' => 'core_competency\external', | |
1923 | 'methodname' => 'add_competency_to_template', | |
1924 | 'classpath' => '', | |
1925 | 'description' => 'Add the competency to a template', | |
1926 | 'type' => 'write', | |
1927 | 'capabilities' => 'moodle/competency:templatemanage', | |
1928 | 'ajax' => true, | |
1929 | ), | |
1930 | 'core_competency_remove_competency_from_course' => array( | |
1931 | 'classname' => 'core_competency\external', | |
1932 | 'methodname' => 'remove_competency_from_course', | |
1933 | 'classpath' => '', | |
1934 | 'description' => 'Remove a competency from a course', | |
1935 | 'type' => 'write', | |
1936 | 'capabilities' => 'moodle/competency:coursecompetencymanage', | |
1937 | 'ajax' => true, | |
1938 | ), | |
1939 | 'core_competency_set_course_competency_ruleoutcome' => array( | |
1940 | 'classname' => 'core_competency\external', | |
1941 | 'methodname' => 'set_course_competency_ruleoutcome', | |
1942 | 'classpath' => '', | |
1943 | 'description' => 'Modify the ruleoutcome value for course competency', | |
1944 | 'type' => 'write', | |
1945 | 'capabilities' => 'moodle/competency:coursecompetencymanage', | |
1946 | 'ajax' => true, | |
1947 | ), | |
1948 | 'core_competency_remove_competency_from_template' => array( | |
1949 | 'classname' => 'core_competency\external', | |
1950 | 'methodname' => 'remove_competency_from_template', | |
1951 | 'classpath' => '', | |
1952 | 'description' => 'Remove a competency from a template', | |
1953 | 'type' => 'write', | |
1954 | 'capabilities' => 'moodle/competency:templatemanage', | |
1955 | 'ajax' => true, | |
1956 | ), | |
1957 | 'core_competency_reorder_course_competency' => array( | |
1958 | 'classname' => 'core_competency\external', | |
1959 | 'methodname' => 'reorder_course_competency', | |
1960 | 'classpath' => '', | |
1961 | 'description' => 'Move a course competency to a new relative sort order.', | |
1962 | 'type' => 'write', | |
1963 | 'capabilities' => 'moodle/competency:coursecompetencymanage', | |
1964 | 'ajax' => true, | |
1965 | ), | |
1966 | 'core_competency_reorder_template_competency' => array( | |
1967 | 'classname' => 'core_competency\external', | |
1968 | 'methodname' => 'reorder_template_competency', | |
1969 | 'classpath' => '', | |
1970 | 'description' => 'Move a template competency to a new relative sort order.', | |
1971 | 'type' => 'write', | |
1972 | 'capabilities' => 'moodle/competency:templatemanage', | |
1973 | 'ajax' => true, | |
1974 | ), | |
1975 | 'core_competency_create_template' => array( | |
1976 | 'classname' => 'core_competency\external', | |
1977 | 'methodname' => 'create_template', | |
1978 | 'classpath' => '', | |
1979 | 'description' => 'Creates new learning plan templates.', | |
1980 | 'type' => 'write', | |
1981 | 'capabilities' => 'moodle/competency:templatemanage', | |
1982 | 'ajax' => true, | |
1983 | ), | |
1984 | 'core_competency_duplicate_template' => array( | |
1985 | 'classname' => 'core_competency\external', | |
1986 | 'methodname' => 'duplicate_template', | |
1987 | 'classpath' => '', | |
1988 | 'description' => 'Duplicate learning plan template.', | |
1989 | 'type' => 'write', | |
1990 | 'capabilities' => 'moodle/competency:templatemanage', | |
1991 | 'ajax' => true, | |
1992 | ), | |
1993 | 'core_competency_read_template' => array( | |
1994 | 'classname' => 'core_competency\external', | |
1995 | 'methodname' => 'read_template', | |
1996 | 'classpath' => '', | |
1997 | 'description' => 'Load a summary of a learning plan template.', | |
1998 | 'type' => 'read', | |
1999 | 'capabilities' => 'moodle/competency:templateview', | |
2000 | 'ajax' => true, | |
2001 | ), | |
2002 | 'core_competency_delete_template' => array( | |
2003 | 'classname' => 'core_competency\external', | |
2004 | 'methodname' => 'delete_template', | |
2005 | 'classpath' => '', | |
2006 | 'description' => 'Delete a learning plan template.', | |
2007 | 'type' => 'write', | |
2008 | 'capabilities' => 'moodle/competency:templatemanage', | |
2009 | 'ajax' => true, | |
2010 | ), | |
2011 | 'core_competency_update_template' => array( | |
2012 | 'classname' => 'core_competency\external', | |
2013 | 'methodname' => 'update_template', | |
2014 | 'classpath' => '', | |
2015 | 'description' => 'Update a learning plan template.', | |
2016 | 'type' => 'write', | |
2017 | 'capabilities' => 'moodle/competency:templatemanage', | |
2018 | 'ajax' => true, | |
2019 | ), | |
2020 | 'core_competency_list_templates' => array( | |
2021 | 'classname' => 'core_competency\external', | |
2022 | 'methodname' => 'list_templates', | |
2023 | 'classpath' => '', | |
2024 | 'description' => 'Load a list of a learning plan templates.', | |
2025 | 'type' => 'read', | |
2026 | 'capabilities' => 'moodle/competency:templateview', | |
2027 | 'ajax' => true, | |
2028 | ), | |
2029 | 'core_competency_list_templates_using_competency' => array( | |
2030 | 'classname' => 'core_competency\external', | |
2031 | 'methodname' => 'list_templates_using_competency', | |
2032 | 'classpath' => '', | |
2033 | 'description' => 'Load a list of a learning plan templates for a given competency.', | |
2034 | 'type' => 'read', | |
2035 | 'capabilities' => 'moodle/competency:templateview', | |
2036 | 'ajax' => true, | |
2037 | ), | |
2038 | 'core_competency_count_templates' => array( | |
2039 | 'classname' => 'core_competency\external', | |
2040 | 'methodname' => 'count_templates', | |
2041 | 'classpath' => '', | |
2042 | 'description' => 'Count a list of a learning plan templates.', | |
2043 | 'type' => 'read', | |
2044 | 'capabilities' => 'moodle/competency:templateview', | |
2045 | 'ajax' => true, | |
2046 | ), | |
2047 | 'core_competency_count_templates_using_competency' => array( | |
2048 | 'classname' => 'core_competency\external', | |
2049 | 'methodname' => 'count_templates_using_competency', | |
2050 | 'classpath' => '', | |
2051 | 'description' => 'Count a list of a learning plan templates for a given competency.', | |
2052 | 'type' => 'read', | |
2053 | 'capabilities' => 'moodle/competency:templateview', | |
2054 | 'ajax' => true, | |
2055 | ), | |
2056 | 'core_competency_create_plan' => array( | |
2057 | 'classname' => 'core_competency\external', | |
2058 | 'methodname' => 'create_plan', | |
2059 | 'classpath' => '', | |
2060 | 'description' => 'Creates a learning plan.', | |
2061 | 'type' => 'write', | |
2062 | 'capabilities' => 'moodle/competency:planmanage', | |
2063 | 'ajax' => true, | |
2064 | ), | |
2065 | 'core_competency_update_plan' => array( | |
2066 | 'classname' => 'core_competency\external', | |
2067 | 'methodname' => 'update_plan', | |
2068 | 'classpath' => '', | |
2069 | 'description' => 'Updates a learning plan.', | |
2070 | 'type' => 'write', | |
2071 | 'capabilities' => 'moodle/competency:planmanage', | |
2072 | 'ajax' => true, | |
2073 | ), | |
2074 | 'core_competency_complete_plan' => array( | |
2075 | 'classname' => 'core_competency\external', | |
2076 | 'methodname' => 'complete_plan', | |
2077 | 'classpath' => '', | |
2078 | 'description' => 'Complete learning plan.', | |
2079 | 'type' => 'write', | |
2080 | 'capabilities' => 'moodle/competency:planmanage', | |
2081 | 'ajax' => true, | |
2082 | ), | |
2083 | 'core_competency_reopen_plan' => array( | |
2084 | 'classname' => 'core_competency\external', | |
2085 | 'methodname' => 'reopen_plan', | |
2086 | 'classpath' => '', | |
2087 | 'description' => 'Reopen learning plan.', | |
2088 | 'type' => 'write', | |
2089 | 'capabilities' => 'moodle/competency:planmanage', | |
2090 | 'ajax' => true, | |
2091 | ), | |
2092 | 'core_competency_read_plan' => array( | |
2093 | 'classname' => 'core_competency\external', | |
2094 | 'methodname' => 'read_plan', | |
2095 | 'classpath' => '', | |
2096 | 'description' => 'Load a learning plan.', | |
2097 | 'type' => 'read', | |
2098 | 'capabilities' => 'moodle/competency:planviewown', | |
2099 | 'ajax' => true, | |
2100 | ), | |
2101 | 'core_competency_delete_plan' => array( | |
2102 | 'classname' => 'core_competency\external', | |
2103 | 'methodname' => 'delete_plan', | |
2104 | 'classpath' => '', | |
2105 | 'description' => 'Delete a learning plan.', | |
2106 | 'type' => 'write', | |
2107 | 'capabilities' => 'moodle/competency:planmanage', | |
2108 | 'ajax' => true, | |
2109 | ), | |
2110 | 'core_competency_list_user_plans' => array( | |
2111 | 'classname' => 'core_competency\external', | |
2112 | 'methodname' => 'list_user_plans', | |
2113 | 'classpath' => '', | |
2114 | 'description' => 'List a user\'s learning plans.', | |
2115 | 'type' => 'read', | |
2116 | 'capabilities' => 'moodle/competency:planviewown', | |
2117 | 'ajax' => true, | |
2118 | ), | |
2119 | 'core_competency_list_plan_competencies' => array( | |
2120 | 'classname' => 'core_competency\external', | |
2121 | 'methodname' => 'list_plan_competencies', | |
2122 | 'classpath' => '', | |
2123 | 'description' => 'List the competencies in a plan', | |
2124 | 'type' => 'read', | |
2125 | 'capabilities' => 'moodle/competency:planviewown', | |
2126 | 'ajax' => true, | |
2127 | ), | |
2128 | 'core_competency_add_competency_to_plan' => array( | |
2129 | 'classname' => 'core_competency\external', | |
2130 | 'methodname' => 'add_competency_to_plan', | |
2131 | 'classpath' => '', | |
2132 | 'description' => 'Add the competency to a learning plan', | |
2133 | 'type' => 'write', | |
2134 | 'capabilities' => 'moodle/competency:planmanage', | |
2135 | 'ajax' => true, | |
2136 | ), | |
2137 | 'core_competency_remove_competency_from_plan' => array( | |
2138 | 'classname' => 'core_competency\external', | |
2139 | 'methodname' => 'remove_competency_from_plan', | |
2140 | 'classpath' => '', | |
2141 | 'description' => 'Remove the competency from a learning plan', | |
2142 | 'type' => 'write', | |
2143 | 'capabilities' => 'moodle/competency:planmanage', | |
2144 | 'ajax' => true, | |
2145 | ), | |
2146 | 'core_competency_reorder_plan_competency' => array( | |
2147 | 'classname' => 'core_competency\external', | |
2148 | 'methodname' => 'reorder_plan_competency', | |
2149 | 'classpath' => '', | |
2150 | 'description' => 'Move a plan competency to a new relative sort order.', | |
2151 | 'type' => 'write', | |
2152 | 'capabilities' => 'moodle/competency:planmanage', | |
2153 | 'ajax' => true, | |
2154 | ), | |
2155 | 'core_competency_plan_request_review' => array( | |
2156 | 'classname' => 'core_competency\external', | |
2157 | 'methodname' => 'plan_request_review', | |
2158 | 'classpath' => '', | |
2159 | 'description' => 'Request for a plan to be reviewed.', | |
2160 | 'type' => 'write', | |
2161 | 'capabilities' => 'moodle/competency:planmanagedraft', | |
2162 | 'ajax' => true, | |
2163 | ), | |
2164 | 'core_competency_plan_start_review' => array( | |
2165 | 'classname' => 'core_competency\external', | |
2166 | 'methodname' => 'plan_start_review', | |
2167 | 'classpath' => '', | |
2168 | 'description' => 'Start the review of a plan.', | |
2169 | 'type' => 'write', | |
2170 | 'capabilities' => 'moodle/competency:planmanage', | |
2171 | 'ajax' => true, | |
2172 | ), | |
2173 | 'core_competency_plan_stop_review' => array( | |
2174 | 'classname' => 'core_competency\external', | |
2175 | 'methodname' => 'plan_stop_review', | |
2176 | 'classpath' => '', | |
2177 | 'description' => 'Stop the review of a plan.', | |
2178 | 'type' => 'write', | |
2179 | 'capabilities' => 'moodle/competency:planmanage', | |
2180 | 'ajax' => true, | |
2181 | ), | |
2182 | 'core_competency_plan_cancel_review_request' => array( | |
2183 | 'classname' => 'core_competency\external', | |
2184 | 'methodname' => 'plan_cancel_review_request', | |
2185 | 'classpath' => '', | |
2186 | 'description' => 'Cancel the review of a plan.', | |
2187 | 'type' => 'write', | |
2188 | 'capabilities' => 'moodle/competency:planmanagedraft', | |
2189 | 'ajax' => true, | |
2190 | ), | |
2191 | 'core_competency_approve_plan' => array( | |
2192 | 'classname' => 'core_competency\external', | |
2193 | 'methodname' => 'approve_plan', | |
2194 | 'classpath' => '', | |
2195 | 'description' => 'Approve a plan.', | |
2196 | 'type' => 'write', | |
2197 | 'capabilities' => 'moodle/competency:planmanage', | |
2198 | 'ajax' => true, | |
2199 | ), | |
2200 | 'core_competency_unapprove_plan' => array( | |
2201 | 'classname' => 'core_competency\external', | |
2202 | 'methodname' => 'unapprove_plan', | |
2203 | 'classpath' => '', | |
2204 | 'description' => 'Unapprove a plan.', | |
2205 | 'type' => 'write', | |
2206 | 'capabilities' => 'moodle/competency:planmanage', | |
2207 | 'ajax' => true, | |
2208 | ), | |
2209 | 'core_competency_template_has_related_data' => array( | |
2210 | 'classname' => 'core_competency\external', | |
2211 | 'methodname' => 'template_has_related_data', | |
2212 | 'classpath' => '', | |
2213 | 'description' => 'Check if a template has related data', | |
2214 | 'type' => 'read', | |
2215 | 'capabilities' => 'moodle/competency:templateview', | |
2216 | 'ajax' => true, | |
2217 | ), | |
2218 | 'core_competency_get_scale_values' => array( | |
2219 | 'classname' => 'core_competency\external', | |
2220 | 'methodname' => 'get_scale_values', | |
2221 | 'classpath' => '', | |
2222 | 'description' => 'Fetch the values for a specific scale', | |
2223 | 'type' => 'read', | |
2224 | 'capabilities' => 'moodle/competency:competencymanage', | |
2225 | 'ajax' => true, | |
3123c2cf | 2226 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
81de839f FM |
2227 | ), |
2228 | 'core_competency_add_related_competency' => array( | |
2229 | 'classname' => 'core_competency\external', | |
2230 | 'methodname' => 'add_related_competency', | |
2231 | 'classpath' => '', | |
2232 | 'description' => 'Adds a related competency', | |
2233 | 'type' => 'write', | |
2234 | 'capabilities' => 'moodle/competency:competencymanage', | |
2235 | 'ajax' => true, | |
2236 | ), | |
2237 | 'core_competency_remove_related_competency' => array( | |
2238 | 'classname' => 'core_competency\external', | |
2239 | 'methodname' => 'remove_related_competency', | |
2240 | 'classpath' => '', | |
2241 | 'description' => 'Remove a related competency', | |
2242 | 'type' => 'write', | |
2243 | 'capabilities' => 'moodle/competency:competencymanage', | |
2244 | 'ajax' => true, | |
2245 | ), | |
2246 | 'core_competency_read_user_evidence' => array( | |
2247 | 'classname' => 'core_competency\external', | |
2248 | 'methodname' => 'read_user_evidence', | |
2249 | 'classpath' => '', | |
2250 | 'description' => 'Read an evidence of prior learning.', | |
2251 | 'type' => 'read', | |
2252 | 'capabilities' => 'moodle/competency:userevidenceview', | |
2253 | 'ajax' => true, | |
2254 | ), | |
2255 | 'core_competency_delete_user_evidence' => array( | |
2256 | 'classname' => 'core_competency\external', | |
2257 | 'methodname' => 'delete_user_evidence', | |
2258 | 'classpath' => '', | |
2259 | 'description' => 'Delete an evidence of prior learning.', | |
2260 | 'type' => 'write', | |
2261 | 'capabilities' => 'moodle/competency:userevidencemanageown', | |
2262 | 'ajax' => true, | |
2263 | ), | |
2264 | 'core_competency_create_user_evidence_competency' => array( | |
2265 | 'classname' => 'core_competency\external', | |
2266 | 'methodname' => 'create_user_evidence_competency', | |
2267 | 'classpath' => '', | |
2268 | 'description' => 'Create an evidence of prior learning relationship with a competency.', | |
2269 | 'type' => 'read', | |
2270 | 'capabilities' => 'moodle/competency:userevidencemanageown, moodle/competency:competencyview', | |
2271 | 'ajax' => true, | |
2272 | ), | |
2273 | 'core_competency_delete_user_evidence_competency' => array( | |
2274 | 'classname' => 'core_competency\external', | |
2275 | 'methodname' => 'delete_user_evidence_competency', | |
2276 | 'classpath' => '', | |
2277 | 'description' => 'Delete an evidence of prior learning relationship with a competency.', | |
2278 | 'type' => 'write', | |
2279 | 'capabilities' => 'moodle/competency:userevidencemanageown', | |
2280 | 'ajax' => true, | |
2281 | ), | |
2282 | 'core_competency_user_competency_cancel_review_request' => array( | |
2283 | 'classname' => 'core_competency\external', | |
2284 | 'methodname' => 'user_competency_cancel_review_request', | |
2285 | 'classpath' => '', | |
2286 | 'description' => 'Cancel a review request.', | |
2287 | 'type' => 'write', | |
2288 | 'capabilities' => 'moodle/competency:userevidencemanageown', | |
2289 | 'ajax' => true, | |
2290 | ), | |
2291 | 'core_competency_user_competency_request_review' => array( | |
2292 | 'classname' => 'core_competency\external', | |
2293 | 'methodname' => 'user_competency_request_review', | |
2294 | 'classpath' => '', | |
2295 | 'description' => 'Request a review.', | |
2296 | 'type' => 'write', | |
2297 | 'capabilities' => 'moodle/competency:userevidencemanageown', | |
2298 | 'ajax' => true, | |
2299 | ), | |
2300 | 'core_competency_user_competency_start_review' => array( | |
2301 | 'classname' => 'core_competency\external', | |
2302 | 'methodname' => 'user_competency_start_review', | |
2303 | 'classpath' => '', | |
2304 | 'description' => 'Start a review.', | |
2305 | 'type' => 'write', | |
2306 | 'capabilities' => 'moodle/competency:competencygrade', | |
2307 | 'ajax' => true, | |
2308 | ), | |
2309 | 'core_competency_user_competency_stop_review' => array( | |
2310 | 'classname' => 'core_competency\external', | |
2311 | 'methodname' => 'user_competency_stop_review', | |
2312 | 'classpath' => '', | |
2313 | 'description' => 'Stop a review.', | |
2314 | 'type' => 'write', | |
2315 | 'capabilities' => 'moodle/competency:competencygrade', | |
2316 | 'ajax' => true, | |
2317 | ), | |
2318 | 'core_competency_user_competency_viewed' => array( | |
2319 | 'classname' => 'core_competency\external', | |
2320 | 'methodname' => 'user_competency_viewed', | |
2321 | 'classpath' => '', | |
2322 | 'description' => 'Log the user competency viewed event.', | |
2323 | 'type' => 'read', | |
2324 | 'capabilities' => 'moodle/competency:usercompetencyview', | |
2325 | 'ajax' => true, | |
3123c2cf | 2326 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
81de839f FM |
2327 | ), |
2328 | 'core_competency_user_competency_viewed_in_plan' => array( | |
2329 | 'classname' => 'core_competency\external', | |
2330 | 'methodname' => 'user_competency_viewed_in_plan', | |
2331 | 'classpath' => '', | |
2332 | 'description' => 'Log the user competency viewed in plan event.', | |
2333 | 'type' => 'read', | |
2334 | 'capabilities' => 'moodle/competency:usercompetencyview', | |
2335 | 'ajax' => true, | |
3123c2cf | 2336 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
81de839f FM |
2337 | ), |
2338 | 'core_competency_user_competency_viewed_in_course' => array( | |
2339 | 'classname' => 'core_competency\external', | |
2340 | 'methodname' => 'user_competency_viewed_in_course', | |
2341 | 'classpath' => '', | |
2342 | 'description' => 'Log the user competency viewed in course event', | |
2343 | 'type' => 'read', | |
2344 | 'capabilities' => 'moodle/competency:usercompetencyview', | |
2345 | 'ajax' => true, | |
3123c2cf | 2346 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
81de839f FM |
2347 | ), |
2348 | 'core_competency_user_competency_plan_viewed' => array( | |
2349 | 'classname' => 'core_competency\external', | |
2350 | 'methodname' => 'user_competency_plan_viewed', | |
2351 | 'classpath' => '', | |
2352 | 'description' => 'Log the user competency plan viewed event.', | |
2353 | 'type' => 'read', | |
2354 | 'capabilities' => 'moodle/competency:usercompetencyview', | |
2355 | 'ajax' => true, | |
3123c2cf | 2356 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
81de839f FM |
2357 | ), |
2358 | 'core_competency_grade_competency' => array( | |
2359 | 'classname' => 'core_competency\external', | |
2360 | 'methodname' => 'grade_competency', | |
2361 | 'classpath' => '', | |
2362 | 'description' => 'Grade a competency.', | |
2363 | 'type' => 'write', | |
2364 | 'capabilities' => 'moodle/competency:competencygrade', | |
2365 | 'ajax' => true, | |
2366 | ), | |
2367 | 'core_competency_grade_competency_in_plan' => array( | |
2368 | 'classname' => 'core_competency\external', | |
2369 | 'methodname' => 'grade_competency_in_plan', | |
2370 | 'classpath' => '', | |
2371 | 'description' => 'Grade a competency from the user plan page.', | |
2372 | 'type' => 'write', | |
2373 | 'capabilities' => 'moodle/competency:competencygrade', | |
2374 | 'ajax' => true, | |
2375 | ), | |
2376 | 'core_competency_grade_competency_in_course' => array( | |
2377 | 'classname' => 'core_competency\external', | |
2378 | 'methodname' => 'grade_competency_in_course', | |
2379 | 'classpath' => '', | |
2380 | 'description' => 'Grade a competency from the course page.', | |
2381 | 'type' => 'write', | |
2382 | 'capabilities' => 'moodle/competency:competencygrade', | |
2383 | 'ajax' => true, | |
3123c2cf | 2384 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
81de839f FM |
2385 | ), |
2386 | 'core_competency_unlink_plan_from_template' => array( | |
2387 | 'classname' => 'core_competency\external', | |
2388 | 'methodname' => 'unlink_plan_from_template', | |
2389 | 'classpath' => '', | |
2390 | 'description' => 'Unlink a plan form it template.', | |
2391 | 'type' => 'write', | |
2392 | 'capabilities' => 'moodle/competency:planmanage', | |
2393 | 'ajax' => true, | |
2394 | ), | |
2395 | 'core_competency_template_viewed' => array( | |
2396 | 'classname' => 'core_competency\external', | |
2397 | 'methodname' => 'template_viewed', | |
2398 | 'classpath' => '', | |
2399 | 'description' => 'Log event template viewed', | |
2400 | 'type' => 'read', | |
2401 | 'capabilities' => 'moodle/competency:templateview', | |
2402 | 'ajax' => true, | |
2403 | ), | |
2404 | 'core_competency_request_review_of_user_evidence_linked_competencies' => array( | |
2405 | 'classname' => 'core_competency\external', | |
2406 | 'methodname' => 'request_review_of_user_evidence_linked_competencies', | |
2407 | 'classpath' => '', | |
2408 | 'description' => 'Send user evidence competencies in review', | |
2409 | 'type' => 'write', | |
2410 | 'capabilities' => 'moodle/competency:userevidencemanageown', | |
2411 | 'ajax' => true, | |
2412 | ), | |
2413 | 'core_competency_update_course_competency_settings' => array( | |
2414 | 'classname' => 'core_competency\external', | |
2415 | 'methodname' => 'update_course_competency_settings', | |
2416 | 'classpath' => '', | |
2417 | 'description' => 'Update the course competency settings', | |
2418 | 'type' => 'write', | |
2419 | 'capabilities' => 'moodle/competency:coursecompetencyconfigure', | |
2420 | 'ajax' => true, | |
2421 | ), | |
1e99f31e FM |
2422 | 'core_competency_delete_evidence' => array( |
2423 | 'classname' => 'core_competency\external', | |
2424 | 'methodname' => 'delete_evidence', | |
2425 | 'classpath' => '', | |
2426 | 'description' => 'Delete an evidence', | |
2427 | 'type' => 'write', | |
2428 | 'capabilities' => 'moodle/competency:evidencedelete', | |
2429 | 'ajax' => true, | |
3123c2cf | 2430 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
1e99f31e | 2431 | ), |
f23e9b6b CB |
2432 | |
2433 | 'core_webservice_get_site_info' => array( | |
2434 | 'classname' => 'core_webservice_external', | |
2435 | 'methodname' => 'get_site_info', | |
2436 | 'classpath' => 'webservice/externallib.php', | |
2437 | 'description' => 'Return some site info / user info / list web service functions', | |
2438 | 'type' => 'read', | |
ee7295ee | 2439 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), |
8446ba36 JL |
2440 | ), |
2441 | ||
2442 | // Blocks functions. | |
2443 | 'core_block_get_course_blocks' => array( | |
2444 | 'classname' => 'core_block_external', | |
2445 | 'methodname' => 'get_course_blocks', | |
2446 | 'description' => 'Returns blocks information for a course.', | |
2447 | 'type' => 'read', | |
2448 | 'capabilities' => '', | |
2449 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
2450 | ), | |
66ef16d3 | 2451 | |
0f8b2604 JL |
2452 | 'core_block_get_dashboard_blocks' => array( |
2453 | 'classname' => 'core_block_external', | |
2454 | 'methodname' => 'get_dashboard_blocks', | |
2455 | 'description' => 'Returns blocks information for the given user dashboard.', | |
2456 | 'type' => 'read', | |
2457 | 'capabilities' => '', | |
2458 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
2459 | ), | |
2460 | ||
66ef16d3 JL |
2461 | // Filters functions. |
2462 | 'core_filters_get_available_in_context' => array( | |
2463 | 'classname' => 'core_filters\external', | |
2464 | 'methodname' => 'get_available_in_context', | |
2465 | 'description' => 'Returns the filters available in the given contexts.', | |
2466 | 'type' => 'read', | |
2467 | 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE), | |
3cfff885 | 2468 | ), |
1eeb465a TBM |
2469 | 'core_customfield_delete_field' => array( |
2470 | 'classname' => 'core_customfield_external', | |
2471 | 'methodname' => 'delete_field', | |
2472 | 'classpath' => 'customfield/externallib.php', | |
2473 | 'description' => 'Deletes an entry', | |
2474 | 'type' => 'write', | |
2475 | 'ajax' => 'true' | |
2476 | ), | |
2477 | 'core_customfield_reload_template' => array( | |
2478 | 'classname' => 'core_customfield_external', | |
2479 | 'methodname' => 'reload_template', | |
2480 | 'classpath' => 'customfield/externallib.php', | |
2481 | 'description' => 'Reloads template', | |
2482 | 'type' => 'read', | |
2483 | 'ajax' => 'true' | |
2484 | ), | |
2485 | 'core_customfield_create_category' => array( | |
2486 | 'classname' => 'core_customfield_external', | |
2487 | 'methodname' => 'create_category', | |
2488 | 'classpath' => 'customfield/externallib.php', | |
2489 | 'description' => 'Creates a new category', | |
2490 | 'type' => 'write', | |
2491 | 'ajax' => 'true' | |
2492 | ), | |
2493 | 'core_customfield_delete_category' => array( | |
2494 | 'classname' => 'core_customfield_external', | |
2495 | 'methodname' => 'delete_category', | |
2496 | 'classpath' => 'customfield/externallib.php', | |
2497 | 'description' => 'Deletes a category', | |
2498 | 'type' => 'write', | |
2499 | 'ajax' => 'true' | |
2500 | ), | |
2501 | 'core_customfield_move_field' => array( | |
2502 | 'classname' => 'core_customfield_external', | |
2503 | 'methodname' => 'move_field', | |
2504 | 'classpath' => 'customfield/externallib.php', | |
2505 | 'description' => 'Drag and drop', | |
2506 | 'type' => 'write', | |
2507 | 'ajax' => 'true' | |
2508 | ), | |
2509 | 'core_customfield_move_category' => array( | |
2510 | 'classname' => 'core_customfield_external', | |
2511 | 'methodname' => 'move_category', | |
2512 | 'classpath' => 'customfield/externallib.php', | |
2513 | 'description' => 'Drag and drop categories', | |
2514 | 'type' => 'write', | |
2515 | 'ajax' => 'true' | |
2516 | ) | |
9a0df45a | 2517 | ); |
c1b65883 JM |
2518 | |
2519 | $services = array( | |
96e0194c | 2520 | 'Moodle mobile web service' => array( |
12c52b91 | 2521 | 'functions' => array(), // Unused as we add the service in each function definition, third party services would use this. |
96e0194c SH |
2522 | 'enabled' => 0, |
2523 | 'restrictedusers' => 0, | |
af03513f | 2524 | 'shortname' => MOODLE_OFFICIAL_MOBILE_SERVICE, |
106c55fb DW |
2525 | 'downloadfiles' => 1, |
2526 | 'uploadfiles' => 1 | |
96e0194c SH |
2527 | ), |
2528 | ); |