MDL-63660 tool_dataprivacy: Increase expected export file size
[moodle.git] / mod / data / preset_form.php
blob53558586fc9cdd600936cbae5cdb70166848e62a
1 <?php
3 if (!defined('MOODLE_INTERNAL')) {
4 die('Direct access to this script is forbidden!');
6 require_once($CFG->libdir . '/formslib.php');
9 class data_existing_preset_form extends moodleform {
10 public function definition() {
11 $this->_form->addElement('header', 'presets', get_string('usestandard', 'data'));
12 $this->_form->addHelpButton('presets', 'usestandard', 'data');
14 $this->_form->addElement('hidden', 'd');
15 $this->_form->setType('d', PARAM_INT);
16 $this->_form->addElement('hidden', 'action', 'confirmdelete');
17 $this->_form->setType('action', PARAM_ALPHANUM);
18 $delete = get_string('delete');
19 foreach ($this->_customdata['presets'] as $preset) {
20 $this->_form->addElement('radio', 'fullname', null, ' '.$preset->description, $preset->userid.'/'.$preset->shortname);
22 $this->_form->addElement('submit', 'importexisting', get_string('choose'));
26 class data_import_preset_zip_form extends moodleform {
27 public function definition() {
28 $this->_form->addElement('header', 'uploadpreset', get_string('fromfile', 'data'));
29 $this->_form->addHelpButton('uploadpreset', 'fromfile', 'data');
31 $this->_form->addElement('hidden', 'd');
32 $this->_form->setType('d', PARAM_INT);
33 $this->_form->addElement('hidden', 'action', 'importzip');
34 $this->_form->setType('action', PARAM_ALPHANUM);
35 $this->_form->addElement('filepicker', 'importfile', get_string('chooseorupload', 'data'));
36 $this->_form->addRule('importfile', null, 'required');
37 $this->_form->addElement('submit', 'uploadzip', get_string('import'));
41 class data_export_form extends moodleform {
42 public function definition() {
43 $this->_form->addElement('header', 'exportheading', get_string('exportaszip', 'data'));
44 $this->_form->addElement('hidden', 'd');
45 $this->_form->setType('d', PARAM_INT);
46 $this->_form->addElement('hidden', 'action', 'export');
47 $this->_form->setType('action', PARAM_ALPHANUM);
48 $this->_form->addElement('submit', 'export', get_string('export', 'data'));
52 class data_save_preset_form extends moodleform {
53 public function definition() {
54 $this->_form->addElement('header', 'exportheading', get_string('saveaspreset', 'data'));
55 $this->_form->addElement('hidden', 'd');
56 $this->_form->setType('d', PARAM_INT);
57 $this->_form->addElement('hidden', 'action', 'save2');
58 $this->_form->setType('action', PARAM_ALPHANUM);
59 $this->_form->addElement('text', 'name', get_string('name'));
60 $this->_form->setType('name', PARAM_FILE);
61 $this->_form->addRule('name', null, 'required');
62 $this->_form->addElement('checkbox', 'overwrite', get_string('overwrite', 'data'), get_string('overrwritedesc', 'data'));
63 $this->_form->addElement('submit', 'saveaspreset', get_string('continue'));