public static function get_user_competency_by_id($usercompetencyid) {
        static::require_enabled();
        $uc = new user_competency($usercompetencyid);
        if (!$uc->can_read()) {
            throw new required_capability_exception($uc->get_context(), 'moodle/competency:usercompetencyview',
                'nopermissions', '');
        }
        return $uc;
    }
public static function get_user_competency_by_id($usercompetencyid) {
        static::require_enabled();
        $uc = new user_competency($usercompetencyid);
        if (!$uc->can_read()) {
            throw new required_capability_exception($uc->get_context(), 'moodle/competency:usercompetencyview',
                'nopermissions', '');
        }
        return $uc;
    }
public static function get_user_competency_by_id ( $ usercompetencyid ) { static :: require_enabled ( ) ; $ uc = new user_competency ( $ usercompetencyid ) ; if ( ! $ uc -> can_read ( ) ) { throw new required_capability_exception ( $ uc -> get_context ( ) , 'moodle/competency:usercompetencyview' , 'nopermissions' , '' ) ; } return $ uc ; }
Get a user competency by ID.

@param int $usercompetencyid The user competency ID.
@return user_competency
Get a user competency by ID .