[MDL-8407] Don't offer the semicolon in the CSV delimiter selection menu. Merged from MOODLE_19_STABLE.

This commit is contained in:
robertall 2008-05-31 15:05:57 +00:00
parent 15f80fd887
commit 7f008c0502

View File

@ -18,6 +18,11 @@ class mod_data_export_form extends moodleform {
$mform =& $this->_form;
$mform->addElement('header', 'notice', get_string('chooseexportformat', 'data'));
$choices = csv_import_reader::get_delimiter_list();
$key = array_search(';', $choices);
if (! $key === FALSE) {
// array $choices contains the semicolon -> drop it (because its encrypted form also contains a semicolon):
unset($choices[$key]);
}
$typesarray = array();
$typesarray[] = &MoodleQuickForm::createElement('radio', 'exporttype', null, get_string('csvwithselecteddelimiter', 'data') . ' ', 'csv');
$typesarray[] = &MoodleQuickForm::createElement('select', 'delimiter_name', null, $choices);