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