diff --git a/analytics/classes/local/analyser/courses.php b/analytics/classes/local/analyser/courses.php index 359686664bed7..5db36b1987bf0 100644 --- a/analytics/classes/local/analyser/courses.php +++ b/analytics/classes/local/analyser/courses.php @@ -66,13 +66,12 @@ public function sample_access_context($sampleid) { protected function get_all_samples(\core_analytics\analysable $course) { global $DB; - $coursedata = $course->get_course_data(); $context = \context_course::instance($course->get_id()); // Just 1 sample per analysable. return array( array($course->get_id() => $course->get_id()), - array($course->get_id() => array('course' => $course, 'context' => $context)) + array($course->get_id() => array('course' => $course->get_course_data(), 'context' => $context)) ); } diff --git a/analytics/tests/fixtures/test_target_shortname.php b/analytics/tests/fixtures/test_target_shortname.php index 858e6e1baaba2..9b5712de30e98 100644 --- a/analytics/tests/fixtures/test_target_shortname.php +++ b/analytics/tests/fixtures/test_target_shortname.php @@ -5,7 +5,7 @@ class test_target_shortname extends \core_analytics\local\target\binary { protected $predictions = array(); public function get_analyser_class() { - return '\core_analytics\local\analyser\courses'; + return '\core_analytics\local\analyser\site_courses'; } public static function classes_description() { diff --git a/analytics/tests/model_test.php b/analytics/tests/model_test.php index 1aa3ff98bce6c..decb11a3509a5 100644 --- a/analytics/tests/model_test.php +++ b/analytics/tests/model_test.php @@ -86,7 +86,7 @@ public function test_model_manager() { $this->assertInstanceOf('\core_analytics\local\analyser\base', $this->model->get_analyser()); $this->model->enable('\core_analytics\local\time_splitting\quarters'); - $this->assertInstanceOf('\core_analytics\local\analyser\courses', $this->model->get_analyser()); + $this->assertInstanceOf('\core_analytics\local\analyser\site_courses', $this->model->get_analyser()); } public function test_output_dir() {