Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
<?php
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
 
17
 
18
/**
19
 * Core external functions and service definitions.
20
 *
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 https://moodledev.io/docs/apis/subsystems/external/writing-a-service}
27
 *     - External API: {@link https://moodledev.io/docs/apis/subsystems/external/functions}
28
 *     - Upgrade API: {@link https://moodledev.io/docs/guides/upgrade}
29
 *
30
 * @package    core_webservice
31
 * @category   webservice
32
 * @copyright  2009 Petr Skodak
33
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
34
 */
35
 
36
$functions = array(
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
    ),
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
    ),
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',
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,
67
        'loginrequired' => false,
68
    ),
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
    ),
77
    'core_backup_get_async_backup_progress' => array(
78
        'classname'   => 'core_backup_external',
79
        'classpath' => 'backup/externallib.php',
80
        'methodname'  => 'get_async_backup_progress',
81
        'description' => 'Get the progress of an Asyncronhous backup.',
82
        'type'        => 'read',
83
        'ajax'          => true,
84
        'loginrequired' => true,
85
    ),
86
    'core_backup_get_async_backup_links_backup' => array(
87
        'classname'   => 'core_backup_external',
88
        'classpath' => 'backup/externallib.php',
89
        'methodname'  => 'get_async_backup_links_backup',
90
        'description' => 'Gets the data to use when updating the status table row in the UI for when an async backup completes.',
91
        'type'        => 'read',
92
        'ajax'          => true,
93
        'loginrequired' => true,
94
    ),
95
    'core_backup_get_async_backup_links_restore' => array(
96
        'classname'   => 'core_backup_external',
97
        'classpath' => 'backup/externallib.php',
98
        'methodname'  => 'get_async_backup_links_restore',
99
        'description' => 'Gets the data to use when updating the status table row in the UI for when an async restore completes.',
100
        'type'        => 'read',
101
        'ajax'          => true,
102
        'loginrequired' => true,
103
    ),
104
    'core_backup_get_copy_progress' => array(
105
        'classname'   => 'core_backup_external',
106
        'classpath' => 'backup/externallib.php',
107
        'methodname'  => 'get_copy_progress',
108
        'description' => 'Gets the progress of course copy operations.',
109
        'type'        => 'read',
110
        'ajax'          => true,
111
        'loginrequired' => true,
112
    ),
113
    'core_backup_submit_copy_form' => array(
114
        'classname'   => 'core_backup_external',
115
        'classpath' => 'backup/externallib.php',
116
        'methodname'  => 'submit_copy_form',
117
        'description' => 'Handles ajax submission of course copy form.',
118
        'type'        => 'read',
119
        'ajax'          => true,
120
        'loginrequired' => true,
121
    ),
1441 ariadna 122
    'core_badges_disable_badges' => [
123
        'classname'     => 'core_badges\external\disable_badges',
124
        'description'   => 'Disable badges',
125
        'type'          => 'write',
126
        'ajax'          => true,
127
    ],
128
    'core_badges_enable_badges' => [
129
        'classname'     => 'core_badges\external\enable_badges',
130
        'description'   => 'Enable badges',
131
        'type'          => 'write',
132
        'ajax'          => true,
133
    ],
134
    'core_badges_get_badge' => [
135
        'classname'     => 'core_badges\external\get_badge',
136
        'description'   => 'Retrieves a badge by id.',
137
        'type'          => 'read',
138
        'services'      => [MOODLE_OFFICIAL_MOBILE_SERVICE],
139
    ],
1 efrain 140
    'core_badges_get_user_badges' => array(
141
        'classname'     => 'core_badges_external',
142
        'methodname'    => 'get_user_badges',
143
        'description'   => 'Returns the list of badges awarded to a user.',
144
        'type'          => 'read',
145
        'capabilities'  => 'moodle/badges:viewotherbadges',
146
        'services'      => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
147
    ),
148
    'core_badges_get_user_badge_by_hash' => [
149
        'classname'     => 'core_badges\external\get_user_badge_by_hash',
150
        'description'   => 'Returns the badge awarded to a user by hash.',
151
        'type'          => 'read',
152
        'services'      => [MOODLE_OFFICIAL_MOBILE_SERVICE],
153
    ],
154
    'core_blog_get_entries' => array(
155
        'classname'   => 'core_blog\external',
156
        'methodname'  => 'get_entries',
157
        'description' => 'Returns blog entries.',
158
        'type'        => 'read',
159
        'services'    => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
160
        'ajax'          => true,
161
        'loginrequired' => false,
162
    ),
163
    'core_blog_view_entries' => array(
164
        'classname'   => 'core_blog\external',
165
        'methodname'  => 'view_entries',
166
        'description' => 'Trigger the blog_entries_viewed event.',
167
        'type'        => 'read',
168
        'services'    => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
169
        'ajax'          => true,
170
        'loginrequired' => false,
171
    ),
172
    'core_blog_get_access_information' => [
173
        'classname' => '\core_blog\external\get_access_information',
174
        'description' => 'Retrieves permission information for the current user.',
175
        'type' => 'read',
176
        'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
177
    ],
178
    'core_blog_add_entry' => [
179
        'classname' => '\core_blog\external\add_entry',
180
        'description' => 'Creates a new blog post entry.',
181
        'type' => 'write',
182
        'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
183
    ],
184
    'core_blog_delete_entry' => [
185
        'classname' => '\core_blog\external\delete_entry',
186
        'description' => 'Deletes a blog post entry.',
187
        'type' => 'write',
188
        'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
189
    ],
190
    'core_blog_prepare_entry_for_edition' => [
191
        'classname' => '\core_blog\external\prepare_entry_for_edition',
192
        'description' => 'Prepare a draft area for editing a blog entry..',
193
        'type' => 'write',
194
        'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
195
    ],
196
    'core_blog_update_entry' => [
197
        'classname' => '\core_blog\external\update_entry',
198
        'description' => 'Updates a blog entry.',
199
        'type' => 'write',
200
        'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
201
    ],
202
    'core_calendar_get_calendar_monthly_view' => array(
203
        'classname' => 'core_calendar_external',
204
        'methodname' => 'get_calendar_monthly_view',
205
        'description' => 'Fetch the monthly view data for a calendar',
206
        'classpath' => 'calendar/externallib.php',
207
        'type' => 'read',
208
        'capabilities' => '',
209
        'ajax' => true,
210
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
211
    ),
212
    'core_calendar_get_calendar_day_view' => array(
213
        'classname' => 'core_calendar_external',
214
        'methodname' => 'get_calendar_day_view',
215
        'description' => 'Fetch the day view data for a calendar',
216
        'classpath' => 'calendar/externallib.php',
217
        'type' => 'read',
218
        'capabilities' => '',
219
        'ajax' => true,
220
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
221
    ),
222
    'core_calendar_get_calendar_upcoming_view' => array(
223
        'classname' => 'core_calendar_external',
224
        'methodname' => 'get_calendar_upcoming_view',
225
        'description' => 'Fetch the upcoming view data for a calendar',
226
        'classpath' => 'calendar/externallib.php',
227
        'type' => 'read',
228
        'capabilities' => '',
229
        'ajax' => true,
230
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
231
    ),
232
    'core_calendar_update_event_start_day' => array(
233
        'classname' => 'core_calendar_external',
234
        'methodname' => 'update_event_start_day',
235
        'description' => 'Update the start day (but not time) for an event.',
236
        'classpath' => 'calendar/externallib.php',
237
        'type' => 'write',
238
        'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
239
        'ajax' => true,
240
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
241
    ),
242
    'core_calendar_create_calendar_events' => array(
243
        'classname' => 'core_calendar_external',
244
        'methodname' => 'create_calendar_events',
245
        'description' => 'Create calendar events',
246
        'classpath' => 'calendar/externallib.php',
247
        'type' => 'write',
248
        'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
249
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
250
    ),
251
    'core_calendar_delete_calendar_events' => array(
252
        'classname' => 'core_calendar_external',
253
        'methodname' => 'delete_calendar_events',
254
        'description' => 'Delete calendar events',
255
        'classpath' => 'calendar/externallib.php',
256
        'type' => 'write',
257
        'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
258
        'ajax' => true,
259
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
260
    ),
261
    'core_calendar_get_calendar_events' => array(
262
        'classname' => 'core_calendar_external',
263
        'methodname' => 'get_calendar_events',
264
        'description' => 'Get calendar events',
265
        'classpath' => 'calendar/externallib.php',
266
        'type' => 'read',
267
        'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
268
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
269
    ),
270
    'core_calendar_get_action_events_by_timesort' => array(
271
        'classname' => 'core_calendar_external',
272
        'methodname' => 'get_calendar_action_events_by_timesort',
273
        'description' => 'Get calendar action events by tiemsort',
274
        'classpath' => 'calendar/externallib.php',
275
        'type' => 'read',
276
        'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
277
        'ajax' => true,
278
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
279
        'readonlysession' => true,
280
    ),
281
    'core_calendar_get_action_events_by_course' => array(
282
        'classname' => 'core_calendar_external',
283
        'methodname' => 'get_calendar_action_events_by_course',
284
        'description' => 'Get calendar action events by course',
285
        'classpath' => 'calendar/externallib.php',
286
        'type' => 'read',
287
        'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
288
        'ajax' => true,
289
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
290
    ),
291
    'core_calendar_get_action_events_by_courses' => array(
292
        'classname' => 'core_calendar_external',
293
        'methodname' => 'get_calendar_action_events_by_courses',
294
        'description' => 'Get calendar action events by courses',
295
        'classpath' => 'calendar/externallib.php',
296
        'type' => 'read',
297
        'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
298
        'ajax' => true,
299
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
300
    ),
301
    'core_calendar_get_calendar_event_by_id' => array(
302
        'classname' => 'core_calendar_external',
303
        'methodname' => 'get_calendar_event_by_id',
304
        'description' => 'Get calendar event by id',
305
        'classpath' => 'calendar/externallib.php',
306
        'type' => 'read',
307
        'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
308
        'ajax' => true,
309
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
310
    ),
311
    'core_calendar_submit_create_update_form' => array(
312
        'classname' => 'core_calendar_external',
313
        'methodname' => 'submit_create_update_form',
314
        'description' => 'Submit form data for event form',
315
        'classpath' => 'calendar/externallib.php',
316
        'type' => 'write',
317
        'capabilities' => 'moodle/calendar:manageentries, moodle/calendar:manageownentries, moodle/calendar:managegroupentries',
318
        'ajax' => true,
319
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
320
    ),
321
    'core_calendar_get_calendar_access_information' => array(
322
        'classname' => 'core_calendar_external',
323
        'methodname' => 'get_calendar_access_information',
324
        'description' => 'Convenience function to retrieve some permissions/access information for the given course calendar.',
325
        'classpath' => 'calendar/externallib.php',
326
        'type' => 'read',
327
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
328
    ),
329
    'core_calendar_get_allowed_event_types' => array(
330
        'classname' => 'core_calendar_external',
331
        'methodname' => 'get_allowed_event_types',
332
        'description' => 'Get the type of events a user can create in the given course.',
333
        'classpath' => 'calendar/externallib.php',
334
        'type' => 'read',
335
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
336
    ),
337
    'core_calendar_get_timestamps' => [
338
        'classname'     => 'core_calendar_external',
339
        'methodname'    => 'get_timestamps',
340
        'description'   => 'Fetch unix timestamps for given date times.',
341
        'classpath' => 'calendar/externallib.php',
342
        'type'          => 'read',
343
        'ajax'          => true,
344
    ],
345
    'core_calendar_get_calendar_export_token' => [
346
        'classname'     => 'core_calendar\external\export\token',
347
        'description'   => 'Return the auth token required for exporting a calendar.',
348
        'type'          => 'read',
349
        'services'      => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
350
    ],
351
    'core_calendar_delete_subscription' => [
352
        'classname' => 'core_calendar\external\subscription\delete',
353
        'description' => 'Delete the calendar subscription',
354
        'type' => 'write',
355
        'ajax' => true
356
    ],
357
    'core_check_get_result_admintree' => [
358
        'classname' => 'core\check\external\get_result_admintree',
359
        'description' => 'Executes a check stored in the admin tree and returns the result',
360
        'type' => 'read',
361
        'ajax' => true,
362
        'readonlysession' => true,
363
    ],
364
    'core_cohort_add_cohort_members' => array(
365
        'classname' => 'core_cohort_external',
366
        'methodname' => 'add_cohort_members',
367
        'classpath' => 'cohort/externallib.php',
368
        'description' => 'Adds cohort members.',
369
        'type' => 'write',
370
        'capabilities' => 'moodle/cohort:assign'
371
    ),
372
    'core_cohort_create_cohorts' => array(
373
        'classname' => 'core_cohort_external',
374
        'methodname' => 'create_cohorts',
375
        'classpath' => 'cohort/externallib.php',
376
        'description' => 'Creates new cohorts.',
377
        'type' => 'write',
378
        'capabilities' => 'moodle/cohort:manage'
379
    ),
380
    'core_cohort_delete_cohort_members' => array(
381
        'classname' => 'core_cohort_external',
382
        'methodname' => 'delete_cohort_members',
383
        'classpath' => 'cohort/externallib.php',
384
        'description' => 'Deletes cohort members.',
385
        'type' => 'write',
386
        'capabilities' => 'moodle/cohort:assign'
387
    ),
388
    'core_cohort_delete_cohorts' => array(
389
        'classname' => 'core_cohort_external',
390
        'methodname' => 'delete_cohorts',
391
        'classpath' => 'cohort/externallib.php',
392
        'description' => 'Deletes all specified cohorts.',
393
        'type' => 'write',
1441 ariadna 394
        'capabilities' => 'moodle/cohort:manage',
395
        'ajax' => true,
1 efrain 396
    ),
397
    'core_cohort_get_cohort_members' => array(
398
        'classname' => 'core_cohort_external',
399
        'methodname' => 'get_cohort_members',
400
        'classpath' => 'cohort/externallib.php',
401
        'description' => 'Returns cohort members.',
402
        'type' => 'read',
403
        'capabilities' => 'moodle/cohort:view'
404
    ),
405
    'core_cohort_search_cohorts' => array(
406
        'classname' => 'core_cohort_external',
407
        'methodname' => 'search_cohorts',
408
        'classpath' => 'cohort/externallib.php',
409
        'description' => 'Search for cohorts.',
410
        'type' => 'read',
411
        'ajax' => true,
412
        'capabilities' => 'moodle/cohort:view'
413
    ),
414
    'core_cohort_get_cohorts' => array(
415
        'classname' => 'core_cohort_external',
416
        'methodname' => 'get_cohorts',
417
        'classpath' => 'cohort/externallib.php',
418
        'description' => 'Returns cohort details.',
419
        'type' => 'read',
420
        'capabilities' => 'moodle/cohort:view'
421
    ),
422
    'core_cohort_update_cohorts' => array(
423
        'classname' => 'core_cohort_external',
424
        'methodname' => 'update_cohorts',
425
        'classpath' => 'cohort/externallib.php',
426
        'description' => 'Updates existing cohorts.',
427
        'type' => 'write',
428
        'capabilities' => 'moodle/cohort:manage'
429
    ),
430
    'core_comment_get_comments' => array(
431
        'classname' => 'core_comment_external',
432
        'methodname' => 'get_comments',
433
        'description' => 'Returns comments.',
434
        'type' => 'read',
435
        'capabilities' => 'moodle/comment:view',
436
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
437
    ),
438
    'core_comment_add_comments' => array(
439
        'classname' => 'core_comment_external',
440
        'methodname' => 'add_comments',
441
        'description' => 'Adds a comment or comments.',
442
        'type' => 'write',
443
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
444
    ),
445
    'core_comment_delete_comments' => array(
446
        'classname' => 'core_comment_external',
447
        'methodname' => 'delete_comments',
448
        'description' => 'Deletes a comment or comments.',
449
        'type' => 'write',
450
        'ajax' => true,
451
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
452
    ),
453
    'core_completion_get_activities_completion_status' => array(
454
        'classname' => 'core_completion_external',
455
        'methodname' => 'get_activities_completion_status',
456
        'description' => 'Return the activities completion status for a user in a course.',
457
        'type' => 'read',
458
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
459
    ),
460
    'core_completion_get_course_completion_status' => array(
461
        'classname' => 'core_completion_external',
462
        'methodname' => 'get_course_completion_status',
463
        'description' => 'Returns course completion status.',
464
        'type' => 'read',
465
        'capabilities' => 'report/completion:view',
466
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
467
    ),
468
    'core_completion_mark_course_self_completed' => array(
469
        'classname' => 'core_completion_external',
470
        'methodname' => 'mark_course_self_completed',
471
        'description' => 'Update the course completion status for the current user (if course self-completion is enabled).',
472
        'type' => 'write',
473
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
474
    ),
475
    'core_completion_update_activity_completion_status_manually' => array(
476
        'classname' => 'core_completion_external',
477
        'methodname' => 'update_activity_completion_status_manually',
478
        'description' => 'Update completion status for the current user in an activity, only for activities with manual tracking.',
479
        'type' => 'write',
480
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
481
        'ajax' => true,
482
    ),
483
    'core_completion_override_activity_completion_status' => array(
484
        'classname'     => 'core_completion_external',
485
        'methodname'    => 'override_activity_completion_status',
486
        'description'   => 'Update completion status for a user in an activity by overriding it.',
487
        'type'          => 'write',
488
        'capabilities'  => 'moodle/course:overridecompletion',
489
        'ajax'          => true,
490
    ),
