77 Commits

Author SHA1 Message Date
David Monllaó
16cb4f32a0 MDL-66536 analytics: Indicators can add extra data for targets 2019-09-18 13:07:21 +08:00
David Monllaó
b024720499 MDL-66536 analytics: Bulk-fetch samples data
For one_sample_per_analysable models.
2019-09-18 13:04:30 +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ó
abc745fbd0 MDL-66498 analytics: get_samples() with no params limit 2019-09-11 12:44: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 Monllaó
5ef49c591a MDL-65633 tool_analytics: Notification for invalid analysis intervals 2019-07-18 18:38:13 +02:00
David Monllaó
3cb0aaaa8c MDL-65633 analytics: New interfaces for time-splitting methods 2019-07-18 18:38:13 +02:00
David Monllaó
1d5cb38292 MDL-65562 analytics: New get_prediction_actions API 2019-07-09 13:36:11 +02:00
Adrian Greeve
d15589bc08 Merge branch 'MDL-65601_master' of git://github.com/dmonllao/moodle 2019-05-16 13:25:44 +08:00
David Monllaó
589a3f57a0 MDL-65601 analytics: Add missing set_modelid calls 2019-05-15 09:34:35 +02:00
David Monllaó
a1fb183df0 MDL-65583 tool_analytics: Model name from a data attribute
The credit and the patch using this approach goes to David Mudrák.
2019-05-13 22:54:28 +02:00
David Mudrák
066a4d6493 MDL-64786 analytics: Allow renaming models via inplace editable element 2019-04-15 08:22:13 +02:00
David Mudrák
ed47112e1b MDL-64786 analytics: Add missing parameter to model::export() method
All methods that export an object to be rendered via a template, must
have the instance of a renderer available.
2019-04-15 08:17:45 +02:00
David Monllaó
982fef46f4 MDL-64783 analytics: Activities due insight forwards to calendar
The patch includes changes applied after the peer review.
2019-04-09 00:29:57 +02:00
David Monllaó
9f690999ec MDL-64783 analytics: Performance improvements and internal refactoring
The base classes analyser and time-splitting method had too many
reponsibilities. A new analysis class has been created.
2019-04-09 00:26:39 +02:00
David Monllaó
e85c2f372b MDL-64783 analytics: Improvements to the insights system 2019-04-09 00:26:23 +02:00
David Monllaó
50935afba4 MDL-64783 analytics: Upcoming activities due and related API changes 2019-04-09 00:25:24 +02:00
Eloy Lafuente (stronk7)
481c1ae4ce Merge branch 'MDL-64779_master' of git://github.com/dmonllao/moodle 2019-04-02 23:23:13 +02:00
David Monllaó
f54a4092c7 MDL-61667 analytics: Remove duplicated capability checks
\core_analytics\model::create and \core_analytics\model::enable methods
are called from install/upgrade scripts. Therefore, they should not
include any capability check. Their capability checks are actually
redundant, as the user capabilities are already checked in the
entry-point scripts.
2019-04-01 14:57:57 +02:00
David Mudrák
aa8af6fcfc MDL-61667 analytics: Fix checking that a given model does not exist
The original implementation did not work well for checking that the
given model does NOT exist. If no record was found in the
analytics_models table, the code execution continued and it reached the
moment when indicators were checked. If no indicators were provided, the
call ended up with error 'array_keys() expects parameter 1 to be array,
boolean given' (because indicators were set to false).
2019-04-01 14:23:06 +02:00
David Mudrák
4de4d1652b MDL-61667 analytics: Don't autoenable models with time splitting defined
When the API had originally been designed, it was assumed that the
presence of the time splitting method implies no requirement for the
machine learning backend and that it is a sign of less performance
demanding models. So it seemed to be safe and useful to have such models
automatically enabled. That assumption did not prove to be valid. Most
of the time is spent calculating indicators that depend on log tables.

