public function get_all_samples(\core_analytics\analysable $course) {

        $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->get_course_data(), 'context' => $context))
        );
    }
public function get_all_samples(\core_analytics\analysable $course) {

        $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->get_course_data(), 'context' => $context))
        );
    }
public function get_all_samples ( \ core_analytics \ analysable $ course ) { $ 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 -> get_course_data ( ) , 'context' => $ context ) ) ) ; }
This will return just one course as we analyse 'by_course'.

@param \core_analytics\analysable $course
@return array
This will return just one course as we analyse by_course .