MDL-65839 core_analytics: New indicator instances for each analysable

This commit is contained in:
David Monllaó
2019-06-28 21:00:04 +02:00
parent 7ec1804935
commit 39db57c3ee
2 changed files with 14 additions and 1 deletions
+2 -1
View File
@@ -313,7 +313,8 @@ class analysis {
}
try {
$indicators = $this->analyser->get_indicators();
// Instantiate empty indicators to ensure that no garbage is dragged from previous analyses.
$indicators = $this->analyser->instantiate_indicators();
foreach ($indicators as $key => $indicator) {
// The analyser attaches the main entities the sample depends on and are provided to the
// indicator to calculate the sample.