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 * Workshop external functions and service definitions.
20 * @package mod_workshop
22 * @copyright 2017 Juan Leyva <juan@moodle.com>
23 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
27 defined('MOODLE_INTERNAL') || die;
31 'mod_workshop_get_workshops_by_courses' => array(
32 'classname' => 'mod_workshop_external',
33 'methodname' => 'get_workshops_by_courses',
34 'description' => 'Returns a list of workshops in a provided list of courses, if no list is provided all workshops that
35 the user can view will be returned.',
37 'capabilities' => 'mod/workshop:view',
38 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
40 'mod_workshop_get_workshop_access_information' => array(
41 'classname' => 'mod_workshop_external',
42 'methodname' => 'get_workshop_access_information',
43 'description' => 'Return access information for a given workshop.',
45 'capabilities' => 'mod/workshop:view',
46 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
48 'mod_workshop_get_user_plan' => array(
49 'classname' => 'mod_workshop_external',
50 'methodname' => 'get_user_plan',
51 'description' => 'Return the planner information for the given user.',
53 'capabilities' => 'mod/workshop:view',
54 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
56 'mod_workshop_view_workshop' => array(
57 'classname' => 'mod_workshop_external',
58 'methodname' => 'view_workshop',
59 'description' => 'Trigger the course module viewed event and update the module completion status.',
61 'capabilities' => 'mod/workshop:view',
62 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
64 'mod_workshop_add_submission' => array(
65 'classname' => 'mod_workshop_external',
66 'methodname' => 'add_submission',
67 'description' => 'Add a new submission to a given workshop.',
69 'capabilities' => 'mod/workshop:submit',
70 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
72 'mod_workshop_update_submission' => array(
73 'classname' => 'mod_workshop_external',
74 'methodname' => 'update_submission',
75 'description' => 'Update the given submission.',
77 'capabilities' => 'mod/workshop:submit',
78 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
80 'mod_workshop_delete_submission' => array(
81 'classname' => 'mod_workshop_external',
82 'methodname' => 'delete_submission',
83 'description' => 'Deletes the given submission.',
85 'capabilities' => 'mod/workshop:submit',
86 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
88 'mod_workshop_get_submissions' => array(
89 'classname' => 'mod_workshop_external',
90 'methodname' => 'get_submissions',
91 'description' => 'Retrieves all the workshop submissions or the one done by the given user.',
93 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
95 'mod_workshop_get_submission' => array(
96 'classname' => 'mod_workshop_external',
97 'methodname' => 'get_submission',
98 'description' => 'Retrieves the given submission.',
100 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
102 'mod_workshop_get_submission_assessments' => array(
103 'classname' => 'mod_workshop_external',
104 'methodname' => 'get_submission_assessments',
105 'description' => 'Retrieves all the assessments of the given submission.',
107 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
109 'mod_workshop_get_assessment' => array(
110 'classname' => 'mod_workshop_external',
111 'methodname' => 'get_assessment',
112 'description' => 'Retrieves the given assessment.',
114 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
116 'mod_workshop_get_assessment_form_definition' => array(
117 'classname' => 'mod_workshop_external',
118 'methodname' => 'get_assessment_form_definition',
119 'description' => 'Retrieves the assessment form definition.',
121 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
123 'mod_workshop_get_reviewer_assessments' => array(
124 'classname' => 'mod_workshop_external',
125 'methodname' => 'get_reviewer_assessments',
126 'description' => 'Retrieves all the assessments reviewed by the given user.',
128 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
130 'mod_workshop_update_assessment' => array(
131 'classname' => 'mod_workshop_external',
132 'methodname' => 'update_assessment',
133 'description' => 'Add information to an allocated assessment.',
135 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
137 'mod_workshop_get_grades' => array(
138 'classname' => 'mod_workshop_external',
139 'methodname' => 'get_grades',
140 'description' => 'Returns the assessment and submission grade for the given user.',
142 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
144 'mod_workshop_evaluate_assessment' => array(
145 'classname' => 'mod_workshop_external',
146 'methodname' => 'evaluate_assessment',
147 'description' => 'Evaluates an assessment (used by teachers for provide feedback to the reviewer).',
149 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
151 'mod_workshop_get_grades_report' => array(
152 'classname' => 'mod_workshop_external',
153 'methodname' => 'get_grades_report',
154 'description' => 'Retrieves the assessment grades report.',
156 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)