491
    'core_course_create_categories' => array(
492
        'classname' => 'core_course_external',
493
        'methodname' => 'create_categories',
494
        'classpath' => 'course/externallib.php',
495
        'description' => 'Create course categories',
496
        'type' => 'write',
497
        'capabilities' => 'moodle/category:manage'
498
    ),
499
    'core_course_create_courses' => array(
500
        'classname' => 'core_course_external',
501
        'methodname' => 'create_courses',
502
        'classpath' => 'course/externallib.php',
503
        'description' => 'Create new courses',
504
        'type' => 'write',
505
        'capabilities' => 'moodle/course:create, moodle/course:visibility'
506
    ),
507
    'core_course_delete_categories' => array(
508
        'classname' => 'core_course_external',
509
        'methodname' => 'delete_categories',
510
        'classpath' => 'course/externallib.php',
511
        'description' => 'Delete course categories',
512
        'type' => 'write',
513
        'capabilities' => 'moodle/category:manage'
514
    ),
515
    'core_course_delete_courses' => array(
516
        'classname' => 'core_course_external',
517
        'methodname' => 'delete_courses',
518
        'classpath' => 'course/externallib.php',
519
        'description' => 'Deletes all specified courses',
520
        'type' => 'write',
521
        'capabilities' => 'moodle/course:delete'
522
    ),
523
    'core_course_delete_modules' => array(
524
        'classname' => 'core_course_external',
525
        'methodname' => 'delete_modules',
526
        'classpath' => 'course/externallib.php',
527
        'description' => 'Deletes all specified module instances',
528
        'type' => 'write',
529
        'capabilities' => 'moodle/course:manageactivities'
530
    ),
531
    'core_course_duplicate_course' => array(
532
        'classname' => 'core_course_external',
533
        'methodname' => 'duplicate_course',
534
        'classpath' => 'course/externallib.php',
535
        'description' => 'Duplicate an existing course (creating a new one).',
536
        'type' => 'write',
537
        'capabilities' => 'moodle/backup:backupcourse, moodle/restore:restorecourse, moodle/course:create'
538
    ),
539
    'core_course_get_categories' => array(
540
        'classname' => 'core_course_external',
541
        'methodname' => 'get_categories',
542
        'classpath' => 'course/externallib.php',
543
        'description' => 'Return category details',
544
        'type' => 'read',
545
        'capabilities' => 'moodle/category:viewhiddencategories',
546
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
547
    ),
548
    'core_course_get_contents' => array(
549
        'classname' => 'core_course_external',
550
        'methodname' => 'get_course_contents',
551
        'classpath' => 'course/externallib.php',
552
        'description' => 'Get course contents',
553
        'type' => 'read',
554
        'capabilities' => 'moodle/course:update, moodle/course:viewhiddencourses',
555
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
556
    ),
557
    'core_course_get_course_module' => array(
558
        'classname' => 'core_course_external',
559
        'methodname' => 'get_course_module',
560
        'classpath' => 'course/externallib.php',
561
        'description' => 'Return information about a course module',
562
        'type' => 'read',
563
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
564
    ),
565
    'core_course_get_course_module_by_instance' => array(
566
        'classname' => 'core_course_external',
567
        'methodname' => 'get_course_module_by_instance',
568
        'classpath' => 'course/externallib.php',
569
        'description' => 'Return information about a given module name and instance id',
570
        'type' => 'read',
571
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
572
    ),
1441 ariadna 573
    // Todo Remove this entry in Moodle 6.0 (MDL-83530).
1 efrain 574
    'core_course_get_module' => array(
575
        'classname'   => 'core_course_external',
576
        'methodname'  => 'get_module',
577
        'classpath'   => 'course/externallib.php',
1441 ariadna 578
        'description' => '** DEPRECATED ** Please do not call this function any more (will be removed in Moodle 6.0).'
579
            . 'Returns html with one activity module on course page.'
580
            . 'Use fragment API using component core_courseformat and fragment cmitem instead.',
1 efrain 581
        'type'        => 'read',
582
        'ajax'        => true,
583
    ),
584
    'core_courseformat_file_handlers' => [
585
        'classname'     => 'core_courseformat\external\file_handlers',
586
        'description'   => 'Get the current course file hanlders.',
587
        'type'          => 'read',
588
        'ajax'          => true,
589
    ],
590
    'core_courseformat_get_state' => [
591
        'classname'     => 'core_courseformat\external\get_state',
592
        'description'   => 'Get the current course state.',
593
        'type'          => 'read',
594
        'ajax'          => true,
595
    ],
1441 ariadna 596
    'core_courseformat_new_module' => [
597
        'classname'     => 'core_courseformat\external\new_module',
598
        'methodname'    => 'execute',
599
        'description'   => 'Create a new module to course.',
600
        'type'          => 'write',
601
        'ajax'          => true,
602
        'capabilities'  => 'moodle/course:manageactivities',
603
    ],
1 efrain 604
    'core_courseformat_update_course' => [
605
        'classname'     => 'core_courseformat\external\update_course',
606
        'methodname'    => 'execute',
607
        'description'   => 'Update course contents.',
608
        'type'          => 'write',
609
        'ajax'          => true,
610
        'capabilities'  => 'moodle/course:sectionvisibility, moodle/course:activityvisibility',
611
    ],
1441 ariadna 612
    'core_courseformat_create_module' => [
613
        'classname'     => 'core_courseformat\external\create_module',
614
        'methodname'    => 'execute',
615
        'description'   => '** DEPRECATED ** Please do not call this function any more. ' .
616
            'Use core_courseformat_new_module instead. ' .
617
            'Add module to course.',
618
        'type'          => 'write',
619
        'ajax'          => true,
620
        'capabilities'  => 'moodle/course:manageactivities',
621
    ],
622
    // Todo Remove this entry in Moodle 6.0 (MDL-83530).
1 efrain 623
    'core_course_edit_module' => array(
624
        'classname'   => 'core_course_external',
625
        'methodname'  => 'edit_module',
626
        'classpath'   => 'course/externallib.php',
1441 ariadna 627
        'description' => '** DEPRECATED ** Please do not call this function any more (will be removed in Moodle 6.0).'
628
            . ' Performs an action on course module (change visibility, duplicate, delete, etc.)'
629
            . ' Use core_courseformat_update_course instead.',
1 efrain 630
        'type'        => 'write',
631
        'ajax'        => true,
632
    ),
1441 ariadna 633
    // Todo Remove this entry in Moodle 6.0 (MDL-83530).
1 efrain 634
    'core_course_edit_section' => array(
635
        'classname'   => 'core_course_external',
636
        'methodname'  => 'edit_section',
637
        'classpath'   => 'course/externallib.php',
1441 ariadna 638
        'description' => '** DEPRECATED ** Please do not call this function any more (will be removed in Moodle 6.0).'
639
            . 'Performs an action on course section (change visibility, set marker, delete)'
640
            . ' Use core_courseformat_update_course instead.',
1 efrain 641
        'type'        => 'write',
642
        'ajax'        => true,
643
    ),
644
    'core_course_get_courses' => array(
645
        'classname' => 'core_course_external',
646
        'methodname' => 'get_courses',
647
        'classpath' => 'course/externallib.php',
648
        'description' => 'Return course details',
649
        'type' => 'read',
650
        'capabilities' => 'moodle/course:view, moodle/course:update, moodle/course:viewhiddencourses',
651
        'ajax' => true,
652
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
653
    ),
654
    'core_course_import_course' => array(
655
        'classname' => 'core_course_external',
656
        'methodname' => 'import_course',
657
        'classpath' => 'course/externallib.php',
658
        'description' => 'Import course data from a course into another course. Does not include any user data.',
659
        'type' => 'write',
660
        'capabilities' => 'moodle/backup:backuptargetimport, moodle/restore:restoretargetimport'
661
    ),
662
    'core_course_search_courses' => array(
663
        'classname' => 'core_course_external',
664
        'methodname' => 'search_courses',
665
        'classpath' => 'course/externallib.php',
666
        'description' => 'Search courses by (name, module, block, tag)',
667
        'type' => 'read',
668
        'ajax' => true,
669
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
670
    ),
671
    'core_course_update_categories' => array(
672
        'classname' => 'core_course_external',
673
        'methodname' => 'update_categories',
674
        'classpath' => 'course/externallib.php',
675
        'description' => 'Update categories',
676
        'type' => 'write',
677
        'capabilities' => 'moodle/category:manage',
678
    ),
679
    'core_course_update_courses' => array(
680
        'classname' => 'core_course_external',
681
        'methodname' => 'update_courses',
682
        'classpath' => 'course/externallib.php',
683
        'description' => 'Update courses',
684
        'type' => 'write',
685
        'capabilities' => 'moodle/course:update, moodle/course:changecategory, moodle/course:changefullname, '
686
            . 'moodle/course:changeshortname, moodle/course:changeidnumber, moodle/course:changesummary, moodle/course:visibility'
687
    ),
688
    'core_course_view_course' => array(
689
        'classname' => 'core_course_external',
690
        'methodname' => 'view_course',
691
        'classpath' => 'course/externallib.php',
692
        'description' => 'Log that the course was viewed',
693
        'type' => 'write',
694
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
695
    ),
696
    'core_course_get_user_navigation_options' => array(
697
        'classname' => 'core_course_external',
698
        'methodname' => 'get_user_navigation_options',
699
        'classpath' => 'course/externallib.php',
700
        'description' => 'Return a list of navigation options in a set of courses that are avaialable or not for the current user.',
701
        'type' => 'read',
702
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
703
    ),
704
    'core_course_get_user_administration_options' => array(
705
        'classname' => 'core_course_external',
706
        'methodname' => 'get_user_administration_options',
707
        'classpath' => 'course/externallib.php',
708
        'description' => 'Return a list of administration options in a set of courses that are avaialable or not for the current
709
                            user.',
710
        'type' => 'read',
711
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
712
    ),
713
    'core_course_get_courses_by_field' => array(
714
        'classname' => 'core_course_external',
715
        'methodname' => 'get_courses_by_field',
716
        'classpath' => 'course/externallib.php',
717
        'description' => 'Get courses matching a specific field (id/s, shortname, idnumber, category)',
718
        'type' => 'read',
719
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
720
    ),
721
    'core_course_check_updates' => array(
722
        'classname' => 'core_course_external',
723
        'methodname' => 'check_updates',
724
        'classpath' => 'course/externallib.php',
725
        'description' => 'Check if there is updates affecting the user for the given course and contexts.',
726
        'type' => 'read',
727
        'ajax' => true,
728
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
729
    ),
730
    'core_course_get_updates_since' => array(
731
        'classname' => 'core_course_external',
732
        'methodname' => 'get_updates_since',
733
        'classpath' => 'course/externallib.php',
734
        'description' => 'Check if there are updates affecting the user for the given course since the given time stamp.',
735
        'type' => 'read',
736
        'ajax' => true,
737
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
738
    ),
739
    'core_course_get_enrolled_courses_by_timeline_classification' => array(
740
        'classname' => 'core_course_external',
741
        'methodname' => 'get_enrolled_courses_by_timeline_classification',
742
        'classpath' => 'course/externallib.php',
743
        'description' => 'List of enrolled courses for the given timeline classification (past, inprogress, or future).',
744
        'type' => 'read',
745
        'ajax' => true,
746
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
747
    ),
748
    'core_course_get_enrolled_courses_with_action_events_by_timeline_classification' => array(
749
        'classname' => '\core_course\external\get_enrolled_courses_with_action_events_by_timeline_classification',
750
        'methodname' => 'execute',
751
        'classpath' => '',
752
        'description' => 'List of enrolled courses with action events in a given timeframe, for the given timeline classification.',
753
        'type' => 'read',
754
        'ajax' => true,
755
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
756
        'readonlysession' => true,
757
    ),
758
    'core_course_get_recent_courses' => array(
759
        'classname' => 'core_course_external',
760
        'methodname' => 'get_recent_courses',
761
        'classpath' => 'course/externallib.php',
762
        'description' => 'List of courses a user has accessed most recently.',
763
        'type' => 'read',
764
        'ajax' => true,
765
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
766
    ),
767
    'core_course_set_favourite_courses' => array(
768
        'classname' => 'core_course_external',
769
        'methodname' => 'set_favourite_courses',
770
        'classpath' => 'course/externallib.php',
771
        'description' => 'Add a list of courses to the list of favourite courses.',
772
        'type' => 'read',
773
        'ajax' => true,
774
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
775
    ),
776
    'core_course_get_enrolled_users_by_cmid' => array(
777
        'classname' => 'core_course_external',
778
        'methodname' => 'get_enrolled_users_by_cmid',
779
        'classpath' => 'course/externallib.php',
780
        'description' => 'List users by course module id, filter by group and active enrolment status.',
781
        'type' => 'read',
782
        'ajax' => true,
783
    ),
784
    'core_course_add_content_item_to_user_favourites' => array(
785
        'classname' => 'core_course_external',
786
        'methodname' => 'add_content_item_to_user_favourites',
787
        'classpath' => 'course/externallib.php',
788
        'description' => 'Adds a content item (activity, resource or their subtypes) to the favourites for the user.',
789
        'type' => 'write',
790
        'ajax' => true,
791
    ),
792
    'core_course_remove_content_item_from_user_favourites' => array(
793
        'classname' => 'core_course_external',
794
        'methodname' => 'remove_content_item_from_user_favourites',
795
        'classpath' => 'course/externallib.php',
796
        'description' => 'Removes a content item (activity, resource or their subtypes) from the favourites for the user.',
797
        'type' => 'write',
798
        'ajax' => true,
799
    ),
800
    'core_course_get_course_content_items' => array(
801
        'classname' => 'core_course_external',
802
        'methodname' => 'get_course_content_items',
803
        'classpath' => 'course/externallib.php',
804
        'description' => 'Fetch all the content items (activities, resources and their subtypes) for the activity picker',
805
        'type' => 'read',
806
        'ajax' => true,
807
    ),
808
    'core_course_get_activity_chooser_footer' => array(
809
        'classname' => 'core_course_external',
810
        'methodname' => 'get_activity_chooser_footer',
811
        'classpath' => 'course/externallib.php',
812
        'description' => 'Fetch the data for the activity chooser footer.',
813
        'type' => 'read',
814
        'ajax' => true,
815
    ),
816
    'core_course_toggle_activity_recommendation' => array(
817
        'classname' => 'core_course_external',
818
        'methodname' => 'toggle_activity_recommendation',
819
        'classpath' => 'course/externallib.php',
820
        'description' => 'Adds or removes an activity as a recommendation in the activity chooser.',
821
        'type' => 'write',
822
        'ajax' => true,
823
    ),
824
    'core_enrol_get_course_enrolment_methods' => array(
825
        'classname' => 'core_enrol_external',
826
        'methodname' => 'get_course_enrolment_methods',
827
        'classpath' => 'enrol/externallib.php',
828
        'description' => 'Get the list of course enrolment methods',
829
        'type' => 'read',
830
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
831
    ),
832
    'core_enrol_get_enrolled_users' => array(
833
        'classname' => 'core_enrol_external',
834
        'methodname' => 'get_enrolled_users',
835
        'classpath' => 'enrol/externallib.php',
836
        'description' => 'Get enrolled users by course id.',
837
        'type' => 'read',
838
        'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, '
839
            . 'moodle/site:accessallgroups',
840
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
841
    ),
842
    'core_enrol_get_enrolled_users_with_capability' => array(
843
        'classname' => 'core_enrol_external',
844
        'methodname' => 'get_enrolled_users_with_capability',
845
        'classpath' => 'enrol/externallib.php',
846
        'description' => 'For each course and capability specified, return a list of the users that are enrolled in the course
847
                                  and have that capability',
848
        'type' => 'read',
849
    ),
850
    'core_enrol_get_potential_users' => array(
851
        'classname' => 'core_enrol_external',
852
        'methodname' => 'get_potential_users',
853
        'classpath' => 'enrol/externallib.php',
854
        'description' => 'Get the list of potential users to enrol',
855
        'ajax' => true,
856
        'type' => 'read',
1441 ariadna 857
        'capabilities' => 'moodle/course:enrolreview',
858
        'readonlysession' => true,
1 efrain 859
    ),
860
    'core_enrol_search_users' => [
861
        'classname' => 'core_enrol_external',
862
        'methodname' => 'search_users',
863
        'classpath' => 'enrol/externallib.php',
864
        'description' => 'Search within the list of course participants',
865
        'ajax' => true,
866
        'type' => 'read',
867
        'capabilities' => 'moodle/course:viewparticipants',
868
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
869
    ],
870
    'core_enrol_get_users_courses' => array(
871
        'classname' => 'core_enrol_external',
872
        'methodname' => 'get_users_courses',
873
        'classpath' => 'enrol/externallib.php',
874
        'description' => 'Get the list of courses where a user is enrolled in',
875
        'type' => 'read',
876
        'capabilities' => 'moodle/course:viewparticipants',
877
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
878
    ),
879
    'core_enrol_submit_user_enrolment_form' => array(
880
        'classname' => 'core_enrol_external',
881
        'methodname' => 'submit_user_enrolment_form',
882
        'classpath' => 'enrol/externallib.php',
883
        'description' => 'Submit form data for enrolment form',
884
        'type' => 'write',
885
        'ajax' => true,
886
    ),
