53 Commits

Author SHA1 Message Date
David Monllaó
06579b18cc MDL-64739 analytics: Contexts autocomplete with ajax 2019-10-21 15:33:29 +08:00
David Monllaó
76b5ee4545 MDL-64739 tool_analytics: Restrict models to specific contexts 2019-10-21 09:54:39 +08:00
David Monllaó
bf25fb166c MDL-65585 analytics: Global on/off switch 2019-10-10 10:06:31 +08:00
David Monllaó
aa5b705607 MDL-66004 mlbackend_python: Package installed on a separate server 2019-10-02 08:41:14 +08:00
David Monllaó
93e71c712d MDL-66091 report_insights: Unify contextwithinsights cache sets 2019-09-18 13:00:06 +08:00
David Monllaó
486e797c5f MDL-66091 analytics: Targets choose if there should be a report or not 2019-09-17 13:58:55 +08:00
David Monllaó
4fd74fba6f MDL-66498 analytics: Avoid get_in_or_equal for big arrays
Also, join directly with context table.
2019-09-11 12:44:55 +08:00
David Monllao
500111c5d3 MDL-66498 analytics: SQL IN in chunks 2019-09-11 12:44:55 +08:00
David Monllaó
35b10d09eb MDL-60949 analytics: Sort models by name 2019-07-08 08:19:47 +02:00
David Mudrák
7dba0c27ad MDL-64777 analytics: Add method to get target and indicators instances
This will be needed in some other places, too.
2019-04-15 08:16:58 +02:00
David Mudrák
1297fa4156 MDL-64777 analytics: Add method to load all model definitions 2019-04-15 08:16:58 +02:00
David Mudrák
01d620ee67 MDL-64777 analytics: Add method for identifying a model declaration
This is intended to be used to as a declaration identifier in HTML or as
a HTTP parameter value.
2019-04-15 08:16:58 +02:00
Eloy Lafuente (stronk7)
7c924d311d Merge branch 'MDL-64284-36_get_component_classes_cache' of https://github.com/tomdickman/moodle 2019-04-11 20:01:37 +02:00
David Monllaó
5f1f0ee6a1 MDL-65175 analytics: Time-splittings can be invalid for evaluation 2019-04-10 12:19:52 +02:00
David Monllaó
fccc728fcc MDL-64783 analytics: Performance improvements
- Removed redundant query to analytics_predict_samples
- Analysers API now uses recordsets to iterate through the analysable
  elements. They take the last analysed time into account.
- New method for targets so there is no need to always update the last
  analysis time. Useful for lightweight targets.
2019-04-09 00:29:57 +02:00
David Monllaó
50935afba4 MDL-64783 analytics: Upcoming activities due and related API changes 2019-04-09 00:25:24 +02:00
David Mudrák
d887b0c7f7 MDL-61667 analytics: Fix coding style issues in the existing code
These coding style issues were spotted while working on the issue. No
real changes here, just the coding style fixes attached to the patchset
for convenience.
2019-04-01 14:23:06 +02:00
David Mudrák
606c3be0f6 MDL-61667 analytics: Create missing models on install/upgrade
Similarly to how the scheduled tasks work, we now automatically check
and make sure that all the models specified in the component's
db/analytics.php file exist during the installation or upgrade of the
component.
2019-04-01 14:23:06 +02:00
David Mudrák
3b7c7918f3 MDL-61667 analytics: Deprecate the add_builtin_models() method
The functionality of the \core_analytics\manager::add_builtin_models()
method is to be replaced with automatic update of models provided by the
core moodle component. There is no need to call this method explicitly
any more. Instead, adding new models will be done by updating the
lib/db/analytics.php file and bumping the core version.
2019-04-01 14:23:06 +02:00
David Mudrák
6187213f39 MDL-61667 analytics: Add method to actually create a declared model
This is simply a wrapper around the model's create() method that works
with the model declaration syntax from the db/analytics.php file.
2019-04-01 14:23:06 +02:00
David Mudrák
f05840451e MDL-61667 analytics: Add methods to read and validate model declarations
Allow every component to declare prediction models it provides via the
db/analytics.php file.
2019-04-01 14:23:06 +02:00
Tom Dickman
0d6a45d2fe MDL-64284 core: improved performance of component class searching
Added static caching of classes to reduce load times and reduce calls to `get_component_classes`
by altering to accept a null component value to search classmap only once.
2019-03-29 11:44:43 +11:00
David Monllaó
3576b66bfd MDL-60936 analytics: Timesplittings setting only for evaluation 2019-03-18 09:34:52 +01:00
David Monllaó
e4453adc55 MDL-60944 tool_analytics: Adding create and delete features
Extra modifications to refine the preexisting patch.
2019-02-25 09:54:07 +01:00
David Monllao
ed12ba6ba8 MDL-60520 analytics: Per-model ml backend 2018-10-22 13:58:33 +02:00
sam marshall
a938e4096c MDL-60174 core_dml: fix miscellaneous incorrect recordset usage
The new recordset support for Postgres requires transactions and
will cause errors if recordsets are not closed correctly. This
commit fixes problems that were identified during unit tests, and
via some basic code analysis, across all core code. Most of these
are incorrect usage of recordset (forgetting to close them).
2017-11-27 11:10:33 +00:00
David Monllao
6e98bca0ba MDL-60388 analytics: Any write action looking at all contexts below course 2017-10-20 13:20:46 +02:00
Andrew Nicols
0b53be9056 Merge branch 'MDL-59987_master' of git://github.com/dmonllao/moodle 2017-10-17 12:00:51 +08:00
David Monllao
e08c74f5bc MDL-59630 analytics: Unit tests fixes 2017-10-05 17:38:17 +02:00
David Monllao
0328f12b07 MDL-59987 analytics: Add extra indicators for students at risk 2017-10-03 19:42:03 +02:00
David Monllao
0927604f8c MDL-59987 analytics: Add no students indicator to no teaching
Sneaking in a bug fix ;) (thanks in advance)
2017-10-03 19:41:43 +02:00
David Monllao
f9222c4953 MDL-59630 analytics: New clean up task 2017-10-03 10:34:43 +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
David Monllao
88777c570c MDL-59774 analytics: Fix sql_compare_text usage
Replace a distinct + join by an exists, which suits better what we need to do.
2017-08-14 07:56:06 +02:00
David Monllao
4a210b0688 MDL-57791 analytics: Predictions deleted context management 2017-07-26 09:17:58 +02:00
David Monllao
85e50ba405 MDL-57791 analytics: Set logstore during install
get_analytics_logstore updated to fix an edge case.
2017-07-25 11:05:03 +02:00
David Monllao
466f683aa6 MDL-57791 analytics: Compatibility with oracle
Also moved predictions test to analytics/tests/prediction_test.php
2017-07-24 17:49:09 +02: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
e709e54435 MDL-57791 analytics: Add builtin models during upgrade 2017-07-24 08:37:01 +02:00
David Monllao
08015e1895 MDL-57791 analytics: Add missing 'new' to throw
Also other code refinements. Credit to Mark Nelson.
2017-07-24 08:37:01 +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
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
cad362520f MDL-59010 analytics: Logstores initialised during tests
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