public function write_setting($data) {
        $data = $this->validate($data);
        if ($data === false) {
            return  get_string('validateerror', 'admin');
        }
        return ($this->config_write($this->name, $data) ? '' : get_string('errorsetting', 'admin'));
    }
public function write_setting($data) {
        $data = $this->validate($data);
        if ($data === false) {
            return  get_string('validateerror', 'admin');
        }
        return ($this->config_write($this->name, $data) ? '' : get_string('errorsetting', 'admin'));
    }
public function write_setting ( $ data ) { $ data = $ this -> validate ( $ data ) ; if ( $ data === false ) { return get_string ( 'validateerror' , 'admin' ) ; } return ( $ this -> config_write ( $ this -> name , $ data ) ? '' : get_string ( 'errorsetting' , 'admin' ) ) ; }
Saves the setting

@param string $data
@return bool
Saves the setting