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());
    }
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());
    }
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 ( ) ) ; }
Returns true if the user is able to request a new course be created.
@return bool
Returns true if the user is able to request a new course be created .