MDL-65788 tool_policy: Prevent two modals rendering for guests.
[moodle.git] / analytics / upgrade.txt
1This files describes API changes in analytics sub system,
2information provided here is intended especially for developers.
4=== 3.8 ===
6* "Time-splitting method" have been replaced by "Analysis interval" for the language strings that are
7 displayed in the Moodle UI. The name of several time-splitting methods have been updated according
8 to the new description of the field.
10=== 3.7 ===
12* \core_analytics\regressor::evaluate_regression and \core_analytics\classifier::evaluate_classification
13 have been updated to include a new $trainedmodeldir param. This new param will be used to evaluate the
14 existing trained model.
15* Plugins and core subsystems can now declare default prediction models by describing them in
16 their db/analytics.php file. Models should not be created manually via the db/install.php
17 file any more.
18* The method \core_analytics\manager::add_builtin_models() has been deprecated. The functionality
19 has been replaced with automatic update of models provided by the core moodle component. There
20 is no need to call this method explicitly any more. Instead, adding new models can be achieved
21 by updating the lib/db/analytics.php file and bumping the core version.
22* \core_analytics\model::execute_prediction_callbacks now returns an array with both sample's contexts
23 and the prediction records.
ed47112e 24* \core_analytics\model::export() now expects the renderer instance as an argument.
25* Time splitting methods:
26 * \core_analytics\local\time_splitting\base::append_rangeindex and
27 \core_analytics\local\time_splitting\base::infer_sample_info are now marked as final and can not
28 be overwritten.
29 * Can now overwrite include_range_info_in_training_data() and
30 get_training_ranges() methods. They can be used to create time splitting methods with a pre-defined
31 number of ranges.
32 * Can now overwrite cache_indicator_calculations(). You should return false if the time frames generated
33 by your time-splitting method are unique and / or can hardly be reused by further models.
34 * Can now overwrite valid_for_evaluation(). You can return false if the time-splitting method can not be
35 used to evaluate prediction models or if it does not make sense to evaluate prediction models with it,
36 as for example upcoming_periodic children classes.
37 * \core_analytics\local\analyser\base::get_most_recent_prediction_range has been moved to
38 \core_analytics\local\time_splitting\base::get_most_recent_prediction_range and it is not overwritable
39 by time splitting methods.
40* Targets:
41 * The visibility of the following methods must now be public: ignored_predicted_classes()
42 and get_insights_users()
43 * Prediction_actions() has now a 3rd parameter $isinsightuser. This parameter is true
44 when we are listing actions for the user that will receives the insight.
45 * Can now implement a always_update_analysis_time() method so analysable elements' timeanalysed is
46 only updated when analysable elements have been successfully evaluated. It is useful for lightweight targets.
47 * Can not implement two new methods to tune the insights generated by the model: get_insight_subject()
48 and get_insight_context_url().
49* Analysers:
50 * The visibility of get_all_samples() method must now be public.
51 * get_analysables() method has been deprecated in favour of a new get_analysables_interator()
52 for performance reasons.
53 * Can overwrite a new one_sample_per_analysable() method if the analysables they use only have
54 one sample. The insights generated by models will then include the suggested actions in
55 the notification.
bc82b895 56
57=== 3.5 ===
59* There are two new methods for analysers, processes_user_data() and join_sample_user(). You
60 need to overwrite them if your analyser uses user data. As a general statement, you should
61 overwrite these new methods if your samples return 'user' data. These new methods are used
62 for analytics' privacy API implementation.