2 // This file is part of Moodle - http://moodle.org/
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.
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.
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/>.
18 * Glossary module external functions.
20 * @package mod_glossary
22 * @copyright 2015 Frédéric Massart - FMCorz.net
23 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
26 defined('MOODLE_INTERNAL') ||
die();
30 'mod_glossary_get_glossaries_by_courses' => array(
31 'classname' => 'mod_glossary_external',
32 'methodname' => 'get_glossaries_by_courses',
33 'description' => 'Retrieve a list of glossaries from several courses.',
35 'capabilities' => 'mod/glossary:view',
36 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
)
39 'mod_glossary_view_glossary' => array(
40 'classname' => 'mod_glossary_external',
41 'methodname' => 'view_glossary',
42 'description' => 'Notify the glossary as being viewed.',
44 'capabilities' => 'mod/glossary:view',
45 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
)
48 'mod_glossary_view_entry' => array(
49 'classname' => 'mod_glossary_external',
50 'methodname' => 'view_entry',
51 'description' => 'Notify a glossary entry as being viewed.',
53 'capabilities' => 'mod/glossary:view',
54 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
)
57 'mod_glossary_get_entries_by_letter' => array(
58 'classname' => 'mod_glossary_external',
59 'methodname' => 'get_entries_by_letter',
60 'description' => 'Browse entries by letter.',
62 'capabilities' => 'mod/glossary:view',
63 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
)
66 'mod_glossary_get_entries_by_date' => array(
67 'classname' => 'mod_glossary_external',
68 'methodname' => 'get_entries_by_date',
69 'description' => 'Browse entries by date.',
71 'capabilities' => 'mod/glossary:view',
72 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
)
75 'mod_glossary_get_categories' => array(
76 'classname' => 'mod_glossary_external',
77 'methodname' => 'get_categories',
78 'description' => 'Get the categories.',
80 'capabilities' => 'mod/glossary:view',
81 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
)
84 'mod_glossary_get_entries_by_category' => array(
85 'classname' => 'mod_glossary_external',
86 'methodname' => 'get_entries_by_category',
87 'description' => 'Browse entries by category.',
89 'capabilities' => 'mod/glossary:view',
90 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
)
93 'mod_glossary_get_authors' => array(
94 'classname' => 'mod_glossary_external',
95 'methodname' => 'get_authors',
96 'description' => 'Get the authors.',
98 'capabilities' => 'mod/glossary:view',
99 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
)
102 'mod_glossary_get_entries_by_author' => array(
103 'classname' => 'mod_glossary_external',
104 'methodname' => 'get_entries_by_author',
105 'description' => 'Browse entries by author.',
107 'capabilities' => 'mod/glossary:view',
108 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
)
111 'mod_glossary_get_entries_by_author_id' => array(
112 'classname' => 'mod_glossary_external',
113 'methodname' => 'get_entries_by_author_id',
114 'description' => 'Browse entries by author ID.',
116 'capabilities' => 'mod/glossary:view',
117 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
)
120 'mod_glossary_get_entries_by_search' => array(
121 'classname' => 'mod_glossary_external',
122 'methodname' => 'get_entries_by_search',
123 'description' => 'Browse entries by search query.',
125 'capabilities' => 'mod/glossary:view',
126 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
)
129 'mod_glossary_get_entries_by_term' => array(
130 'classname' => 'mod_glossary_external',
131 'methodname' => 'get_entries_by_term',
132 'description' => 'Browse entries by term (concept or alias).',
134 'capabilities' => 'mod/glossary:view',
135 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
)
138 'mod_glossary_get_entries_to_approve' => array(
139 'classname' => 'mod_glossary_external',
140 'methodname' => 'get_entries_to_approve',
141 'description' => 'Browse entries to be approved.',
143 'capabilities' => 'mod/glossary:approve',
144 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
)
147 'mod_glossary_get_entry_by_id' => array(
148 'classname' => 'mod_glossary_external',
149 'methodname' => 'get_entry_by_id',
150 'description' => 'Get an entry by ID',
152 'capabilities' => 'mod/glossary:view',
153 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
)
156 'mod_glossary_add_entry' => array(
157 'classname' => 'mod_glossary_external',
158 'methodname' => 'add_entry',
159 'description' => 'Add a new entry to a given glossary',
161 'capabilities' => 'mod/glossary:write',
162 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE
)
165 'mod_glossary_delete_entry' => [
166 'classname' => 'mod_glossary\external\delete_entry',
168 'description' => 'Delete the given entry from the glossary.',
170 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE
]
173 'mod_glossary_update_entry' => [
174 'classname' => 'mod_glossary\external\update_entry',
176 'description' => 'Updates the given glossary entry.',
178 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE
]
181 'mod_glossary_prepare_entry_for_edition' => [
182 'classname' => 'mod_glossary\external\prepare_entry',
184 'description' => 'Prepares the given entry for edition returning draft item areas and file areas information.',
186 'services' => [MOODLE_OFFICIAL_MOBILE_SERVICE
]