MDL-59171 mod_lti: Set mod_lti_view_lti's type to 'read'
[moodle.git] / mod / lti / db / services.php
CommitLineData
d5ded9e7
JL
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$functions = array(
28
29 'mod_lti_get_tool_launch_data' => array(
30 'classname' => 'mod_lti_external',
31 'methodname' => 'get_tool_launch_data',
32 'description' => 'Return the launch data for a given external tool.',
33 'type' => 'read',
0ca559a1
JL
34 'capabilities' => 'mod/lti:view',
35 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
d5ded9e7
JL
36 ),
37
dfcdec12
JL
38 'mod_lti_get_ltis_by_courses' => array(
39 'classname' => 'mod_lti_external',
40 'methodname' => 'get_ltis_by_courses',
41 'description' => 'Returns a list of external tool instances in a provided set of courses, if
42 no courses are provided then all the external tool instances the user has access to will be returned.',
43 'type' => 'read',
0ca559a1
JL
44 'capabilities' => 'mod/lti:view',
45 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
4bed1682
JL
46 ),
47
48 'mod_lti_view_lti' => array(
49 'classname' => 'mod_lti_external',
50 'methodname' => 'view_lti',
51 'description' => 'Trigger the course module viewed event and update the module completion status.',
9332accd 52 'type' => 'read',
0ca559a1
JL
53 'capabilities' => 'mod/lti:view',
54 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
4bed1682 55 ),
cc193e0d 56
811d9ff9
JO
57 'mod_lti_get_tool_proxies' => array(
58 'classname' => 'mod_lti_external',
59 'methodname' => 'get_tool_proxies',
60 'description' => 'Get a list of the tool proxies',
61 'type' => 'read',
62 'capabilities' => 'moodle/site:config',
63 'ajax' => true
64 ),
65
cc193e0d
RW
66 'mod_lti_create_tool_proxy' => array(
67 'classname' => 'mod_lti_external',
68 'methodname' => 'create_tool_proxy',
69 'description' => 'Create a tool proxy',
70 'type' => 'write',
811d9ff9 71 'capabilities' => 'moodle/site:config',
cc193e0d
RW
72 'ajax' => true
73 ),
74
75 'mod_lti_delete_tool_proxy' => array(
76 'classname' => 'mod_lti_external',
77 'methodname' => 'delete_tool_proxy',
78 'description' => 'Delete a tool proxy',
79 'type' => 'write',
811d9ff9 80 'capabilities' => 'moodle/site:config',
cc193e0d
RW
81 'ajax' => true
82 ),
83
84 'mod_lti_get_tool_proxy_registration_request' => array(
85 'classname' => 'mod_lti_external',
86 'methodname' => 'get_tool_proxy_registration_request',
87 'description' => 'Get a registration request for a tool proxy',
88 'type' => 'read',
811d9ff9 89 'capabilities' => 'moodle/site:config',
cc193e0d
RW
90 'ajax' => true
91 ),
92
93 'mod_lti_get_tool_types' => array(
94 'classname' => 'mod_lti_external',
95 'methodname' => 'get_tool_types',
96 'description' => 'Get a list of the tool types',
97 'type' => 'read',
811d9ff9 98 'capabilities' => 'moodle/site:config',
cc193e0d
RW
99 'ajax' => true
100 ),
101
102 'mod_lti_create_tool_type' => array(
103 'classname' => 'mod_lti_external',
104 'methodname' => 'create_tool_type',
105 'description' => 'Create a tool type',
106 'type' => 'write',
811d9ff9 107 'capabilities' => 'moodle/site:config',
cc193e0d
RW
108 'ajax' => true
109 ),
110
111 'mod_lti_update_tool_type' => array(
112 'classname' => 'mod_lti_external',
113 'methodname' => 'update_tool_type',
114 'description' => 'Update a tool type',
115 'type' => 'write',
811d9ff9 116 'capabilities' => 'moodle/site:config',
cc193e0d
RW
117 'ajax' => true
118 ),
119
120 'mod_lti_delete_tool_type' => array(
121 'classname' => 'mod_lti_external',
122 'methodname' => 'delete_tool_type',
123 'description' => 'Delete a tool type',
124 'type' => 'write',
811d9ff9 125 'capabilities' => 'moodle/site:config',
cc193e0d
RW
126 'ajax' => true
127 ),
128
129 'mod_lti_is_cartridge' => array(
130 'classname' => 'mod_lti_external',
131 'methodname' => 'is_cartridge',
132 'description' => 'Determine if the given url is for a cartridge',
133 'type' => 'read',
811d9ff9 134 'capabilities' => 'moodle/site:config',
cc193e0d
RW
135 'ajax' => true
136 ),
d5ded9e7 137);