/** * Adds the enrolment table for this class, and the custom field tables, if necessary, to the JOIN sql. * * @param array $filters An array of active filters to use to determne join sql. * @return array An array of JOIN sql fragments. */ protected function get_join_sql(array $filters = array()) { $joinsql = parent::get_join_sql($filters); $joinsql[] = 'LEFT JOIN {local_elisprogram_cls_enrol} enrol ON enrol.classid=' . $this->classid . ' AND enrol.userid = element.id'; return $joinsql; }