MDL-66091 report_insights: Unify contextwithinsights cache sets

This commit is contained in:
David Monllaó
2019-09-18 13:00:06 +08:00
parent 486e797c5f
commit 93e71c712d
4 changed files with 60 additions and 34 deletions
+17
View File
@@ -3449,3 +3449,20 @@ function get_courses_page($categoryid="all", $sort="c.sortorder ASC", $fields="c
$rs->close();
return $visiblecourses;
}
/**
* Returns the models that generated insights in the provided context.
*
* @deprecated since Moodle 3.8 MDL-66091 - please do not use this function any more.
* @todo MDL-65799 This will be deleted in Moodle 4.2
* @see \core_analytics\manager::cached_models_with_insights
* @param \context $context
* @return int[]
*/
function report_insights_context_insights(\context $context) {
debugging('report_insights_context_insights is deprecated. Please use ' .
'\core_analytics\manager::cached_models_with_insights instead', DEBUG_DEVELOPER);
return \core_analytics\manager::cached_models_with_insights($context);
}