887
    'core_enrol_unenrol_user_enrolment' => array(
888
        'classname' => 'core_enrol_external',
889
        'methodname' => 'unenrol_user_enrolment',
890
        'classpath' => 'enrol/externallib.php',
891
        'description' => 'External function that unenrols a given user enrolment',
892
        'type' => 'write',
893
        'ajax' => true,
894
    ),
895
    'core_fetch_notifications' => array(
896
        'classname' => 'core_external',
897
        'methodname' => 'fetch_notifications',
898
        'classpath' => 'lib/external/externallib.php',
899
        'description' => 'Return a list of notifications for the current session',
900
        'type' => 'read',
901
        'loginrequired' => false,
902
        'ajax' => true,
903
        'readonlysession' => false, // Fetching removes from stack.
904
    ),
905
    'core_session_touch' => array(
906
        'classname' => 'core\session\external',
907
        'methodname' => 'touch_session',
908
        'description' => 'Keep the users session alive',
909
        'type' => 'read',
910
        'loginrequired' => true,
911
        'ajax' => true,
912
    ),
913
    'core_session_time_remaining' => array(
914
        'classname' => 'core\session\external',
915
        'methodname' => 'time_remaining',
916
        'description' => 'Count the seconds remaining in this session',
917
        'type' => 'read',
918
        'loginrequired' => true,
919
        'ajax' => true,
920
    ),
921
    'core_files_get_files' => array(
922
        'classname' => 'core_files_external',
923
        'methodname' => 'get_files',
924
        'description' => 'browse moodle files',
925
        'type' => 'read',
926
        'classpath' => 'files/externallib.php',
927
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
928
    ),
929
    'core_files_upload' => array(
930
        'classname' => 'core_files_external',
931
        'methodname' => 'upload',
932
        'description' => 'upload a file to moodle',
933
        'type'        => 'write',
934
        'classpath'   => 'files/externallib.php',
935
    ),
936
    'core_files_delete_draft_files' => array(
937
        'classname' => 'core_files\external\delete\draft',
938
        'description' => 'Delete the indicated files (or directories) from a user draft file area.',
939
        'type'        => 'write',
940
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
941
    ),
942
    'core_files_get_unused_draft_itemid' => array(
943
        'classname' => 'core_files\external\get\unused_draft',
944
        'description' => 'Generate a new draft itemid for the current user.',
945
        'type'        => 'write',
946
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
947
    ),
948
    'core_form_get_filetypes_browser_data' => array(
949
        'classname' => 'core_form\external',
950
        'methodname' => 'get_filetypes_browser_data',
951
        'classpath' => '',
952
        'description' => 'Provides data for the filetypes element browser.',
953
        'type' => 'read',
954
        'loginrequired' => false,
955
        'ajax' => true,
956
    ),
957
    'core_form_dynamic_form' => array(
958
        'classname' => 'core_form\external\dynamic_form',
959
        'description' => 'Process submission of a dynamic (modal) form',
960
        'type' => 'write',
961
        'ajax' => true,
962
    ),
963
    'core_get_component_strings' => array(
964
        'classname' => 'core_external',
965
        'methodname' => 'get_component_strings',
966
        'classpath' => 'lib/external/externallib.php',
967
        'description' => 'Return all raw strings (with {$a->xxx}), for a specific component ' .
968
            '- similar to core get_component_strings(), call',
969
        'type' => 'read',
970
        'loginrequired' => false,
971
        'ajax' => true,
972
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
973
    ),
974
    'core_get_fragment' => array(
975
        'classname' => 'core_external',
976
        'methodname' => 'get_fragment',
977
        'classpath' => 'lib/external/externallib.php',
978
        'description' => 'Return a fragment for inclusion, such as a JavaScript page.',
979
        'type' => 'read',
980
        'ajax' => true,
981
    ),
982
    'core_get_string' => array(
983
        'classname' => 'core_external',
984
        'methodname' => 'get_string',
985
        'classpath' => 'lib/external/externallib.php',
986
        'description' => 'Return a translated string - similar to core get_string(), call',
987
        'type' => 'read',
988
        'loginrequired' => false,
989
        'ajax' => true,
990
    ),
991
    'core_get_strings' => array(
992
        'classname' => 'core_external',
993
        'methodname' => 'get_strings',
994
        'classpath' => 'lib/external/externallib.php',
995
        'description' => 'Return some translated strings - like several core get_string(), calls',
996
        'type' => 'read',
997
        'loginrequired' => false,
998
        'ajax' => true,
999
    ),
1000
    'core_get_user_dates' => array(
1001
        'classname' => 'core_external',
1002
        'methodname' => 'get_user_dates',
1003
        'classpath' => 'lib/external/externallib.php',
1004
        'description' => 'Return formatted timestamps',
1005
        'type' => 'read',
1006
        'ajax' => true,
1007
    ),
1008
    'core_grades_update_grades' => array(
1009
        'classname' => 'core_grades_external',
1010
        'methodname' => 'update_grades',
1011
        'description' => 'Update a grade item and associated student grades.',
1012
        'type' => 'write',
1013
    ),
1014
    'core_grades_grader_gradingpanel_point_fetch' => [
1015
        'classname' => 'core_grades\\grades\\grader\\gradingpanel\\point\\external\\fetch',
1016
        'description' => 'Fetch the data required to display the grader grading panel for simple grading, ' .
1017
            'creating the grade item if required',
1018
        'type' => 'write',
1019
        'ajax' => true,
1020
        'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
1021
    ],
1022
    'core_grades_grader_gradingpanel_point_store' => [
1023
        'classname' => 'core_grades\\grades\\grader\\gradingpanel\\point\\external\\store',
1024
        'description' => 'Store the data required to display the grader grading panel for simple grading',
1025
        'type' => 'write',
1026
        'ajax' => true,
1027
        'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
1028
    ],
1029
    'core_grades_grader_gradingpanel_scale_fetch' => [
1030
        'classname' => 'core_grades\\grades\\grader\\gradingpanel\\scale\\external\\fetch',
1031
        'description' => 'Fetch the data required to display the grader grading panel for scale-based grading, ' .
1032
            'creating the grade item if required',
1033
        'type' => 'write',
1034
        'ajax' => true,
1035
        'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
1036
    ],
1037
    'core_grades_grader_gradingpanel_scale_store' => [
1038
        'classname' => 'core_grades\\grades\\grader\\gradingpanel\\scale\\external\\store',
1039
        'description' => 'Store the data required to display the grader grading panel for scale-based grading',
1040
        'type' => 'write',
1041
        'ajax' => true,
1042
        'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
1043
    ],
1044
    'core_grades_create_gradecategories' => array (
1045
        'classname' => 'core_grades\external\create_gradecategories',
1046
        'description' => 'Create grade categories inside a course gradebook.',
1047
        'type' => 'write',
1048
        'capabilities' => 'moodle/grade:manage',
1049
    ),
1050
    'core_grades_get_enrolled_users_for_selector' => array (
1051
        'classname' => 'core_grades\external\get_enrolled_users_for_selector',
1052
        'description' => 'Returns the enrolled users within and map some fields to the returned array of user objects.',
1053
        'type' => 'read',
1054
        'ajax' => true,
1055
        'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
1056
    ),
1057
    'core_grades_get_groups_for_selector' => [
1058
        'classname' => 'core_group\external\get_groups_for_selector',
1059
        'description' => '** DEPRECATED ** Please do not call this function any more. ' .
1060
            'Use core_group_get_groups_for_selector instead. ' .
1061
            'Get the group/(s) for a course',
1062
        'type' => 'read',
1063
        'ajax' => true,
1064
        'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
1065
    ],
1066
    'core_grades_get_feedback' => [
1067
        'classname' => 'core_grades\external\get_feedback',
1068
        'description' => 'Get the feedback data for a grade item',
1069
        'type' => 'read',
1070
        'ajax' => true,
1071
        ],
1072
    'core_grades_get_gradeitems' => [
1073
        'classname' => 'core_grades\external\get_gradeitems',
1074
        'description' => 'Get the gradeitems for a course',
1075
        'type' => 'read',
1076
        'ajax' => true,
1077
        'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
1078
    ],
1079
    'core_grades_get_grade_tree' => [
1080
        'classname' => 'core_grades\external\get_grade_tree',
1081
        'description' => 'Get the grade tree structure for a course',
1082
        'type' => 'read',
1083
        'ajax' => true,
1084
    ],
1085
    'core_grades_get_gradable_users' => [
1086
        'classname' => 'core_grades\external\get_gradable_users',
1087
        'description' => 'Returns the gradable users in a course',
1088
        'type' => 'read',
1089
        'ajax' => true,
1090
        'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
1091
    ],
1092
    'core_grading_get_definitions' => array(
1093
        'classname' => 'core_grading_external',
1094
        'methodname' => 'get_definitions',
1095
        'description' => 'Get grading definitions',
1096
        'type' => 'read',
1097
    ),
1098
    'core_grading_get_gradingform_instances' => array(
1099
        'classname' => 'core_grading_external',
1100
        'methodname' => 'get_gradingform_instances',
1101
        'description' => 'Get grading form instances',
1102
        'type' => 'read',
1103
    ),
1104
    'core_grading_save_definitions' => array(
1105
        'classname' => 'core_grading_external',
1106
        'methodname' => 'save_definitions',
1107
        'description' => 'Save grading definitions',
1108
        'type' => 'write',
1109
    ),
1110
    'core_group_add_group_members' => array(
1111
        'classname' => 'core_group_external',
1112
        'methodname' => 'add_group_members',
1113
        'classpath' => 'group/externallib.php',
1114
        'description' => 'Adds group members.',
1115
        'type' => 'write',
1116
        'capabilities' => 'moodle/course:managegroups',
1117
    ),
1118
    'core_group_assign_grouping' => array(
1119
        'classname' => 'core_group_external',
1120
        'methodname' => 'assign_grouping',
1121
        'classpath' => 'group/externallib.php',
1122
        'description' => 'Assing groups from groupings',
1123
        'type' => 'write',
1124
    ),
1125
    'core_group_create_groupings' => array(
1126
        'classname' => 'core_group_external',
1127
        'methodname' => 'create_groupings',
1128
        'classpath' => 'group/externallib.php',
1129
        'description' => 'Creates new groupings',
1130
        'type' => 'write',
1131
    ),
1132
    'core_group_create_groups' => array(
1133
        'classname' => 'core_group_external',
1134
        'methodname' => 'create_groups',
1135
        'classpath' => 'group/externallib.php',
1136
        'description' => 'Creates new groups.',
1137
        'type' => 'write',
1138
        'capabilities' => 'moodle/course:managegroups'
1139
    ),
1140
    'core_group_delete_group_members' => array(
1141
        'classname' => 'core_group_external',
1142
        'methodname' => 'delete_group_members',
1143
        'classpath' => 'group/externallib.php',
1144
        'description' => 'Deletes group members.',
1145
        'type' => 'write',
1146
        'capabilities' => 'moodle/course:managegroups'
1147
    ),
1148
    'core_group_delete_groupings' => array(
1149
        'classname' => 'core_group_external',
1150
        'methodname' => 'delete_groupings',
1151
        'classpath' => 'group/externallib.php',
1152
        'description' => 'Deletes all specified groupings.',
1153
        'type' => 'write',
1154
    ),
1155
    'core_group_delete_groups' => array(
1156
        'classname' => 'core_group_external',
1157
        'methodname' => 'delete_groups',
1158
        'classpath' => 'group/externallib.php',
1159
        'description' => 'Deletes all specified groups.',
1160
        'type' => 'write',
1161
        'capabilities' => 'moodle/course:managegroups'
1162
    ),
1163
    'core_group_get_activity_allowed_groups' => array(
1164
        'classname' => 'core_group_external',
1165
        'methodname' => 'get_activity_allowed_groups',
1166
        'classpath' => 'group/externallib.php',
1167
        'description' => 'Gets a list of groups that the user is allowed to access within the specified activity.',
1168
        'type' => 'read',
1169
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1170
    ),
1171
    'core_group_get_activity_groupmode' => array(
1172
        'classname' => 'core_group_external',
1173
        'methodname' => 'get_activity_groupmode',
1174
        'classpath' => 'group/externallib.php',
1175
        'description' => 'Returns effective groupmode used in a given activity.',
1176
        'type' => 'read',
1177
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1178
    ),
1179
    'core_group_get_course_groupings' => array(
1180
        'classname' => 'core_group_external',
1181
        'methodname' => 'get_course_groupings',
1182
        'classpath' => 'group/externallib.php',
1183
        'description' => 'Returns all groupings in specified course.',
1184
        'type' => 'read',
1185
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1186
    ),
1187
    'core_group_get_course_groups' => array(
1188
        'classname' => 'core_group_external',
1189
        'methodname' => 'get_course_groups',
1190
        'classpath' => 'group/externallib.php',
1191
        'description' => 'Returns all groups in specified course.',
1192
        'type' => 'read',
1193
        'ajax' => true,
1194
        'capabilities' => 'moodle/course:managegroups',
1195
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1196
    ),
1197
    'core_group_get_course_user_groups' => array(
1198
        'classname' => 'core_group_external',
1199
        'methodname' => 'get_course_user_groups',
1200
        'classpath' => 'group/externallib.php',
1201
        'description' => 'Returns all groups in specified course for the specified user.',
1202
        'type' => 'read',
1203
        'capabilities' => 'moodle/course:managegroups',
1204
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1205
    ),
1206
    'core_group_get_group_members' => array(
1207
        'classname' => 'core_group_external',
1208
        'methodname' => 'get_group_members',
1209
        'classpath' => 'group/externallib.php',
1210
        'description' => 'Returns group members.',
1211
        'type' => 'read',
1212
        'capabilities' => 'moodle/course:managegroups'
1213
    ),
1214
    'core_group_get_groupings' => array(
1215
        'classname' => 'core_group_external',
1216
        'methodname' => 'get_groupings',
1217
        'classpath' => 'group/externallib.php',
1218
        'description' => 'Returns groupings details.',
1219
        'type' => 'read',
1220
    ),
1221
    'core_group_get_groups' => array(
1222
        'classname' => 'core_group_external',
1223
        'methodname' => 'get_groups',
1224
        'classpath' => 'group/externallib.php',
1225
        'description' => 'Returns group details.',
1226
        'type' => 'read',
1227
        'capabilities' => 'moodle/course:managegroups'
1228
    ),
1229
    'core_group_get_groups_for_selector' => [
1230
        'classname' => 'core_group\external\get_groups_for_selector',
1231
        'description' => 'Get the group/(s) for a course',
1232
        'type' => 'read',
1233
        'ajax' => true,
1234
        'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
1235
    ],
1236
    'core_group_unassign_grouping' => array(
1237
        'classname' => 'core_group_external',
1238
        'methodname' => 'unassign_grouping',
1239
        'classpath' => 'group/externallib.php',
1240
        'description' => 'Unassing groups from groupings',
1241
        'type' => 'write',
1242
    ),
1243
    'core_group_update_groupings' => array(
1244
        'classname' => 'core_group_external',
1245
        'methodname' => 'update_groupings',
1246
        'classpath' => 'group/externallib.php',
1247
        'description' => 'Updates existing groupings',
1248
        'type' => 'write',
1249
    ),
1250
    'core_group_update_groups' => array(
1251
        'classname' => 'core_group_external',
1252
        'methodname' => 'update_groups',
1253
        'classpath' => 'group/externallib.php',
1254
        'description' => 'Updates existing groups.',
1255
        'type' => 'write',
1256
        'capabilities' => 'moodle/course:managegroups'
1257
    ),
1258
    'core_message_mute_conversations' => array(
1259
        'classname' => 'core_message_external',
1260
        'methodname' => 'mute_conversations',
1261
        'classpath' => 'message/externallib.php',
1262
        'description' => 'Mutes a list of conversations',
1263
        'type' => 'write',
1264
        'ajax' => true,
1265
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1266
    ),
1267
    'core_message_unmute_conversations' => array(
1268
        'classname' => 'core_message_external',
1269
        'methodname' => 'unmute_conversations',
1270
        'classpath' => 'message/externallib.php',
1271
        'description' => 'Unmutes a list of conversations',
1272
        'type' => 'write',
1273
        'ajax' => true,
1274
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1275
    ),
1276
    'core_message_block_user' => array(
1277
        'classname' => 'core_message_external',
1278
        'methodname' => 'block_user',
1279
        'classpath' => 'message/externallib.php',
1280
        'description' => 'Blocks a user',
1281
        'type' => 'write',
1282
        'ajax' => true,
1283
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1284
    ),
1285
    'core_message_get_contact_requests' => array(
1286
        'classname' => 'core_message_external',
1287
        'methodname' => 'get_contact_requests',
1288
        'classpath' => 'message/externallib.php',
1289
        'description' => 'Returns contact requests for a user',
1290
        'type' => 'read',
1291
        'ajax' => true,
1292
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1293
    ),
1294
    'core_message_create_contact_request' => array(
1295
        'classname' => 'core_message_external',
1296
        'methodname' => 'create_contact_request',
1297
        'classpath' => 'message/externallib.php',
1298
        'description' => 'Creates a contact request',
1299
        'type' => 'write',
1300
        'ajax' => true,
1301
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1302
    ),
1303
    'core_message_confirm_contact_request' => array(
1304
        'classname' => 'core_message_external',
1305
        'methodname' => 'confirm_contact_request',
1306
        'classpath' => 'message/externallib.php',
1307
        'description' => 'Confirms a contact request',
1308
        'type' => 'write',
1309
        'ajax' => true,
1310
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1311
    ),
