My focus switches back to Moodle 3.7 roadmap issues this week.
Last week, I made a good progress with MDL-61667 which will bring the ability for plugins (or better components, including the core ones) to easily declare models they provide. This will replace the need for creating the model "manually" via the install / upgrade scripts. Also, this will allow us to implement a "reset" function for the provided models.
The current work in progress assumes that any component can provide a file db/analytics.php where prediction models are easily described via fully qualified names of the relevant target, indicators and optionally time splitting methods or the processor. These will be then automatically installed whenever the component is being installed or upgraded - exactly as scheduled tasks do, for example.
This is an example of declaring the in-built "no teaching" model - something like that will eventually be in the core's lib/db/analytics.php file:
$models = [ [ 'target' => '\core\analytics\target\no_teaching', 'indicators' => [ '\core_course\analytics\indicator\no_teacher', '\core_course\analytics\indicator\no_student', ], 'timesplitting' => '\core\analytics\time_splitting\single_range', ], ];
I am about to finish this feature this week.
I keep working on the new targets, course completion (MDL-64636) and course competencies achievement (MDL-64693). After the first peer review (thanks David Monllaó), we have added a new parent class for all targets based on courses (analysable) and student enrolments (samples).