mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 13:02:07 +02:00
MDL-58859 analytics: Subsystem and API db/ requirements added
Part of MDL-57791 epic.
This commit is contained in:
parent
8473b73581
commit
40fcb365c3
@ -415,6 +415,7 @@ $cache = '.var_export($cache, true).';
|
||||
$info = array(
|
||||
'access' => null,
|
||||
'admin' => $CFG->dirroot.'/'.$CFG->admin,
|
||||
'analytics' => $CFG->dirroot . '/analytics',
|
||||
'antivirus' => $CFG->dirroot . '/lib/antivirus',
|
||||
'auth' => $CFG->dirroot.'/auth',
|
||||
'availability' => $CFG->dirroot . '/availability',
|
||||
@ -515,6 +516,7 @@ $cache = '.var_export($cache, true).';
|
||||
'gradeimport' => $CFG->dirroot.'/grade/import',
|
||||
'gradereport' => $CFG->dirroot.'/grade/report',
|
||||
'gradingform' => $CFG->dirroot.'/grade/grading/form',
|
||||
'mlbackend' => $CFG->dirroot.'/lib/mlbackend',
|
||||
'mnetservice' => $CFG->dirroot.'/mnet/service',
|
||||
'webservice' => $CFG->dirroot.'/webservice',
|
||||
'repository' => $CFG->dirroot.'/repository',
|
||||
|
@ -1807,6 +1807,10 @@ class core_plugin_manager {
|
||||
'memberships', 'profile', 'toolproxy', 'toolsettings'
|
||||
),
|
||||
|
||||
'mlbackend' => array(
|
||||
'php', 'python'
|
||||
),
|
||||
|
||||
'media' => array(
|
||||
'html5audio', 'html5video', 'swf', 'videojs', 'vimeo', 'youtube'
|
||||
),
|
||||
@ -1868,7 +1872,7 @@ class core_plugin_manager {
|
||||
|
||||
'report' => array(
|
||||
'backups', 'competency', 'completion', 'configlog', 'courseoverview', 'eventlist',
|
||||
'log', 'loglive', 'outline', 'participation', 'progress', 'questioninstances',
|
||||
'insights', 'log', 'loglive', 'outline', 'participation', 'progress', 'questioninstances',
|
||||
'security', 'stats', 'performance', 'usersessions'
|
||||
),
|
||||
|
||||
@ -1902,8 +1906,8 @@ class core_plugin_manager {
|
||||
'tool' => array(
|
||||
'assignmentupgrade', 'availabilityconditions', 'behat', 'capability', 'cohortroles', 'customlang',
|
||||
'dbtransfer', 'filetypes', 'generator', 'health', 'innodb', 'installaddon',
|
||||
'langimport', 'log', 'lp', 'lpimportcsv', 'lpmigrate', 'messageinbound', 'mobile', 'multilangupgrade', 'monitor',
|
||||
'oauth2', 'phpunit', 'profiling', 'recyclebin', 'replace', 'spamcleaner', 'task', 'templatelibrary',
|
||||
'langimport', 'log', 'lp', 'lpimportcsv', 'lpmigrate', 'messageinbound', 'mobile', 'models', 'multilangupgrade',
|
||||
'monitor', 'oauth2', 'phpunit', 'profiling', 'recyclebin', 'replace', 'spamcleaner', 'task', 'templatelibrary',
|
||||
'unittest', 'uploadcourse', 'uploaduser', 'unsuproles', 'usertours', 'xmldb'
|
||||
),
|
||||
|
||||
|
54
lib/classes/plugininfo/mlbackend.php
Normal file
54
lib/classes/plugininfo/mlbackend.php
Normal file
@ -0,0 +1,54 @@
|
||||
<?php
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Defines classes used for plugin info.
|
||||
*
|
||||
* @package core
|
||||
* @copyright 2017 David Monllao
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
namespace core\plugininfo;
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
/**
|
||||
* Class for analytics machine learning backend plugins
|
||||
*
|
||||
* @package core
|
||||
* @copyright 2017 David Monllao
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
class mlbackend extends base {
|
||||
|
||||
/**
|
||||
* Is uninstall allowed or not.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function is_uninstall_allowed() {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the node name used in admin settings menu for this plugin settings (if applicable).
|
||||
*
|
||||
* @return null|string node name or null if plugin does not create settings node (default)
|
||||
*/
|
||||
public function get_settings_section_name() {
|
||||
return 'mlbackendsetting' . $this->name;
|
||||
}
|
||||
}
|
@ -2305,6 +2305,24 @@ $capabilities = array(
|
||||
'manager' => CAP_ALLOW
|
||||
),
|
||||
),
|
||||
'moodle/analytics:listinsights' => array(
|
||||
'riskbitmask' => RISK_PERSONAL,
|
||||
'captype' => 'read',
|
||||
'contextlevel' => CONTEXT_COURSE,
|
||||
'archetypes' => array(
|
||||
'teacher' => CAP_ALLOW,
|
||||
'editingteacher' => CAP_ALLOW,
|
||||
'manager' => CAP_ALLOW
|
||||
)
|
||||
),
|
||||
'moodle/analytics:managemodels' => array(
|
||||
'riskbitmask' => RISK_CONFIG,
|
||||
'captype' => 'write',
|
||||
'contextlevel' => CONTEXT_SYSTEM,
|
||||
'archetypes' => array(
|
||||
'manager' => CAP_ALLOW
|
||||
),
|
||||
),
|
||||
'moodle/competency:templateview' => array(
|
||||
'captype' => 'read',
|
||||
'contextlevel' => CONTEXT_COURSECAT,
|
||||
|
@ -312,6 +312,15 @@ $definitions = array(
|
||||
),
|
||||
),
|
||||
|
||||
// Caches analytic models that have already predicted stuff.
|
||||
'modelswithpredictions' => array(
|
||||
'mode' => cache_store::MODE_APPLICATION,
|
||||
'simplekeys' => true,
|
||||
'simpledata' => true,
|
||||
'staticacceleration' => true,
|
||||
'staticaccelerationsize' => 1
|
||||
),
|
||||
|
||||
// Caches message processors.
|
||||
'message_processors_enabled' => array(
|
||||
'mode' => cache_store::MODE_APPLICATION,
|
||||
|
@ -101,4 +101,9 @@ $messageproviders = array (
|
||||
|
||||
// A comment was left on a user competency.
|
||||
'competencyusercompcomment' => array(),
|
||||
|
||||
// User insights.
|
||||
'insights' => array (
|
||||
'capability' => 'moodle/analytics:listinsights'
|
||||
)
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user