292 Commits

Author SHA1 Message Date
Eloy Lafuente (stronk7)
5daeae8867 Merge branch 'MDL-65656-master-2' of git://github.com/andrewnicols/moodle 2019-07-03 02:16:35 +02:00
David Monllaó
39db57c3ee MDL-65839 core_analytics: New indicator instances for each analysable 2019-06-28 21:00:04 +02:00
David Monllaó
692d691da5 MDL-65639 analytics: Rewording time-splitting methods 2019-06-06 19:07:55 +02:00
Andrew Nicols
a2f81b201e MDL-65656 analytics: Stop covering memory-intensive tests 2019-06-04 10:16:50 +08:00
David Monllaó
73f8085f3f MDL-65680 analytics: Fix random failure on slow test environments 2019-05-24 10:59:13 +02:00
Adrian Greeve
467af62e35 Merge branch 'MDL-65067_master' of https://github.com/dmonllao/moodle 2019-05-22 16:29:52 +08:00
Jun Pataleta
1525b9626e Merge branch 'MDL-60407-master' of git://github.com/vmdef/moodle 2019-05-21 18:44:52 +08:00
Didier 'OdyX' Raboud
62e1b79cb0 MDL-65067 analytics: Strengthen format_weeks detection
The public function get_section_dates($section, $startdate = false) is
only defined in format_weeks, not in format_base.

As other formats can (and format_topcoll has) declare a different
get_section_dates public method, merely checking that it exists is not
sufficient to guarantee that it can be called with just a section object.

Check that the format either is, or is a subclass of format_weeks.
2019-05-17 13:24:47 +02:00
Adrian Greeve
d15589bc08 Merge branch 'MDL-65601_master' of git://github.com/dmonllao/moodle 2019-05-16 13:25:44 +08:00
Jun Pataleta
64d680c271 Merge branch 'MDL-65583_master' of git://github.com/dmonllao/moodle 2019-05-15 15:57:05 +08:00
David Monllaó
589a3f57a0 MDL-65601 analytics: Add missing set_modelid calls 2019-05-15 09:34:35 +02:00
Víctor Déniz Falcón
8dd1ebaaba MDL-60407 report_insights: Fix redirect when action on last prediction
When an actions is taken on the last prediction, the predictions
list page is reloaded.
2019-05-14 01:06:00 +01: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 Monllaó
bc2f679bca MDL-65582 analytics: Upcoming activities due enabled by default 2019-05-13 18:04:13 +02:00
David Monllaó
352ab7464e MDL-65348 analytics: Upcoming periodic from time() 2019-04-29 16:51:04 +02:00
Eloy Lafuente (stronk7)
0d575a542a Merge branch 'MDL-65248_master' of git://github.com/dmonllao/moodle 2019-04-23 13:50:22 +02:00
David Monllaó
7063b665e0 MDL-65248 core_course: Move analytics targets to course
MOV [coursealreadyfinished, moodle], [coursealreadyfinished, course]
MOV [coursenotyetstarted, moodle], [coursenotyetstarted, course]
MOV [coursenotyetfinished, moodle], [coursenotyetfinished, course]
MOV [nocourseactivity, moodle], [nocourseactivity, course]
MOV [nocourseendtime, moodle], [nocourseendtime, course]
MOV [nocoursesections, moodle], [nocoursesections, course]
MOV [nocoursestudents, moodle], [nocoursestudents, course]
MOV [studentsatriskincourse, moodle], [studentsatriskincourse, course]
MOV [target:coursecompletion, moodle], [target:coursecompletion, course]
MOV [target:coursecompletion_help, moodle], [target:coursecompletion_help, course]
MOV [target:coursecompetencies, moodle], [target:coursecompetencies, course]
MOV [target:coursecompetencies_help, moodle], [target:coursecompetencies_help, course]
MOV [target:coursedropout, moodle], [target:coursedropout, course]
MOV [target:coursedropout_help, moodle], [target:coursedropout_help, course]
MOV [target:coursegradetopass, moodle], [target:coursegradetopass, course]
MOV [target:coursegradetopass_help, moodle], [target:coursegradetopass_help, course]
MOV [target:noteachingactivity, moodle], [target:noteachingactivity, course]
MOV [target:noteachingactivity_help, moodle], [target:noteachingactivity_help, course]
MOV [target:upcomingactivitiesdue, moodle], [target:upcomingactivitiesdue, course]
MOV [target:upcomingactivitiesdue_help, moodle], [target:upcomingactivitiesdue_help, course]
MOV [targetlabelstudentcompletionno, moodle], [targetlabelstudentcompletionno, course]
MOV [targetlabelstudentcompletionyes, moodle], [targetlabelstudentcompletionyes, course]
MOV [targetlabelstudentcompetenciesno, moodle], [targetlabelstudentcompetenciesno, course]
MOV [targetlabelstudentcompetenciesyes, moodle], [targetlabelstudentcompetenciesyes, course]
MOV [targetlabelstudentdropoutyes, moodle], [targetlabelstudentdropoutyes, course]
MOV [targetlabelstudentdropoutno, moodle], [targetlabelstudentdropoutno, course]
MOV [targetlabelstudentgradetopassno, moodle], [targetlabelstudentgradetopassno, course]
MOV [targetlabelstudentgradetopassyes, moodle], [targetlabelstudentgradetopassyes, course]
MOV [targetlabelteachingyes, moodle], [targetlabelteachingyes, course]
MOV [targetlabelteachingno, moodle], [targetlabelteachingno, course]
MOV [coursetoolong, analytics], [coursetoolong, course]
MOV [errorendbeforestart, analytics], [errorendbeforestart, course]
2019-04-15 09:45:50 +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ó
baa6c29cc1 MDL-65175 analytics: Rm references to unexisting time-splittings 2019-04-10 12:19:52 +02:00
David Monllaó
21bf5ae5ab MDL-64783 analytics: Send notifications using the receiver's language 2019-04-09 00:29:57 +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ó
93663fa1a8 MDL-64783 analytics: Styles for insights sent through email 2019-04-09 00:29:57 +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ó
20d7f527b0 MDL-64783 analytics: Discern prediction actions on insights generation 2019-04-09 00:29:51 +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ó
bb7dccdb8e MDL-64783 analytics: Insights generation logic out of the target 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
Eloy Lafuente (stronk7)
ed7fa60946 Merge branch 'MDL-61667-master-modelsinstall' of git://github.com/mudrd8mz/moodle 2019-04-02 00:20:47 +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
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
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
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
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
Jun Pataleta
db3527c2cc Merge branch 'MDL-63906_master' of git://github.com/dmonllao/moodle 2019-04-01 10:32:10 +08: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 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
Adrian Greeve
b1869131cf Merge branch 'MDL-60936_master' of git://github.com/dmonllao/moodle 2019-03-20 14:50:46 +08:00
David Monllaó
3576b66bfd MDL-60936 analytics: Timesplittings setting only for evaluation 2019-03-18 09:34:52 +01:00
Eloy Lafuente (stronk7)
f7e183e513 Merge branch 'MDL-64777-master-modelsrestore' of git://github.com/mudrd8mz/moodle 2019-04-15 23:37:43 +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 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