public static function can_read_user($evidenceuserid) {
        $context = context_user::instance($evidenceuserid);

        $capabilities = array('moodle/competency:userevidenceview');

        return has_any_capability($capabilities, $context) || self::can_manage_user($evidenceuserid);
    }
public static function can_read_user($evidenceuserid) {
        $context = context_user::instance($evidenceuserid);

        $capabilities = array('moodle/competency:userevidenceview');

        return has_any_capability($capabilities, $context) || self::can_manage_user($evidenceuserid);
    }
public static function can_read_user ( $ evidenceuserid ) { $ context = context_user :: instance ( $ evidenceuserid ) ; $ capabilities = array ( 'moodle/competency:userevidenceview' ) ; return has_any_capability ( $ capabilities , $ context ) || self :: can_manage_user ( $ evidenceuserid ) ; }
Can the current user view a user's evidence?

@param  int $evidenceuserid The user to whom the evidence would belong.
@return bool
Can the current user view a user s evidence?