1312
    'core_message_decline_contact_request' => array(
1313
        'classname' => 'core_message_external',
1314
        'methodname' => 'decline_contact_request',
1315
        'classpath' => 'message/externallib.php',
1316
        'description' => 'Declines a contact request',
1317
        'type' => 'write',
1318
        'ajax' => true,
1319
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1320
    ),
1321
    'core_message_get_received_contact_requests_count' => array(
1322
        'classname' => 'core_message_external',
1323
        'methodname' => 'get_received_contact_requests_count',
1324
        'classpath' => 'message/externallib.php',
1325
        'description' => 'Gets the number of received contact requests',
1326
        'type' => 'read',
1327
        'ajax' => true,
1328
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1329
    ),
1330
    'core_message_delete_contacts' => array(
1331
        'classname' => 'core_message_external',
1332
        'methodname' => 'delete_contacts',
1333
        'classpath' => 'message/externallib.php',
1334
        'description' => 'Remove contacts from the contact list',
1335
        'type' => 'write',
1336
        'ajax' => true,
1337
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1338
    ),
1339
    'core_message_delete_conversations_by_id' => array(
1340
        'classname' => 'core_message_external',
1341
        'methodname' => 'delete_conversations_by_id',
1342
        'classpath' => 'message/externallib.php',
1343
        'description' => 'Deletes a list of conversations.',
1344
        'type' => 'write',
1345
        'capabilities' => 'moodle/site:deleteownmessage',
1346
        'ajax' => true,
1347
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1348
    ),
1349
    'core_message_delete_message' => array(
1350
        'classname' => 'core_message_external',
1351
        'methodname' => 'delete_message',
1352
        'classpath' => 'message/externallib.php',
1353
        'description' => 'Deletes a message.',
1354
        'type' => 'write',
1355
        'capabilities' => 'moodle/site:deleteownmessage',
1356
        'ajax' => true,
1357
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1358
    ),
1359
    'core_message_get_blocked_users' => array(
1360
        'classname' => 'core_message_external',
1361
        'methodname' => 'get_blocked_users',
1362
        'classpath' => 'message/externallib.php',
1363
        'description' => 'Retrieve a list of users blocked',
1364
        'type' => 'read',
1365
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1366
    ),
1367
    'core_message_data_for_messagearea_search_messages' => array(
1368
        'classname' => 'core_message_external',
1369
        'methodname' => 'data_for_messagearea_search_messages',
1370
        'classpath' => 'message/externallib.php',
1371
        'description' => 'Retrieve the template data for searching for messages',
1372
        'type' => 'read',
1373
        'ajax' => true,
1374
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1375
    ),
1376
    'core_message_message_search_users' => array(
1377
        'classname' => 'core_message_external',
1378
        'methodname' => 'message_search_users',
1379
        'classpath' => 'message/externallib.php',
1380
        'description' => 'Retrieve the data for searching for people',
1381
        'type' => 'read',
1382
        'ajax' => true,
1383
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1384
    ),
1385
    'core_message_get_user_contacts' => array(
1386
        'classname' => 'core_message_external',
1387
        'methodname' => 'get_user_contacts',
1388
        'classpath' => 'message/externallib.php',
1389
        'description' => 'Retrieve the contact list',
1390
        'type' => 'read',
1391
        'ajax' => true,
1392
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1393
    ),
1394
    'core_message_get_conversations' => array(
1395
        'classname' => 'core_message_external',
1396
        'methodname' => 'get_conversations',
1397
        'classpath' => 'message/externallib.php',
1398
        'description' => 'Retrieve a list of conversations for a user',
1399
        'type' => 'read',
1400
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1401
        'ajax' => true
1402
    ),
1403
    'core_message_get_conversation' => array(
1404
        'classname' => 'core_message_external',
1405
        'methodname' => 'get_conversation',
1406
        'classpath' => 'message/externallib.php',
1407
        'description' => 'Retrieve a conversation for a user',
1408
        'type' => 'read',
1409
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1410
        'ajax' => true
1411
    ),
1412
    'core_message_get_conversation_between_users' => array(
1413
        'classname' => 'core_message_external',
1414
        'methodname' => 'get_conversation_between_users',
1415
        'classpath' => 'message/externallib.php',
1416
        'description' => 'Retrieve a conversation for a user between another user',
1417
        'type' => 'read',
1418
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1419
        'ajax' => true
1420
    ),
1421
    'core_message_get_self_conversation' => array(
1422
        'classname' => 'core_message_external',
1423
        'methodname' => 'get_self_conversation',
1424
        'classpath' => 'message/externallib.php',
1425
        'description' => 'Retrieve a self-conversation for a user',
1426
        'type' => 'read',
1427
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1428
        'ajax' => true
1429
    ),
1430
    'core_message_get_messages' => array(
1431
        'classname' => 'core_message_external',
1432
        'methodname' => 'get_messages',
1433
        'classpath' => 'message/externallib.php',
1434
        'description' => 'Retrieve a list of messages sent and received by a user (conversations, notifications or both)',
1435
        'type' => 'read',
1436
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1437
        'ajax' => true,
1438
    ),
1439
    'core_message_get_conversation_counts' => array(
1440
        'classname' => 'core_message_external',
1441
        'methodname' => 'get_conversation_counts',
1442
        'classpath' => 'message/externallib.php',
1443
        'description' => 'Retrieve a list of conversation counts, indexed by type.',
1444
        'type' => 'read',
1445
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1446
        'ajax' => true,
1447
    ),
1448
    'core_message_get_unread_conversation_counts' => array(
1449
        'classname' => 'core_message_external',
1450
        'methodname' => 'get_unread_conversation_counts',
1451
        'classpath' => 'message/externallib.php',
1452
        'description' => 'Retrieve a list of unread conversation counts, indexed by type.',
1453
        'type' => 'read',
1454
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1455
        'ajax' => true,
1456
    ),
1457
    'core_message_get_conversation_members' => array(
1458
        'classname' => 'core_message_external',
1459
        'methodname' => 'get_conversation_members',
1460
        'classpath' => 'message/externallib.php',
1461
        'description' => 'Retrieve a list of members in a conversation',
1462
        'type' => 'read',
1463
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1464
        'ajax' => true,
1465
    ),
1466
    'core_message_get_member_info' => array(
1467
        'classname' => 'core_message_external',
1468
        'methodname' => 'get_member_info',
1469
        'classpath' => 'message/externallib.php',
1470
        'description' => 'Retrieve a user message profiles',
1471
        'type' => 'read',
1472
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1473
        'ajax' => true,
1474
    ),
1475
    'core_message_get_unread_conversations_count' => array(
1476
        'classname' => 'core_message_external',
1477
        'methodname' => 'get_unread_conversations_count',
1478
        'classpath' => 'message/externallib.php',
1479
        'description' => 'Retrieve the count of unread conversations for a given user',
1480
        'type' => 'read',
1481
        'ajax' => true,
1482
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1483
        'readonlysession' => true, // We don't modify the session.
1484
    ),
1485
    'core_message_mark_all_notifications_as_read' => array(
1486
        'classname' => 'core_message_external',
1487
        'methodname' => 'mark_all_notifications_as_read',
1488
        'classpath' => 'message/externallib.php',
1489
        'description' => 'Mark all notifications as read for a given user',
1490
        'type' => 'write',
1491
        'ajax' => true,
1492
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1493
    ),
1494
    'core_message_mark_all_conversation_messages_as_read' => array(
1495
        'classname' => 'core_message_external',
1496
        'methodname' => 'mark_all_conversation_messages_as_read',
1497
        'classpath' => 'message/externallib.php',
1498
        'description' => 'Mark all conversation messages as read for a given user',
1499
        'type' => 'write',
1500
        'ajax' => true,
1501
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1502
    ),
1503
    'core_message_mark_message_read' => array(
1504
        'classname' => 'core_message_external',
1505
        'methodname' => 'mark_message_read',
1506
        'classpath' => 'message/externallib.php',
1507
        'description' => 'Mark a single message as read, trigger message_viewed event.',
1508
        'type' => 'write',
1509
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1510
        'ajax' => true,
1511
    ),
1512
    'core_message_mark_notification_read' => array(
1513
        'classname' => 'core_message_external',
1514
        'methodname' => 'mark_notification_read',
1515
        'classpath' => 'message/externallib.php',
1516
        'description' => 'Mark a single notification as read, trigger notification_viewed event.',
1517
        'type' => 'write',
1518
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1519
        'ajax' => true,
1520
    ),
1521
    'core_message_message_processor_config_form' => array(
1522
        'classname' => 'core_message_external',
1523
        'methodname' => 'message_processor_config_form',
1524
        'classpath' => 'message/externallib.php',
1525
        'description' => 'Process the message processor config form',
1526
        'type' => 'write',
1527
        'ajax' => true,
1528
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1529
    ),
1530
    'core_message_get_message_processor' => array(
1531
        'classname' => 'core_message_external',
1532
        'methodname' => 'get_message_processor',
1533
        'classpath' => 'message/externallib.php',
1534
        'description' => 'Get a message processor',
1535
        'type' => 'read',
1536
        'ajax' => true,
1537
    ),
1538
    'core_message_search_contacts' => array(
1539
        'classname' => 'core_message_external',
1540
        'methodname' => 'search_contacts',
1541
        'classpath' => 'message/externallib.php',
1542
        'description' => 'Search for contacts',
1543
        'type' => 'read',
1544
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1545
    ),
1546
    'core_message_send_instant_messages' => array(
1547
        'classname' => 'core_message_external',
1548
        'methodname' => 'send_instant_messages',
1549
        'classpath' => 'message/externallib.php',
1550
        'description' => 'Send instant messages',
1551
        'type' => 'write',
1552
        'capabilities' => 'moodle/site:sendmessage',
1553
        'ajax' => true,
1554
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1555
        'readonlysession' => true,
1556
    ),
1557
    'core_message_send_messages_to_conversation' => array(
1558
        'classname' => 'core_message_external',
1559
        'methodname' => 'send_messages_to_conversation',
1560
        'classpath' => 'message/externallib.php',
1561
        'description' => 'Send messages to an existing conversation between users',
1562
        'type' => 'write',
1563
        'capabilities' => 'moodle/site:sendmessage',
1564
        'ajax' => true,
1565
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1566
    ),
1567
    'core_message_get_conversation_messages' => array(
1568
        'classname' => 'core_message_external',
1569
        'methodname' => 'get_conversation_messages',
1570
        'classpath' => 'message/externallib.php',
1571
        'description' => 'Retrieve the conversation messages and relevant member information',
1572
        'type' => 'read',
1573
        'ajax' => true,
1574
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1575
    ),
1576
    'core_message_unblock_user' => array(
1577
        'classname' => 'core_message_external',
1578
        'methodname' => 'unblock_user',
1579
        'classpath' => 'message/externallib.php',
1580
        'description' => 'Unblocks a user',
1581
        'type' => 'write',
1582
        'ajax' => true,
1583
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1584
    ),
1585
    'core_message_get_user_notification_preferences' => array(
1586
        'classname' => 'core_message_external',
1587
        'methodname' => 'get_user_notification_preferences',
1588
        'classpath' => 'message/externallib.php',
1589
        'description' => 'Get the notification preferences for a given user.',
1590
        'type' => 'read',
1591
        'capabilities' => 'moodle/user:editownmessageprofile',
1592
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1593
    ),
1594
    'core_message_get_user_message_preferences' => array(
1595
        'classname' => 'core_message_external',
1596
        'methodname' => 'get_user_message_preferences',
1597
        'classpath' => 'message/externallib.php',
1598
        'description' => 'Get the message preferences for a given user.',
1599
        'type' => 'read',
1600
        'capabilities' => 'moodle/user:editownmessageprofile',
1601
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1602
        'ajax' => true
1603
    ),
1604
    'core_message_set_favourite_conversations' => array(
1605
        'classname' => 'core_message_external',
1606
        'methodname' => 'set_favourite_conversations',
1607
        'classpath' => 'message/externallib.php',
1608
        'description' => 'Mark a conversation or group of conversations as favourites/starred conversations.',
1609
        'type' => 'write',
1610
        'ajax' => true,
1611
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1612
    ),
1613
    'core_message_unset_favourite_conversations' => array(
1614
        'classname' => 'core_message_external',
1615
        'methodname' => 'unset_favourite_conversations',
1616
        'classpath' => 'message/externallib.php',
1617
        'description' => 'Unset a conversation or group of conversations as favourites/starred conversations.',
1618
        'type' => 'write',
1619
        'ajax' => true,
1620
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1621
    ),
1622
    'core_message_delete_message_for_all_users' => array(
1623
        'classname' => 'core_message_external',
1624
        'methodname' => 'delete_message_for_all_users',
1625
        'classpath' => 'message/externallib.php',
1626
        'description' => 'Deletes a message for all users.',
1627
        'type' => 'write',
1628
        'capabilities' => 'moodle/site:deleteanymessage',
1629
        'ajax' => true,
1630
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1631
    ),
1632
    'core_message_get_unread_notification_count' => [
1633
        'classname'     => '\core_message\external\get_unread_notification_count',
1634
        'description'   => 'Get number of unread notifications.',
1635
        'type'          => 'read',
1636
        'services'      => [MOODLE_OFFICIAL_MOBILE_SERVICE],
1637
    ],
1441 ariadna 1638
    'core_message_set_default_notification' => [
1639
        'classname'   => 'core_message\external\message_set_default_notification',
1640
        'description' => 'Set the default value for a given notification preference',
1641
        'capabilities' => 'moodle/site:config',
1642
        'type'        => 'write',
1643
        'ajax'        => true,
1644
    ],
1 efrain 1645
    'core_my_view_page' => [
1646
        'classname'     => '\core_my\external\view_page',
1647
        'methodname'    => 'execute',
1648
        'description'   => 'Trigger the My or Dashboard viewed event.',
1649
        'type'          => 'write',
1650
        'services'      => [MOODLE_OFFICIAL_MOBILE_SERVICE],
1651
    ],
1652
    'core_notes_create_notes' => array(
1653
        'classname' => 'core_notes_external',
1654
        'methodname' => 'create_notes',
1655
        'classpath' => 'notes/externallib.php',
1656
        'description' => 'Create notes',
1657
        'type' => 'write',
1658
        'ajax' => true,
1659
        'capabilities' => 'moodle/notes:manage',
1660
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1661
    ),
1662
    'core_notes_delete_notes' => array(
1663
        'classname' => 'core_notes_external',
1664
        'methodname' => 'delete_notes',
1665
        'classpath' => 'notes/externallib.php',
1666
        'description' => 'Delete notes',
1667
        'type' => 'write',
1668
        'capabilities' => 'moodle/notes:manage',
1669
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1670
    ),
1671
    'core_notes_get_course_notes' => array(
1672
        'classname' => 'core_notes_external',
1673
        'methodname' => 'get_course_notes',
1674
        'classpath' => 'notes/externallib.php',
1675
        'description' => 'Returns all notes in specified course (or site), for the specified user.',
1676
        'type' => 'read',
1677
        'capabilities' => 'moodle/notes:view',
1678
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1679
    ),
1680
    'core_notes_get_notes' => array(
1681
        'classname' => 'core_notes_external',
1682
        'methodname' => 'get_notes',
1683
        'classpath' => 'notes/externallib.php',
1684
        'description' => 'Get notes',
1685
        'type' => 'read',
1686
        'capabilities' => 'moodle/notes:view'
1687
    ),
1688
    'core_notes_update_notes' => array(
1689
        'classname' => 'core_notes_external',
1690
        'methodname' => 'update_notes',
1691
        'classpath' => 'notes/externallib.php',
1692
        'description' => 'Update notes',
1693
        'type' => 'write',
1694
        'capabilities' => 'moodle/notes:manage'
1695
    ),
1696
    'core_notes_view_notes' => array(
1697
        'classname' => 'core_notes_external',
1698
        'methodname' => 'view_notes',
1699
        'classpath' => 'notes/externallib.php',
1700
        'description' => 'Simulates the web interface view of notes/index.php: trigger events.',
1701
        'type' => 'write',
1702
        'capabilities' => 'moodle/notes:view',
1703
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1704
    ),
1705
    'core_output_load_template' => array(
1706
        'classname' => 'core\output\external',
1707
        'methodname' => 'load_template',
1708
        'description' => 'Load a template for a renderable',
1709
        'type' => 'read',
1710
        'loginrequired' => false,
1711
        'ajax' => true,
1712
    ),
1713
    'core_output_load_template_with_dependencies' => array(
1714
        'classname' => 'core\output\external',
1715
        'methodname' => 'load_template_with_dependencies',
1716
        'description' => 'Load a template and its dependencies for a renderable',
1717
        'type' => 'read',
1718
        'loginrequired' => false,
1719
        'ajax' => true,
1720
    ),
1721
    'core_output_load_fontawesome_icon_system_map' => array(
1722
        'classname' => 'core\external\output\icon_system\load_fontawesome_map',
1723
        'description' => 'Load the mapping of moodle pix names to fontawesome icon names',
1724
        'type' => 'read',
1725
        'loginrequired' => false,
1726
        'ajax' => true,
1727
    ),
1728
    // Question related functions.
1729
    'core_question_update_flag' => array(
1730
        'classname'     => 'core_question_external',
1731
        'methodname'    => 'update_flag',
1732
        'description'   => 'Update the flag state of a question attempt.',
1733
        'type'          => 'write',
1734
        'capabilities'  => 'moodle/question:flag',
1735
        'services'      => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1736
    ),
