Merge branch 'MDL-75910-311' of https://github.com/andrewnicols/moodle into MOODLE_31...
[moodle.git] / lib / db / analytics.php
blob7efac78d69456864b897eb0dd1d9779412f8fed6
1 <?php
2 // This file is part of Moodle - https://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.
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/>.
17 /**
18 * Defines the built-in prediction models provided by the Moodle core.
20 * @package core
21 * @category analytics
22 * @copyright 2019 David Mudrák <david@moodle.com>
23 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
26 defined('MOODLE_INTERNAL') || die();
28 $models = [
30 'target' => '\core_course\analytics\target\course_dropout',
31 'indicators' => [
32 '\core\analytics\indicator\any_access_after_end',
33 '\core\analytics\indicator\any_access_before_start',
34 '\core\analytics\indicator\any_write_action_in_course',
35 '\core\analytics\indicator\read_actions',
36 '\core_course\analytics\indicator\completion_enabled',
37 '\core_course\analytics\indicator\potential_cognitive_depth',
38 '\core_course\analytics\indicator\potential_social_breadth',
39 '\mod_assign\analytics\indicator\cognitive_depth',
40 '\mod_assign\analytics\indicator\social_breadth',
41 '\mod_book\analytics\indicator\cognitive_depth',
42 '\mod_book\analytics\indicator\social_breadth',
43 '\mod_chat\analytics\indicator\cognitive_depth',
44 '\mod_chat\analytics\indicator\social_breadth',
45 '\mod_choice\analytics\indicator\cognitive_depth',
46 '\mod_choice\analytics\indicator\social_breadth',
47 '\mod_data\analytics\indicator\cognitive_depth',
48 '\mod_data\analytics\indicator\social_breadth',
49 '\mod_feedback\analytics\indicator\cognitive_depth',
50 '\mod_feedback\analytics\indicator\social_breadth',
51 '\mod_folder\analytics\indicator\cognitive_depth',
52 '\mod_folder\analytics\indicator\social_breadth',
53 '\mod_forum\analytics\indicator\cognitive_depth',
54 '\mod_forum\analytics\indicator\social_breadth',
55 '\mod_glossary\analytics\indicator\cognitive_depth',
56 '\mod_glossary\analytics\indicator\social_breadth',
57 '\mod_imscp\analytics\indicator\cognitive_depth',
58 '\mod_imscp\analytics\indicator\social_breadth',
59 '\mod_label\analytics\indicator\cognitive_depth',
60 '\mod_label\analytics\indicator\social_breadth',
61 '\mod_lesson\analytics\indicator\cognitive_depth',
62 '\mod_lesson\analytics\indicator\social_breadth',
63 '\mod_lti\analytics\indicator\cognitive_depth',
64 '\mod_lti\analytics\indicator\social_breadth',
65 '\mod_page\analytics\indicator\cognitive_depth',
66 '\mod_page\analytics\indicator\social_breadth',
67 '\mod_quiz\analytics\indicator\cognitive_depth',
68 '\mod_quiz\analytics\indicator\social_breadth',
69 '\mod_resource\analytics\indicator\cognitive_depth',
70 '\mod_resource\analytics\indicator\social_breadth',
71 '\mod_scorm\analytics\indicator\cognitive_depth',
72 '\mod_scorm\analytics\indicator\social_breadth',
73 '\mod_survey\analytics\indicator\cognitive_depth',
74 '\mod_survey\analytics\indicator\social_breadth',
75 '\mod_url\analytics\indicator\cognitive_depth',
76 '\mod_url\analytics\indicator\social_breadth',
77 '\mod_wiki\analytics\indicator\cognitive_depth',
78 '\mod_wiki\analytics\indicator\social_breadth',
79 '\mod_workshop\analytics\indicator\cognitive_depth',
80 '\mod_workshop\analytics\indicator\social_breadth',
84 'target' => '\core_course\analytics\target\no_teaching',
85 'indicators' => [
86 '\core_course\analytics\indicator\no_teacher',
87 '\core_course\analytics\indicator\no_student',
89 'timesplitting' => '\core\analytics\time_splitting\single_range',
90 'enabled' => true,
93 'target' => '\core_user\analytics\target\upcoming_activities_due',
94 'indicators' => [
95 '\core_course\analytics\indicator\activities_due',
97 'timesplitting' => '\core\analytics\time_splitting\upcoming_week',
98 'enabled' => true,
101 'target' => '\core_course\analytics\target\no_access_since_course_start',
102 'indicators' => [
103 '\core\analytics\indicator\any_course_access',
105 'timesplitting' => '\core\analytics\time_splitting\one_month_after_start',
106 'enabled' => true,
109 'target' => '\core_course\analytics\target\no_recent_accesses',
110 'indicators' => [
111 '\core\analytics\indicator\any_course_access',
113 'timesplitting' => '\core\analytics\time_splitting\past_month',
114 'enabled' => true,