MDL-59244 mod_workshop: New WS mod_workshop_delete_submission
[moodle.git] / mod / workshop / db / services.php
CommitLineData
9f1ab2db
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 * Workshop external functions and service definitions.
19 *
20 * @package mod_workshop
21 * @category external
22 * @copyright 2017 Juan Leyva <juan@moodle.com>
23 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
24 * @since Moodle 3.4
25 */
26
27defined('MOODLE_INTERNAL') || die;
28
29$functions = array(
30
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.',
36 'type' => 'read',
37 'capabilities' => 'mod/workshop:view',
38 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
39 ),
977fdfa3
JL
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.',
44 'type' => 'read',
45 'capabilities' => 'mod/workshop:view',
46 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
47 ),
cd495029
JL
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.',
52 'type' => 'read',
53 'capabilities' => 'mod/workshop:view',
54 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE),
55 ),
291645f7
JL
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.',
60 'type' => 'write',
61 'capabilities' => 'mod/workshop:view',
62 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
63 ),
c2cf2450
JL
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.',
68 'type' => 'write',
69 'capabilities' => 'mod/workshop:submit',
70 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
71 ),
c1698a37
JL
72 'mod_workshop_update_submission' => array(
73 'classname' => 'mod_workshop_external',
74 'methodname' => 'update_submission',
75 'description' => 'Update the given submission.',
76 'type' => 'write',
77 'capabilities' => 'mod/workshop:submit',
78 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
79 ),
bde5631d
JL
80 'mod_workshop_delete_submission' => array(
81 'classname' => 'mod_workshop_external',
82 'methodname' => 'delete_submission',
83 'description' => 'Deletes the given submission.',
84 'type' => 'write',
85 'capabilities' => 'mod/workshop:submit',
86 'services' => array(MOODLE_OFFICIAL_MOBILE_SERVICE)
87 ),
9f1ab2db 88);