1737
    'core_question_get_random_question_summaries' => array(
1738
        'classname' => 'core_question_external',
1739
        'methodname' => 'get_random_question_summaries',
1740
        'description' => 'Get the random question set for a criteria',
1741
        'type' => 'read',
1742
        'ajax' => true,
1743
    ),
1744
    'core_rating_get_item_ratings' => array(
1745
        'classname' => 'core_rating_external',
1746
        'methodname' => 'get_item_ratings',
1747
        'description' => 'Retrieve all the ratings for an item.',
1748
        'type' => 'read',
1749
        'capabilities' => 'moodle/rating:view',
1750
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1751
    ),
1752
    'core_rating_add_rating' => array(
1753
        'classname' => 'core_rating_external',
1754
        'methodname' => 'add_rating',
1755
        'description' => 'Rates an item.',
1756
        'type' => 'write',
1757
        'capabilities' => 'moodle/rating:rate',
1758
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1759
    ),
1760
    'core_role_assign_roles' => array(
1761
        'classname' => 'core_role_external',
1762
        'methodname' => 'assign_roles',
1763
        'classpath' => 'enrol/externallib.php',
1764
        'description' => 'Manual role assignments.',
1765
        'type' => 'write',
1766
        'capabilities' => 'moodle/role:assign'
1767
    ),
1768
    'core_role_unassign_roles' => array(
1769
        'classname' => 'core_role_external',
1770
        'methodname' => 'unassign_roles',
1771
        'classpath' => 'enrol/externallib.php',
1772
        'description' => 'Manual role unassignments.',
1773
        'type' => 'write',
1774
        'capabilities' => 'moodle/role:assign'
1775
    ),
1776
    'core_search_get_relevant_users' => array(
1777
        'classname' => '\core_search\external',
1778
        'methodname' => 'get_relevant_users',
1779
        'description' => 'Gets relevant users for a search request.',
1780
        'type' => 'read',
1781
        'ajax' => true
1782
    ),
1783
    'core_search_get_results' => [
1784
        'classname' => '\core_search\external\get_results',
1785
        'description' => 'Get search results.',
1786
        'type' => 'read',
1787
        'capabilities' => 'moodle/search:query',
1788
        'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
1789
    ],
1790
    'core_search_get_search_areas_list' => [
1791
        'classname' => '\core_search\external\get_search_areas_list',
1792
        'description' => 'Get search areas.',
1793
        'type' => 'read',
1794
        'capabilities' => 'moodle/search:query',
1795
        'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
1796
    ],
1797
    'core_search_view_results' => [
1798
        'classname' => '\core_search\external\view_results',
1799
        'description' => 'Trigger view search results event.',
1800
        'type' => 'write',
1801
        'capabilities' => 'moodle/search:query',
1802
        'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
1803
    ],
1804
    'core_search_get_top_results' => [
1805
        'classname' => '\core_search\external\get_top_results',
1806
        'description' => 'Get top search results.',
1807
        'type' => 'read',
1808
        'capabilities' => 'moodle/search:query',
1809
        'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
1810
    ],
1811
    'core_tag_get_tagindex' => array(
1812
        'classname' => 'core_tag_external',
1813
        'methodname' => 'get_tagindex',
1814
        'description' => 'Gets tag index page for one tag and one tag area',
1815
        'type' => 'read',
1816
        'ajax' => true,
1817
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1818
    ),
1819
    'core_tag_get_tags' => array(
1820
        'classname' => 'core_tag_external',
1821
        'methodname' => 'get_tags',
1822
        'description' => 'Gets tags by their ids',
1823
        'type' => 'read',
1824
        'ajax' => true,
1825
    ),
1826
    'core_tag_update_tags' => array(
1827
        'classname' => 'core_tag_external',
1828
        'methodname' => 'update_tags',
1829
        'description' => 'Updates tags',
1830
        'type' => 'write',
1831
        'ajax' => true,
1832
    ),
1833
    'core_tag_get_tagindex_per_area' => array(
1834
        'classname' => 'core_tag_external',
1835
        'methodname' => 'get_tagindex_per_area',
1836
        'description' => 'Gets tag index page per different areas.',
1837
        'type' => 'read',
1838
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1839
    ),
1840
    'core_tag_get_tag_areas' => array(
1841
        'classname' => 'core_tag_external',
1842
        'methodname' => 'get_tag_areas',
1843
        'description' => 'Retrieves existing tag areas.',
1844
        'type' => 'read',
1845
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1846
    ),
1847
    'core_tag_get_tag_collections' => array(
1848
        'classname' => 'core_tag_external',
1849
        'methodname' => 'get_tag_collections',
1850
        'description' => 'Retrieves existing tag collections.',
1851
        'type' => 'read',
1852
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1853
    ),
1854
    'core_tag_get_tag_cloud' => array(
1855
        'classname' => 'core_tag_external',
1856
        'methodname' => 'get_tag_cloud',
1857
        'description' => 'Retrieves a tag cloud for the given collection and/or query search.',
1858
        'type' => 'read',
1859
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1860
    ),
1861
    'core_update_inplace_editable' => array(
1862
        'classname' => 'core_external',
1863
        'methodname' => 'update_inplace_editable',
1864
        'classpath' => 'lib/external/externallib.php',
1865
        'description' => 'Generic service to update title',
1866
        'type' => 'write',
1867
        'loginrequired' => true,
1868
        'ajax' => true,
1869
    ),
1870
    'core_user_add_user_device' => array(
1871
        'classname' => 'core_user_external',
1872
        'methodname' => 'add_user_device',
1873
        'classpath' => 'user/externallib.php',
1874
        'description' => 'Store mobile user devices information for PUSH Notifications.',
1875
        'type' => 'write',
1876
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1877
    ),
1878
    'core_user_update_user_device_public_key' => array(
1879
        'classname' => '\core_user\external\update_user_device_public_key',
1880
        'description' => 'Store mobile user public key.',
1881
        'type' => 'write',
1882
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1883
    ),
1884
    'core_user_add_user_private_files' => array(
1885
        'classname' => 'core_user_external',
1886
        'methodname' => 'add_user_private_files',
1887
        'classpath' => 'user/externallib.php',
1888
        'description' => 'Copy files from a draft area to users private files area.',
1889
        'type' => 'write',
1890
        'capabilities' => 'moodle/user:manageownfiles',
1891
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1892
    ),
1893
    'core_user_create_users' => array(
1894
        'classname' => 'core_user_external',
1895
        'methodname' => 'create_users',
1896
        'classpath' => 'user/externallib.php',
1897
        'description' => 'Create users.',
1898
        'type' => 'write',
1899
        'capabilities' => 'moodle/user:create'
1900
    ),
1901
    'core_user_delete_users' => array(
1902
        'classname' => 'core_user_external',
1903
        'methodname' => 'delete_users',
1904
        'classpath' => 'user/externallib.php',
1905
        'description' => 'Delete users.',
1906
        'type' => 'write',
1907
        'capabilities' => 'moodle/user:delete'
1908
    ),
1909
    'core_user_get_course_user_profiles' => array(
1910
        'classname' => 'core_user_external',
1911
        'methodname' => 'get_course_user_profiles',
1912
        'classpath' => 'user/externallib.php',
1913
        'description' => 'Get course user profiles (each of the profils matching a course id and a user id),.',
1914
        'type' => 'read',
1915
        'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, '
1916
            . 'moodle/site:accessallgroups',
1917
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1918
    ),
1919
    'core_user_get_users' => array(
1920
        'classname' => 'core_user_external',
1921
        'methodname' => 'get_users',
1922
        'classpath' => 'user/externallib.php',
1923
        'description' => 'search for users matching the parameters',
1924
        'type' => 'read',
1925
        'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update'
1926
    ),
1927
    'core_user_get_users_by_field' => array(
1928
        'classname' => 'core_user_external',
1929
        'methodname' => 'get_users_by_field',
1930
        'classpath' => 'user/externallib.php',
1931
        'description' => 'Retrieve users\' information for a specified unique field - If you want to do a user search, use '
1932
            . 'core_user_get_users() or core_user_search_identity().',
1933
        'type' => 'read',
1934
        'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update',
1935
        'ajax' => true,
1936
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1937
    ),
1938
    'core_user_search_identity' => array(
1939
        'classname' => '\core_user\external\search_identity',
1940
        'description' => 'Return list of users identities matching the given criteria in their name or other identity fields.',
1941
        'type' => 'read',
1942
        'capabilities' => 'moodle/user:viewalldetails',
1943
        'ajax' => true,
1944
        'loginrequired' => true,
1945
    ),
1946
    'core_user_remove_user_device' => array(
1947
        'classname' => 'core_user_external',
1948
        'methodname' => 'remove_user_device',
1949
        'classpath' => 'user/externallib.php',
1950
        'description' => 'Remove a user device from the Moodle database.',
1951
        'type' => 'write',
1952
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1953
    ),
1954
    'core_user_update_users' => array(
1955
        'classname' => 'core_user_external',
1956
        'methodname' => 'update_users',
1957
        'classpath' => 'user/externallib.php',
1958
        'description' => 'Update users.',
1959
        'type' => 'write',
1960
        'capabilities' => 'moodle/user:update',
1961
        'ajax' => true,
1962
    ),
1963
    'core_user_update_user_preferences' => array(
1964
        'classname' => 'core_user_external',
1965
        'methodname' => 'update_user_preferences',
1966
        'classpath' => 'user/externallib.php',
1967
        'description' => 'Update a user\'s preferences',
1968
        'type' => 'write',
1969
        'capabilities' => 'moodle/user:editownmessageprofile, moodle/user:editmessageprofile',
1970
        'ajax' => true,
1971
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1972
    ),
1973
    'core_user_view_user_list' => array(
1974
        'classname' => 'core_user_external',
1975
        'methodname' => 'view_user_list',
1976
        'classpath' => 'user/externallib.php',
1977
        'description' => 'Simulates the web-interface view of user/index.php (triggering events),.',
1978
        'type' => 'write',
1979
        'capabilities' => 'moodle/course:viewparticipants',
1980
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1981
    ),
1982
    'core_user_view_user_profile' => array(
1983
        'classname' => 'core_user_external',
1984
        'methodname' => 'view_user_profile',
1985
        'classpath' => 'user/externallib.php',
1986
        'description' => 'Simulates the web-interface view of user/view.php and user/profile.php (triggering events),.',
1987
        'type' => 'write',
1988
        'capabilities' => 'moodle/user:viewdetails',
1989
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1990
    ),
1991
    'core_user_get_user_preferences' => array(
1992
        'classname' => 'core_user_external',
1993
        'methodname' => 'get_user_preferences',
1994
        'classpath' => 'user/externallib.php',
1995
        'description' => 'Return user preferences.',
1996
        'type' => 'read',
1997
        'ajax' => true,
1998
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
1999
    ),
2000
    'core_user_update_picture' => array(
2001
        'classname' => 'core_user_external',
2002
        'methodname' => 'update_picture',
2003
        'classpath' => 'user/externallib.php',
2004
        'description' => 'Update or delete the user picture in the site',
2005
        'type' => 'write',
2006
        'capabilities' => 'moodle/user:editownprofile, moodle/user:editprofile',
2007
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2008
    ),
2009
    'core_user_set_user_preferences' => array(
2010
        'classname' => 'core_user_external',
2011
        'methodname' => 'set_user_preferences',
2012
        'classpath' => 'user/externallib.php',
2013
        'description' => 'Set user preferences.',
2014
        'type' => 'write',
2015
        'capabilities' => 'moodle/site:config',
2016
        'ajax' => true,
2017
        'loginrequired' => false,
2018
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2019
    ),
2020
    'core_user_agree_site_policy' => array(
2021
        'classname' => 'core_user_external',
2022
        'methodname' => 'agree_site_policy',
2023
        'classpath' => 'user/externallib.php',
2024
        'description' => 'Agree the site policy for the current user.',
2025
        'type' => 'write',
2026
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2027
    ),
2028
    'core_user_get_private_files_info' => array(
2029
        'classname' => 'core_user_external',
2030
        'methodname' => 'get_private_files_info',
2031
        'classpath' => 'user/externallib.php',
2032
        'description' => 'Returns general information about files in the user private files area.',
2033
        'type' => 'read',
2034
        'capabilities' => 'moodle/user:manageownfiles',
2035
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2036
    ),
1441 ariadna 2037
    'core_user_prepare_private_files_for_edition' => [
2038
        'classname'     => '\core_user\external\prepare_private_files_for_edition',
2039
        'description'   => 'Prepares the draft area for user private files.',
2040
        'type'          => 'write',
2041
        'capabilities'  => 'moodle/user:manageownfiles',
2042
        'services'      => [MOODLE_OFFICIAL_MOBILE_SERVICE],
2043
    ],
2044
    'core_user_update_private_files' => [
2045
        'classname'     => '\core_user\external\update_private_files',
2046
        'description'   => 'Copy files from a draft area to users private files area.',
2047
        'type'          => 'write',
2048
        'capabilities'  => 'moodle/user:manageownfiles',
2049
        'services'      => [MOODLE_OFFICIAL_MOBILE_SERVICE],
2050
    ],
1 efrain 2051
 
2052
    // Competencies functions.
2053
    'core_competency_create_competency_framework' => array(
2054
        'classname'    => 'core_competency\external',
2055
        'methodname'   => 'create_competency_framework',
2056
        'classpath'    => '',
2057
        'description'  => 'Creates new competency frameworks.',
2058
        'type'         => 'write',
2059
        'capabilities' => 'moodle/competency:competencymanage',
2060
        'ajax'         => true,
2061
    ),
2062
    'core_competency_read_competency_framework' => array(
2063
        'classname'    => 'core_competency\external',
2064
        'methodname'   => 'read_competency_framework',
2065
        'classpath'    => '',
2066
        'description'  => 'Load a summary of a competency framework.',
2067
        'type'         => 'read',
2068
        'capabilities' => 'moodle/competency:competencyview',
2069
        'ajax'         => true,
2070
    ),
2071
    'core_competency_duplicate_competency_framework' => array(
2072
        'classname'    => 'core_competency\external',
2073
        'methodname'   => 'duplicate_competency_framework',
2074
        'classpath'    => '',
2075
        'description'  => 'Duplicate a competency framework.',
2076
        'type'         => 'write',
2077
        'capabilities' => 'moodle/competency:competencymanage',
2078
        'ajax'         => true,
2079
    ),
2080
    'core_competency_delete_competency_framework' => array(
2081
        'classname'    => 'core_competency\external',
2082
        'methodname'   => 'delete_competency_framework',
2083
        'classpath'    => '',
2084
        'description'  => 'Delete a competency framework.',
2085
        'type'         => 'write',
2086
        'capabilities' => 'moodle/competency:competencymanage',
2087
        'ajax'         => true,
2088
    ),
2089
    'core_competency_update_competency_framework' => array(
2090
        'classname'    => 'core_competency\external',
2091
        'methodname'   => 'update_competency_framework',
2092
        'classpath'    => '',
2093
        'description'  => 'Update a competency framework.',
2094
        'type'         => 'write',
2095
        'capabilities' => 'moodle/competency:competencymanage',
2096
        'ajax'         => true,
2097
    ),
2098
    'core_competency_list_competency_frameworks' => array(
2099
        'classname'    => 'core_competency\external',
2100
        'methodname'   => 'list_competency_frameworks',
2101
        'classpath'    => '',
2102
        'description'  => 'Load a list of a competency frameworks.',
2103
        'type'         => 'read',
2104
        'capabilities' => 'moodle/competency:competencyview',
2105
        'ajax'         => true,
2106
    ),
2107
    'core_competency_count_competency_frameworks' => array(
2108
        'classname'    => 'core_competency\external',
2109
        'methodname'   => 'count_competency_frameworks',
2110
        'classpath'    => '',
2111
        'description'  => 'Count a list of a competency frameworks.',
2112
        'type'         => 'read',
2113
        'capabilities' => 'moodle/competency:competencyview',
2114
        'ajax'         => true,
2115
    ),
2116
    'core_competency_competency_framework_viewed' => array(
2117
        'classname'    => 'core_competency\external',
2118
        'methodname'   => 'competency_framework_viewed',
2119
        'classpath'    => '',
2120
        'description'  => 'Log event competency framework viewed',
2121
        'type'         => 'read',
2122
        'capabilities' => 'moodle/competency:competencyview',
2123
        'ajax'         => true,
2124
    ),
2125
    'core_competency_create_competency' => array(
2126
        'classname'    => 'core_competency\external',
2127
        'methodname'   => 'create_competency',
2128
        'classpath'    => '',
2129
        'description'  => 'Creates new competencies.',
2130
        'type'         => 'write',
2131
        'capabilities' => 'moodle/competency:competencymanage',
2132
        'ajax'         => true,
2133
    ),
2134
    'core_competency_read_competency' => array(
2135
        'classname'    => 'core_competency\external',
2136
        'methodname'   => 'read_competency',
2137
        'classpath'    => '',
2138
        'description'  => 'Load a summary of a competency.',
2139
        'type'         => 'read',
2140
        'capabilities' => 'moodle/competency:competencyview',
2141
        'ajax'         => true,
2142
    ),
