Commit | Line | Data |
---|---|---|
e9bf3011 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 | * SCORM external functions and service definitions. | |
19 | * | |
20 | * @package mod_scorm | |
21 | * @category external | |
22 | * @copyright 2015 Juan Leyva <juan@moodle.com> | |
23 | * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | |
24 | * @since Moodle 3.0 | |
25 | */ | |
26 | ||
27 | $functions = array( | |
28 | ||
29 | 'mod_scorm_view_scorm' => array( | |
30 | 'classname' => 'mod_scorm_external', | |
31 | 'methodname' => 'view_scorm', | |
32 | 'description' => 'Trigger the course module viewed event.', | |
33 | 'type' => 'write', | |
34 | 'capabilities' => '' | |
35 | ), | |
22de67f4 JL |
36 | |
37 | 'mod_scorm_get_scorm_attempt_count' => array( | |
38 | 'classname' => 'mod_scorm_external', | |
39 | 'methodname' => 'get_scorm_attempt_count', | |
40 | 'description' => 'Return the number of attempts done by a user in the given SCORM.', | |
41 | 'type' => 'read', | |
42 | 'capabilities' => '' | |
43 | ), | |
dfe927c8 JL |
44 | |
45 | 'mod_scorm_get_scorm_scoes' => array( | |
46 | 'classname' => 'mod_scorm_external', | |
47 | 'methodname' => 'get_scorm_scoes', | |
48 | 'description' => 'Returns a list containing all the scoes data related to the given scorm id', | |
49 | 'type' => 'read', | |
50 | 'capabilities' => '' | |
51 | ), | |
822e9df7 JL |
52 | |
53 | 'mod_scorm_get_scorm_user_data' => array( | |
54 | 'classname' => 'mod_scorm_external', | |
55 | 'methodname' => 'get_scorm_user_data', | |
56 | 'description' => 'Retrieves user tracking and SCO data and default SCORM values', | |
57 | 'type' => 'read', | |
58 | 'capabilities' => '' | |
59 | ), | |
6b4ceb24 JL |
60 | |
61 | 'mod_scorm_insert_scorm_tracks' => array( | |
62 | 'classname' => 'mod_scorm_external', | |
63 | 'methodname' => 'insert_scorm_tracks', | |
64 | 'description' => 'Saves a scorm tracking record. | |
65 | It will overwrite any existing tracking data for this attempt. | |
66 | Validation should be performed before running the function to ensure the user will not lose any existing | |
67 | attempt data.', | |
68 | 'type' => 'write', | |
69 | 'capabilities' => 'mod/scorm:savetrack' | |
70 | ), | |
6b5e69eb JL |
71 | |
72 | 'mod_scorm_get_scorm_sco_tracks' => array( | |
73 | 'classname' => 'mod_scorm_external', | |
74 | 'methodname' => 'get_scorm_sco_tracks', | |
75 | 'description' => 'Retrieves SCO tracking data for the given user id and attempt number', | |
76 | 'type' => 'read', | |
77 | 'capabilities' => '' | |
78 | ), | |
91ea3678 JL |
79 | |
80 | 'mod_scorm_get_scorms_by_courses' => array( | |
81 | 'classname' => 'mod_scorm_external', | |
82 | 'methodname' => 'get_scorms_by_courses', | |
83 | 'description' => 'Returns a list of scorm instances in a provided set of courses, if | |
84 | no courses are provided then all the scorm instances the user has access to will be returned.', | |
85 | 'type' => 'read', | |
86 | 'capabilities' => '' | |
87 | ) | |
e9bf3011 | 88 | ); |