original_string: public function write_setting($data) {
          if ((string)$data === $this->yes) { // convert to strings before comparison
              $data = $this->yes;
          } else {
              $data = $this->no;
          }
          return ($this->config_write($this->name, $data) ? '' : get_string('errorsetting', 'admin'));
      }
code: public function write_setting($data) {
          if ((string)$data === $this->yes) { // convert to strings before comparison
              $data = $this->yes;
          } else {
              $data = $this->no;
          }
          return ($this->config_write($this->name, $data) ? '' : get_string('errorsetting', 'admin'));
      }
code_tokens: public function write_setting ( $ data ) { if ( ( string ) $ data === $ this -> yes ) { // convert to strings before comparison $ data = $ this -> yes ; } else { $ data = $ this -> no ; } return ( $ this -> config_write ( $ this -> name , $ data ) ? '' : get_string ( 'errorsetting' , 'admin' ) ) ; }
docstring: Sets the value for the setting
  
  Sets the value for the setting to either the yes or no values
  of the object by comparing $data to yes
  
  @param mixed $data Gets converted to str for comparison against yes value
  @return string empty string or error
docstring_tokens: Sets the value for the setting