protected function get_roleid_options($instance, $context) {
        if ($instance->id) {
            $roles = get_default_enrol_roles($context, $instance->roleid);
        } else {
            $roles = get_default_enrol_roles($context, $this->get_config('roleid'));
        }
        return $roles;
    }
protected function get_roleid_options($instance, $context) {
        if ($instance->id) {
            $roles = get_default_enrol_roles($context, $instance->roleid);
        } else {
            $roles = get_default_enrol_roles($context, $this->get_config('roleid'));
        }
        return $roles;
    }
protected function get_roleid_options ( $ instance , $ context ) { if ( $ instance -> id ) { $ roles = get_default_enrol_roles ( $ context , $ instance -> roleid ) ; } else { $ roles = get_default_enrol_roles ( $ context , $ this -> get_config ( 'roleid' ) ) ; } return $ roles ; }
Return an array of valid options for the roleid.

@param stdClass $instance
@param context $context
@return array
Return an array of valid options for the roleid .