2009-09-14 23:52:08 +00:00
< ? php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
2012-02-21 11:24:32 +08:00
2009-09-14 23:52:08 +00:00
/**
* Core external functions and service definitions .
*
2012-04-01 22:48:17 +02:00
* The functions and services defined on this file are
* processed and registered into the Moodle DB after any
* install or upgrade operation . All plugins support this .
*
* For more information , take a look to the documentation available :
* - Webservices API : { @ link http :// docs . moodle . org / dev / Web_services_API }
* - External API : { @ link http :// docs . moodle . org / dev / External_functions_API }
* - Upgrade API : { @ link http :// docs . moodle . org / dev / Upgrade_API }
*
2012-02-21 11:24:32 +08:00
* @ package core_webservice
* @ category webservice
* @ copyright 2009 Petr Skodak
2009-09-14 23:52:08 +00:00
* @ license http :// www . gnu . org / copyleft / gpl . html GNU GPL v3 or later
*/
$functions = array (
2009-09-15 22:52:49 +00:00
2013-05-03 12:24:40 +02:00
// Cohort related functions.
'core_cohort_create_cohorts' => array (
'classname' => 'core_cohort_external' ,
'methodname' => 'create_cohorts' ,
'classpath' => 'cohort/externallib.php' ,
'description' => 'Creates new cohorts.' ,
'type' => 'write' ,
'capabilities' => 'moodle/cohort:manage' ,
),
'core_cohort_delete_cohorts' => array (
'classname' => 'core_cohort_external' ,
'methodname' => 'delete_cohorts' ,
'classpath' => 'cohort/externallib.php' ,
'description' => 'Deletes all specified cohorts.' ,
'type' => 'delete' ,
'capabilities' => 'moodle/cohort:manage' ,
),
'core_cohort_get_cohorts' => array (
'classname' => 'core_cohort_external' ,
'methodname' => 'get_cohorts' ,
'classpath' => 'cohort/externallib.php' ,
'description' => 'Returns cohort details.' ,
'type' => 'read' ,
'capabilities' => 'moodle/cohort:view' ,
),
'core_cohort_update_cohorts' => array (
'classname' => 'core_cohort_external' ,
'methodname' => 'update_cohorts' ,
'classpath' => 'cohort/externallib.php' ,
'description' => 'Updates existing cohorts.' ,
'type' => 'write' ,
'capabilities' => 'moodle/cohort:manage' ,
),
'core_cohort_add_cohort_members' => array (
'classname' => 'core_cohort_external' ,
'methodname' => 'add_cohort_members' ,
'classpath' => 'cohort/externallib.php' ,
'description' => 'Adds cohort members.' ,
'type' => 'write' ,
'capabilities' => 'moodle/cohort:assign' ,
),
'core_cohort_delete_cohort_members' => array (
'classname' => 'core_cohort_external' ,
'methodname' => 'delete_cohort_members' ,
'classpath' => 'cohort/externallib.php' ,
'description' => 'Deletes cohort members.' ,
'type' => 'delete' ,
'capabilities' => 'moodle/cohort:assign' ,
),
'core_cohort_get_cohort_members' => array (
'classname' => 'core_cohort_external' ,
'methodname' => 'get_cohort_members' ,
'classpath' => 'cohort/externallib.php' ,
'description' => 'Returns cohort members.' ,
'type' => 'read' ,
'capabilities' => 'moodle/cohort:view' ,
),
2015-03-16 16:39:23 +01:00
2015-02-27 17:06:27 +01:00
// Comments related functions.
'core_comment_get_comments' => array (
2015-03-16 12:31:53 +01:00
'classname' => 'core_comment_external' ,
'methodname' => 'get_comments' ,
'description' => 'Returns comments.' ,
'type' => 'read' ,
'capabilities' => 'moodle/comment:view' ,
),
2014-02-21 16:09:00 +01:00
// Grade related functions.
2012-12-17 11:13:10 +08:00
2014-02-21 16:09:00 +01:00
'core_grades_get_grades' => array (
'classname' => 'core_grades_external' ,
'methodname' => 'get_grades' ,
2014-10-23 11:05:57 +02:00
'description' => ' Returns student course total grade and grades for activities .
This function does not return category or manual items .
This function is suitable for managers or teachers not students . ' ,
2014-02-21 16:09:00 +01:00
'type' => 'read' ,
2014-10-23 11:05:57 +02:00
'capabilities' => 'moodle/grade:view, moodle/grade:viewall, moodle/grade:viewhidden' ,
2012-12-17 11:13:10 +08:00
),
2014-02-21 16:09:00 +01:00
'core_grades_update_grades' => array (
'classname' => 'core_grades_external' ,
'methodname' => 'update_grades' ,
'description' => 'Update a grade item and associated student grades.' ,
'type' => 'write' ,
'capabilities' => '' ,
2012-12-17 11:13:10 +08:00
),
2013-05-03 12:24:40 +02:00
2009-09-15 22:52:49 +00:00
// === group related functions ===
2009-10-22 23:07:21 +00:00
2009-09-14 23:52:08 +00:00
'moodle_group_create_groups' => array (
2015-01-23 10:24:13 +08:00
'classname' => 'moodle_group_external' ,
2011-10-18 12:57:33 +08:00
'methodname' => 'create_groups' ,
'classpath' => 'group/externallib.php' ,
2015-01-23 10:24:13 +08:00
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_group_create_groups(). ' ,
2011-10-18 12:57:33 +08:00
'type' => 'write' ,
'capabilities' => 'moodle/course:managegroups' ,
),
'core_group_create_groups' => array (
'classname' => 'core_group_external' ,
2009-09-14 23:52:08 +00:00
'methodname' => 'create_groups' ,
'classpath' => 'group/externallib.php' ,
2009-10-22 23:07:21 +00:00
'description' => 'Creates new groups.' ,
'type' => 'write' ,
2010-07-23 06:17:06 +00:00
'capabilities' => 'moodle/course:managegroups' ,
2009-09-14 23:52:08 +00:00
),
2009-10-22 23:07:21 +00:00
2009-09-14 23:52:08 +00:00
'moodle_group_get_groups' => array (
2015-01-23 10:24:13 +08:00
'classname' => 'moodle_group_external' ,
2011-10-18 12:57:33 +08:00
'methodname' => 'get_groups' ,
'classpath' => 'group/externallib.php' ,
2015-01-23 10:24:13 +08:00
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_group_get_groups()' ,
2011-10-18 12:57:33 +08:00
'type' => 'read' ,
'capabilities' => 'moodle/course:managegroups' ,
),
'core_group_get_groups' => array (
'classname' => 'core_group_external' ,
2009-09-14 23:52:08 +00:00
'methodname' => 'get_groups' ,
'classpath' => 'group/externallib.php' ,
2009-10-21 21:21:48 +00:00
'description' => 'Returns group details.' ,
2009-10-22 23:07:21 +00:00
'type' => 'read' ,
2010-07-23 06:17:06 +00:00
'capabilities' => 'moodle/course:managegroups' ,
2009-09-14 23:52:08 +00:00
),
2009-10-22 23:54:35 +00:00
'moodle_group_get_course_groups' => array (
2015-01-23 10:24:13 +08:00
'classname' => 'moodle_group_external' ,
2011-10-18 12:57:33 +08:00
'methodname' => 'get_course_groups' ,
'classpath' => 'group/externallib.php' ,
2015-01-23 10:24:13 +08:00
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_group_get_course_groups()' ,
2011-10-18 12:57:33 +08:00
'type' => 'read' ,
'capabilities' => 'moodle/course:managegroups' ,
),
'core_group_get_course_groups' => array (
'classname' => 'core_group_external' ,
2009-10-22 23:54:35 +00:00
'methodname' => 'get_course_groups' ,
'classpath' => 'group/externallib.php' ,
'description' => 'Returns all groups in specified course.' ,
'type' => 'read' ,
2010-07-23 06:17:06 +00:00
'capabilities' => 'moodle/course:managegroups' ,
2009-10-22 23:54:35 +00:00
),
2009-10-27 09:27:34 +00:00
2009-09-14 23:52:08 +00:00
'moodle_group_delete_groups' => array (
2015-01-23 10:24:13 +08:00
'classname' => 'moodle_group_external' ,
2011-10-18 12:57:33 +08:00
'methodname' => 'delete_groups' ,
'classpath' => 'group/externallib.php' ,
2015-01-23 10:24:13 +08:00
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_group_delete_groups()' ,
2011-10-18 12:57:33 +08:00
'type' => 'delete' ,
'capabilities' => 'moodle/course:managegroups' ,
),
'core_group_delete_groups' => array (
'classname' => 'core_group_external' ,
2009-09-14 23:52:08 +00:00
'methodname' => 'delete_groups' ,
'classpath' => 'group/externallib.php' ,
2009-10-26 23:05:11 +00:00
'description' => 'Deletes all specified groups.' ,
'type' => 'delete' ,
2010-07-23 06:17:06 +00:00
'capabilities' => 'moodle/course:managegroups' ,
2009-09-14 23:52:08 +00:00
),
2009-11-05 20:04:27 +00:00
2009-09-14 23:52:08 +00:00
'moodle_group_get_groupmembers' => array (
2015-01-23 10:24:13 +08:00
'classname' => 'moodle_group_external' ,
'methodname' => 'get_groupmembers' ,
2011-10-18 12:57:33 +08:00
'classpath' => 'group/externallib.php' ,
2015-01-23 10:24:13 +08:00
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_group_get_group_members()' ,
2011-10-18 12:57:33 +08:00
'type' => 'read' ,
'capabilities' => 'moodle/course:managegroups' ,
),
'core_group_get_group_members' => array (
'classname' => 'core_group_external' ,
'methodname' => 'get_group_members' ,
2009-09-14 23:52:08 +00:00
'classpath' => 'group/externallib.php' ,
2009-10-26 23:05:11 +00:00
'description' => 'Returns group members.' ,
'type' => 'read' ,
2010-07-23 06:17:06 +00:00
'capabilities' => 'moodle/course:managegroups' ,
2009-09-14 23:52:08 +00:00
),
2009-11-05 22:06:49 +00:00
2009-09-14 23:52:08 +00:00
'moodle_group_add_groupmembers' => array (
2015-01-23 10:24:13 +08:00
'classname' => 'moodle_group_external' ,
'methodname' => 'add_groupmembers' ,
2011-10-18 12:57:33 +08:00
'classpath' => 'group/externallib.php' ,
2015-01-23 10:24:13 +08:00
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_group_add_group_members()' ,
2011-10-18 12:57:33 +08:00
'type' => 'write' ,
'capabilities' => 'moodle/course:managegroups' ,
),
'core_group_add_group_members' => array (
'classname' => 'core_group_external' ,
'methodname' => 'add_group_members' ,
2009-09-14 23:52:08 +00:00
'classpath' => 'group/externallib.php' ,
2009-10-26 23:05:11 +00:00
'description' => 'Adds group members.' ,
'type' => 'write' ,
2010-07-23 06:17:06 +00:00
'capabilities' => 'moodle/course:managegroups' ,
2009-09-14 23:52:08 +00:00
),
'moodle_group_delete_groupmembers' => array (
2015-01-23 10:24:13 +08:00
'classname' => 'moodle_group_external' ,
'methodname' => 'delete_groupmembers' ,
2009-09-14 23:52:08 +00:00
'classpath' => 'group/externallib.php' ,
2015-01-23 10:24:13 +08:00
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_group_delete_group_members()' ,
2009-10-26 23:05:11 +00:00
'type' => 'delete' ,
2010-07-23 06:17:06 +00:00
'capabilities' => 'moodle/course:managegroups' ,
2009-09-14 23:52:08 +00:00
),
2010-07-23 06:17:06 +00:00
2011-10-18 12:57:33 +08:00
'core_group_delete_group_members' => array (
'classname' => 'core_group_external' ,
'methodname' => 'delete_group_members' ,
'classpath' => 'group/externallib.php' ,
'description' => 'Deletes group members.' ,
'type' => 'delete' ,
'capabilities' => 'moodle/course:managegroups' ,
),
2010-07-23 06:17:06 +00:00
2012-04-30 17:00:03 +02:00
'core_group_create_groupings' => array (
'classname' => 'core_group_external' ,
'methodname' => 'create_groupings' ,
'classpath' => 'group/externallib.php' ,
'description' => 'Creates new groupings' ,
'type' => 'write' ,
),
'core_group_update_groupings' => array (
'classname' => 'core_group_external' ,
'methodname' => 'update_groupings' ,
'classpath' => 'group/externallib.php' ,
'description' => 'Updates existing groupings' ,
'type' => 'write' ,
),
'core_group_get_groupings' => array (
'classname' => 'core_group_external' ,
'methodname' => 'get_groupings' ,
'classpath' => 'group/externallib.php' ,
'description' => 'Returns groupings details.' ,
'type' => 'read' ,
),
'core_group_get_course_groupings' => array (
2012-05-10 11:41:46 +02:00
'classname' => 'core_group_external' ,
'methodname' => 'get_course_groupings' ,
'classpath' => 'group/externallib.php' ,
'description' => 'Returns all groupings in specified course.' ,
'type' => 'read' ,
2012-04-30 17:00:03 +02:00
),
'core_group_delete_groupings' => array (
2012-05-10 11:41:46 +02:00
'classname' => 'core_group_external' ,
'methodname' => 'delete_groupings' ,
'classpath' => 'group/externallib.php' ,
'description' => 'Deletes all specified groupings.' ,
'type' => 'write' ,
2012-04-30 17:00:03 +02:00
),
'core_group_assign_grouping' => array (
2012-05-10 11:41:46 +02:00
'classname' => 'core_group_external' ,
'methodname' => 'assign_grouping' ,
'classpath' => 'group/externallib.php' ,
'description' => 'Assing groups from groupings' ,
'type' => 'write' ,
2012-04-30 17:00:03 +02:00
),
'core_group_unassign_grouping' => array (
2012-05-10 11:41:46 +02:00
'classname' => 'core_group_external' ,
'methodname' => 'unassign_grouping' ,
'classpath' => 'group/externallib.php' ,
'description' => 'Unassing groups from groupings' ,
'type' => 'write' ,
2012-04-30 17:00:03 +02:00
),
2015-02-05 13:32:22 +01:00
'core_group_get_course_user_groups' => array (
'classname' => 'core_group_external' ,
'methodname' => 'get_course_user_groups' ,
'classpath' => 'group/externallib.php' ,
'description' => 'Returns all groups in specified course for the specified user.' ,
'type' => 'read' ,
'capabilities' => 'moodle/course:managegroups' ,
),
2015-03-20 12:56:32 +01:00
'core_notes_get_course_notes' => array (
'classname' => 'core_notes_external' ,
'methodname' => 'get_course_notes' ,
2015-04-02 11:34:11 +05:30
'classpath' => 'notes/externallib.php' ,
2015-03-20 12:56:32 +01:00
'description' => 'Returns all notes in specified course (or site) for the specified user.' ,
'type' => 'read' ,
'capabilities' => 'moodle/notes:view' ,
),
2010-07-23 06:17:06 +00:00
// === file related functions ===
2010-03-16 08:29:08 +00:00
'moodle_file_get_files' => array (
2015-01-23 10:24:13 +08:00
'classname' => 'moodle_file_external' ,
2011-10-18 12:57:33 +08:00
'methodname' => 'get_files' ,
2015-01-23 10:24:13 +08:00
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_files_get_files()' ,
2011-10-18 12:57:33 +08:00
'type' => 'read' ,
'classpath' => 'files/externallib.php' ,
),
'core_files_get_files' => array (
'classname' => 'core_files_external' ,
2010-03-16 08:29:08 +00:00
'methodname' => 'get_files' ,
'description' => 'browse moodle files' ,
'type' => 'read' ,
'classpath' => 'files/externallib.php' ,
),
2011-10-18 12:57:33 +08:00
2010-03-16 08:29:08 +00:00
'moodle_file_upload' => array (
2015-01-23 10:24:13 +08:00
'classname' => 'moodle_file_external' ,
2011-10-18 12:57:33 +08:00
'methodname' => 'upload' ,
2015-01-23 10:24:13 +08:00
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_files_upload()' ,
2011-10-18 12:57:33 +08:00
'type' => 'write' ,
'classpath' => 'files/externallib.php' ,
),
'core_files_upload' => array (
'classname' => 'core_files_external' ,
2010-03-16 08:29:08 +00:00
'methodname' => 'upload' ,
'description' => 'upload a file to moodle' ,
'type' => 'write' ,
'classpath' => 'files/externallib.php' ,
),
2009-11-05 22:06:49 +00:00
2009-09-15 22:52:49 +00:00
// === user related functions ===
2010-07-23 06:17:06 +00:00
2009-09-15 22:52:49 +00:00
'moodle_user_create_users' => array (
2015-01-23 10:24:13 +08:00
'classname' => 'moodle_user_external' ,
2011-10-18 12:57:33 +08:00
'methodname' => 'create_users' ,
'classpath' => 'user/externallib.php' ,
2015-01-23 10:24:13 +08:00
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_user_create_users()' ,
2011-10-18 12:57:33 +08:00
'type' => 'write' ,
'capabilities' => 'moodle/user:create' ,
),
'core_user_create_users' => array (
'classname' => 'core_user_external' ,
2009-09-15 22:52:49 +00:00
'methodname' => 'create_users' ,
'classpath' => 'user/externallib.php' ,
2010-02-11 04:02:04 +00:00
'description' => 'Create users.' ,
'type' => 'write' ,
2010-07-23 06:17:06 +00:00
'capabilities' => 'moodle/user:create' ,
2009-09-15 22:52:49 +00:00
),
2013-01-23 18:02:31 +08:00
'core_user_get_users' => array (
'classname' => 'core_user_external' ,
'methodname' => 'get_users' ,
'classpath' => 'user/externallib.php' ,
'description' => 'search for users matching the parameters' ,
'type' => 'read' ,
'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update' ,
),
2010-02-11 04:02:04 +00:00
'moodle_user_get_users_by_id' => array (
2015-01-23 10:24:13 +08:00
'classname' => 'moodle_user_external' ,
2011-10-18 12:57:33 +08:00
'methodname' => 'get_users_by_id' ,
'classpath' => 'user/externallib.php' ,
2015-01-23 10:24:13 +08:00
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. Use core_user_get_users_by_field service instead' ,
2011-10-18 12:57:33 +08:00
'type' => 'read' ,
'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update' ,
),
2012-10-30 11:36:29 +08:00
'core_user_get_users_by_field' => array (
2012-05-07 12:09:09 +01:00
'classname' => 'core_user_external' ,
2012-10-30 11:36:29 +08:00
'methodname' => 'get_users_by_field' ,
2012-05-07 12:09:09 +01:00
'classpath' => 'user/externallib.php' ,
2012-10-30 11:36:29 +08:00
'description' => 'Retrieve users information for a specified unique field - If you want to do a user search, use core_user_get_users()' ,
2012-05-07 12:09:09 +01:00
'type' => 'read' ,
'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update' ,
),
2011-10-18 12:57:33 +08:00
'core_user_get_users_by_id' => array (
'classname' => 'core_user_external' ,
2010-02-11 04:02:04 +00:00
'methodname' => 'get_users_by_id' ,
2009-09-15 22:52:49 +00:00
'classpath' => 'user/externallib.php' ,
2013-04-05 13:14:49 +08:00
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been replaced by core_user_get_users_by_field()' ,
2010-02-11 04:02:04 +00:00
'type' => 'read' ,
2011-06-08 16:07:12 +08:00
'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update' ,
2009-09-15 22:52:49 +00:00
),
2011-06-29 15:41:31 +08:00
'moodle_user_get_users_by_courseid' => array (
2015-01-23 10:24:13 +08:00
'classname' => 'moodle_user_external' ,
'methodname' => 'get_users_by_courseid' ,
'classpath' => 'user/externallib.php' ,
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_enrol_get_enrolled_users()' ,
2011-06-29 15:41:31 +08:00
'type' => 'read' ,
'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, moodle/site:accessallgroups' ,
),
2011-06-20 13:46:47 +08:00
'moodle_user_get_course_participants_by_id' => array (
2015-01-23 10:24:13 +08:00
'classname' => 'moodle_user_external' ,
'methodname' => 'get_course_participants_by_id' ,
2011-06-20 13:46:47 +08:00
'classpath' => 'user/externallib.php' ,
2015-01-23 10:24:13 +08:00
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_user_get_course_user_profiles()' ,
2011-10-18 12:57:33 +08:00
'type' => 'read' ,
'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, moodle/site:accessallgroups' ,
),
'core_user_get_course_user_profiles' => array (
'classname' => 'core_user_external' ,
'methodname' => 'get_course_user_profiles' ,
'classpath' => 'user/externallib.php' ,
'description' => 'Get course user profiles (each of the profils matching a course id and a user id).' ,
2011-06-20 13:46:47 +08:00
'type' => 'read' ,
'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, moodle/site:accessallgroups' ,
),
2009-09-15 22:52:49 +00:00
'moodle_user_delete_users' => array (
2015-01-23 10:24:13 +08:00
'classname' => 'moodle_user_external' ,
2011-10-18 12:57:33 +08:00
'methodname' => 'delete_users' ,
'classpath' => 'user/externallib.php' ,
2015-01-23 10:24:13 +08:00
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_user_delete_users()' ,
2011-10-18 12:57:33 +08:00
'type' => 'write' ,
'capabilities' => 'moodle/user:delete' ,
),
'core_user_delete_users' => array (
'classname' => 'core_user_external' ,
2009-09-15 22:52:49 +00:00
'methodname' => 'delete_users' ,
'classpath' => 'user/externallib.php' ,
2010-02-11 04:02:04 +00:00
'description' => 'Delete users.' ,
'type' => 'write' ,
2010-07-23 06:17:06 +00:00
'capabilities' => 'moodle/user:delete' ,
2009-09-15 22:52:49 +00:00
),
'moodle_user_update_users' => array (
2015-01-23 10:24:13 +08:00
'classname' => 'moodle_user_external' ,
2011-10-18 12:57:33 +08:00
'methodname' => 'update_users' ,
'classpath' => 'user/externallib.php' ,
2015-01-23 10:24:13 +08:00
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_user_update_users()' ,
2011-10-18 12:57:33 +08:00
'type' => 'write' ,
'capabilities' => 'moodle/user:update' ,
),
'core_user_update_users' => array (
'classname' => 'core_user_external' ,
2009-09-15 22:52:49 +00:00
'methodname' => 'update_users' ,
'classpath' => 'user/externallib.php' ,
2010-02-11 04:02:04 +00:00
'description' => 'Update users.' ,
'type' => 'write' ,
2010-07-23 06:17:06 +00:00
'capabilities' => 'moodle/user:update' ,
2009-09-15 22:52:49 +00:00
),
2010-02-16 07:07:04 +00:00
2013-10-04 11:43:45 +02:00
'core_user_add_user_device' => array (
'classname' => 'core_user_external' ,
'methodname' => 'add_user_device' ,
'classpath' => 'user/externallib.php' ,
'description' => 'Store mobile user devices information for PUSH Notifications.' ,
'type' => 'write' ,
'capabilities' => '' ,
),
2015-02-09 18:06:10 +01:00
'core_user_remove_user_device' => array (
'classname' => 'core_user_external' ,
'methodname' => 'remove_user_device' ,
'classpath' => 'user/externallib.php' ,
'description' => 'Remove a user device from the Moodle database.' ,
'type' => 'write' ,
'capabilities' => '' ,
),
2015-03-30 12:06:38 +02:00
'core_user_view_user_list' => array (
'classname' => 'core_user_external' ,
'methodname' => 'view_user_list' ,
'classpath' => 'user/externallib.php' ,
'description' => 'Simulates the web-interface view of user/index.php (triggering events).' ,
'type' => 'write' ,
'capabilities' => 'moodle/course:viewparticipants' ,
),
2015-03-30 14:12:00 +02:00
'core_user_view_user_profile' => array (
'classname' => 'core_user_external' ,
'methodname' => 'view_user_profile' ,
'classpath' => 'user/externallib.php' ,
'description' => 'Simulates the web-interface view of user/view.php and user/profile.php (triggering events).' ,
'type' => 'write' ,
'capabilities' => 'moodle/user:viewdetails' ,
),
2015-05-14 16:30:32 +02:00
'core_user_add_user_private_files' => array (
'classname' => 'core_user_external' ,
'methodname' => 'add_user_private_files' ,
'classpath' => 'user/externallib.php' ,
'description' => 'Copy files from a draft area to users private files area.' ,
'type' => 'write' ,
'capabilities' => 'moodle/user:manageownfiles' ,
),
2010-07-23 06:17:06 +00:00
// === enrol related functions ===
2012-09-26 14:36:59 +08:00
2012-09-19 13:01:26 +12:00
'core_enrol_get_enrolled_users_with_capability' => array (
'classname' => 'core_enrol_external' ,
'methodname' => 'get_enrolled_users_with_capability' ,
'classpath' => 'enrol/externallib.php' ,
'description' => ' For each course and capability specified , return a list of the users that are enrolled in the course
and have that capability ' ,
'type' => 'read' ,
),
2010-07-23 06:17:06 +00:00
MDL-21782 reworked enrolment framework, the core infrastructure is in place, the basic plugins are all implemented; see the tracker issue for list of unfinished bits, expect more changes and improvements during the next week
AMOS START
MOV [sendcoursewelcomemessage,core_admin],[sendcoursewelcomemessage,enrol_self]
MOV [configsendcoursewelcomemessage,core_admin],[sendcoursewelcomemessage_desc,enrol_self]
MOV [enrolstartdate,core],[enrolstartdate,enrol_self]
MOV [enrolenddate,core],[enrolenddate,enrol_self]
CPY [welcometocourse,core],[welcometocourse,enrol_self]
CPY [welcometocoursetext,core],[welcometocoursetext,enrol_self]
MOV [notenrollable,core],[notenrollable,core_enrol]
MOV [enrolenddaterror,core],[enrolenddaterror,enrol_self]
MOV [enrolmentkeyhint,core],[passwordinvalidhint,enrol_self]
MOV [coursemanager,core_admin],[coursecontact,core_admin]
MOV [configcoursemanager,core_admin],[coursecontact_desc,core_admin]
MOV [enrolledincourserole,core],[enrolledincourserole,enrol_manual]
MOV [enrolme,core],[enrolme,core_enrol]
MOV [unenrol,core],[unenrol,core_enrol]
MOV [unenrolme,core],[unenrolme,core_enrol]
MOV [enrolmentnew,core],[enrolmentnew,core_enrol]
MOV [enrolmentnewuser,core],[enrolmentnewuser,core_enrol]
MOV [enrolments,core],[enrolments,core_enrol]
MOV [enrolperiod,core],[enrolperiod,core_enrol]
MOV [unenrolroleusers,core],[unenrolroleusers,core_enrol]
AMOS END
2010-06-21 15:30:49 +00:00
'moodle_enrol_get_enrolled_users' => array (
'classname' => 'moodle_enrol_external' ,
'methodname' => 'get_enrolled_users' ,
'classpath' => 'enrol/externallib.php' ,
2011-10-18 12:57:33 +08:00
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. Please use core_enrol_get_enrolled_users() (previously known as moodle_user_get_users_by_courseid).' ,
MDL-21782 reworked enrolment framework, the core infrastructure is in place, the basic plugins are all implemented; see the tracker issue for list of unfinished bits, expect more changes and improvements during the next week
AMOS START
MOV [sendcoursewelcomemessage,core_admin],[sendcoursewelcomemessage,enrol_self]
MOV [configsendcoursewelcomemessage,core_admin],[sendcoursewelcomemessage_desc,enrol_self]
MOV [enrolstartdate,core],[enrolstartdate,enrol_self]
MOV [enrolenddate,core],[enrolenddate,enrol_self]
CPY [welcometocourse,core],[welcometocourse,enrol_self]
CPY [welcometocoursetext,core],[welcometocoursetext,enrol_self]
MOV [notenrollable,core],[notenrollable,core_enrol]
MOV [enrolenddaterror,core],[enrolenddaterror,enrol_self]
MOV [enrolmentkeyhint,core],[passwordinvalidhint,enrol_self]
MOV [coursemanager,core_admin],[coursecontact,core_admin]
MOV [configcoursemanager,core_admin],[coursecontact_desc,core_admin]
MOV [enrolledincourserole,core],[enrolledincourserole,enrol_manual]
MOV [enrolme,core],[enrolme,core_enrol]
MOV [unenrol,core],[unenrol,core_enrol]
MOV [unenrolme,core],[unenrolme,core_enrol]
MOV [enrolmentnew,core],[enrolmentnew,core_enrol]
MOV [enrolmentnewuser,core],[enrolmentnewuser,core_enrol]
MOV [enrolments,core],[enrolments,core_enrol]
MOV [enrolperiod,core],[enrolperiod,core_enrol]
MOV [unenrolroleusers,core],[unenrolroleusers,core_enrol]
AMOS END
2010-06-21 15:30:49 +00:00
'type' => 'read' ,
2010-07-23 06:17:06 +00:00
'capabilities' => ' moodle / site : viewparticipants , moodle / course : viewparticipants ,
moodle / role : review , moodle / site : accessallgroups , moodle / course : enrolreview ' ,
MDL-21782 reworked enrolment framework, the core infrastructure is in place, the basic plugins are all implemented; see the tracker issue for list of unfinished bits, expect more changes and improvements during the next week
AMOS START
MOV [sendcoursewelcomemessage,core_admin],[sendcoursewelcomemessage,enrol_self]
MOV [configsendcoursewelcomemessage,core_admin],[sendcoursewelcomemessage_desc,enrol_self]
MOV [enrolstartdate,core],[enrolstartdate,enrol_self]
MOV [enrolenddate,core],[enrolenddate,enrol_self]
CPY [welcometocourse,core],[welcometocourse,enrol_self]
CPY [welcometocoursetext,core],[welcometocoursetext,enrol_self]
MOV [notenrollable,core],[notenrollable,core_enrol]
MOV [enrolenddaterror,core],[enrolenddaterror,enrol_self]
MOV [enrolmentkeyhint,core],[passwordinvalidhint,enrol_self]
MOV [coursemanager,core_admin],[coursecontact,core_admin]
MOV [configcoursemanager,core_admin],[coursecontact_desc,core_admin]
MOV [enrolledincourserole,core],[enrolledincourserole,enrol_manual]
MOV [enrolme,core],[enrolme,core_enrol]
MOV [unenrol,core],[unenrol,core_enrol]
MOV [unenrolme,core],[unenrolme,core_enrol]
MOV [enrolmentnew,core],[enrolmentnew,core_enrol]
MOV [enrolmentnewuser,core],[enrolmentnewuser,core_enrol]
MOV [enrolments,core],[enrolments,core_enrol]
MOV [enrolperiod,core],[enrolperiod,core_enrol]
MOV [unenrolroleusers,core],[unenrolroleusers,core_enrol]
AMOS END
2010-06-21 15:30:49 +00:00
),
2011-10-25 15:28:52 +13:00
2011-10-18 12:57:33 +08:00
'core_enrol_get_enrolled_users' => array (
'classname' => 'core_enrol_external' ,
'methodname' => 'get_enrolled_users' ,
'classpath' => 'enrol/externallib.php' ,
'description' => 'Get enrolled users by course id.' ,
'type' => 'read' ,
'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update, moodle/site:accessallgroups' ,
),
MDL-21782 reworked enrolment framework, the core infrastructure is in place, the basic plugins are all implemented; see the tracker issue for list of unfinished bits, expect more changes and improvements during the next week
AMOS START
MOV [sendcoursewelcomemessage,core_admin],[sendcoursewelcomemessage,enrol_self]
MOV [configsendcoursewelcomemessage,core_admin],[sendcoursewelcomemessage_desc,enrol_self]
MOV [enrolstartdate,core],[enrolstartdate,enrol_self]
MOV [enrolenddate,core],[enrolenddate,enrol_self]
CPY [welcometocourse,core],[welcometocourse,enrol_self]
CPY [welcometocoursetext,core],[welcometocoursetext,enrol_self]
MOV [notenrollable,core],[notenrollable,core_enrol]
MOV [enrolenddaterror,core],[enrolenddaterror,enrol_self]
MOV [enrolmentkeyhint,core],[passwordinvalidhint,enrol_self]
MOV [coursemanager,core_admin],[coursecontact,core_admin]
MOV [configcoursemanager,core_admin],[coursecontact_desc,core_admin]
MOV [enrolledincourserole,core],[enrolledincourserole,enrol_manual]
MOV [enrolme,core],[enrolme,core_enrol]
MOV [unenrol,core],[unenrol,core_enrol]
MOV [unenrolme,core],[unenrolme,core_enrol]
MOV [enrolmentnew,core],[enrolmentnew,core_enrol]
MOV [enrolmentnewuser,core],[enrolmentnewuser,core_enrol]
MOV [enrolments,core],[enrolments,core_enrol]
MOV [enrolperiod,core],[enrolperiod,core_enrol]
MOV [unenrolroleusers,core],[unenrolroleusers,core_enrol]
AMOS END
2010-06-21 15:30:49 +00:00
2011-04-23 22:18:08 +02:00
'moodle_enrol_get_users_courses' => array (
2015-01-23 10:24:13 +08:00
'classname' => 'moodle_enrol_external' ,
2011-04-23 22:18:08 +02:00
'methodname' => 'get_users_courses' ,
'classpath' => 'enrol/externallib.php' ,
2015-01-23 10:24:13 +08:00
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_enrol_get_users_courses()' ,
2011-04-23 22:18:08 +02:00
'type' => 'read' ,
'capabilities' => 'moodle/course:viewparticipants' ,
),
2011-10-18 12:57:33 +08:00
'core_enrol_get_users_courses' => array (
'classname' => 'core_enrol_external' ,
'methodname' => 'get_users_courses' ,
'classpath' => 'enrol/externallib.php' ,
'description' => 'Get the list of courses where a user is enrolled in' ,
'type' => 'read' ,
'capabilities' => 'moodle/course:viewparticipants' ,
),
2013-07-10 09:42:56 +08:00
'core_enrol_get_course_enrolment_methods' => array (
'classname' => 'core_enrol_external' ,
'methodname' => 'get_course_enrolment_methods' ,
'classpath' => 'enrol/externallib.php' ,
'description' => 'Get the list of course enrolment methods' ,
'type' => 'read' ,
),
2011-10-18 12:57:33 +08:00
// === Role related functions ===
MDL-21782 reworked enrolment framework, the core infrastructure is in place, the basic plugins are all implemented; see the tracker issue for list of unfinished bits, expect more changes and improvements during the next week
AMOS START
MOV [sendcoursewelcomemessage,core_admin],[sendcoursewelcomemessage,enrol_self]
MOV [configsendcoursewelcomemessage,core_admin],[sendcoursewelcomemessage_desc,enrol_self]
MOV [enrolstartdate,core],[enrolstartdate,enrol_self]
MOV [enrolenddate,core],[enrolenddate,enrol_self]
CPY [welcometocourse,core],[welcometocourse,enrol_self]
CPY [welcometocoursetext,core],[welcometocoursetext,enrol_self]
MOV [notenrollable,core],[notenrollable,core_enrol]
MOV [enrolenddaterror,core],[enrolenddaterror,enrol_self]
MOV [enrolmentkeyhint,core],[passwordinvalidhint,enrol_self]
MOV [coursemanager,core_admin],[coursecontact,core_admin]
MOV [configcoursemanager,core_admin],[coursecontact_desc,core_admin]
MOV [enrolledincourserole,core],[enrolledincourserole,enrol_manual]
MOV [enrolme,core],[enrolme,core_enrol]
MOV [unenrol,core],[unenrol,core_enrol]
MOV [unenrolme,core],[unenrolme,core_enrol]
MOV [enrolmentnew,core],[enrolmentnew,core_enrol]
MOV [enrolmentnewuser,core],[enrolmentnewuser,core_enrol]
MOV [enrolments,core],[enrolments,core_enrol]
MOV [enrolperiod,core],[enrolperiod,core_enrol]
MOV [unenrolroleusers,core],[unenrolroleusers,core_enrol]
AMOS END
2010-06-21 15:30:49 +00:00
'moodle_role_assign' => array (
2015-01-23 10:24:13 +08:00
'classname' => 'moodle_enrol_external' ,
'methodname' => 'role_assign' ,
2011-10-18 12:57:33 +08:00
'classpath' => 'enrol/externallib.php' ,
2015-01-23 10:24:13 +08:00
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_role_assign_role()' ,
2011-10-18 12:57:33 +08:00
'type' => 'write' ,
'capabilities' => 'moodle/role:assign' ,
),
'core_role_assign_roles' => array (
'classname' => 'core_role_external' ,
'methodname' => 'assign_roles' ,
2010-02-16 07:07:04 +00:00
'classpath' => 'enrol/externallib.php' ,
MDL-21782 reworked enrolment framework, the core infrastructure is in place, the basic plugins are all implemented; see the tracker issue for list of unfinished bits, expect more changes and improvements during the next week
AMOS START
MOV [sendcoursewelcomemessage,core_admin],[sendcoursewelcomemessage,enrol_self]
MOV [configsendcoursewelcomemessage,core_admin],[sendcoursewelcomemessage_desc,enrol_self]
MOV [enrolstartdate,core],[enrolstartdate,enrol_self]
MOV [enrolenddate,core],[enrolenddate,enrol_self]
CPY [welcometocourse,core],[welcometocourse,enrol_self]
CPY [welcometocoursetext,core],[welcometocoursetext,enrol_self]
MOV [notenrollable,core],[notenrollable,core_enrol]
MOV [enrolenddaterror,core],[enrolenddaterror,enrol_self]
MOV [enrolmentkeyhint,core],[passwordinvalidhint,enrol_self]
MOV [coursemanager,core_admin],[coursecontact,core_admin]
MOV [configcoursemanager,core_admin],[coursecontact_desc,core_admin]
MOV [enrolledincourserole,core],[enrolledincourserole,enrol_manual]
MOV [enrolme,core],[enrolme,core_enrol]
MOV [unenrol,core],[unenrol,core_enrol]
MOV [unenrolme,core],[unenrolme,core_enrol]
MOV [enrolmentnew,core],[enrolmentnew,core_enrol]
MOV [enrolmentnewuser,core],[enrolmentnewuser,core_enrol]
MOV [enrolments,core],[enrolments,core_enrol]
MOV [enrolperiod,core],[enrolperiod,core_enrol]
MOV [unenrolroleusers,core],[unenrolroleusers,core_enrol]
AMOS END
2010-06-21 15:30:49 +00:00
'description' => 'Manual role assignments.' ,
2010-02-16 07:07:04 +00:00
'type' => 'write' ,
2010-07-23 06:17:06 +00:00
'capabilities' => 'moodle/role:assign' ,
2010-02-16 07:07:04 +00:00
),
MDL-21782 reworked enrolment framework, the core infrastructure is in place, the basic plugins are all implemented; see the tracker issue for list of unfinished bits, expect more changes and improvements during the next week
AMOS START
MOV [sendcoursewelcomemessage,core_admin],[sendcoursewelcomemessage,enrol_self]
MOV [configsendcoursewelcomemessage,core_admin],[sendcoursewelcomemessage_desc,enrol_self]
MOV [enrolstartdate,core],[enrolstartdate,enrol_self]
MOV [enrolenddate,core],[enrolenddate,enrol_self]
CPY [welcometocourse,core],[welcometocourse,enrol_self]
CPY [welcometocoursetext,core],[welcometocoursetext,enrol_self]
MOV [notenrollable,core],[notenrollable,core_enrol]
MOV [enrolenddaterror,core],[enrolenddaterror,enrol_self]
MOV [enrolmentkeyhint,core],[passwordinvalidhint,enrol_self]
MOV [coursemanager,core_admin],[coursecontact,core_admin]
MOV [configcoursemanager,core_admin],[coursecontact_desc,core_admin]
MOV [enrolledincourserole,core],[enrolledincourserole,enrol_manual]
MOV [enrolme,core],[enrolme,core_enrol]
MOV [unenrol,core],[unenrol,core_enrol]
MOV [unenrolme,core],[unenrolme,core_enrol]
MOV [enrolmentnew,core],[enrolmentnew,core_enrol]
MOV [enrolmentnewuser,core],[enrolmentnewuser,core_enrol]
MOV [enrolments,core],[enrolments,core_enrol]
MOV [enrolperiod,core],[enrolperiod,core_enrol]
MOV [unenrolroleusers,core],[unenrolroleusers,core_enrol]
AMOS END
2010-06-21 15:30:49 +00:00
'moodle_role_unassign' => array (
2015-01-23 10:24:13 +08:00
'classname' => 'moodle_enrol_external' ,
'methodname' => 'role_unassign' ,
2011-10-18 12:57:33 +08:00
'classpath' => 'enrol/externallib.php' ,
2015-01-23 10:24:13 +08:00
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_role_unassign_role()' ,
2011-10-18 12:57:33 +08:00
'type' => 'write' ,
'capabilities' => 'moodle/role:assign' ,
),
'core_role_unassign_roles' => array (
'classname' => 'core_role_external' ,
'methodname' => 'unassign_roles' ,
2010-02-16 07:07:04 +00:00
'classpath' => 'enrol/externallib.php' ,
MDL-21782 reworked enrolment framework, the core infrastructure is in place, the basic plugins are all implemented; see the tracker issue for list of unfinished bits, expect more changes and improvements during the next week
AMOS START
MOV [sendcoursewelcomemessage,core_admin],[sendcoursewelcomemessage,enrol_self]
MOV [configsendcoursewelcomemessage,core_admin],[sendcoursewelcomemessage_desc,enrol_self]
MOV [enrolstartdate,core],[enrolstartdate,enrol_self]
MOV [enrolenddate,core],[enrolenddate,enrol_self]
CPY [welcometocourse,core],[welcometocourse,enrol_self]
CPY [welcometocoursetext,core],[welcometocoursetext,enrol_self]
MOV [notenrollable,core],[notenrollable,core_enrol]
MOV [enrolenddaterror,core],[enrolenddaterror,enrol_self]
MOV [enrolmentkeyhint,core],[passwordinvalidhint,enrol_self]
MOV [coursemanager,core_admin],[coursecontact,core_admin]
MOV [configcoursemanager,core_admin],[coursecontact_desc,core_admin]
MOV [enrolledincourserole,core],[enrolledincourserole,enrol_manual]
MOV [enrolme,core],[enrolme,core_enrol]
MOV [unenrol,core],[unenrol,core_enrol]
MOV [unenrolme,core],[unenrolme,core_enrol]
MOV [enrolmentnew,core],[enrolmentnew,core_enrol]
MOV [enrolmentnewuser,core],[enrolmentnewuser,core_enrol]
MOV [enrolments,core],[enrolments,core_enrol]
MOV [enrolperiod,core],[enrolperiod,core_enrol]
MOV [unenrolroleusers,core],[unenrolroleusers,core_enrol]
AMOS END
2010-06-21 15:30:49 +00:00
'description' => 'Manual role unassignments.' ,
2010-02-16 07:07:04 +00:00
'type' => 'write' ,
2010-07-23 06:17:06 +00:00
'capabilities' => 'moodle/role:assign' ,
2010-02-16 07:07:04 +00:00
),
2010-08-03 08:07:49 +00:00
2010-08-06 15:22:27 +00:00
// === course related functions ===
2012-05-17 22:13:28 +02:00
'core_course_get_contents' => array (
2012-02-16 18:12:46 +00:00
'classname' => 'core_course_external' ,
2012-05-17 22:13:28 +02:00
'methodname' => 'get_course_contents' ,
2012-02-16 18:12:46 +00:00
'classpath' => 'course/externallib.php' ,
2012-05-17 22:13:28 +02:00
'description' => 'Get course contents' ,
2012-02-16 18:12:46 +00:00
'type' => 'read' ,
2012-05-17 22:13:28 +02:00
'capabilities' => 'moodle/course:update,moodle/course:viewhiddencourses' ,
2012-04-11 15:28:07 +01:00
),
2012-05-11 14:37:59 +08:00
2010-08-06 15:22:27 +00:00
'moodle_course_get_courses' => array (
2015-01-23 10:24:13 +08:00
'classname' => 'moodle_course_external' ,
2011-10-18 12:57:33 +08:00
'methodname' => 'get_courses' ,
'classpath' => 'course/externallib.php' ,
2015-01-23 10:24:13 +08:00
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_course_get_courses()' ,
2011-10-18 12:57:33 +08:00
'type' => 'read' ,
'capabilities' => 'moodle/course:view,moodle/course:update,moodle/course:viewhiddencourses' ,
),
'core_course_get_courses' => array (
'classname' => 'core_course_external' ,
2010-08-06 15:22:27 +00:00
'methodname' => 'get_courses' ,
'classpath' => 'course/externallib.php' ,
'description' => 'Return course details' ,
'type' => 'read' ,
'capabilities' => 'moodle/course:view,moodle/course:update,moodle/course:viewhiddencourses' ,
),
'moodle_course_create_courses' => array (
2015-01-23 10:24:13 +08:00
'classname' => 'moodle_course_external' ,
2011-10-18 12:57:33 +08:00
'methodname' => 'create_courses' ,
'classpath' => 'course/externallib.php' ,
2015-01-23 10:24:13 +08:00
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_course_create_courses()' ,
2011-10-18 12:57:33 +08:00
'type' => 'write' ,
'capabilities' => 'moodle/course:create,moodle/course:visibility' ,
),
'core_course_create_courses' => array (
'classname' => 'core_course_external' ,
2010-08-06 15:22:27 +00:00
'methodname' => 'create_courses' ,
'classpath' => 'course/externallib.php' ,
'description' => 'Create new courses' ,
'type' => 'write' ,
'capabilities' => 'moodle/course:create,moodle/course:visibility' ,
),
2012-04-18 10:08:24 +02:00
'core_course_delete_courses' => array (
'classname' => 'core_course_external' ,
'methodname' => 'delete_courses' ,
'classpath' => 'course/externallib.php' ,
'description' => 'Deletes all specified courses' ,
'type' => 'write' ,
'capabilities' => 'moodle/course:delete' ,
),
2012-12-12 13:08:03 +08:00
'core_course_delete_modules' => array (
'classname' => 'core_course_external' ,
'methodname' => 'delete_modules' ,
'classpath' => 'course/externallib.php' ,
'description' => 'Deletes all specified module instances' ,
'type' => 'write' ,
'capabilities' => 'moodle/course:manageactivities'
),
2012-05-10 09:38:04 +02:00
'core_course_duplicate_course' => array (
'classname' => 'core_course_external' ,
'methodname' => 'duplicate_course' ,
'classpath' => 'course/externallib.php' ,
'description' => 'Duplicate an existing course (creating a new one) without user data' ,
'type' => 'write' ,
'capabilities' => 'moodle/backup:backupcourse,moodle/restore:restorecourse,moodle/course:create' ,
),
2012-12-18 17:20:51 +08:00
'core_course_update_courses' => array (
'classname' => 'core_course_external' ,
'methodname' => 'update_courses' ,
'classpath' => 'course/externallib.php' ,
'description' => 'Update courses' ,
'type' => 'write' ,
'capabilities' => 'moodle/course:update,moodle/course:changecategory,moodle/course:changefullname,moodle/course:changeshortname,moodle/course:changeidnumber,moodle/course:changesummary,moodle/course:visibility' ,
),
2015-03-09 22:31:12 +01:00
'core_course_view_course' => array (
'classname' => 'core_course_external' ,
'methodname' => 'view_course' ,
'classpath' => 'course/externallib.php' ,
'description' => 'Log that the course was viewed' ,
'type' => 'write'
),
2012-05-17 22:13:28 +02:00
// === course category related functions ===
'core_course_get_categories' => array (
'classname' => 'core_course_external' ,
'methodname' => 'get_categories' ,
'classpath' => 'course/externallib.php' ,
'description' => 'Return category details' ,
'type' => 'read' ,
'capabilities' => 'moodle/category:viewhiddencategories' ,
),
2011-12-29 14:07:42 +00:00
'core_course_create_categories' => array (
'classname' => 'core_course_external' ,
'methodname' => 'create_categories' ,
'classpath' => 'course/externallib.php' ,
'description' => 'Create course categories' ,
'type' => 'write' ,
'capabilities' => 'moodle/category:manage' ,
),
2012-05-11 14:37:59 +08:00
2012-05-17 22:13:28 +02:00
'core_course_update_categories' => array (
'classname' => 'core_course_external' ,
'methodname' => 'update_categories' ,
'classpath' => 'course/externallib.php' ,
'description' => 'Update categories' ,
'type' => 'write' ,
2012-09-17 11:38:43 +08:00
'capabilities' => 'moodle/category:manage' ,
2012-05-17 22:13:28 +02:00
),
2011-12-29 12:10:34 +00:00
'core_course_delete_categories' => array (
'classname' => 'core_course_external' ,
'methodname' => 'delete_categories' ,
'classpath' => 'course/externallib.php' ,
'description' => 'Delete course categories' ,
'type' => 'write' ,
'capabilities' => 'moodle/category:manage' ,
),
2011-12-29 14:07:42 +00:00
2012-05-11 08:39:38 +02:00
'core_course_import_course' => array (
'classname' => 'core_course_external' ,
'methodname' => 'import_course' ,
'classpath' => 'course/externallib.php' ,
'description' => 'Import course data from a course into another course. Does not include any user data.' ,
'type' => 'write' ,
'capabilities' => 'moodle/backup:backuptargetimport, moodle/restore:restoretargetimport' ,
),
2011-06-07 16:40:55 +08:00
// === message related functions ===
2011-06-29 11:26:16 +08:00
'moodle_message_send_instantmessages' => array (
2015-01-23 10:24:13 +08:00
'classname' => 'moodle_message_external' ,
'methodname' => 'send_instantmessages' ,
2011-10-18 12:57:33 +08:00
'classpath' => 'message/externallib.php' ,
2015-01-23 10:24:13 +08:00
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_message_send_instant_messages()' ,
2011-10-18 12:57:33 +08:00
'type' => 'write' ,
'capabilities' => 'moodle/site:sendmessage' ,
),
'core_message_send_instant_messages' => array (
'classname' => 'core_message_external' ,
'methodname' => 'send_instant_messages' ,
2011-06-07 16:40:55 +08:00
'classpath' => 'message/externallib.php' ,
2011-06-29 11:26:16 +08:00
'description' => 'Send instant messages' ,
2011-06-07 16:40:55 +08:00
'type' => 'write' ,
'capabilities' => 'moodle/site:sendmessage' ,
),
2012-12-13 16:25:36 +08:00
'core_message_create_contacts' => array (
'classname' => 'core_message_external' ,
'methodname' => 'create_contacts' ,
'classpath' => 'message/externallib.php' ,
'description' => 'Add contacts to the contact list' ,
'type' => 'write' ,
'capabilities' => '' ,
),
'core_message_delete_contacts' => array (
'classname' => 'core_message_external' ,
'methodname' => 'delete_contacts' ,
'classpath' => 'message/externallib.php' ,
'description' => 'Remove contacts from the contact list' ,
'type' => 'write' ,
'capabilities' => '' ,
),
'core_message_block_contacts' => array (
'classname' => 'core_message_external' ,
'methodname' => 'block_contacts' ,
'classpath' => 'message/externallib.php' ,
'description' => 'Block contacts' ,
'type' => 'write' ,
'capabilities' => '' ,
),
'core_message_unblock_contacts' => array (
'classname' => 'core_message_external' ,
'methodname' => 'unblock_contacts' ,
'classpath' => 'message/externallib.php' ,
'description' => 'Unblock contacts' ,
'type' => 'write' ,
'capabilities' => '' ,
),
'core_message_get_contacts' => array (
'classname' => 'core_message_external' ,
'methodname' => 'get_contacts' ,
'classpath' => 'message/externallib.php' ,
'description' => 'Retrieve the contact list' ,
'type' => 'read' ,
'capabilities' => '' ,
),
'core_message_search_contacts' => array (
'classname' => 'core_message_external' ,
'methodname' => 'search_contacts' ,
'classpath' => 'message/externallib.php' ,
'description' => 'Search for contacts' ,
'type' => 'read' ,
'capabilities' => '' ,
),
2014-05-05 14:34:17 +02:00
'core_message_get_messages' => array (
2014-05-06 18:01:41 +02:00
'classname' => 'core_message_external' ,
'methodname' => 'get_messages' ,
'classpath' => 'message/externallib.php' ,
2014-10-06 10:44:30 +13:00
'description' => 'Retrieve a list of messages sent and received by a user (conversations, notifications or both)' ,
2014-05-06 18:01:41 +02:00
'type' => 'read' ,
'capabilities' => '' ,
2014-05-05 14:34:17 +02:00
),
2015-01-22 14:43:54 +01:00
'core_message_get_blocked_users' => array (
'classname' => 'core_message_external' ,
'methodname' => 'get_blocked_users' ,
'classpath' => 'message/externallib.php' ,
'description' => 'Retrieve a list of users blocked' ,
'type' => 'read' ,
'capabilities' => '' ,
),
2015-03-31 10:49:16 +02:00
'core_message_mark_message_read' => array (
'classname' => 'core_message_external' ,
'methodname' => 'mark_message_read' ,
'classpath' => 'message/externallib.php' ,
'description' => 'Mark a single message as read, trigger message_viewed event.' ,
'type' => 'write' ,
'capabilities' => '' ,
),
2011-06-07 17:28:51 +08:00
// === notes related functions ===
'moodle_notes_create_notes' => array (
2015-01-23 10:24:13 +08:00
'classname' => 'moodle_notes_external' ,
2011-10-18 12:57:33 +08:00
'methodname' => 'create_notes' ,
'classpath' => 'notes/externallib.php' ,
2015-01-23 10:24:13 +08:00
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_notes_create_notes()' ,
2011-10-18 12:57:33 +08:00
'type' => 'write' ,
'capabilities' => 'moodle/notes:manage' ,
),
'core_notes_create_notes' => array (
'classname' => 'core_notes_external' ,
2011-06-07 17:28:51 +08:00
'methodname' => 'create_notes' ,
'classpath' => 'notes/externallib.php' ,
'description' => 'Create notes' ,
'type' => 'write' ,
'capabilities' => 'moodle/notes:manage' ,
),
2013-01-07 12:01:22 +08:00
'core_notes_delete_notes' => array (
'classname' => 'core_notes_external' ,
'methodname' => 'delete_notes' ,
'classpath' => 'notes/externallib.php' ,
'description' => 'Delete notes' ,
'type' => 'write' ,
'capabilities' => 'moodle/notes:manage' ,
),
'core_notes_get_notes' => array (
'classname' => 'core_notes_external' ,
'methodname' => 'get_notes' ,
'classpath' => 'notes/externallib.php' ,
'description' => 'Get notes' ,
'type' => 'read' ,
'capabilities' => 'moodle/notes:view' ,
),
'core_notes_update_notes' => array (
'classname' => 'core_notes_external' ,
'methodname' => 'update_notes' ,
'classpath' => 'notes/externallib.php' ,
'description' => 'Update notes' ,
'type' => 'write' ,
'capabilities' => 'moodle/notes:manage' ,
),
2015-03-31 13:31:48 +02:00
'core_notes_view_notes' => array (
'classname' => 'core_notes_external' ,
'methodname' => 'view_notes' ,
'classpath' => 'notes/externallib.php' ,
'description' => 'Simulates the web interface view of notes/index.php: trigger events.' ,
'type' => 'write' ,
'capabilities' => 'moodle/notes:view' ,
),
2013-08-05 14:07:23 +12:00
// === grading related functions ===
'core_grading_get_definitions' => array (
'classname' => 'core_grading_external' ,
'methodname' => 'get_definitions' ,
'description' => 'Get grading definitions' ,
'type' => 'read'
),
2013-03-21 11:00:59 +13:00
'core_grade_get_definitions' => array (
'classname' => 'core_grade_external' ,
'methodname' => 'get_definitions' ,
'classpath' => 'grade/externallib.php' ,
2013-08-05 14:07:23 +12:00
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_grading_get_definitions()' ,
'type' => 'read'
),
2014-06-13 15:36:25 +12:00
'core_grading_save_definitions' => array (
'classname' => 'core_grading_external' ,
'methodname' => 'save_definitions' ,
'description' => 'Save grading definitions' ,
'type' => 'write'
),
2013-08-05 14:07:23 +12:00
'core_grading_get_gradingform_instances' => array (
'classname' => 'core_grading_external' ,
'methodname' => 'get_gradingform_instances' ,
'description' => 'Get grading form instances' ,
2013-03-21 11:00:59 +13:00
'type' => 'read'
),
2011-06-07 15:19:53 +08:00
// === webservice related functions ===
'moodle_webservice_get_siteinfo' => array (
2015-01-23 10:24:13 +08:00
'classname' => 'moodle_webservice_external' ,
'methodname' => 'get_siteinfo' ,
2011-10-18 12:57:33 +08:00
'classpath' => 'webservice/externallib.php' ,
2015-01-23 10:24:13 +08:00
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has been renamed as core_webservice_get_site_info()' ,
2011-10-18 12:57:33 +08:00
'type' => 'read' ,
),
'core_webservice_get_site_info' => array (
'classname' => 'core_webservice_external' ,
'methodname' => 'get_site_info' ,
2011-06-07 15:19:53 +08:00
'classpath' => 'webservice/externallib.php' ,
'description' => 'Return some site info / user info / list web service functions' ,
'type' => 'read' ,
),
2012-10-31 14:21:56 +08:00
'core_get_string' => array (
'classname' => 'core_external' ,
'methodname' => 'get_string' ,
'classpath' => 'lib/external/externallib.php' ,
'description' => 'Return a translated string - similar to core get_string() call' ,
'type' => 'read' ,
),
'core_get_strings' => array (
'classname' => 'core_external' ,
'methodname' => 'get_strings' ,
'classpath' => 'lib/external/externallib.php' ,
'description' => 'Return some translated strings - like several core get_string() calls' ,
'type' => 'read' ,
),
'core_get_component_strings' => array (
'classname' => 'core_external' ,
'methodname' => 'get_component_strings' ,
'classpath' => 'lib/external/externallib.php' ,
'description' => ' Return all raw strings ( with { $a -> xxx }) for a specific component
- similar to core get_component_strings () call ' ,
'type' => 'read' ,
),
2012-12-10 13:27:25 +08:00
// === Calendar related functions ===
'core_calendar_delete_calendar_events' => array (
'classname' => 'core_calendar_external' ,
'methodname' => 'delete_calendar_events' ,
'description' => 'Delete calendar events' ,
'classpath' => 'calendar/externallib.php' ,
'type' => 'write' ,
'capabilities' => 'moodle/calendar:manageentries' , 'moodle/calendar:manageownentries' , 'moodle/calendar:managegroupentries'
),
2012-12-17 10:59:33 +08:00
'core_calendar_get_calendar_events' => array (
'classname' => 'core_calendar_external' ,
'methodname' => 'get_calendar_events' ,
'description' => 'Get calendar events' ,
'classpath' => 'calendar/externallib.php' ,
'type' => 'read' ,
'capabilities' => 'moodle/calendar:manageentries' , 'moodle/calendar:manageownentries' , 'moodle/calendar:managegroupentries'
),
2012-12-17 15:27:58 +08:00
'core_calendar_create_calendar_events' => array (
'classname' => 'core_calendar_external' ,
'methodname' => 'create_calendar_events' ,
'description' => 'Create calendar events' ,
'classpath' => 'calendar/externallib.php' ,
'type' => 'write' ,
'capabilities' => 'moodle/calendar:manageentries' , 'moodle/calendar:manageownentries' , 'moodle/calendar:managegroupentries'
),
2015-02-22 15:24:44 +08:00
'core_output_load_template' => array (
'classname' => 'core\output\external' ,
'methodname' => 'load_template' ,
'description' => 'Load a template for a renderable' ,
'type' => 'read'
),
2015-03-09 13:15:15 +01:00
// Completion related functions.
'core_completion_update_activity_completion_status_manually' => array (
'classname' => 'core_completion_external' ,
'methodname' => 'update_activity_completion_status_manually' ,
'description' => 'Update completion status for the current user in an activity, only for activities with manual tracking.' ,
'type' => 'write' ,
),
2015-03-18 12:14:29 +01:00
'core_completion_get_activities_completion_status' => array (
'classname' => 'core_completion_external' ,
'methodname' => 'get_activities_completion_status' ,
'description' => 'Return the activities completion status for a user in a course.' ,
'type' => 'read' ,
'capabilities' => '' ,
),
'core_completion_get_course_completion_status' => array (
'classname' => 'core_completion_external' ,
'methodname' => 'get_course_completion_status' ,
'description' => 'Returns course completion status.' ,
'type' => 'read' ,
'capabilities' => 'report/completion:view' ,
),
2015-04-07 20:25:28 +01:00
2015-03-31 16:22:38 +02:00
// Rating functions.
'core_rating_get_item_ratings' => array (
2015-04-01 21:45:52 +02:00
'classname' => 'core_rating_external' ,
'methodname' => 'get_item_ratings' ,
'description' => 'Retrieve all the ratings for an item.' ,
'type' => 'read' ,
'capabilities' => 'moodle/rating:view'
2015-03-31 16:22:38 +02:00
),
2015-07-18 10:38:19 +08:00
// Tag functions.
'core_tag_update_tags' => array (
'classname' => 'core_tag_external' ,
'methodname' => 'update_tags' ,
'description' => 'Updates tags' ,
'type' => 'write' ,
),
2009-09-14 23:52:08 +00:00
);
2011-06-08 15:10:26 +08:00
$services = array (
2011-06-08 17:34:17 +08:00
'Moodle mobile web service' => array (
'functions' => array (
'moodle_enrol_get_users_courses' ,
'moodle_enrol_get_enrolled_users' ,
2011-06-09 15:19:58 +08:00
'moodle_user_get_users_by_id' ,
'moodle_webservice_get_siteinfo' ,
'moodle_notes_create_notes' ,
2011-06-20 13:46:47 +08:00
'moodle_user_get_course_participants_by_id' ,
2011-06-29 15:41:31 +08:00
'moodle_user_get_users_by_courseid' ,
2011-11-25 14:44:13 +08:00
'moodle_message_send_instantmessages' ,
2012-10-31 14:21:56 +08:00
'core_course_get_contents' ,
2013-10-04 11:43:45 +02:00
'core_get_component_strings' ,
2014-02-07 12:23:33 +01:00
'core_user_add_user_device' ,
2014-02-21 15:26:45 +01:00
'core_calendar_get_calendar_events' ,
'core_enrol_get_users_courses' ,
'core_enrol_get_enrolled_users' ,
'core_user_get_users_by_id' ,
'core_webservice_get_site_info' ,
'core_notes_create_notes' ,
'core_user_get_course_user_profiles' ,
2014-03-05 11:59:26 +01:00
'core_message_send_instant_messages' ,
'mod_assign_get_grades' ,
'mod_assign_get_assignments' ,
'mod_assign_get_submissions' ,
'mod_assign_get_user_flags' ,
'mod_assign_set_user_flags' ,
'mod_assign_get_user_mappings' ,
'mod_assign_revert_submissions_to_draft' ,
'mod_assign_lock_submissions' ,
'mod_assign_unlock_submissions' ,
'mod_assign_save_submission' ,
'mod_assign_submit_for_grading' ,
'mod_assign_save_grade' ,
'mod_assign_save_user_extensions' ,
2014-04-10 10:23:28 +02:00
'mod_assign_reveal_identities' ,
'message_airnotifier_is_system_configured' ,
2014-04-22 12:59:43 +02:00
'message_airnotifier_are_notification_preferences_configured' ,
2014-03-04 15:45:27 +01:00
'core_grades_update_grades' ,
'mod_forum_get_forums_by_courses' ,
2014-10-02 12:23:23 +02:00
'mod_forum_get_forum_discussions_paginated' ,
2014-09-10 13:34:02 +02:00
'mod_forum_get_forum_discussion_posts' ,
2014-05-05 14:34:17 +02:00
'core_files_get_files' ,
2014-10-23 15:24:07 +02:00
'core_message_get_messages' ,
'core_message_create_contacts' ,
'core_message_delete_contacts' ,
'core_message_block_contacts' ,
'core_message_unblock_contacts' ,
'core_message_get_contacts' ,
2015-01-22 14:43:54 +01:00
'core_message_search_contacts' ,
2015-01-30 12:29:56 +01:00
'core_message_get_blocked_users' ,
2015-02-05 13:32:22 +01:00
'gradereport_user_get_grades_table' ,
2015-02-25 09:20:26 +08:00
'core_group_get_course_user_groups' ,
'core_user_remove_user_device' ,
2015-03-09 13:15:15 +01:00
'core_course_get_courses' ,
'core_completion_update_activity_completion_status_manually' ,
2015-03-16 12:31:53 +01:00
'mod_data_get_databases_by_courses' ,
'core_comment_get_comments' ,
2015-03-26 18:15:10 +01:00
'mod_forum_view_forum' ,
2015-03-09 22:31:12 +01:00
'core_course_view_course' ,
2015-03-16 16:39:23 +01:00
'core_completion_get_activities_completion_status' ,
2015-03-20 12:56:32 +01:00
'core_notes_get_course_notes' ,
2015-03-18 12:14:29 +01:00
'core_completion_get_course_completion_status' ,
2015-03-30 12:06:38 +02:00
'core_user_view_user_list' ,
2015-03-31 10:49:16 +02:00
'core_message_mark_message_read' ,
2015-03-31 13:31:48 +02:00
'core_notes_view_notes' ,
2015-03-31 12:26:32 +02:00
'mod_forum_view_forum_discussion' ,
2015-03-30 14:12:00 +02:00
'core_user_view_user_profile' ,
2015-03-30 10:34:34 +02:00
'gradereport_user_view_grade_report' ,
2015-03-31 16:22:38 +02:00
'core_rating_get_item_ratings' ,
2015-04-17 14:02:49 +02:00
'mod_url_view_url' ,
2015-06-02 10:49:26 +02:00
'core_user_get_users_by_field' ,
2015-05-14 16:30:32 +02:00
'core_user_add_user_private_files' ,
2015-04-17 14:57:19 +02:00
'mod_assign_view_grading_table' ,
2015-06-09 15:27:42 +02:00
'mod_scorm_view_scorm' ,
2015-04-17 14:22:09 +02:00
'mod_page_view_page' ,
2015-04-16 21:18:07 +02:00
'mod_resource_view_resource' ,
2015-05-20 11:04:06 +02:00
'mod_folder_view_folder' ,
2015-01-22 14:43:54 +01:00
),
2011-06-08 17:34:17 +08:00
'enabled' => 0 ,
'restrictedusers' => 0 ,
2011-11-16 11:51:03 +08:00
'shortname' => MOODLE_OFFICIAL_MOBILE_SERVICE ,
2013-01-17 15:26:29 +08:00
'downloadfiles' => 1 ,
'uploadfiles' => 1
2011-06-08 17:34:17 +08:00
),
);