public function get_enrolment_instance_names($onlyenabled = false) {
        if ($this->_inames === null) {
            $instances = $this->get_enrolment_instances($onlyenabled);
            $plugins = $this->get_enrolment_plugins(false);
            foreach ($instances as $key=>$instance) {
                if (!isset($plugins[$instance->enrol])) {
                    // weird, some broken stuff in plugin
                    unset($instances[$key]);
                    continue;
                }
                $this->_inames[$key] = $plugins[$instance->enrol]->get_instance_name($instance);
            }
        }
        return $this->_inames;
    }
public function get_enrolment_instance_names($onlyenabled = false) {
        if ($this->_inames === null) {
            $instances = $this->get_enrolment_instances($onlyenabled);
            $plugins = $this->get_enrolment_plugins(false);
            foreach ($instances as $key=>$instance) {
                if (!isset($plugins[$instance->enrol])) {
                    // weird, some broken stuff in plugin
                    unset($instances[$key]);
                    continue;
                }
                $this->_inames[$key] = $plugins[$instance->enrol]->get_instance_name($instance);
            }
        }
        return $this->_inames;
    }
public function get_enrolment_instance_names ( $ onlyenabled = false ) { if ( $ this -> _inames === null ) { $ instances = $ this -> get_enrolment_instances ( $ onlyenabled ) ; $ plugins = $ this -> get_enrolment_plugins ( false ) ; foreach ( $ instances as $ key => $ instance ) { if ( ! isset ( $ plugins [ $ instance -> enrol ] ) ) { // weird, some broken stuff in plugin unset ( $ instances [ $ key ] ) ; continue ; } $ this -> _inames [ $ key ] = $ plugins [ $ instance -> enrol ] -> get_instance_name ( $ instance ) ; } } return $ this -> _inames ; }
Returns the names for all of the enrolment instances for this course.

@param bool $onlyenabled Whether to return data from enabled enrolment instance names only.
@return array
Returns the names for all of the enrolment instances for this course .