public static function get_competency_by_usercompetencyid($id) {
        global $DB;
        $sql = "SELECT c.*
                  FROM {" . self::TABLE . "} uc
                  JOIN {" . competency::TABLE . "} c
                    ON c.id = uc.competencyid
                 WHERE uc.id = ?";
        $record = $DB->get_record_sql($sql, array($id), MUST_EXIST);
        return new competency(0, $record);
    }