We realized it would be useful to be able to specify the default time
splitting method without the need to have such models auto-enabled.
2019-04-01 14:23:06 +02:00
David Monllaó
75dfc588b5 MDL-64779 tool_analytics: Export selector 2019-04-01 13:56:37 +02:00
David Mudrák
c679d39c36 MDL-64996 analytics: Don't mark static model as untrained after clearing
Static predictions models (i.e. those using a target based on
assumptions, not facts) are always considered as trained. Clearing them
must not mark them as untrained. Doing so would make them being skipped
by the prediction scheduled task.
2019-03-25 08:56:11 +01:00
David Monllaó
3576b66bfd MDL-60936 analytics: Timesplittings setting only for evaluation 2019-03-18 09:34:52 +01:00
David Monllaó
e97dfff78d MDL-64787 tool_analytics: Include training data source in the log table 2019-03-07 20:44:48 +01:00
David Monllaó
bc82b89586 MDL-64787 mlbackend: Evaluate trained models 2019-03-07 20:43:30 +01:00
David Monllaó
74823933c8 MDL-64787 tool_analytics: UI for trained models evaluation 2019-03-07 20:43:30 +01:00
David Monllaó
c70a7194f4 MDL-60944 analytics: Include trained ML models 2019-02-26 10:58:41 +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
Ankit Agarwal
349c44128d MDL-60944 analytics: Add base support for import / export 2019-02-25 09:54:07 +01:00
Eloy Lafuente (stronk7)
bd5fdcfccd MDL-63422 general: review core loop / switch / case / continue
This commit reviews all continue uses in core happening within a
loop / switch / case hierarchy. This does not cover:

- Changes to libraries. Will be handled in another issue / commit.
- Uses out from loops, will be reviewed by other commit.

The policy followed has been:
- When possible, take rid of the continue.
- When clearly the intention was to jump to next element in loop
  change to continue 2
- When it was not clear, keep old behavior switching to break, no
  matter how weird the behavior may be.
2018-10-31 00:17:59 +01:00
David Monllao
d44ce97fe1 MDL-60520 analytics: Do not block model updates if the backend is down 2018-10-22 13:58:33 +02:00
David Monllao
ed12ba6ba8 MDL-60520 analytics: Per-model ml backend 2018-10-22 13:58:33 +02:00
Ankit Agarwal
fabe98ac92 MDL-60861 analytics: Enabling a model requires timesplitting 2017-12-11 10:47:01 +05:30
David Monllao
0af2421acd MDL-59988 analytics: Reset trained status on clear 2017-10-18 07:02:23 +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
2dca133916 MDL-59988 analytics: Process pending training and prediction files 2017-10-13 12:29:21 +02:00
David Monllao
325b3bdd8e MDL-59988 analytics: Files marked as used only if valid
- Basic unit test for minimum machine learning backends requirements
- Warning return messages now include not enough data
- Clear models when the predictions processor is changed
- Refined the name of a couple of constants / methods
2017-10-13 12:24:17 +02:00
Jake Dallimore
0ce9026307 Merge branch 'MDL-59106_master' of git://github.com/markn86/moodle 2017-10-12 10:53:20 +08:00
David Monllao
dd13fc222c MDL-59694 analytics: Track processed analysables 2017-10-09 07:47:28 +02:00
Mark Nelson
f87174dcc2 MDL-59106 analytics: store the 'timestart' and 'timeend' values 2017-10-06 17:28:38 +08: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
abafbc8405 MDL-59630 analytics: mlbackend model directories deletion 2017-10-03 10:34:47 +02:00
David Monllao
99b84a26f9 MDL-59630 analytics: Purge everything when the model is deleted 2017-10-03 10:07:32 +02:00
David Monllao
a8ccc5f2eb MDL-59630 analytics: Move get_analysables to abstract class 2017-10-03 10:07:21 +02:00
David Monllao
2e151c3c74 MDL-58835 analytics: Remove hidden elements from insights list 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
David Monllao
3e0f33aa4b MDL-59153 analytics: No access to disabled models predictions 2017-09-01 11:17: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