Ir a la última revisión | Autoría | Comparar con el anterior | Ultima modificación | Ver Log |
This files describes API changes in analytics sub system,information provided here is intended especially for developers.=== 4.2 ===* The following analytics target classes, renamed since 3.7, have now been removed completed:- `\core\analytics\target\course_dropout`- `\core\analytics\target\course_competencies`- `\core\analytics\target\course_completion`- `\core\analytics\target\course_gradetopass`- `\core\analytics\target\no_teaching`=== 3.11 ===* Final deprecation get_enabled_time_splitting_methods. Method has been removed. Useget_time_splitting_methods_for_evaluation instead.* Final deprecation add_builtin_models. Method has been removed. The functionalityhas been 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 can be achievedby updating the lib/db/analytics.php file and bumping the core version.* Final deprecation - get_analysables(). Please see get_analysables_interator() instead.get_analysables_iterator() needs to be overridden by the child class.* A new function get_executed_actions() has been added to \core_analytics\prediction classto get all (or filtered by action name) executed actions of a prediction=== 3.8 ===* "Time-splitting method" have been replaced by "Analysis interval" for the language strings that aredisplayed in the Moodle UI. The name of several time-splitting methods have been updated accordingto the new description of the field.* A new target::can_use_timesplitting method must be implemented to discard time-splitting methods that can notbe used on a target.* Targets can now implement get_insight_body and get_insight_body_for_prediction to set the body of the insight.* Indicators can add information about calculated values by calling add_shared_calculation_info(). Thisdata is later available for targets in get_insight_body_for_prediction(), it can be accessedappending ':extradata' to the indicator name (e.g. $sampledata['\mod_yeah\analytics\indicator\ou:extradata')* A new \core_analytics\local\time_splitting\past_periodic abstract class has been added. Time-splittingmethods extending \core_analytics\local\time_splitting\periodic directly should be extending past_periodicnow. 'periodic' can still be directly extended by implementing get_next_range and get_first_start methods.* Targets can now specify a list of bulk actions in bulk_actions(). core_analytics\prediction_action is nowextending core_analytics\action and a new core_analytics\bulk_action class has been added. Actions can nowspecify a type in its constructor: core_analytics\action::TYPE_POSITIVE, TYPE_NEUTRAL or TYPE_NEGATIVE. A listof default bulk actions is available in \core_analytics\default_bulk_actions.* The default suggested actions provided to users changed:* For targets with one single sample per analysable (e.g. upcoming activities due) the default actions areUseful and Not useful.* For targets with multiple samples per analysable (e.g. students at risk) the default actions areAccept, Not applicable and Incorrectly flagged.* The suggested actions for the existing models have been reworded:* Predictions flagged as "Acknowledged" in models whose targets use analysers that provide one sample peranalysable (e.g. upcoming activities due) have been updated to "Useful" flag.* Predictions flagged as "Not useful" in models whose targets use analysers that provide multiple samplesper analysable (e.g. students at risk or no teaching) have been updated to "Incorrectly flagged".* \core_analytics\predictor::delete_output_dir has a new 2nd parameter, $uniquemodelid.* Analyser's get_analysables_iterator and get_iterator_sql have a new $contexts parameter to limit the returned analysables tothe ones that depend on the provided contexts.* Analysers can implement a context_restriction_support() method to restrict models to a subset of thecontents in the site. Only CONTEXT_COURSE and CONTEXT_COURSECAT are supported.=== 3.7 ===* \core_analytics\regressor::evaluate_regression and \core_analytics\classifier::evaluate_classificationhave been updated to include a new $trainedmodeldir param. This new param will be used to evaluate theexisting trained model.* Plugins and core subsystems can now declare default prediction models by describing them intheir db/analytics.php file. Models should not be created manually via the db/install.phpfile any more.* The method \core_analytics\manager::add_builtin_models() has been deprecated. The functionalityhas been replaced with automatic update of models provided by the core moodle component. Thereis no need to call this method explicitly any more. Instead, adding new models can be achievedby updating the lib/db/analytics.php file and bumping the core version.* \core_analytics\model::execute_prediction_callbacks now returns an array with both sample's contextsand the prediction records.* \core_analytics\model::export() now expects the renderer instance as an argument.* Time splitting methods:* \core_analytics\local\time_splitting\base::append_rangeindex and\core_analytics\local\time_splitting\base::infer_sample_info are now marked as final and can notbe overwritten.* Can now overwrite include_range_info_in_training_data() andget_training_ranges() methods. They can be used to create time splitting methods with a pre-definednumber of ranges.* Can now overwrite cache_indicator_calculations(). You should return false if the time frames generatedby your time-splitting method are unique and / or can hardly be reused by further models.* Can now overwrite valid_for_evaluation(). You can return false if the time-splitting method can not beused to evaluate prediction models or if it does not make sense to evaluate prediction models with it,as for example upcoming_periodic children classes.* \core_analytics\local\analyser\base::get_most_recent_prediction_range has been moved to\core_analytics\local\time_splitting\base::get_most_recent_prediction_range and it is not overwritableby time splitting methods.* Targets:* The visibility of the following methods must now be public: ignored_predicted_classes()and get_insights_users()* Prediction_actions() has now a 3rd parameter $isinsightuser. This parameter is truewhen we are listing actions for the user that will receives the insight.* Can now implement a always_update_analysis_time() method so analysable elements' timeanalysed isonly updated when analysable elements have been successfully evaluated. It is useful for lightweight targets.* Can not implement two new methods to tune the insights generated by the model: get_insight_subject()and get_insight_context_url().* Analysers:* The visibility of get_all_samples() method must now be public.* get_analysables() method has been deprecated in favour of a new get_analysables_interator()for performance reasons.* Can overwrite a new one_sample_per_analysable() method if the analysables they use only haveone sample. The insights generated by models will then include the suggested actions inthe notification.=== 3.5 ===* There are two new methods for analysers, processes_user_data() and join_sample_user(). Youneed to overwrite them if your analyser uses user data. As a general statement, you shouldoverwrite these new methods if your samples return 'user' data. These new methods are usedfor analytics' privacy API implementation.