Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 44... Línea 44...
44
        }
44
        }
45
        $this->_form->addElement('submit', 'importexisting', get_string('choose'));
45
        $this->_form->addElement('submit', 'importexisting', get_string('choose'));
46
    }
46
    }
47
}
47
}
Línea 48... Línea -...
48
 
-
 
49
/**
-
 
50
 * Import preset class
-
 
51
 *
-
 
52
 *
-
 
53
 * @package   mod_data
-
 
54
 * @deprecated since 4.1 This is deprecated since MDL-75188, please use the dynamic_form
-
 
55
 *             form (\mod_data\form\import_presets)
-
 
56
 * @todo MDL-75189 This will be deleted in Moodle 4.5.
-
 
57
 */
-
 
58
class data_import_preset_zip_form extends moodleform {
-
 
59
    /**
-
 
60
     * Form definition
-
 
61
     *
-
 
62
     * @return void
-
 
63
     * @throws coding_exception
-
 
64
     */
-
 
65
    public function definition() {
-
 
66
        $this->_form->addElement('header', 'uploadpreset', get_string('fromfile', 'data'));
-
 
67
        $this->_form->addHelpButton('uploadpreset', 'fromfile', 'data');
-
 
68
 
-
 
69
        $this->_form->addElement('hidden', 'd');
-
 
70
        $this->_form->setType('d', PARAM_INT);
-
 
71
        $this->_form->addElement('hidden', 'mode', 'import');
-
 
72
        $this->_form->setType('mode', PARAM_ALPHANUM);
-
 
73
        $this->_form->addElement('hidden', 'action', 'importzip');
-
 
74
        $this->_form->setType('action', PARAM_ALPHANUM);
-
 
75
        $this->_form->addElement('filepicker', 'importfile', get_string('chooseorupload', 'data'));
-
 
76
        $this->_form->addRule('importfile', null, 'required');
-
 
77
        $buttons = [
-
 
78
            $this->_form->createElement('submit', 'submitbutton', get_string('save')),
-
 
79
            $this->_form->createElement('cancel'),
-
 
80
        ];
-
 
81
        $this->_form->addGroup($buttons, 'buttonar', '', [' '], false);
-
 
82
    }
-
 
83
}
-
 
84
 
48
 
85
class data_export_form extends moodleform {
49
class data_export_form extends moodleform {
86
    public function definition() {
50
    public function definition() {
87
        $this->_form->addElement('header', 'exportheading', get_string('exportaszip', 'data'));
51
        $this->_form->addElement('header', 'exportheading', get_string('exportaszip', 'data'));
88
        $this->_form->addElement('hidden', 'd');
52
        $this->_form->addElement('hidden', 'd');