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/>.
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Core external functions and service definitions.
|
|
|
|
*
|
2010-08-03 08:07:49 +00:00
|
|
|
* @package core
|
2009-09-14 23:52:08 +00:00
|
|
|
* @subpackage webservice
|
|
|
|
* @copyright 2009 Petr Skoda (http://skodak.org)
|
|
|
|
* @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(
|
|
|
|
'classname' => 'moodle_group_external',
|
|
|
|
'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(
|
|
|
|
'classname' => 'moodle_group_external',
|
|
|
|
'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(
|
|
|
|
'classname' => 'moodle_group_external',
|
|
|
|
'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(
|
|
|
|
'classname' => 'moodle_group_external',
|
|
|
|
'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(
|
|
|
|
'classname' => 'moodle_group_external',
|
|
|
|
'methodname' => 'get_groupmembers',
|
|
|
|
'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(
|
|
|
|
'classname' => 'moodle_group_external',
|
|
|
|
'methodname' => 'add_groupmembers',
|
|
|
|
'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(
|
|
|
|
'classname' => 'moodle_group_external',
|
|
|
|
'methodname' => 'delete_groupmembers',
|
|
|
|
'classpath' => 'group/externallib.php',
|
2009-10-26 23:05:11 +00:00
|
|
|
'description' => 'Deletes group members.',
|
|
|
|
'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
|
|
|
|
|
|
|
|
|
|
|
// === file related functions ===
|
|
|
|
|
2010-03-16 08:29:08 +00:00
|
|
|
'moodle_file_get_files' => array(
|
|
|
|
'classname' => 'moodle_file_external',
|
|
|
|
'methodname' => 'get_files',
|
|
|
|
'description' => 'browse moodle files',
|
|
|
|
'type' => 'read',
|
|
|
|
'classpath' => 'files/externallib.php',
|
|
|
|
),
|
|
|
|
'moodle_file_upload' => array(
|
|
|
|
'classname' => 'moodle_file_external',
|
|
|
|
'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(
|
|
|
|
'classname' => 'moodle_user_external',
|
|
|
|
'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(
|
2009-09-15 22:52:49 +00:00
|
|
|
'classname' => 'moodle_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
|
|
|
),
|
|
|
|
|
|
|
|
'moodle_user_delete_users' => array(
|
|
|
|
'classname' => 'moodle_user_external',
|
|
|
|
'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(
|
|
|
|
'classname' => 'moodle_user_external',
|
|
|
|
'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 ===
|
|
|
|
|
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',
|
|
|
|
'description' => 'Get list of course participants',
|
|
|
|
'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-04-23 22:18:08 +02:00
|
|
|
'moodle_enrol_get_users_courses' => array(
|
|
|
|
'classname' => 'moodle_enrol_external',
|
|
|
|
'methodname' => 'get_users_courses',
|
|
|
|
'classpath' => 'enrol/externallib.php',
|
|
|
|
'description' => 'Get list of courses user is enrolled in',
|
|
|
|
'type' => 'read',
|
|
|
|
'capabilities'=> 'moodle/course:viewparticipants',
|
|
|
|
),
|
|
|
|
|
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(
|
2010-02-16 07:07:04 +00:00
|
|
|
'classname' => 'moodle_enrol_external',
|
|
|
|
'methodname' => 'role_assign',
|
|
|
|
'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(
|
2010-02-16 07:07:04 +00:00
|
|
|
'classname' => 'moodle_enrol_external',
|
|
|
|
'methodname' => 'role_unassign',
|
|
|
|
'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 ===
|
|
|
|
|
|
|
|
'moodle_course_get_courses' => array(
|
|
|
|
'classname' => 'moodle_course_external',
|
|
|
|
'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(
|
|
|
|
'classname' => 'moodle_course_external',
|
|
|
|
'methodname' => 'create_courses',
|
|
|
|
'classpath' => 'course/externallib.php',
|
|
|
|
'description' => 'Create new courses',
|
|
|
|
'type' => 'write',
|
|
|
|
'capabilities'=> 'moodle/course:create,moodle/course:visibility',
|
|
|
|
),
|
|
|
|
|
2011-06-07 16:40:55 +08:00
|
|
|
// === message related functions ===
|
|
|
|
|
|
|
|
'moodle_message_send_messages' => array(
|
|
|
|
'classname' => 'moodle_message_external',
|
|
|
|
'methodname' => 'send_messages',
|
|
|
|
'classpath' => 'message/externallib.php',
|
|
|
|
'description' => 'Send messages',
|
|
|
|
'type' => 'write',
|
|
|
|
'capabilities'=> 'moodle/site:sendmessage',
|
|
|
|
),
|
|
|
|
|
2011-06-07 17:28:51 +08:00
|
|
|
// === notes related functions ===
|
|
|
|
|
|
|
|
'moodle_notes_create_notes' => array(
|
|
|
|
'classname' => 'moodle_notes_external',
|
|
|
|
'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(
|
|
|
|
'classname' => 'moodle_webservice_external',
|
|
|
|
'methodname' => 'get_siteinfo',
|
|
|
|
'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',
|
|
|
|
'moodle_message_send_messages'),
|
2011-06-08 17:34:17 +08:00
|
|
|
'enabled' => 0,
|
|
|
|
'restrictedusers' => 0,
|
|
|
|
'shortname' => MOODLE_OFFICIAL_MOBILE_SERVICE
|
|
|
|
),
|
|
|
|
);
|