Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
<?php
2
// This file is part of Moodle - http://moodle.org/
3
//
4
// Moodle is free software: you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published by
6
// the Free Software Foundation, either version 3 of the License, or
7
// (at your option) any later version.
8
//
9
// Moodle is distributed in the hope that it will be useful,
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
// GNU General Public License for more details.
13
//
14
// You should have received a copy of the GNU General Public License
15
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
16
 
17
/**
18
 * External tool external functions and service definitions.
19
 *
20
 * @package    mod_lti
21
 * @category   external
22
 * @copyright  2015 Juan Leyva <juan@moodle.com>
23
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
24
 * @since      Moodle 3.0
25
 */
26
 
27
defined('MOODLE_INTERNAL') || die;
28
 
29
$functions = array(
30
 
31
    'mod_lti_get_tool_launch_data' => array(
32
        'classname'     => 'mod_lti_external',
33
        'methodname'    => 'get_tool_launch_data',
34
        'description'   => 'Return the launch data for a given external tool.',
35
        'type'          => 'read',
36
        'capabilities'  => 'mod/lti:view',
37
        'services'      => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
38
    ),
39
 
40
    'mod_lti_get_ltis_by_courses' => array(
41
        'classname'     => 'mod_lti_external',
42
        'methodname'    => 'get_ltis_by_courses',
43
        'description'   => 'Returns a list of external tool instances in a provided set of courses, if
44
                            no courses are provided then all the external tool instances the user has access to will be returned.',
45
        'type'          => 'read',
46
        'capabilities'  => 'mod/lti:view',
47
        'services'      => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
48
    ),
49
 
50
    'mod_lti_view_lti' => array(
51
        'classname'     => 'mod_lti_external',
52
        'methodname'    => 'view_lti',
53
        'description'   => 'Trigger the course module viewed event and update the module completion status.',
54
        'type'          => 'read',
55
        'capabilities'  => 'mod/lti:view',
56
        'services'      => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
57
    ),
58
 
59
    'mod_lti_get_tool_proxies' => array(
60
        'classname'     => 'mod_lti_external',
61
        'methodname'    => 'get_tool_proxies',
62
        'description'   => 'Get a list of the tool proxies',
63
        'type'          => 'read',
64
        'capabilities'  => 'moodle/site:config',
65
        'ajax'          => true
66
    ),
67
 
68
    'mod_lti_create_tool_proxy' => array(
69
        'classname'     => 'mod_lti_external',
70
        'methodname'    => 'create_tool_proxy',
71
        'description'   => 'Create a tool proxy',
72
        'type'          => 'write',
73
        'capabilities'  => 'moodle/site:config',
74
        'ajax'          => true
75
    ),
76
 
77
    'mod_lti_delete_tool_proxy' => array(
78
        'classname'     => 'mod_lti_external',
79
        'methodname'    => 'delete_tool_proxy',
80
        'description'   => 'Delete a tool proxy',
81
        'type'          => 'write',
82
        'capabilities'  => 'moodle/site:config',
83
        'ajax'          => true
84
    ),
85
 
86
    'mod_lti_get_tool_proxy_registration_request' => array(
87
        'classname'     => 'mod_lti_external',
88
        'methodname'    => 'get_tool_proxy_registration_request',
89
        'description'   => 'Get a registration request for a tool proxy',
90
        'type'          => 'read',
91
        'capabilities'  => 'moodle/site:config',
92
        'ajax'          => true
93
    ),
94
 
95
    'mod_lti_get_tool_types' => array(
96
        'classname'     => 'mod_lti_external',
97
        'methodname'    => 'get_tool_types',
98
        'description'   => 'Get a list of the tool types',
99
        'type'          => 'read',
100
        'capabilities'  => 'moodle/site:config',
101
        'ajax'          => true
102
    ),
103
 
104
    'mod_lti_get_tool_types_and_proxies' => [
105
        'classname'     => 'mod_lti\external\get_tool_types_and_proxies',
106
        'methodname'    => 'execute',
107
        'description'   => 'Get a list of the tool types and tool proxies',
108
        'type'          => 'read',
109
        'capabilities'  => 'moodle/site:config',
110
        'ajax'          => true
111
    ],
112
 
113
    'mod_lti_get_tool_types_and_proxies_count' => [
114
        'classname'     => 'mod_lti\external\get_tool_types_and_proxies_count',
115
        'methodname'    => 'execute',
116
        'description'   => 'Get total number of the tool types and tool proxies',
117
        'type'          => 'read',
118
        'capabilities'  => 'moodle/site:config',
119
        'ajax'          => true
120
    ],
121
 
122
    'mod_lti_create_tool_type' => array(
123
        'classname'     => 'mod_lti_external',
124
        'methodname'    => 'create_tool_type',
125
        'description'   => 'Create a tool type',
126
        'type'          => 'write',
127
        'capabilities'  => 'moodle/site:config',
128
        'ajax'          => true
129
    ),
130
 
131
    'mod_lti_update_tool_type' => array(
132
        'classname'     => 'mod_lti_external',
133
        'methodname'    => 'update_tool_type',
134
        'description'   => 'Update a tool type',
135
        'type'          => 'write',
136
        'capabilities'  => 'moodle/site:config',
137
        'ajax'          => true
138
    ),
139
 
140
    'mod_lti_delete_tool_type' => array(
141
        'classname'     => 'mod_lti_external',
142
        'methodname'    => 'delete_tool_type',
143
        'description'   => 'Delete a tool type',
144
        'type'          => 'write',
145
        'capabilities'  => 'moodle/site:config',
146
        'ajax'          => true
147
    ),
148
 
149
    'mod_lti_delete_course_tool_type' => array(
150
        'classname'     => 'mod_lti\external\delete_course_tool_type',
151
        'description'   => 'Delete a course tool type',
152
        'type'          => 'write',
153
        'capabilities'  => 'mod/lti:addcoursetool',
154
        'ajax'          => true
155
    ),
156
 
157
    'mod_lti_toggle_showinactivitychooser' => array(
158
        'classname'     => 'mod_lti\external\toggle_showinactivitychooser',
159
        'description'   => 'Toggle showinactivitychooser for a tool type in a course',
160
        'type'          => 'write',
161
        'capabilities'  => 'mod/lti:addcoursetool',
162
        'ajax'          => true
163
    ),
164
 
165
    'mod_lti_is_cartridge' => array(
166
        'classname'     => 'mod_lti_external',
167
        'methodname'    => 'is_cartridge',
168
        'description'   => 'Determine if the given url is for a cartridge',
169
        'type'          => 'read',
170
        'capabilities'  => 'moodle/site:config',
171
        'ajax'          => true
172
    ),
173
);