2143
    'core_competency_competency_viewed' => array(
2144
        'classname'    => 'core_competency\external',
2145
        'methodname'   => 'competency_viewed',
2146
        'classpath'    => '',
2147
        'description'  => 'Log event competency viewed',
2148
        'type'         => 'read',
2149
        'capabilities' => 'moodle/competency:competencyview',
2150
        'ajax'         => true,
2151
        'services'     => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2152
    ),
2153
    'core_competency_delete_competency' => array(
2154
        'classname'    => 'core_competency\external',
2155
        'methodname'   => 'delete_competency',
2156
        'classpath'    => '',
2157
        'description'  => 'Delete a competency.',
2158
        'type'         => 'write',
2159
        'capabilities' => 'moodle/competency:competencymanage',
2160
        'ajax'         => true,
2161
    ),
2162
    'core_competency_update_competency' => array(
2163
        'classname'    => 'core_competency\external',
2164
        'methodname'   => 'update_competency',
2165
        'classpath'    => '',
2166
        'description'  => 'Update a competency.',
2167
        'type'         => 'write',
2168
        'capabilities' => 'moodle/competency:competencymanage',
2169
        'ajax'         => true,
2170
    ),
2171
    'core_competency_list_competencies' => array(
2172
        'classname'    => 'core_competency\external',
2173
        'methodname'   => 'list_competencies',
2174
        'classpath'    => '',
2175
        'description'  => 'Load a list of a competencies.',
2176
        'type'         => 'read',
2177
        'capabilities' => 'moodle/competency:competencyview',
2178
        'ajax'         => true,
2179
    ),
2180
    'core_competency_list_competencies_in_template' => array(
2181
        'classname'    => 'core_competency\external',
2182
        'methodname'   => 'list_competencies_in_template',
2183
        'classpath'    => '',
2184
        'description'  => 'Load a list of a competencies for a given template.',
2185
        'type'         => 'read',
2186
        'capabilities' => 'moodle/competency:competencyview',
2187
        'ajax'         => true,
2188
    ),
2189
    'core_competency_count_competencies' => array(
2190
        'classname'    => 'core_competency\external',
2191
        'methodname'   => 'count_competencies',
2192
        'classpath'    => '',
2193
        'description'  => 'Count a list of a competencies.',
2194
        'type'         => 'read',
2195
        'capabilities' => 'moodle/competency:competencyview',
2196
        'ajax'         => true,
2197
    ),
2198
    'core_competency_count_competencies_in_template' => array(
2199
        'classname'    => 'core_competency\external',
2200
        'methodname'   => 'count_competencies_in_template',
2201
        'classpath'    => '',
2202
        'description'  => 'Count a list of a competencies for a given template.',
2203
        'type'         => 'read',
2204
        'capabilities' => 'moodle/competency:competencyview',
2205
        'ajax'         => true,
2206
    ),
2207
    'core_competency_search_competencies' => array(
2208
        'classname'    => 'core_competency\external',
2209
        'methodname'   => 'search_competencies',
2210
        'classpath'    => '',
2211
        'description'  => 'Search a list of a competencies.',
2212
        'type'         => 'read',
2213
        'capabilities' => 'moodle/competency:competencyview',
2214
        'ajax'         => true,
2215
    ),
2216
    'core_competency_set_parent_competency' => array(
2217
        'classname'    => 'core_competency\external',
2218
        'methodname'   => 'set_parent_competency',
2219
        'classpath'    => '',
2220
        'description'  => 'Set a new parent for a competency.',
2221
        'type'         => 'write',
2222
        'capabilities' => 'moodle/competency:competencymanage',
2223
        'ajax'         => true,
2224
    ),
2225
    'core_competency_move_up_competency' => array(
2226
        'classname'    => 'core_competency\external',
2227
        'methodname'   => 'move_up_competency',
2228
        'classpath'    => '',
2229
        'description'  => 'Re-order a competency.',
2230
        'type'         => 'write',
2231
        'capabilities' => 'moodle/competency:competencymanage',
2232
        'ajax'         => true,
2233
    ),
2234
    'core_competency_move_down_competency' => array(
2235
        'classname'    => 'core_competency\external',
2236
        'methodname'   => 'move_down_competency',
2237
        'classpath'    => '',
2238
        'description'  => 'Re-order a competency.',
2239
        'type'         => 'write',
2240
        'capabilities' => 'moodle/competency:competencymanage',
2241
        'ajax'         => true,
2242
    ),
2243
    'core_competency_list_course_module_competencies' => array(
2244
        'classname'    => 'core_competency\external',
2245
        'methodname'   => 'list_course_module_competencies',
2246
        'classpath'    => '',
2247
        'description'  => 'List the competencies in a course module',
2248
        'type'         => 'read',
2249
        'capabilities' => 'moodle/competency:coursecompetencyview',
2250
        'ajax'         => true,
2251
    ),
2252
    'core_competency_count_course_module_competencies' => array(
2253
        'classname'    => 'core_competency\external',
2254
        'methodname'   => 'count_course_module_competencies',
2255
        'classpath'    => '',
2256
        'description'  => 'Count the competencies in a course module',
2257
        'type'         => 'read',
2258
        'capabilities' => 'moodle/competency:coursecompetencyview',
2259
        'ajax'         => true,
2260
    ),
2261
    'core_competency_list_course_competencies' => array(
2262
        'classname'    => 'core_competency\external',
2263
        'methodname'   => 'list_course_competencies',
2264
        'classpath'    => '',
2265
        'description'  => 'List the competencies in a course',
2266
        'type'         => 'read',
2267
        'capabilities' => 'moodle/competency:coursecompetencyview',
2268
        'ajax'         => true,
2269
        'services'     => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2270
    ),
2271
    'core_competency_count_competencies_in_course' => array(
2272
        'classname'    => 'core_competency\external',
2273
        'methodname'   => 'count_competencies_in_course',
2274
        'classpath'    => '',
2275
        'description'  => 'List the competencies in a course',
2276
        'type'         => 'read',
2277
        'capabilities' => 'moodle/competency:coursecompetencyview',
2278
        'ajax'         => true,
2279
    ),
2280
    'core_competency_count_courses_using_competency' => array(
2281
        'classname'    => 'core_competency\external',
2282
        'methodname'   => 'count_courses_using_competency',
2283
        'classpath'    => '',
2284
        'description'  => 'List the courses using a competency',
2285
        'type'         => 'read',
2286
        'capabilities' => 'moodle/competency:coursecompetencyview',
2287
        'ajax'         => true,
2288
    ),
2289
    'core_competency_add_competency_to_course' => array(
2290
        'classname'    => 'core_competency\external',
2291
        'methodname'   => 'add_competency_to_course',
2292
        'classpath'    => '',
2293
        'description'  => 'Add the competency to a course',
2294
        'type'         => 'write',
2295
        'capabilities' => 'moodle/competency:coursecompetencymanage',
2296
        'ajax'         => true,
2297
    ),
2298
    'core_competency_add_competency_to_template' => array(
2299
        'classname'    => 'core_competency\external',
2300
        'methodname'   => 'add_competency_to_template',
2301
        'classpath'    => '',
2302
        'description'  => 'Add the competency to a template',
2303
        'type'         => 'write',
2304
        'capabilities' => 'moodle/competency:templatemanage',
2305
        'ajax'         => true,
2306
    ),
2307
    'core_competency_remove_competency_from_course' => array(
2308
        'classname'    => 'core_competency\external',
2309
        'methodname'   => 'remove_competency_from_course',
2310
        'classpath'    => '',
2311
        'description'  => 'Remove a competency from a course',
2312
        'type'         => 'write',
2313
        'capabilities' => 'moodle/competency:coursecompetencymanage',
2314
        'ajax'         => true,
2315
    ),
2316
    'core_competency_set_course_competency_ruleoutcome' => array(
2317
        'classname'    => 'core_competency\external',
2318
        'methodname'   => 'set_course_competency_ruleoutcome',
2319
        'classpath'    => '',
2320
        'description'  => 'Modify the ruleoutcome value for course competency',
2321
        'type'         => 'write',
2322
        'capabilities' => 'moodle/competency:coursecompetencymanage',
2323
        'ajax'         => true,
2324
    ),
2325
    'core_competency_remove_competency_from_template' => array(
2326
        'classname'    => 'core_competency\external',
2327
        'methodname'   => 'remove_competency_from_template',
2328
        'classpath'    => '',
2329
        'description'  => 'Remove a competency from a template',
2330
        'type'         => 'write',
2331
        'capabilities' => 'moodle/competency:templatemanage',
2332
        'ajax'         => true,
2333
    ),
2334
    'core_competency_reorder_course_competency' => array(
2335
        'classname'    => 'core_competency\external',
2336
        'methodname'   => 'reorder_course_competency',
2337
        'classpath'    => '',
2338
        'description'  => 'Move a course competency to a new relative sort order.',
2339
        'type'         => 'write',
2340
        'capabilities' => 'moodle/competency:coursecompetencymanage',
2341
        'ajax'         => true,
2342
    ),
2343
    'core_competency_reorder_template_competency' => array(
2344
        'classname'    => 'core_competency\external',
2345
        'methodname'   => 'reorder_template_competency',
2346
        'classpath'    => '',
2347
        'description'  => 'Move a template competency to a new relative sort order.',
2348
        'type'         => 'write',
2349
        'capabilities' => 'moodle/competency:templatemanage',
2350
        'ajax'         => true,
2351
    ),
2352
    'core_competency_create_template' => array(
2353
        'classname'    => 'core_competency\external',
2354
        'methodname'   => 'create_template',
2355
        'classpath'    => '',
2356
        'description'  => 'Creates new learning plan templates.',
2357
        'type'         => 'write',
2358
        'capabilities' => 'moodle/competency:templatemanage',
2359
        'ajax'         => true,
2360
    ),
2361
    'core_competency_duplicate_template' => array(
2362
        'classname'    => 'core_competency\external',
2363
        'methodname'   => 'duplicate_template',
2364
        'classpath'    => '',
2365
        'description'  => 'Duplicate learning plan template.',
2366
        'type'         => 'write',
2367
        'capabilities' => 'moodle/competency:templatemanage',
2368
        'ajax'         => true,
2369
    ),
2370
    'core_competency_read_template' => array(
2371
        'classname'    => 'core_competency\external',
2372
        'methodname'   => 'read_template',
2373
        'classpath'    => '',
2374
        'description'  => 'Load a summary of a learning plan template.',
2375
        'type'         => 'read',
2376
        'capabilities' => 'moodle/competency:templateview',
2377
        'ajax'         => true,
2378
    ),
2379
    'core_competency_delete_template' => array(
2380
        'classname'    => 'core_competency\external',
2381
        'methodname'   => 'delete_template',
2382
        'classpath'    => '',
2383
        'description'  => 'Delete a learning plan template.',
2384
        'type'         => 'write',
2385
        'capabilities' => 'moodle/competency:templatemanage',
2386
        'ajax'         => true,
2387
    ),
2388
    'core_competency_update_template' => array(
2389
        'classname'    => 'core_competency\external',
2390
        'methodname'   => 'update_template',
2391
        'classpath'    => '',
2392
        'description'  => 'Update a learning plan template.',
2393
        'type'         => 'write',
2394
        'capabilities' => 'moodle/competency:templatemanage',
2395
        'ajax'         => true,
2396
    ),
2397
    'core_competency_list_templates' => array(
2398
        'classname'    => 'core_competency\external',
2399
        'methodname'   => 'list_templates',
2400
        'classpath'    => '',
2401
        'description'  => 'Load a list of a learning plan templates.',
2402
        'type'         => 'read',
2403
        'capabilities' => 'moodle/competency:templateview',
2404
        'ajax'         => true,
2405
    ),
2406
    'core_competency_list_templates_using_competency' => array(
2407
        'classname'    => 'core_competency\external',
2408
        'methodname'   => 'list_templates_using_competency',
2409
        'classpath'    => '',
2410
        'description'  => 'Load a list of a learning plan templates for a given competency.',
2411
        'type'         => 'read',
2412
        'capabilities' => 'moodle/competency:templateview',
2413
        'ajax'         => true,
2414
    ),
2415
    'core_competency_count_templates' => array(
2416
        'classname'    => 'core_competency\external',
2417
        'methodname'   => 'count_templates',
2418
        'classpath'    => '',
2419
        'description'  => 'Count a list of a learning plan templates.',
2420
        'type'         => 'read',
2421
        'capabilities' => 'moodle/competency:templateview',
2422
        'ajax'         => true,
2423
    ),
2424
    'core_competency_count_templates_using_competency' => array(
2425
        'classname'    => 'core_competency\external',
2426
        'methodname'   => 'count_templates_using_competency',
2427
        'classpath'    => '',
2428
        'description'  => 'Count a list of a learning plan templates for a given competency.',
2429
        'type'         => 'read',
2430
        'capabilities' => 'moodle/competency:templateview',
2431
        'ajax'         => true,
2432
    ),
2433
    'core_competency_create_plan' => array(
2434
        'classname'    => 'core_competency\external',
2435
        'methodname'   => 'create_plan',
2436
        'classpath'    => '',
2437
        'description'  => 'Creates a learning plan.',
2438
        'type'         => 'write',
2439
        'capabilities' => 'moodle/competency:planmanage',
2440
        'ajax'         => true,
2441
    ),
2442
    'core_competency_update_plan' => array(
2443
        'classname'    => 'core_competency\external',
2444
        'methodname'   => 'update_plan',
2445
        'classpath'    => '',
2446
        'description'  => 'Updates a learning plan.',
2447
        'type'         => 'write',
2448
        'capabilities' => 'moodle/competency:planmanage',
2449
        'ajax'         => true,
2450
    ),
2451
    'core_competency_complete_plan' => array(
2452
        'classname'    => 'core_competency\external',
2453
        'methodname'   => 'complete_plan',
2454
        'classpath'    => '',
2455
        'description'  => 'Complete learning plan.',
2456
        'type'         => 'write',
2457
        'capabilities' => 'moodle/competency:planmanage',
2458
        'ajax'         => true,
2459
    ),
2460
    'core_competency_reopen_plan' => array(
2461
        'classname'    => 'core_competency\external',
2462
        'methodname'   => 'reopen_plan',
2463
        'classpath'    => '',
2464
        'description'  => 'Reopen learning plan.',
2465
        'type'         => 'write',
2466
        'capabilities' => 'moodle/competency:planmanage',
2467
        'ajax'         => true,
2468
    ),
2469
    'core_competency_read_plan' => array(
2470
        'classname'    => 'core_competency\external',
2471
        'methodname'   => 'read_plan',
2472
        'classpath'    => '',
2473
        'description'  => 'Load a learning plan.',
2474
        'type'         => 'read',
2475
        'capabilities' => 'moodle/competency:planviewown',
2476
        'ajax'         => true,
2477
    ),
2478
    'core_competency_delete_plan' => array(
2479
        'classname'    => 'core_competency\external',
2480
        'methodname'   => 'delete_plan',
2481
        'classpath'    => '',
2482
        'description'  => 'Delete a learning plan.',
2483
        'type'         => 'write',
2484
        'capabilities' => 'moodle/competency:planmanage',
2485
        'ajax'         => true,
2486
    ),
2487
    'core_competency_list_user_plans' => array(
2488
        'classname'    => 'core_competency\external',
2489
        'methodname'   => 'list_user_plans',
2490
        'classpath'    => '',
2491
        'description'  => 'List a user\'s learning plans.',
2492
        'type'         => 'read',
2493
        'capabilities' => 'moodle/competency:planviewown',
2494
        'ajax'         => true,
2495
    ),
2496
    'core_competency_list_plan_competencies' => array(
2497
        'classname'    => 'core_competency\external',
2498
        'methodname'   => 'list_plan_competencies',
2499
        'classpath'    => '',
2500
        'description'  => 'List the competencies in a plan',
2501
        'type'         => 'read',
2502
        'capabilities' => 'moodle/competency:planviewown',
2503
        'ajax'         => true,
2504
    ),
2505
    'core_competency_add_competency_to_plan' => array(
2506
        'classname'    => 'core_competency\external',
2507
        'methodname'   => 'add_competency_to_plan',
2508
        'classpath'    => '',
2509
        'description'  => 'Add the competency to a learning plan',
2510
        'type'         => 'write',
2511
        'capabilities' => 'moodle/competency:planmanage',
2512
        'ajax'         => true,
2513
    ),
2514
    'core_competency_remove_competency_from_plan' => array(
2515
        'classname'    => 'core_competency\external',
2516
        'methodname'   => 'remove_competency_from_plan',
2517
        'classpath'    => '',
2518
        'description'  => 'Remove the competency from a learning plan',
2519
        'type'         => 'write',
2520
        'capabilities' => 'moodle/competency:planmanage',
2521
        'ajax'         => true,
2522
    ),
2523
    'core_competency_reorder_plan_competency' => array(
2524
        'classname'    => 'core_competency\external',
2525
        'methodname'   => 'reorder_plan_competency',
2526
        'classpath'    => '',
2527
        'description'  => 'Move a plan competency to a new relative sort order.',
2528
        'type'         => 'write',
2529
        'capabilities' => 'moodle/competency:planmanage',
2530
        'ajax'         => true,
2531
    ),
2532
    'core_competency_plan_request_review' => array(
2533
        'classname'    => 'core_competency\external',
2534
        'methodname'   => 'plan_request_review',
2535
        'classpath'    => '',
2536
        'description'  => 'Request for a plan to be reviewed.',
2537
        'type'         => 'write',
2538
        'capabilities' => 'moodle/competency:planmanagedraft',
2539
        'ajax'         => true,
2540
    ),
