public static function read_evidence($evidenceid) {
        static::require_enabled();

        $evidence = new evidence($evidenceid);
        $uc = new user_competency($evidence->get('usercompetencyid'));
        if (!$uc->can_read()) {
            throw new required_capability_exception($uc->get_context(), 'moodle/competency:usercompetencyview',
                'nopermissions', '');
        }

        return $evidence;
    }
public static function read_evidence($evidenceid) {
        static::require_enabled();

        $evidence = new evidence($evidenceid);
        $uc = new user_competency($evidence->get('usercompetencyid'));
        if (!$uc->can_read()) {
            throw new required_capability_exception($uc->get_context(), 'moodle/competency:usercompetencyview',
                'nopermissions', '');
        }

        return $evidence;
    }
public static function read_evidence ( $ evidenceid ) { static :: require_enabled ( ) ; $ evidence = new evidence ( $ evidenceid ) ; $ uc = new user_competency ( $ evidence -> get ( 'usercompetencyid' ) ) ; if ( ! $ uc -> can_read ( ) ) { throw new required_capability_exception ( $ uc -> get_context ( ) , 'moodle/competency:usercompetencyview' , 'nopermissions' , '' ) ; } return $ evidence ; }
Read an evidence.
@param int $evidenceid The evidence ID.
@return evidence
Read an evidence .