|
Moodle
2.2.1
http://www.collinsharper.com
|
00001 <?php 00002 if (!defined('MOODLE_INTERNAL')) { 00003 die('Direct access to this script is forbidden.'); 00004 } 00005 00006 require_once($CFG->libdir.'/formslib.php'); 00007 00008 class mod_glossary_import_form extends moodleform { 00009 00010 function definition() { 00011 global $CFG; 00012 $mform =& $this->_form; 00013 $cmid = $this->_customdata['id']; 00014 00015 $mform->addElement('filepicker', 'file', get_string('filetoimport', 'glossary')); 00016 $mform->addHelpButton('file', 'filetoimport', 'glossary'); 00017 $options = array(); 00018 $options['current'] = get_string('currentglossary', 'glossary'); 00019 $options['newglossary'] = get_string('newglossary', 'glossary'); 00020 $mform->addElement('select', 'dest', get_string('destination', 'glossary'), $options); 00021 $mform->addHelpButton('dest', 'destination', 'glossary'); 00022 $mform->addElement('checkbox', 'catsincl', get_string('importcategories', 'glossary')); 00023 $submit_string = get_string('submit'); 00024 $mform->addElement('hidden', 'id'); 00025 $mform->setType('id', PARAM_INT); 00026 $this->add_action_buttons(false, $submit_string); 00027 } 00028 }