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
 * Glossary module external functions.
19
 *
20
 * @package    mod_glossary
21
 * @category   external
22
 * @copyright  2015 Frédéric Massart - FMCorz.net
23
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
24
 */
25
 
26
defined('MOODLE_INTERNAL') || die();
27
 
28
$functions = array(
29
 
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.',
34
        'type'          => 'read',
35
        'capabilities'  => 'mod/glossary:view',
36
        'services'      => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
37
    ),
38
 
39
    'mod_glossary_view_glossary' => array(
40
        'classname'     => 'mod_glossary_external',
41
        'methodname'    => 'view_glossary',
42
        'description'   => 'Notify the glossary as being viewed.',
43
        'type'          => 'write',
44
        'capabilities'  => 'mod/glossary:view',
45
        'services'      => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
46
    ),
47
 
48
    'mod_glossary_view_entry' => array(
49
        'classname'     => 'mod_glossary_external',
50
        'methodname'    => 'view_entry',
51
        'description'   => 'Notify a glossary entry as being viewed.',
52
        'type'          => 'write',
53
        'ajax'          => true,
54
        'capabilities'  => 'mod/glossary:view',
55
        'services'      => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
56
    ),
57
 
58
    'mod_glossary_get_entries_by_letter' => array(
59
        'classname'     => 'mod_glossary_external',
60
        'methodname'    => 'get_entries_by_letter',
61
        'description'   => 'Browse entries by letter.',
62
        'type'          => 'read',
63
        'capabilities'  => 'mod/glossary:view',
64
        'services'      => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
65
    ),
66
 
67
    'mod_glossary_get_entries_by_date' => array(
68
        'classname'     => 'mod_glossary_external',
69
        'methodname'    => 'get_entries_by_date',
70
        'description'   => 'Browse entries by date.',
71
        'type'          => 'read',
72
        'capabilities'  => 'mod/glossary:view',
73
        'services'      => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
74
    ),
75
 
76
    'mod_glossary_get_categories' => array(
77
        'classname'     => 'mod_glossary_external',
78
        'methodname'    => 'get_categories',
79
        'description'   => 'Get the categories.',
80
        'type'          => 'read',
81
        'capabilities'  => 'mod/glossary:view',
82
        'services'      => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
83
    ),
84
 
85
    'mod_glossary_get_entries_by_category' => array(
86
        'classname'     => 'mod_glossary_external',
87
        'methodname'    => 'get_entries_by_category',
88
        'description'   => 'Browse entries by category.',
89
        'type'          => 'read',
90
        'capabilities'  => 'mod/glossary:view',
91
        'services'      => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
92
    ),
93
 
94
    'mod_glossary_get_authors' => array(
95
        'classname'     => 'mod_glossary_external',
96
        'methodname'    => 'get_authors',
97
        'description'   => 'Get the authors.',
98
        'type'          => 'read',
99
        'capabilities'  => 'mod/glossary:view',
100
        'services'      => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
101
    ),
102
 
103
    'mod_glossary_get_entries_by_author' => array(
104
        'classname'     => 'mod_glossary_external',
105
        'methodname'    => 'get_entries_by_author',
106
        'description'   => 'Browse entries by author.',
107
        'type'          => 'read',
108
        'capabilities'  => 'mod/glossary:view',
109
        'services'      => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
110
    ),
111
 
112
    'mod_glossary_get_entries_by_author_id' => array(
113
        'classname'     => 'mod_glossary_external',
114
        'methodname'    => 'get_entries_by_author_id',
115
        'description'   => 'Browse entries by author ID.',
116
        'type'          => 'read',
117
        'capabilities'  => 'mod/glossary:view',
118
        'services'      => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
119
    ),
120
 
121
    'mod_glossary_get_entries_by_search' => array(
122
        'classname'     => 'mod_glossary_external',
123
        'methodname'    => 'get_entries_by_search',
124
        'description'   => 'Browse entries by search query.',
125
        'type'          => 'read',
126
        'capabilities'  => 'mod/glossary:view',
127
        'services'      => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
128
    ),
129
 
130
    'mod_glossary_get_entries_by_term' => array(
131
        'classname'     => 'mod_glossary_external',
132
        'methodname'    => 'get_entries_by_term',
133
        'description'   => 'Browse entries by term (concept or alias).',
134
        'type'          => 'read',
135
        'capabilities'  => 'mod/glossary:view',
136
        'services'      => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
137
    ),
138
 
139
    'mod_glossary_get_entries_to_approve' => array(
140
        'classname'     => 'mod_glossary_external',
141
        'methodname'    => 'get_entries_to_approve',
142
        'description'   => 'Browse entries to be approved.',
143
        'type'          => 'read',
144
        'capabilities'  => 'mod/glossary:approve',
145
        'services'      => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
146
    ),
147
 
148
    'mod_glossary_get_entry_by_id' => array(
149
        'classname'     => 'mod_glossary_external',
150
        'methodname'    => 'get_entry_by_id',
151
        'description'   => 'Get an entry by ID',
152
        'type'          => 'read',
153
        'ajax'          => true,
154
        'capabilities'  => 'mod/glossary:view',
155
        'services'      => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
156
    ),
157
 
158
    'mod_glossary_add_entry' => array(
159
        'classname'     => 'mod_glossary_external',
160
        'methodname'    => 'add_entry',
161
        'description'   => 'Add a new entry to a given glossary',
162
        'type'          => 'write',
163
        'capabilities'  => 'mod/glossary:write',
164
        'services'      => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
165
    ),
166
 
167
    'mod_glossary_delete_entry' => [
168
        'classname'     => 'mod_glossary\external\delete_entry',
169
        'classpath'     => '',
170
        'description'   => 'Delete the given entry from the glossary.',
171
        'type'          => 'write',
172
        'services'      => [MOODLE_OFFICIAL_MOBILE_SERVICE]
173
    ],
174
 
175
    'mod_glossary_update_entry' => [
176
        'classname'     => 'mod_glossary\external\update_entry',
177
        'classpath'     => '',
178
        'description'   => 'Updates the given glossary entry.',
179
        'type'          => 'write',
180
        'services'      => [MOODLE_OFFICIAL_MOBILE_SERVICE]
181
    ],
182
 
183
    'mod_glossary_prepare_entry_for_edition' => [
184
        'classname'     => 'mod_glossary\external\prepare_entry',
185
        'classpath'     => '',
186
        'description'   => 'Prepares the given entry for edition returning draft item areas and file areas information.',
187
        'type'          => 'read',
188
        'services'      => [MOODLE_OFFICIAL_MOBILE_SERVICE]
189
    ],
190
);