Merge branch 'MDL-38892' of git://github.com/rwijaya/moodle
This commit is contained in:
@@ -20,7 +20,7 @@ class mod_data_import_form extends moodleform {
|
||||
$mform->setDefault('fielddelimiter', 'comma');
|
||||
|
||||
$mform->addElement('text', 'fieldenclosure', get_string('fieldenclosure', 'data'));
|
||||
|
||||
$mform->setType('fieldenclosure', PARAM_CLEANHTML);
|
||||
$choices = textlib::get_encodings();
|
||||
$mform->addElement('select', 'encoding', get_string('fileencoding', 'mod_data'), $choices);
|
||||
$mform->setDefault('encoding', 'UTF-8');
|
||||
|
||||
+1
-1
@@ -176,7 +176,7 @@ if (optional_param('sesskey', false, PARAM_BOOL) && confirm_sesskey()) {
|
||||
echo $OUTPUT->footer();
|
||||
exit(0);
|
||||
} else {
|
||||
$action = optional_param('action', null, PARAM_ALPHA);
|
||||
$action = optional_param('action', null, PARAM_ALPHANUM);
|
||||
$fullname = optional_param('fullname', '', PARAM_PATH); // directory the preset is in
|
||||
//
|
||||
// find out preset owner userid and shortname
|
||||
|
||||
@@ -12,7 +12,9 @@ class data_existing_preset_form extends moodleform {
|
||||
$this->_form->addHelpButton('presets', 'usestandard', 'data');
|
||||
|
||||
$this->_form->addElement('hidden', 'd');
|
||||
$this->_form->setType('d', PARAM_INT);
|
||||
$this->_form->addElement('hidden', 'action', 'confirmdelete');
|
||||
$this->_form->setType('action', PARAM_ALPHANUM);
|
||||
$delete = get_string('delete');
|
||||
foreach ($this->_customdata['presets'] as $preset) {
|
||||
$this->_form->addElement('radio', 'fullname', null, ' '.$preset->description, $preset->userid.'/'.$preset->shortname);
|
||||
@@ -27,7 +29,9 @@ class data_import_preset_zip_form extends moodleform {
|
||||
$this->_form->addHelpButton('uploadpreset', 'fromfile', 'data');
|
||||
|
||||
$this->_form->addElement('hidden', 'd');
|
||||
$this->_form->setType('d', PARAM_INT);
|
||||
$this->_form->addElement('hidden', 'action', 'importzip');
|
||||
$this->_form->setType('action', PARAM_ALPHANUM);
|
||||
$this->_form->addElement('filepicker', 'importfile', get_string('chooseorupload', 'data'));
|
||||
$this->_form->addRule('importfile', null, 'required');
|
||||
$this->_form->addElement('submit', 'uploadzip', get_string('import'));
|
||||
@@ -38,7 +42,9 @@ class data_export_form extends moodleform {
|
||||
public function definition() {
|
||||
$this->_form->addElement('header', 'exportheading', get_string('exportaszip', 'data'));
|
||||
$this->_form->addElement('hidden', 'd');
|
||||
$this->_form->setType('d', PARAM_INT);
|
||||
$this->_form->addElement('hidden', 'action', 'export');
|
||||
$this->_form->setType('action', PARAM_ALPHANUM);
|
||||
$this->_form->addElement('submit', 'export', get_string('export', 'data'));
|
||||
}
|
||||
}
|
||||
@@ -47,7 +53,9 @@ class data_save_preset_form extends moodleform {
|
||||
public function definition() {
|
||||
$this->_form->addElement('header', 'exportheading', get_string('saveaspreset', 'data'));
|
||||
$this->_form->addElement('hidden', 'd');
|
||||
$this->_form->setType('d', PARAM_INT);
|
||||
$this->_form->addElement('hidden', 'action', 'save2');
|
||||
$this->_form->setType('action', PARAM_ALPHANUM);
|
||||
$this->_form->addElement('text', 'name', get_string('name'));
|
||||
$this->_form->setType('name', PARAM_FILE);
|
||||
$this->_form->addRule('name', null, 'required');
|
||||
|
||||
Reference in New Issue
Block a user