MDL-49502 forum: Add the new function to the mobile service
[moodle.git] / mod / forum / db / services.php
blob66b5a76ea06c47a61ff6ac59aeff2fb842d7088a
1 <?php
3 // This file is part of Moodle - http://moodle.org/
4 //
5 // Moodle is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // Moodle is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with Moodle. If not, see <http://www.gnu.org/licenses/>.
18 /**
19 * Forum external functions and service definitions.
21 * @package mod_forum
22 * @copyright 2012 Mark Nelson <markn@moodle.com>
23 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
26 $functions = array(
28 'mod_forum_get_forums_by_courses' => array(
29 'classname' => 'mod_forum_external',
30 'methodname' => 'get_forums_by_courses',
31 'classpath' => 'mod/forum/externallib.php',
32 'description' => 'Returns a list of forum instances in a provided set of courses, if
33 no courses are provided then all the forum instances the user has access to will be
34 returned.',
35 'type' => 'read',
36 'capabilities' => 'mod/forum:viewdiscussion'
39 'mod_forum_get_forum_discussions' => array(
40 'classname' => 'mod_forum_external',
41 'methodname' => 'get_forum_discussions',
42 'classpath' => 'mod/forum/externallib.php',
43 'description' => 'Returns a list of forum discussions contained within a given set of forums.',
44 'type' => 'read',
45 'capabilities' => 'mod/forum:viewdiscussion, mod/forum:viewqandawithoutposting'
48 'mod_forum_get_forum_discussion_posts' => array(
49 'classname' => 'mod_forum_external',
50 'methodname' => 'get_forum_discussion_posts',
51 'classpath' => 'mod/forum/externallib.php',
52 'description' => 'Returns a list of forum posts for a discussion.',
53 'type' => 'read',
54 'capabilities' => 'mod/forum:viewdiscussion, mod/forum:viewqandawithoutposting'
57 'mod_forum_get_forum_discussions_paginated' => array(
58 'classname' => 'mod_forum_external',
59 'methodname' => 'get_forum_discussions_paginated',
60 'classpath' => 'mod/forum/externallib.php',
61 'description' => 'Returns a list of forum discussions optionally sorted and paginated.',
62 'type' => 'read',
63 'capabilities' => 'mod/forum:viewdiscussion, mod/forum:viewqandawithoutposting'
66 'mod_forum_view_forum' => array(
67 'classname' => 'mod_forum_external',
68 'methodname' => 'view_forum',
69 'classpath' => 'mod/forum/externallib.php',
70 'description' => 'Simulate the view.php web interface page: trigger events, completion, etc...',
71 'type' => 'write',
72 'capabilities' => 'mod/forum:viewdiscussion'