101 Commits

Author SHA1 Message Date
David Monllao
0c0a72e7ac MDL-58835 report_insights: Not useful and ack prediction actions 2017-09-07 14:45:34 +02:00
David Monllao
025363d17c MDL-58835 analytics: Store prediction actions separately
New event for insights viewed as part of this issue.
2017-09-07 14:45:34 +02:00
Dan Poltawski
83575729b6 Merge branch 'MDL-59279_master' of git://github.com/dmonllao/moodle 2017-09-07 10:50:17 +02:00
Eloy Lafuente (stronk7)
9533cf3419 Merge branch 'MDL-59779_master' of git://github.com/dmonllao/moodle 2017-08-30 01:09:20 +02:00
David Monllao
10658a1cb4 MDL-59279 analytics: Include more info about the dataset 2017-08-29 16:26:41 +02:00
Andrew Nicols
3bb2900cf7 Merge branch 'MDL-59030_master' of git://github.com/dmonllao/moodle 2017-08-29 14:34:59 +08:00
David Monllao
f07d93de9d MDL-59030 analytics: Social breadth accepting more than level 2
Even if core indicators are limited to level 2 we should not block
other activities from implementing up to level 5.
2017-08-29 08:28:46 +02:00
David Monllao
edee629d1a MDL-59030 analytics: Expand community of inquiry mods public API 2017-08-29 06:19:37 +02:00
David Monllao
5c5cb3ee15 MDL-59265 analytics: Rename machine learning backend method
- Method names renamed to avoid interface changes once
  we support regression and unsupervised learning
- Adding regressor interface even if not implemente
- predictor interface comments expanded
- Differentiate model's required accuracy from predictions quality
- Add missing get_callback_boundary call
- Updated datasets' metadata to allow 3rd parties to code
  regressors themselves
- Add missing option to exception message
- Include target data into the dataset regardless of being a prediction
  dataset or a training dataset
- Explicit in_array and array_search non-strict calls
- Overwrite discrete should_be_displayed implementation with the binary one
- Overwrite no_teacher get_display_value as it would otherwise look
  wrong
- Other minor fixes
2017-08-25 13:17:22 +02:00
Eloy Lafuente (stronk7)
a7417383fa Merge branch 'MDL-59067_master' of git://github.com/dmonllao/moodle 2017-08-23 02:55:20 +02:00
David Monllao
0690a271c3 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
2017-08-22 22:28:04 +02:00
Jun Pataleta
f8de8cb314 Merge branch 'MDL-59204_master_v2' of git://github.com/markn86/moodle 2017-08-22 12:46:23 +08:00
Mark Nelson
7e00aa725a MDL-59204 analytics: changed get_name so that it returns a lang_string
This was done for indicators, targets and time splitting methods so that we
can get the string identifier and component in order to display a help_icon.

The functions were also made abstract, removing the default implementation.
Indicators, targets and time splitting methods should define this function.
2017-08-18 18:02:38 +08:00
David Monllao
cab7abec70 MDL-59779 analytics: Bulk-insert predictions 2017-08-17 20:55:38 +02:00
David Monllao
56d4981e03 MDL-59661 analytics: Filearea passed as an argument to dataset_manager 2017-08-17 20:51:56 +02:00
David Monllao
fbc889a268 MDL-59779 analytics: Reduce community of inquiry indicators db queries 2017-08-10 11:07:23 +02:00
Andrew Nicols
ba07a8e7da Merge branch 'MDL-59638_master-fix' of git://github.com/dmonllao/moodle 2017-08-09 13:41:29 +08:00
David Monllao
42d67f95cd MDL-59638 analytics: Prevent start time to be higher than end time
Other related changes:

- core_analytics\site get_start and get_end returning always integer values
- Defer intval call in define_ranges to refine some seconds
2017-08-08 14:38:11 +02:00
David Monllao
e4584b8110 MDL-59116 analytics: Replace wrong sorting 2017-08-08 14:04:52 +02:00
Eloy Lafuente (stronk7)
d4c8235f87 Merge branch 'MDL-59638_master' of git://github.com/dmonllao/moodle 2017-08-07 19:48:17 +02:00
David Monllao
00da1e6010 MDL-59116 analytics: Multiple predictions for each analysable time range
Now we only predict using the most recent range available, this means
that if someone upgrades to moodle 3.4 at three quarters of a course
we will only calculate the latest range, previous ranges were not
displayed anyway once more recent predictions were available.