2541
    'core_competency_plan_start_review' => array(
2542
        'classname'    => 'core_competency\external',
2543
        'methodname'   => 'plan_start_review',
2544
        'classpath'    => '',
2545
        'description'  => 'Start the review of a plan.',
2546
        'type'         => 'write',
2547
        'capabilities' => 'moodle/competency:planmanage',
2548
        'ajax'         => true,
2549
    ),
2550
    'core_competency_plan_stop_review' => array(
2551
        'classname'    => 'core_competency\external',
2552
        'methodname'   => 'plan_stop_review',
2553
        'classpath'    => '',
2554
        'description'  => 'Stop the review of a plan.',
2555
        'type'         => 'write',
2556
        'capabilities' => 'moodle/competency:planmanage',
2557
        'ajax'         => true,
2558
    ),
2559
    'core_competency_plan_cancel_review_request' => array(
2560
        'classname'    => 'core_competency\external',
2561
        'methodname'   => 'plan_cancel_review_request',
2562
        'classpath'    => '',
2563
        'description'  => 'Cancel the review of a plan.',
2564
        'type'         => 'write',
2565
        'capabilities' => 'moodle/competency:planmanagedraft',
2566
        'ajax'         => true,
2567
    ),
2568
    'core_competency_approve_plan' => array(
2569
        'classname'    => 'core_competency\external',
2570
        'methodname'   => 'approve_plan',
2571
        'classpath'    => '',
2572
        'description'  => 'Approve a plan.',
2573
        'type'         => 'write',
2574
        'capabilities' => 'moodle/competency:planmanage',
2575
        'ajax'         => true,
2576
    ),
2577
    'core_competency_unapprove_plan' => array(
2578
        'classname'    => 'core_competency\external',
2579
        'methodname'   => 'unapprove_plan',
2580
        'classpath'    => '',
2581
        'description'  => 'Unapprove a plan.',
2582
        'type'         => 'write',
2583
        'capabilities' => 'moodle/competency:planmanage',
2584
        'ajax'         => true,
2585
    ),
2586
     'core_competency_template_has_related_data' => array(
2587
        'classname'    => 'core_competency\external',
2588
        'methodname'   => 'template_has_related_data',
2589
        'classpath'    => '',
2590
        'description'  => 'Check if a template has related data',
2591
        'type'         => 'read',
2592
        'capabilities' => 'moodle/competency:templateview',
2593
        'ajax'         => true,
2594
    ),
2595
    'core_competency_get_scale_values' => array(
2596
        'classname'    => 'core_competency\external',
2597
        'methodname'   => 'get_scale_values',
2598
        'classpath'    => '',
2599
        'description'  => 'Fetch the values for a specific scale',
2600
        'type'         => 'read',
2601
        'capabilities' => 'moodle/competency:competencymanage',
2602
        'ajax'         => true,
2603
        'services'     => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2604
    ),
2605
    'core_competency_add_related_competency' => array(
2606
        'classname'    => 'core_competency\external',
2607
        'methodname'   => 'add_related_competency',
2608
        'classpath'    => '',
2609
        'description'  => 'Adds a related competency',
2610
        'type'         => 'write',
2611
        'capabilities' => 'moodle/competency:competencymanage',
2612
        'ajax'         => true,
2613
    ),
2614
    'core_competency_remove_related_competency' => array(
2615
        'classname'    => 'core_competency\external',
2616
        'methodname'   => 'remove_related_competency',
2617
        'classpath'    => '',
2618
        'description'  => 'Remove a related competency',
2619
        'type'         => 'write',
2620
        'capabilities' => 'moodle/competency:competencymanage',
2621
        'ajax'         => true,
2622
    ),
2623
    'core_competency_read_user_evidence' => array(
2624
        'classname'    => 'core_competency\external',
2625
        'methodname'   => 'read_user_evidence',
2626
        'classpath'    => '',
2627
        'description'  => 'Read an evidence of prior learning.',
2628
        'type'         => 'read',
2629
        'capabilities' => 'moodle/competency:userevidenceview',
2630
        'ajax'         => true,
2631
    ),
2632
    'core_competency_delete_user_evidence' => array(
2633
        'classname'    => 'core_competency\external',
2634
        'methodname'   => 'delete_user_evidence',
2635
        'classpath'    => '',
2636
        'description'  => 'Delete an evidence of prior learning.',
2637
        'type'         => 'write',
2638
        'capabilities' => 'moodle/competency:userevidencemanageown',
2639
        'ajax'         => true,
2640
    ),
2641
    'core_competency_create_user_evidence_competency' => array(
2642
        'classname'    => 'core_competency\external',
2643
        'methodname'   => 'create_user_evidence_competency',
2644
        'classpath'    => '',
2645
        'description'  => 'Create an evidence of prior learning relationship with a competency.',
2646
        'type'         => 'read',
2647
        'capabilities' => 'moodle/competency:userevidencemanageown, moodle/competency:competencyview',
2648
        'ajax'         => true,
2649
    ),
2650
    'core_competency_delete_user_evidence_competency' => array(
2651
        'classname'    => 'core_competency\external',
2652
        'methodname'   => 'delete_user_evidence_competency',
2653
        'classpath'    => '',
2654
        'description'  => 'Delete an evidence of prior learning relationship with a competency.',
2655
        'type'         => 'write',
2656
        'capabilities' => 'moodle/competency:userevidencemanageown',
2657
        'ajax'         => true,
2658
    ),
2659
    'core_competency_user_competency_cancel_review_request' => array(
2660
        'classname'    => 'core_competency\external',
2661
        'methodname'   => 'user_competency_cancel_review_request',
2662
        'classpath'    => '',
2663
        'description'  => 'Cancel a review request.',
2664
        'type'         => 'write',
2665
        'capabilities' => 'moodle/competency:userevidencemanageown',
2666
        'ajax'         => true,
2667
    ),
2668
    'core_competency_user_competency_request_review' => array(
2669
        'classname'    => 'core_competency\external',
2670
        'methodname'   => 'user_competency_request_review',
2671
        'classpath'    => '',
2672
        'description'  => 'Request a review.',
2673
        'type'         => 'write',
2674
        'capabilities' => 'moodle/competency:userevidencemanageown',
2675
        'ajax'         => true,
2676
    ),
2677
    'core_competency_user_competency_start_review' => array(
2678
        'classname'    => 'core_competency\external',
2679
        'methodname'   => 'user_competency_start_review',
2680
        'classpath'    => '',
2681
        'description'  => 'Start a review.',
2682
        'type'         => 'write',
2683
        'capabilities' => 'moodle/competency:competencygrade',
2684
        'ajax'         => true,
2685
    ),
2686
    'core_competency_user_competency_stop_review' => array(
2687
        'classname'    => 'core_competency\external',
2688
        'methodname'   => 'user_competency_stop_review',
2689
        'classpath'    => '',
2690
        'description'  => 'Stop a review.',
2691
        'type'         => 'write',
2692
        'capabilities' => 'moodle/competency:competencygrade',
2693
        'ajax'         => true,
2694
    ),
2695
    'core_competency_user_competency_viewed' => array(
2696
        'classname'    => 'core_competency\external',
2697
        'methodname'   => 'user_competency_viewed',
2698
        'classpath'    => '',
2699
        'description'  => 'Log the user competency viewed event.',
2700
        'type'         => 'read',
2701
        'capabilities' => 'moodle/competency:usercompetencyview',
2702
        'ajax'         => true,
2703
        'services'     => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2704
    ),
2705
    'core_competency_user_competency_viewed_in_plan' => array(
2706
        'classname'    => 'core_competency\external',
2707
        'methodname'   => 'user_competency_viewed_in_plan',
2708
        'classpath'    => '',
2709
        'description'  => 'Log the user competency viewed in plan event.',
2710
        'type'         => 'read',
2711
        'capabilities' => 'moodle/competency:usercompetencyview',
2712
        'ajax'         => true,
2713
        'services'     => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2714
    ),
2715
    'core_competency_user_competency_viewed_in_course' => array(
2716
        'classname'    => 'core_competency\external',
2717
        'methodname'   => 'user_competency_viewed_in_course',
2718
        'classpath'    => '',
2719
        'description'  => 'Log the user competency viewed in course event',
2720
        'type'         => 'read',
2721
        'capabilities' => 'moodle/competency:usercompetencyview',
2722
        'ajax'         => true,
2723
        'services'     => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2724
    ),
2725
    'core_competency_user_competency_plan_viewed' => array(
2726
        'classname'    => 'core_competency\external',
2727
        'methodname'   => 'user_competency_plan_viewed',
2728
        'classpath'    => '',
2729
        'description'  => 'Log the user competency plan viewed event.',
2730
        'type'         => 'read',
2731
        'capabilities' => 'moodle/competency:usercompetencyview',
2732
        'ajax'         => true,
2733
        'services'     => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2734
    ),
2735
    'core_competency_grade_competency' => array(
2736
        'classname'    => 'core_competency\external',
2737
        'methodname'   => 'grade_competency',
2738
        'classpath'    => '',
2739
        'description'  => 'Grade a competency.',
2740
        'type'         => 'write',
2741
        'capabilities' => 'moodle/competency:competencygrade',
2742
        'ajax'         => true,
2743
    ),
2744
    'core_competency_grade_competency_in_plan' => array(
2745
        'classname'    => 'core_competency\external',
2746
        'methodname'   => 'grade_competency_in_plan',
2747
        'classpath'    => '',
2748
        'description'  => 'Grade a competency from the user plan page.',
2749
        'type'         => 'write',
2750
        'capabilities' => 'moodle/competency:competencygrade',
2751
        'ajax'         => true,
2752
    ),
2753
    'core_competency_grade_competency_in_course' => array(
2754
        'classname'    => 'core_competency\external',
2755
        'methodname'   => 'grade_competency_in_course',
2756
        'classpath'    => '',
2757
        'description'  => 'Grade a competency from the course page.',
2758
        'type'         => 'write',
2759
        'capabilities' => 'moodle/competency:competencygrade',
2760
        'ajax'         => true,
2761
        'services'     => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2762
    ),
2763
    'core_competency_unlink_plan_from_template' => array(
2764
        'classname'    => 'core_competency\external',
2765
        'methodname'   => 'unlink_plan_from_template',
2766
        'classpath'    => '',
2767
        'description'  => 'Unlink a plan form it template.',
2768
        'type'         => 'write',
2769
        'capabilities' => 'moodle/competency:planmanage',
2770
        'ajax'         => true,
2771
    ),
2772
    'core_competency_template_viewed' => array(
2773
        'classname'     => 'core_competency\external',
2774
        'methodname'    => 'template_viewed',
2775
        'classpath'     => '',
2776
        'description'   => 'Log event template viewed',
2777
        'type'          => 'read',
2778
        'capabilities'  => 'moodle/competency:templateview',
2779
        'ajax'          => true,
2780
    ),
2781
    'core_competency_request_review_of_user_evidence_linked_competencies' => array(
2782
        'classname'     => 'core_competency\external',
2783
        'methodname'    => 'request_review_of_user_evidence_linked_competencies',
2784
        'classpath'     => '',
2785
        'description'   => 'Send user evidence competencies in review',
2786
        'type'          => 'write',
2787
        'capabilities'  => 'moodle/competency:userevidencemanageown',
2788
        'ajax'          => true,
2789
    ),
2790
    'core_competency_update_course_competency_settings' => array(
2791
        'classname'     => 'core_competency\external',
2792
        'methodname'    => 'update_course_competency_settings',
2793
        'classpath'     => '',
2794
        'description'   => 'Update the course competency settings',
2795
        'type'          => 'write',
2796
        'capabilities'  => 'moodle/competency:coursecompetencyconfigure',
2797
        'ajax'          => true,
2798
    ),
2799
    'core_competency_delete_evidence' => array(
2800
        'classname'     => 'core_competency\external',
2801
        'methodname'    => 'delete_evidence',
2802
        'classpath'     => '',
2803
        'description'   => 'Delete an evidence',
2804
        'type'          => 'write',
2805
        'capabilities'  => 'moodle/competency:evidencedelete',
2806
        'ajax'          => true,
2807
        'services'      => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2808
    ),
2809
 
2810
    'core_webservice_get_site_info' => array(
2811
        'classname' => 'core_webservice_external',
2812
        'methodname' => 'get_site_info',
2813
        'classpath' => 'webservice/externallib.php',
2814
        'description' => 'Return some site info / user info / list web service functions',
2815
        'type' => 'read',
2816
        'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2817
    ),
2818
 
2819
    // Blocks functions.
2820
    'core_block_get_course_blocks' => array(
2821
        'classname'     => 'core_block_external',
2822
        'methodname'    => 'get_course_blocks',
2823
        'description'   => 'Returns blocks information for a course.',
2824
        'type'          => 'read',
2825
        'capabilities'  => '',
2826
        'services'      => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2827
    ),
2828
 
2829
    'core_block_get_dashboard_blocks' => array(
2830
        'classname'     => 'core_block_external',
2831
        'methodname'    => 'get_dashboard_blocks',
2832
        'description'   => 'Returns blocks information for the given user dashboard.',
2833
        'type'          => 'read',
2834
        'capabilities'  => '',
2835
        'services'      => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2836
    ),
2837
 
2838
    'core_block_fetch_addable_blocks' => array(
2839
        'classname'     => 'core_block\external\fetch_addable_blocks',
2840
        'description'   => 'Returns all addable blocks in a given page.',
2841
        'type'          => 'read',
2842
        'capabilities'  => 'moodle/site:manageblocks',
2843
        'ajax'          => true,
2844
        'services'      => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2845
    ),
2846
 
2847
    // Filters functions.
2848
    'core_filters_get_available_in_context' => array(
1441 ariadna 2849
        'classname'   => 'core_filters\external\get_available_in_context',
1 efrain 2850
        'description' => 'Returns the filters available in the given contexts.',
2851
        'type'        => 'read',
2852
        'services'    => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
2853
    ),
2854
    'core_filters_get_all_states' => [
2855
        'classname'   => 'core_filters\external\get_all_states',
2856
        'description' => 'Retrieve all the filters and their states (including overridden ones in any context).',
2857
        'type'        => 'read',
2858
        'services'    => [MOODLE_OFFICIAL_MOBILE_SERVICE],
2859
    ],
2860
 
2861
    'core_customfield_delete_field' => array(
2862
        'classname'   => 'core_customfield_external',
2863
        'methodname'  => 'delete_field',
2864
        'classpath'   => 'customfield/externallib.php',
2865
        'description' => 'Deletes an entry',
2866
        'type'        => 'write',
2867
        'ajax'        => true,
2868
    ),
2869
    'core_customfield_reload_template' => array(
2870
        'classname'   => 'core_customfield_external',
2871
        'methodname'  => 'reload_template',
2872
        'classpath'   => 'customfield/externallib.php',
2873
        'description' => 'Reloads template',
2874
        'type'        => 'read',
2875
        'ajax'        => true,
2876
    ),
2877
    'core_customfield_create_category' => array(
2878
        'classname'   => 'core_customfield_external',
2879
        'methodname'  => 'create_category',
2880
        'classpath'   => 'customfield/externallib.php',
2881
        'description' => 'Creates a new category',
2882
        'type'        => 'write',
2883
        'ajax'        => true,
2884
    ),
2885
    'core_customfield_delete_category' => array(
2886
        'classname'   => 'core_customfield_external',
2887
        'methodname'  => 'delete_category',
2888
        'classpath'   => 'customfield/externallib.php',
2889
        'description' => 'Deletes a category',
2890
        'type'        => 'write',
2891
        'ajax'        => true,
2892
    ),
2893
    'core_customfield_move_field'   => array(
2894
        'classname'   => 'core_customfield_external',
2895
        'methodname'  => 'move_field',
2896
        'classpath'   => 'customfield/externallib.php',
2897
        'description' => 'Drag and drop',
2898
        'type'        => 'write',
2899
        'ajax'        => true,
2900
    ),
2901
    'core_customfield_move_category' => array(
2902
        'classname'   => 'core_customfield_external',
2903
        'methodname'  => 'move_category',
2904
        'classpath'   => 'customfield/externallib.php',
2905
        'description' => 'Drag and drop categories',
2906
        'type'        => 'write',
2907
        'ajax'        => true,
2908
    ),
2909
    'core_h5p_get_trusted_h5p_file' => [
2910
        'classname'     => 'core_h5p\external',
2911
        'methodname'    => 'get_trusted_h5p_file',
2912
        'classpath'     => '',
2913
        'description'   => 'Get the H5P file cleaned for Mobile App.',
2914
        'type'          => 'read',
2915
        'ajax'          => true,
2916
        'capabilities'  => '',
2917
        'services'      => [MOODLE_OFFICIAL_MOBILE_SERVICE],
2918
    ],
2919
    'core_table_get_dynamic_table_content' => [
2920
        'classname' => 'core_table\external\dynamic\get',
2921
        'description' => 'Get the dynamic table content raw html',
2922
        'type' => 'read',
2923
        'ajax' => true,
2924
        'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
2925
    ],
2926
    'core_xapi_statement_post' => [
2927
        'classname'     => 'core_xapi\external\post_statement',
2928
        'classpath'     => '',
2929
        'description'   => 'Post an xAPI statement.',
2930
        'type'          => 'write',
2931
        'ajax'          => true,
2932
        'capabilities'  => '',
2933
        'services'      => [MOODLE_OFFICIAL_MOBILE_SERVICE],
2934
    ],
