original_string: public function check_shortname_collision($shortnamemark = '[*]') {
          global $DB;
  
          if ($this->properties->collision !== null) {
              return $this->properties->collision;
          }
  
          if (empty($this->properties->shortname)) {
              debugging('Attempting to check a course request shortname before it has been set', DEBUG_DEVELOPER);
              $this->properties->collision = false;
          } else if ($DB->record_exists('course', array('shortname' => $this->properties->shortname))) {
              if (!empty($shortnamemark)) {
                  $this->properties->shortname .= ' '.$shortnamemark;
              }
              $this->properties->collision = true;
          } else {
              $this->properties->collision = false;
          }
          return $this->properties->collision;
      }
code: public function check_shortname_collision($shortnamemark = '[*]') {
          global $DB;
  
          if ($this->properties->collision !== null) {
              return $this->properties->collision;
          }
  
          if (empty($this->properties->shortname)) {
              debugging('Attempting to check a course request shortname before it has been set', DEBUG_DEVELOPER);
              $this->properties->collision = false;
          } else if ($DB->record_exists('course', array('shortname' => $this->properties->shortname))) {
              if (!empty($shortnamemark)) {
                  $this->properties->shortname .= ' '.$shortnamemark;
              }
              $this->properties->collision = true;
          } else {
              $this->properties->collision = false;
          }
          return $this->properties->collision;
      }
code_tokens: public function check_shortname_collision ( $ shortnamemark = '[*]' ) { global $ DB ; if ( $ this -> properties -> collision !== null ) { return $ this -> properties -> collision ; } if ( empty ( $ this -> properties -> shortname ) ) { debugging ( 'Attempting to check a course request shortname before it has been set' , DEBUG_DEVELOPER ) ; $ this -> properties -> collision = false ; } else if ( $ DB -> record_exists ( 'course' , array ( 'shortname' => $ this -> properties -> shortname ) ) ) { if ( ! empty ( $ shortnamemark ) ) { $ this -> properties -> shortname .= ' ' . $ shortnamemark ; } $ this -> properties -> collision = true ; } else { $ this -> properties -> collision = false ; } return $ this -> properties -> collision ; }
docstring: Checks that the shortname used by the course does not conflict with any other
  courses that exist
  
  @param string|null $shortnamemark The string to append to the requests shortname
  should a conflict be found
  @return bool true is there is a conflict, false otherwise
docstring_tokens: Checks that the shortname used by the course does not conflict with any other courses that exist