public function write_setting($data) {
        if (!is_array($data)) {
            return '';
        }

        $seconds = (int)($data['v']*$data['u']);
        if ($seconds < 0) {
            return get_string('errorsetting', 'admin');
        }

        $result = $this->config_write($this->name, $seconds);
        return ($result ? '' : get_string('errorsetting', 'admin'));
    }
public function write_setting($data) {
        if (!is_array($data)) {
            return '';
        }

        $seconds = (int)($data['v']*$data['u']);
        if ($seconds < 0) {
            return get_string('errorsetting', 'admin');
        }

        $result = $this->config_write($this->name, $seconds);
        return ($result ? '' : get_string('errorsetting', 'admin'));
    }
public function write_setting ( $ data ) { if ( ! is_array ( $ data ) ) { return '' ; } $ seconds = ( int ) ( $ data [ 'v' ] * $ data [ 'u' ] ) ; if ( $ seconds < 0 ) { return get_string ( 'errorsetting' , 'admin' ) ; } $ result = $ this -> config_write ( $ this -> name , $ seconds ) ; return ( $ result ? '' : get_string ( 'errorsetting' , 'admin' ) ) ; }
Store the duration as seconds.

@param array $data Must be form 'h'=>xx, 'm'=>xx
@return bool true if success, false if not
Store the duration as seconds .