MDL-59067 analytics: Store indicator calculations
authorDavid Monllao <davidm@moodle.com>
Mon, 7 Aug 2017 10:15:19 +0000 (12:15 +0200)
committerDavid Monllao <davidm@moodle.com>
Tue, 22 Aug 2017 20:28:04 +0000 (22:28 +0200)
commit0690a271c375af646d3cb3697579561abc80bee9
tree33e9339fbe54f4304121025344d5f491cc0d86ba
parentd126f838066758d89e8d63ed2dc5802039520e8f
MDL-59067 analytics: Store indicator calculations

This was supposed to be split into multiple commits to make it easier to understand
but I failed to do it properly. So this is the list of changes:

- New analytics_indicator_calc db table to store indicators calculations
- Reuse previous calculations during prediction/training; other models
  previous calculations should also be reused as long as they belong to
  the same sample (sampleid depends on sampleorigin), time range and indicator
- Allow bulk inserting of these calculations as this can hurt database performance
- Block the same analysable to be analysed for training and for prediction
- Use a new instance of the target and use it for is_valid_* functions
  as using ::is_valid_sample can lead to problems if people
  uses it to cache stuff
analytics/classes/dataset_manager.php
analytics/classes/local/analyser/base.php
analytics/classes/local/indicator/base.php
analytics/classes/local/time_splitting/base.php
analytics/classes/manager.php
analytics/classes/model.php
analytics/tests/prediction_test.php
lib/db/install.xml
lib/db/upgrade.php
lib/tests/indicators_test.php
version.php