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
// === group related functions ===
2009-10-22 23:07:21 +00:00
2009-09-14 23:52:08 +00:00
'moodle_group_create_groups' => array (
2011-10-18 12:57:33 +08:00
'classname' => 'core_group_external' ,
'methodname' => 'create_groups' ,
'classpath' => 'group/externallib.php' ,
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_group_create_groups(). ' ,
'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 (
2011-10-18 12:57:33 +08:00
'classname' => 'core_group_external' ,
'methodname' => 'get_groups' ,
'classpath' => 'group/externallib.php' ,
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_group_get_groups()' ,
'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 (
2011-10-18 12:57:33 +08:00
'classname' => 'core_group_external' ,
'methodname' => 'get_course_groups' ,
'classpath' => 'group/externallib.php' ,
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_group_get_course_groups()' ,
'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 (
2011-10-18 12:57:33 +08:00
'classname' => 'core_group_external' ,
'methodname' => 'delete_groups' ,
'classpath' => 'group/externallib.php' ,
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_group_delete_groups()' ,
'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 (
2011-10-18 12:57:33 +08:00
'classname' => 'core_group_external' ,
'methodname' => 'get_group_members' ,
'classpath' => 'group/externallib.php' ,
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_group_get_group_members()' ,
'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 (
2011-10-18 12:57:33 +08:00
'classname' => 'core_group_external' ,
'methodname' => 'add_group_members' ,
'classpath' => 'group/externallib.php' ,
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_group_add_group_members()' ,
'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 (
2011-10-18 12:57:33 +08:00
'classname' => 'core_group_external' ,
'methodname' => 'delete_group_members' ,
2009-09-14 23:52:08 +00:00
'classpath' => 'group/externallib.php' ,
2011-10-18 12:57:33 +08:00
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be 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
),
2010-07-23 06:17:06 +00:00
// === file related functions ===
2010-03-16 08:29:08 +00:00
'moodle_file_get_files' => array (
2011-10-18 12:57:33 +08:00
'classname' => 'core_files_external' ,
'methodname' => 'get_files' ,
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_files_get_files()' ,
'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 (
2011-10-18 12:57:33 +08:00
'classname' => 'core_files_external' ,
'methodname' => 'upload' ,
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_files_upload()' ,
'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 (
2011-10-18 12:57:33 +08:00
'classname' => 'core_user_external' ,
'methodname' => 'create_users' ,
'classpath' => 'user/externallib.php' ,
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_user_create_users()' ,
'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
),
2010-02-11 04:02:04 +00:00
'moodle_user_get_users_by_id' => array (
2011-10-18 12:57:33 +08:00
'classname' => 'core_user_external' ,
'methodname' => 'get_users_by_id' ,
'classpath' => 'user/externallib.php' ,
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_user_get_users_by_id()' ,
'type' => 'read' ,
'capabilities' => 'moodle/user:viewdetails, moodle/user:viewhiddendetails, moodle/course:useremail, moodle/user:update' ,
),
2012-05-07 12:09:09 +01:00
'core_user_get_users' => array (
'classname' => 'core_user_external' ,
'methodname' => 'get_users' ,
'classpath' => 'user/externallib.php' ,
'description' => 'Get users by key/value' ,
'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' ,
2010-02-11 04:02:04 +00:00
'description' => 'Get users by id.' ,
'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 (
2011-10-18 12:57:33 +08:00
'classname' => 'core_enrol_external' ,
'methodname' => 'get_enrolled_users' ,
'classpath' => 'enrol/externallib.php' ,
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be 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 (
2011-10-18 12:57:33 +08:00
'classname' => 'core_user_external' ,
'methodname' => 'get_course_user_profiles' ,
2011-06-20 13:46:47 +08:00
'classpath' => 'user/externallib.php' ,
2011-10-18 12:57:33 +08:00
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_user_get_course_user_profiles()' ,
'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 (
2011-10-18 12:57:33 +08:00
'classname' => 'core_user_external' ,
'methodname' => 'delete_users' ,
'classpath' => 'user/externallib.php' ,
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_user_delete_users()' ,
'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 (
2011-10-18 12:57:33 +08:00
'classname' => 'core_user_external' ,
'methodname' => 'update_users' ,
'classpath' => 'user/externallib.php' ,
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_user_update_users()' ,
'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
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 (
2011-10-18 12:57:33 +08:00
'classname' => 'core_enrol_external' ,
2011-04-23 22:18:08 +02:00
'methodname' => 'get_users_courses' ,
'classpath' => 'enrol/externallib.php' ,
2011-10-18 12:57:33 +08:00
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be 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' ,
),
// === 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 (
2011-10-18 12:57:33 +08:00
'classname' => 'core_role_external' ,
'methodname' => 'assign_roles' ,
'classpath' => 'enrol/externallib.php' ,
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_role_assign_role()' ,
'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 (
2011-10-18 12:57:33 +08:00
'classname' => 'core_role_external' ,
'methodname' => 'unassign_roles' ,
'classpath' => 'enrol/externallib.php' ,
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_role_unassign_role()' ,
'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 (
2011-10-18 12:57:33 +08:00
'classname' => 'core_course_external' ,
'methodname' => 'get_courses' ,
'classpath' => 'course/externallib.php' ,
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_course_get_courses()' ,
'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 (
2011-10-18 12:57:33 +08:00
'classname' => 'core_course_external' ,
'methodname' => 'create_courses' ,
'classpath' => 'course/externallib.php' ,
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_course_create_courses()' ,
'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-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-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 (
2011-10-18 12:57:33 +08:00
'classname' => 'core_message_external' ,
'methodname' => 'send_instant_messages' ,
'classpath' => 'message/externallib.php' ,
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_message_send_instant_messages()' ,
'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' ,
),
2011-06-07 17:28:51 +08:00
// === notes related functions ===
'moodle_notes_create_notes' => array (
2011-10-18 12:57:33 +08:00
'classname' => 'core_notes_external' ,
'methodname' => 'create_notes' ,
'classpath' => 'notes/externallib.php' ,
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_notes_create_notes()' ,
'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' ,
),
2011-06-07 15:19:53 +08:00
// === webservice related functions ===
'moodle_webservice_get_siteinfo' => array (
2011-10-18 12:57:33 +08:00
'classname' => 'core_webservice_external' ,
'methodname' => 'get_site_info' ,
'classpath' => 'webservice/externallib.php' ,
'description' => 'DEPRECATED: this deprecated function will be removed in a future version. This function has be renamed as core_webservice_get_site_info()' ,
'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' ,
),
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' ,
'core_course_get_contents' ),
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 ,
'downloadfiles' => 1
2011-06-08 17:34:17 +08:00
),
);