public function get_enrolment_instances($onlyenabled = false) {
        if ($this->_instances === null) {
            $this->_instances = enrol_get_instances($this->course->id, $onlyenabled);
        }
        return $this->_instances;
    }