Saves an array of submitted values
772472
protected function submitEditFile()
    {
        if ($this->isPosted('delete') && isset($this->data_file['file_id'])) {
            $this->deleteFile();
        } else if ($this->isPosted('save') && $this->validateEditFile()) {
            if (isset($this->data_file['file_id'])) {
                $this->updateFile();
            } else {
                $this->addFile();
            }
        }
    }
402072
protected function setSubmittedValues()
    {
        parent::setSubmittedValues();
        $submittedValues = $this->submittedValues;
        $this->submittedValues = array();

        foreach ($this->acumulusConfig->getKeys() as $key) {
            if (!$this->addIfIsset($this->submittedValues, $key, $submittedValues)) {
                // Add unchecked checkboxes and empty arrays,but only if they
                // were defined on the form.
                if ($this->isKey($key)) {
                    if ($this->isCheckbox($key)) {
                        $this->submittedValues[$key] = '';
                    } elseif ($this->isArray($key)) {
                        $this->submittedValues[$key] = array();
                    }
                }
            }
        }
    }
378601
function _handleDataUpdate() {
    const rawData = dataEditor.getValue();
    let freshData = null;

    try {
        freshData = evalDataString(rawData);
    } catch(e) {
        errors.push(new Error('Could not parse the data from the input field', rawData));
    }

    storage.setDataByKey(savedDataKey, freshData);

    if (freshData) {
        setNewChart();
    }
}
1050945
protected function submitSettings()
    {
        if ($this->isPosted('reset')) {
            $this->updateSettings(array());
        } else if ($this->isPosted('save') && $this->validateSettings()) {
            $this->updateSettings($this->getSubmitted());
        }
    }
1165948
function () {
            var selected = [];
            var items = this._data.items;
            for (var i = 0; i < items.length; i++) {
                if (!items[i].initiallyDisabled) {
                    selected.push(items[i].value);
                }
            }
            this.setSelectedValues(selected);
            if (this._data) {
                this.json.setValue(this._data, "focusIndex", 0);
            }
        }
1137629
public function save()
    {
        if( is_admin() && !empty( $_POST ) ) {
            do_action('wpExpressSettingsPageBeforeSave', $this, $_POST);

            foreach( $this->fields->toArray() as $fieldName => $field ) {

                $optionName = "{$this->fieldPrefix}{$fieldName}";

                if( isset( $_POST[$fieldName] ) ) {

                    update_option($optionName, $_POST[$fieldName]);
                    // Update the field value :D
                    $this->fields($fieldName)->setValue($_POST[$fieldName]);
                }

            }

            do_action('wpExpressSettingsPageAfterSave', $this, $_POST);
        }
    }
1252307
def process_submitters(self):
        """"""
        for submission in self.submissions.values():
            if submission.author and (self.distinguished or
                                      submission.distinguished is None):
                self.submitters[submission.author].append(submission)
10421
def submit(self, value):
    """"""
    # Add a batch dimension if necessary.
    if value.shape.ndims == self._sum.shape.ndims:
      value = value[None, ...]
    return tf.group(
        self._sum.assign_add(tf.reduce_sum(value, 0)),
        self._count.assign_add(tf.shape(value)[0]))
1318601
def submit(key, type, data, options={})
      @backend.submit(key, type, data, options)
    end
379385
protected function submitSettings()
    {
        if ($this->isPosted('clear_cache')) {
            $this->deleteCacheSettings();
        } else if ($this->isPosted('save') && $this->validateSettings()) {
            $this->updateSettings();
        }
    }
291897
def _save_results(self):
        """"""
        with open(self.results_file, 'w') as results_file:
            json.dump(self.results, results_file)
634087
function save()
    {
        $dirty_props = $this->_dirty; 

        if ($this->_vars)
        {   
            $dirty_vars = $this->_vars->getDirtyVariables();
            if ($dirty_vars)
            {
                $dirty_props['vars'] = $dirty_vars;
            }
        }
        
        $this->_api->doRequest('POST', $this->getBaseApiPath(), $dirty_props);        
        $this->_dirty = array();
        
        if ($this->_vars)
        {
            $this->_vars->clearDirtyVariables();
        }
    }
934337
function() {
			if ( $.fn.resetForm ) {
				$(this.currentForm).resetForm();
			}
			this.submitted = {};
			this.lastElement = null;
			this.prepareForm();
			this.hideErrors();
			this.elements().removeClass( this.settings.errorClass ).removeData( "previousValue" );
		}
1134661
private function setSubmittedDatasFromPost()
    {
        if (null !== $_POST) {
            // If ajax, check formData parameter
            if (!empty($_SERVER['HTTP_X_REQUESTED_WITH'])
                && strtolower($_SERVER['HTTP_X_REQUESTED_WITH']) == 'xmlhttprequest'
            ) {
                $keyValuePairs = explode('&', $_POST['formData']);
                array_walk(
                    $keyValuePairs,
                    function ($value) {
                        list($key, $postValue) = explode('=', $value);
                        $this->submittedData[$key] = urldecode($postValue);
                    }
                );
            } else {
                $this->submittedData = $_POST;
            }
        }
    }
1315869
public static function save_submission_parameters() {
        global $CFG;
        $instance = new assign(null, null, null);
        $pluginsubmissionparams = array();

        foreach ($instance->get_submission_plugins() as $plugin) {
            if ($plugin->is_visible()) {
                $pluginparams = $plugin->get_external_parameters();
                if (!empty($pluginparams)) {
                    $pluginsubmissionparams = array_merge($pluginsubmissionparams, $pluginparams);
                }
            }
        }

        return new external_function_parameters(
            array(
                'assignmentid' => new external_value(PARAM_INT, 'The assignment id to operate on'),
                'plugindata' => new external_single_structure(
                    $pluginsubmissionparams
                )
            )
        );
    }
433767
protected function prepareSubmittedOrderComponentsCheckout(array &$submitted)
    {
        foreach ($submitted['data']['components'] as $id => &$component) {

            if (!isset($component['price'])) {
                continue;
            }

            if (empty($component['price'])) {
                unset($submitted['data']['components'][$id]);
                continue;
            }

            $component['currency'] = $submitted['currency'];
            $component['price'] = $this->price->amount($component['price'], $submitted['currency']);
        }
    }
268189
function append(form_id, array_name, value) {
        this._checkInit(form_id);
        var formData = this._collection[form_id];
        formData.append(array_name, value);
    }