-
New Feature
-
Resolution: Fixed
-
Blocker
-
3.7
-
MOODLE_37_STABLE
-
MOODLE_38_STABLE
-
MDL-64739_master -
MDL-60944 is scheduled for 3.7, it will allow people to create as many prediction models as they want, reusing the same target.
A new "Restrict model to the following contexts" option would allow people to set up separate predictive models for different course categories or courses. A model restricted to a set of contexts (just CONTEXT_COURSE and CONTEXT_COURSECAT) would limit the analysable elements used by the model to analysable elements whose context is equal to, or a child of, any of the contexts specified in "Restrict to the following contexts".
The required changes to core could be summarized here:
- A new field to 'models' db table (e.g. contexts)
- A new field in the edit model form (e.g. an autocomplete field with a list of courses and course categories)
- A new \core_analytics\local\analyser\base::supports_context_filtering() method to show/hide the new field (the point right above this one)
- Modifications to the analytics API to pre-fill options['filter'] with the list of contexts
- Modifications to core's get_analysables_iterator() implementations (core_analytics\local\analyser\by_course and core\analytics\analyser\users) to receive $this->options['filter'] as a parameter and take it into account
- A new helper method somewhere in core_analytics to return an SQL that joins with the context table and uses the ctx.path value of the provided context to filter out analysables that do not fit into the restricted list of contexts for the model. This method will be called by get_analysables() implementations where supports_context_filtering == true
- A modification to the current evaluation process, which supports a filter by course option. I would vote to just replace this filter by course for the filter by contextid/s
- A review of the analytics caching system to ensure we don't break anything
- Unit tests should be added to test everything. Specially helpful to detect possible issues in the point right above this one
I may be missing extra stuff, but those are the most critical points we need to cover.
- caused a regression
-
MDL-67038 'null' string in m_analytics_models since MDL-64739
- Closed
- has been marked as being related by
-
MDL-64775 Issues related to analytics models editing for 3.7
- Closed
-
MDL-65230 Recordset interface to get analysables
- Closed
- is blocked by
-
MDL-60944 Allow models to be created, deleted, imported and exported
- Closed
- is duplicated by
-
MDL-64947 Make "filter by course" analytics option available in web GUI
- Closed