本文整理汇总了PHP中MoodleQuickForm::updateSubmission方法的典型用法代码示例。如果您正苦于以下问题:PHP MoodleQuickForm::updateSubmission方法的具体用法?PHP MoodleQuickForm::updateSubmission怎么用?PHP MoodleQuickForm::updateSubmission使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MoodleQuickForm
的用法示例。
在下文中一共展示了MoodleQuickForm::updateSubmission方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
/**
* Internal method. Alters submitted data to be suitable for quickforms processing.
* Must be called when the form is fully set up.
*/
function _process_submission($method)
{
$submission = array();
if ($method == 'post') {
if (!empty($_POST)) {
$submission = $_POST;
}
} else {
$submission = array_merge_recursive($_GET, $_POST);
// emulate handling of parameters in xxxx_param()
}
// following trick is needed to enable proper sesskey checks when using GET forms
// the _qf__.$this->_formname serves as a marker that form was actually submitted
if (array_key_exists('_qf__' . $this->_formname, $submission) and $submission['_qf__' . $this->_formname] == 1) {
if (!confirm_sesskey()) {
print_error('invalidsesskey');
}
$files = $_FILES;
} else {
$submission = array();
$files = array();
}
$this->_form->updateSubmission($submission, $files);
}