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);
    }
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);
    }
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 ) ; }
Fetch a competency by user competency ID.

This is a convenience method to attempt to efficiently fetch a competency when
the only information we have is the user_competency ID, in evidence for instance.

@param  int $id The user competency ID.
@return competency
Fetch a competency by user competency ID .