public function can_request_course() {
        global $CFG;
        if (empty($CFG->enablecourserequests) || $this->id != $CFG->defaultrequestcategory) {
            return false;
        }
        return !$this->can_create_course() && has_capability('moodle/course:request', $this->get_context());
    }