2935
    'core_xapi_post_state' => [
2936
        'classname' => 'core_xapi\external\post_state',
2937
        'classpath' => '',
2938
        'description' => 'Post an xAPI state into an activityId.',
2939
        'type' => 'write',
2940
        'ajax' => true,
2941
        'capabilities' => '',
2942
        'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
2943
    ],
2944
    'core_xapi_get_state' => [
2945
        'classname' => 'core_xapi\external\get_state',
2946
        'classpath' => '',
2947
        'description' => 'Get an xAPI state data from an activityId.',
2948
        'type' => 'read',
2949
        'ajax' => true,
2950
        'capabilities' => '',
2951
        'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
2952
    ],
2953
    'core_xapi_get_states' => [
2954
        'classname' => 'core_xapi\external\get_states',
2955
        'description' => 'Get all state ID from an activityId.',
2956
        'type' => 'read',
2957
        'ajax' => true,
2958
        'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
2959
    ],
2960
    'core_xapi_delete_state' => [
2961
        'classname' => 'core_xapi\external\delete_state',
2962
        'classpath' => '',
2963
        'description' => 'Delete an xAPI state data from an activityId.',
2964
        'type' => 'write',
2965
        'ajax' => true,
2966
        'capabilities' => '',
2967
        'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
2968
    ],
2969
    'core_xapi_delete_states' => [
2970
        'classname' => 'core_xapi\external\delete_states',
2971
        'description' => 'Delete all xAPI state data from an activityId.',
2972
        'type' => 'write',
2973
        'ajax' => true,
2974
        'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE],
2975
    ],
2976
    'core_contentbank_delete_content' => [
2977
        'classname'     => 'core_contentbank\external\delete_content',
2978
        'classpath'     => '',
2979
        'description'   => 'Delete a content from the content bank.',
2980
        'type'          => 'write',
2981
        'ajax'          => true,
2982
        'capabilities'  => 'moodle/contentbank:deleteanycontent',
2983
    ],
2984
    'core_contentbank_rename_content' => [
2985
        'classname'     => 'core_contentbank\external\rename_content',
2986
        'classpath'     => '',
2987
        'description'   => 'Rename a content in the content bank.',
2988
        'type'          => 'write',
2989
        'ajax'          => true,
2990
        'capabilities'  => 'moodle/contentbank:manageowncontent',
2991
    ],
2992
    'core_contentbank_copy_content' => [
2993
        'classname'     => 'core_contentbank\external\copy_content',
2994
        'classpath'     => '',
2995
        'description'   => 'Copy a content in the content bank.',
2996
        'type'          => 'write',
2997
        'ajax'          => 'true',
2998
        'capabilities'  => 'moodle/contentbank:copycontent, moodle/contentbank:copyanycontent',
2999
    ],
3000
    'core_contentbank_set_content_visibility' => [
3001
        'classname'     => 'core_contentbank\external\set_content_visibility',
3002
        'classpath'     => '',
3003
        'description'   => 'Set the visibility of a content in the content bank.',
3004
        'type'          => 'write',
3005
        'ajax'          => true,
3006
        'capabilities'  => 'moodle/contentbank:manageowncontent',
3007
    ],
3008
    'core_create_userfeedback_action_record' => [
3009
        'classname'     => 'core\external\record_userfeedback_action',
3010
        'classpath'     => '',
3011
        'description'   => 'Record the action that the user takes in the user feedback notification for future use.',
3012
        'type'          => 'write',
3013
        'ajax'          => true,
3014
        'capabilities'  => '',
3015
    ],
3016
    'core_payment_get_available_gateways' => [
3017
        'classname'   => 'core_payment\external\get_available_gateways',
3018
        'description' => 'Get the list of payment gateways that support the given component/area',
3019
        'type'        => 'read',
3020
        'ajax'        => true,
3021
    ],
3022
    'core_reportbuilder_filters_reset' => [
3023
        'classname'   => 'core_reportbuilder\external\filters\reset',
3024
        'description' => 'Reset filters for given report',
3025
        'type'        => 'write',
3026
        'ajax'        => true,
3027
    ],
3028
    'core_reportbuilder_set_filters' => [
3029
        'classname'   => 'core_reportbuilder\external\filters\set',
3030
        'description' => 'Set filter values for given report',
3031
        'type'        => 'write',
3032
        'ajax'        => true,
3033
    ],
3034
    'core_dynamic_tabs_get_content' => [
3035
        'classname'   => 'core\external\dynamic_tabs_get_content',
3036
        'description' => 'Returns the content for a dynamic tab',
3037
        'type'        => 'read',
3038
        'ajax'        => true,
3039
    ],
3040
    'core_change_editmode' => [
3041
        'classname'   => 'core\external\editmode',
3042
        'methodname'   => 'change_editmode',
3043
        'description' => 'Change the editing mode',
3044
        'type'        => 'write',
3045
        'ajax'        => true,
3046
    ],
3047
    'core_reportbuilder_reports_delete' => [
3048
        'classname'   => 'core_reportbuilder\external\reports\delete',
3049
        'description' => 'Delete report',
3050
        'type'        => 'write',
3051
        'ajax'        => true,
3052
    ],
3053
    'core_reportbuilder_reports_get' => [
3054
        'classname'   => 'core_reportbuilder\external\reports\get',
3055
        'description' => 'Get custom report',
3056
        'type'        => 'read',
3057
        'ajax'        => true,
3058
    ],
3059
    'core_reportbuilder_list_reports' => [
3060
        'classname'   => 'core_reportbuilder\external\reports\listing',
3061
        'description' => 'List custom reports for current user',
3062
        'type'        => 'read',
3063
        'services'    => [MOODLE_OFFICIAL_MOBILE_SERVICE],
3064
    ],
3065
    'core_reportbuilder_retrieve_report' => [
3066
        'classname'   => 'core_reportbuilder\external\reports\retrieve',
3067
        'description' => 'Retrieve custom report content',
3068
        'type'        => 'read',
3069
        'services'    => [MOODLE_OFFICIAL_MOBILE_SERVICE],
3070
    ],
3071
    'core_reportbuilder_retrieve_system_report' => [
3072
        'classname'   => 'core_reportbuilder\external\systemreports\retrieve',
3073
        'description' => 'Retrieve system report content',
3074
        'type'        => 'read',
3075
        'services'    => [MOODLE_OFFICIAL_MOBILE_SERVICE],
3076
    ],
3077
    'core_reportbuilder_can_view_system_report' => [
3078
        'classname'   => 'core_reportbuilder\external\systemreports\can_view',
3079
        'description' => 'Determine access to a system report',
3080
        'type'        => 'read',
3081
        'services'    => [MOODLE_OFFICIAL_MOBILE_SERVICE],
3082
    ],
3083
    'core_reportbuilder_view_report' => [
3084
        'classname'   => 'core_reportbuilder\external\reports\view',
3085
        'description' => 'Trigger custom report viewed',
3086
        'type'        => 'write',
3087
        'services'    => [MOODLE_OFFICIAL_MOBILE_SERVICE],
3088
    ],
3089
    'core_reportbuilder_columns_add' => [
3090
        'classname'   => 'core_reportbuilder\external\columns\add',
3091
        'description' => 'Add column to report',
3092
        'type'        => 'write',
3093
        'ajax'        => true,
3094
    ],
3095
    'core_reportbuilder_columns_delete' => [
3096
        'classname'   => 'core_reportbuilder\external\columns\delete',
3097
        'description' => 'Delete column from report',
3098
        'type'        => 'write',
3099
        'ajax'        => true,
3100
    ],
3101
    'core_reportbuilder_columns_reorder' => [
3102
        'classname'   => 'core_reportbuilder\external\columns\reorder',
3103
        'description' => 'Re-order column within report',
3104
        'type'        => 'write',
3105
        'ajax'        => true,
3106
    ],
3107
    'core_reportbuilder_columns_sort_get' => [
3108
        'classname'   => 'core_reportbuilder\external\columns\sort\get',
3109
        'description' => 'Retrieve column sorting for report',
3110
        'type'        => 'read',
3111
        'ajax'        => true,
3112
    ],
3113
    'core_reportbuilder_columns_sort_reorder' => [
3114
        'classname'   => 'core_reportbuilder\external\columns\sort\reorder',
3115
        'description' => 'Re-order column sorting within report',
3116
        'type'        => 'write',
3117
        'ajax'        => true,
3118
    ],
3119
    'core_reportbuilder_columns_sort_toggle' => [
3120
        'classname'   => 'core_reportbuilder\external\columns\sort\toggle',
3121
        'description' => 'Toggle sorting of column within report',
3122
        'type'        => 'write',
3123
        'ajax'        => true,
3124
    ],
3125
    'core_reportbuilder_conditions_add' => [
3126
        'classname'   => 'core_reportbuilder\external\conditions\add',
3127
        'description' => 'Add condition to report',
3128
        'type'        => 'write',
3129
        'ajax'        => true,
3130
    ],
3131
    'core_reportbuilder_conditions_delete' => [
3132
        'classname'   => 'core_reportbuilder\external\conditions\delete',
3133
        'description' => 'Delete condition from report',
3134
        'type'        => 'write',
3135
        'ajax'        => true,
3136
    ],
3137
    'core_reportbuilder_conditions_reorder' => [
3138
        'classname'   => 'core_reportbuilder\external\conditions\reorder',
3139
        'description' => 'Re-order condition within report',
3140
        'type'        => 'write',
3141
        'ajax'        => true,
3142
    ],
3143
    'core_reportbuilder_conditions_reset' => [
3144
        'classname'   => 'core_reportbuilder\external\conditions\reset',
3145
        'description' => 'Reset conditions for given report',
3146
        'type'        => 'write',
3147
        'ajax'        => true,
3148
    ],
3149
    'core_reportbuilder_filters_add' => [
3150
        'classname'   => 'core_reportbuilder\external\filters\add',
3151
        'description' => 'Add filter to report',
3152
        'type'        => 'write',
3153
        'ajax'        => true,
3154
    ],
3155
    'core_reportbuilder_filters_delete' => [
3156
        'classname'   => 'core_reportbuilder\external\filters\delete',
3157
        'description' => 'Delete filter from report',
3158
        'type'        => 'write',
3159
        'ajax'        => true,
3160
    ],
3161
    'core_reportbuilder_filters_reorder' => [
3162
        'classname'   => 'core_reportbuilder\external\filters\reorder',
3163
        'description' => 'Re-order filter within report',
3164
        'type'        => 'write',
3165
        'ajax'        => true,
3166
    ],
3167
    'core_reportbuilder_audiences_delete' => [
3168
        'classname'   => 'core_reportbuilder\external\audiences\delete',
3169
        'description' => 'Delete audience from report',
3170
        'type'        => 'write',
3171
        'ajax'        => true,
3172
    ],
3173
    'core_reportbuilder_schedules_delete' => [
3174
        'classname'   => 'core_reportbuilder\external\schedules\delete',
3175
        'description' => 'Delete schedule from report',
3176
        'type'        => 'write',
3177
        'ajax'        => true,
3178
    ],
3179
    'core_reportbuilder_schedules_send' => [
3180
        'classname'   => 'core_reportbuilder\external\schedules\send',
3181
        'description' => 'Send report schedule',
3182
        'type'        => 'write',
3183
        'ajax'        => true,
3184
    ],
3185
    'core_reportbuilder_schedules_toggle' => [
3186
        'classname'   => 'core_reportbuilder\external\schedules\toggle',
3187
        'description' => 'Toggle state of report schedule',
3188
        'type'        => 'write',
3189
        'ajax'        => true,
3190
    ],
3191
    'core_admin_set_plugin_state' => [
3192
        'classname' => 'core_admin\external\set_plugin_state',
3193
        'description' => 'Set the state of a plugin',
3194
        'type' => 'write',
3195
        'ajax' => true,
3196
    ],
3197
    'core_admin_set_plugin_order' => [
3198
        'classname' => 'core_admin\external\set_plugin_order',
3199
        'description' => 'Set the order of a plugin',
3200
        'type' => 'write',
3201
        'ajax' => true,
3202
    ],
3203
    'core_admin_set_block_protection' => [
3204
        'classname' => 'core_admin\external\set_block_protection',
3205
        'description' => 'Set the protection state for a block plugin',
3206
        'type' => 'write',
3207
        'ajax' => true,
3208
    ],
3209
    'core_moodlenet_send_activity' => [
3210
        'classname'   => 'core\external\moodlenet_send_activity',
3211
        'description' => 'Send activity to MoodleNet',
3212
        'type'        => 'read',
3213
        'ajax'        => true,
3214
    ],
3215
    'core_moodlenet_get_share_info_activity' => [
3216
        'classname'   => 'core\external\moodlenet_get_share_info_activity',
3217
        'description' => 'Get information about an activity being shared',
3218
        'type'        => 'read',
3219
        'ajax'        => true,
3220
    ],
3221
    'core_moodlenet_auth_check' => [
3222
        'classname'   => 'core\external\moodlenet_auth_check',
3223
        'description' => 'Check a user has authorized for a given MoodleNet site',
3224
        'type'        => 'write',
3225
        'ajax'        => true,
3226
    ],
3227
    'core_moodlenet_get_shared_course_info' => [
3228
        'classname'   => 'core\external\moodlenet_get_shared_course_info',
3229
        'description' => 'Get information about an course being shared',
3230
        'type'        => 'read',
3231
        'ajax'        => true,
3232
    ],
3233
    'core_moodlenet_send_course' => [
3234
        'classname'   => 'core\external\moodlenet_send_course',
3235
        'description' => 'Send course to MoodleNet',
3236
        'type'        => 'read',
3237
        'ajax'        => true,
3238
    ],
1441 ariadna 3239
    'core_output_poll_stored_progress' => [
3240
        'classname'   => 'core\external\output\poll_stored_progress',
3241
        'methodname'  => 'execute',
3242
        'description' => 'Polls for the current percentage progress of a stored progress object',
3243
        'type'        => 'read',
3244
        'ajax'        => true,
3245
        'readonlysession' => true,
3246
    ],
3247
    'core_ai_delete_provider_instance' => [
3248
        'classname'   => \core_ai\external\delete_provider_instance::class,
3249
        'description' => 'Delete a provider instance',
3250
        'type'        => 'write',
3251
        'ajax'        => true,
3252
    ],
3253
    'core_ai_set_policy_status' => [
3254
        'classname'   => 'core_ai\external\set_policy_status',
3255
        'description' => 'Set a users AI policy acceptance',
3256
        'type'        => 'write',
3257
        'ajax'        => true,
3258
        'services'    => [MOODLE_OFFICIAL_MOBILE_SERVICE],
3259
    ],
3260
    'core_ai_get_policy_status' => [
3261
        'classname'   => \core_ai\external\get_policy_status::class,
3262
        'description' => 'Get a users AI policy acceptance',
3263
        'type'        => 'read',
3264
        'ajax'        => true,
3265
        'services'    => [MOODLE_OFFICIAL_MOBILE_SERVICE],
3266
    ],
3267
    'core_ai_set_action' => [
3268
        'classname'   => 'core_ai\external\set_action',
3269
        'description' => 'Update action',
3270
        'type'        => 'write',
3271
        'ajax'        => true,
3272
    ],
3273
    'core_ai_set_provider_status' => [
3274
        'classname'   => \core_ai\external\set_provider_status::class,
3275
        'description' => 'Set a providers status',
3276
        'type'        => 'write',
3277
        'ajax'        => true,
3278
    ],
3279
    'core_ai_set_provider_order' => [
3280
        'classname' => \core_ai\external\set_provider_order::class,
3281
        'description' => 'Set the order of a provider',
3282
        'type' => 'write',
3283
        'ajax' => true,
3284
    ],
3285
    'core_sms_set_gateway_status' => [
3286
        'classname'   => 'core_sms\external\sms_gateway_status',
3287
        'description' => 'Set the sms gateway status',
3288
        'type'        => 'write',
3289
        'ajax'        => true,
3290
    ],
3291
    'core_question_move_questions' => [
3292
        'classname' => '\core_question\external\move_questions',
3293
        'description' => 'Bulk move questions to a new category.',
3294
        'type' => 'write',
3295
        'ajax' => true,
3296
    ],
3297
    'core_question_search_shared_banks' => [
3298
        'classname' => '\core_question\external\search_shared_banks',
3299
        'description' => 'Get a list of shared question banks filtered by a search term.',
3300
        'type' => 'read',
3301
        'ajax' => true,
3302
    ],
3303
    'core_message_set_unsent_message' => [
3304
        'classname' => 'core_message\external\set_unsent_message',
3305
        'description' => 'Store an unsent message string',
3306
        'type' => 'write',
3307
        'ajax' => true,
3308
    ],
3309
    'core_message_get_unsent_message' => [
3310
        'classname' => 'core_message\external\get_unsent_message',
3311
        'description' => 'Get an unsent message string',
3312
        'type' => 'read',
3313
        'ajax' => true,
3314
    ],
1 efrain 3315
);
3316
 
3317
$services = array(
3318
   'Moodle mobile web service'  => array(
3319
        'functions' => array(), // Unused as we add the service in each function definition, third party services would use this.
3320
        'enabled' => 0,
3321
        'restrictedusers' => 0,
3322
        'shortname' => MOODLE_OFFICIAL_MOBILE_SERVICE,
3323
        'downloadfiles' => 1,
3324
        'uploadfiles' => 1
3325
    ),
3326
);