MDL-52786 mod_quiz: Fix quiz_get_combined_reviewoptions
[moodle.git] / mod / quiz / db / services.php
CommitLineData
51e27aac
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 * Quiz external functions and service definitions.
19 *
20 * @package mod_quiz
21 * @category external
22 * @copyright 2016 Juan Leyva <juan@moodle.com>
23 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
24 * @since Moodle 3.1
25 */
26
27defined('MOODLE_INTERNAL') || die;
28
29$functions = array(
30
31 'mod_quiz_get_quizzes_by_courses' => array(
32 'classname' => 'mod_quiz_external',
33 'methodname' => 'get_quizzes_by_courses',
34 'description' => 'Returns a list of quizzes in a provided list of courses,
35 if no list is provided all quizzes that the user can view will be returned.',
36 'type' => 'read',
37 'capabilities' => 'mod/quiz:view'
38 ),
4064dd0e
JL
39
40 'mod_quiz_view_quiz' => array(
41 'classname' => 'mod_quiz_external',
42 'methodname' => 'view_quiz',
43 'description' => 'Trigger the course module viewed event and update the module completion status.',
44 'type' => 'write',
45 'capabilities' => 'mod/quiz:view'
46 ),
c161ecff
JL
47
48 'mod_quiz_get_user_attempts' => array(
49 'classname' => 'mod_quiz_external',
50 'methodname' => 'get_user_attempts',
51 'description' => 'Return a list of attempts for the given quiz and user.',
52 'type' => 'read',
53 'capabilities' => 'mod/quiz:view'
54 ),
e73e4581
JL
55
56 'mod_quiz_get_user_best_grade' => array(
57 'classname' => 'mod_quiz_external',
58 'methodname' => 'get_user_best_grade',
59 'description' => 'Get the best current grade for the given user on a quiz.',
60 'type' => 'read',
61 'capabilities' => 'mod/quiz:view'
62 ),
51e27aac 63);