forked from vfremaux/moodle-mod_flashcard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathimport_form.php
37 lines (26 loc) · 1.15 KB
/
import_form.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
/**
* This view allows checking deck states
*
* @package mod-flashcard
* @category mod
* @author Valery Fremaux ([email protected])
* @license http://www.gnu.org/copyleft/gpl.html GNU Public License
*/
require_once($CFG->libdir.'/formslib.php');
class flashcard_import_form extends moodleform{
function definition(){
$mform =& $this->_form;
$mform->addElement('hidden', 'what');
$mform->addElement('hidden', 'view');
$mform->addElement('hidden', 'id');
$mform->addElement('header', 'cardimport', '');
$fieldsepoptions[0] = ',';
$fieldsepoptions[1] = ':';
$fieldsepoptions[2] = ';';
$mform->addElement('select', 'fieldsep', get_string('fieldsep', 'flashcard'), $fieldsepoptions);
$mform->addElement('textarea', 'import', get_string('imported', 'flashcard'), array('ROWS' => 20, 'COLS' => 60));
$mform->addElement('checkbox', 'confirm', get_string('confirm', 'flashcard'), get_string('importadvice', 'flashcard'));
$this->add_action_buttons(true, get_string('import', 'flashcard'));
}
}