public static function get_relations_by_templateid($templateid) {
        global $DB;

        $params = array(
            'templateid' => $templateid
        );

        $relations = array();
        $records = $DB->get_records(self::TABLE, $params);
        foreach ($records as $record) {
            $relations[] = new template_cohort(0, $record);
        }

        return $relations;
    }