Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.
   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.
  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   * Defines the built-in prediction models provided by the Moodle core.
  19   *
  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
  24   */
  25  
  26  defined('MOODLE_INTERNAL') || die();
  27  
  28  $models = [
  29      [
  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',
  81          ],
  82      ],
  83      [
  84          'target' => '\core_course\analytics\target\no_teaching',
  85          'indicators' => [
  86              '\core_course\analytics\indicator\no_teacher',
  87              '\core_course\analytics\indicator\no_student',
  88          ],
  89          'timesplitting' => '\core\analytics\time_splitting\single_range',
  90          'enabled' => true,
  91      ],
  92      [
  93          'target' => '\core_user\analytics\target\upcoming_activities_due',
  94          'indicators' => [
  95              '\core_course\analytics\indicator\activities_due',
  96          ],
  97          'timesplitting' => '\core\analytics\time_splitting\upcoming_week',
  98          'enabled' => true,
  99      ],
 100      [
 101          'target' => '\core_course\analytics\target\no_access_since_course_start',
 102          'indicators' => [
 103              '\core\analytics\indicator\any_course_access',
 104          ],
 105          'timesplitting' => '\core\analytics\time_splitting\one_month_after_start',
 106          'enabled' => true,
 107      ],
 108      [
 109          'target' => '\core_course\analytics\target\no_recent_accesses',
 110          'indicators' => [
 111              '\core\analytics\indicator\any_course_access',
 112          ],
 113          'timesplitting' => '\core\analytics\time_splitting\past_month',
 114          'enabled' => true,
 115      ],
 116  ];