public static function read_user_evidence($id) {
        static::require_enabled();
        $userevidence = new user_evidence($id);

        if (!$userevidence->can_read()) {
            $context = $userevidence->get_context();
            throw new required_capability_exception($context, 'moodle/competency:userevidenceview', 'nopermissions', '');
        }

        return $userevidence;
    }
public static function read_user_evidence($id) {
        static::require_enabled();
        $userevidence = new user_evidence($id);

        if (!$userevidence->can_read()) {
            $context = $userevidence->get_context();
            throw new required_capability_exception($context, 'moodle/competency:userevidenceview', 'nopermissions', '');
        }

        return $userevidence;
    }
public static function read_user_evidence ( $ id ) { static :: require_enabled ( ) ; $ userevidence = new user_evidence ( $ id ) ; if ( ! $ userevidence -> can_read ( ) ) { $ context = $ userevidence -> get_context ( ) ; throw new required_capability_exception ( $ context , 'moodle/competency:userevidenceview' , 'nopermissions' , '' ) ; } return $ userevidence ; }
Read a user evidence.

@param int $id
@return user_evidence
Read a user evidence .