This commit deletes all previous predictions :) this shouldn't be a
problem in master as we don't provide any guarantee, the alternative
(retrive sampleids from mdl_files) would have been slow and a waste of
time as well as require horrible code in an upgrade step (text fields
do not accept defaults nor we can use NOTNULL).
2017-08-07 06:56:11 +02:00
David Monllao
8f5a52b484 MDL-59638 analytics: Advance time splitting start instead of delay end 2017-07-27 12:03:21 +02:00
Jake Dallimore
0eb594401d MDL-57791 analytics: fix for in_array 2017-07-26 13:25:37 +08:00
David Monllao
e10b29ed0c MDL-57791 tool_analytics: From tool_models to tool_analytics 2017-07-24 08:37:03 +02:00
David Monllao
690ad8759d MDL-57791 analytics: Fixes during integration review
This commit includes the following changes:
- cibot complains fixes
- removed randomly failing test
- fixed course_dropout return
- other minor fixes
2017-07-24 08:37:03 +02:00
David Monllao
2db6e9811b MDL-59212 analytics: Core indicators tests
Part of MDL-57791 epic.
2017-07-24 08:37:01 +02:00
David Monllao
206d7aa9ad MDL-59212 analytics: Move API uses out of analytics dir
Part of MDL-57791 epic.
2017-07-24 08:37:00 +02:00
David Monllao
fbc18acda0 MDL-59212 analytics: Abstract equal parts and accum time splittings
Part of MDL-57791 epic.
2017-07-24 08:37:00 +02:00
David Monllao
b3d6879489 MDL-59212 analytics: Analyser and static methods tests
Part of MDL-57791 epic.
2017-07-24 08:36:59 +02:00
David Monllao
3a396286b1 MDL-57791 analytics: Always absolute full class names
Some extra tiny changes as well.
2017-07-24 08:36:50 +02:00
David Monllao
1cc2b4bac3 MDL-57791 analytics: Second review round 2017-07-24 08:36:50 +02:00
David Monllao
413f19bc49 MDL-59211 analytics: Make cibot happy
Part of MDL-57791 epic.
2017-07-24 08:36:49 +02:00
David Monllao
1611308b58 MDL-57791 analytics: Changes after review
- Split model::predict in parts
- JS promises updated according to eslint-plugin-promise
- New API methods replacing direct DB queries
- Reduce insights nav link display cost
- Increase time limit as well as memory for big processes
- Move prediction action event to core
- Dataset write locking and others
- Refine last time range end time
- Removed dodgy splitting method id to int
- Replace admin_setting_predictor output_html overwrite for write_setting overwrite
- New APIs for access control
- Discard invalid samples also during prediction
2017-07-24 08:36:49 +02:00
David Monllao
584ffa4ffc MDL-57791 analytics: Replace sql queries for API calls 2017-07-24 08:36:49 +02:00
David Monllao
27ae9af4ba MDL-57791 analytics: No UI in calculables APIs 2017-07-24 08:36:48 +02:00
David Monllao
3a217fc394 MDL-57791 analytics: Replace settings by get_archetype_roles 2017-07-24 08:36:48 +02:00
Ankit Agarwal
f39cebbb3c MDL-59119 analytics: Fix references to wrong var
Part of MDL-57791 epic.
2017-07-24 08:36:47 +02:00
David Monllao
f67f35f324 MDL-59010 analytics: Direct db calls to logging API
Part of MDL-57791 epic.
2017-07-24 08:36:46 +02:00
David Monllao
8970ff91bb MDL-59174 analytics: Analyser queries to enrollib
Part of MDL-57791 epic.
2017-07-24 08:36:46 +02:00
David Monllao
bd164083eb MDL-59057 analytics: Unit test fixes
Updating tests according to courses - site_courses analysers change.

Part of MDL-57791 epic.
2017-07-24 08:36:45 +02:00
David Monllao
20b77f9b63 MDL-59057 analytics: Split up course analyser in 2
One at course level so teachers can get insights and another
one at system level so the insights go to the site admin.

Part of MDL-57791 epic.
2017-07-24 08:36:45 +02:00
David Monllao
5d7f06f4c8 MDL-59057 analytics: Get rid of week_before_course_start
It is useless at site level. It can be useful at course level but
I removed it in favour of single_range + is_valid_*

Part of MDL-57791 epic.
2017-07-24 08:36:45 +02:00
David Monllao
f9e7447f42 MDL-57791 insights: Clarify insights-prediction boundaries 2017-07-24 08:36:44 +02:00
David Monllao
a40952d384 MDL-59057 analytics: Introduce static models
Part of MDL-57791 epic.
2017-07-24 08:36:32 +02:00
Ankit Agarwal
5846c72c4d MDL-59117 core_analytics: Move all indicators to respective modules
Part of MDL-57791 epic.
2017-07-24 08:36:21 +02:00
Ankit Agarwal
3c305df1de MDL-59079 core_analytics: Add social level 2 to various activities
Part of MDL-57791 epic.
2017-07-24 08:36:18 +02:00
Ankit Agarwal
a6805cc8e0 MDL-59079 core_analytics: Define social levels for various activities
Part of MDL-57791 epic.
2017-07-24 08:36:17 +02:00
Ankit Agarwal
1eb6c52bf2 MDL-59079 core_analytics: Add support for more than one social level
Part of MDL-57791 epic.
2017-07-24 08:36:17 +02:00
Ankit Agarwal
022f3f07fa MDL-59079 core_analytics: Refactor community of inquiry indicators
Refactor code to introduce a new base class per activity. This would help in sharing apis
between cognitive and social classes which is heavily required for level 2 and onwards.

Part of MDL-57791 epic.
2017-07-24 08:36:17 +02:00
David Monllao
6ec2ae0f87 MDL-58859 analytics: Fix migration to core bugs and pre-migration issues
Part of MDL-57791 epic.
2017-07-24 08:36:17 +02:00