]> git.mjollnir.org Git - moodle.git/commitdiff
[MDL-8407] Don't offer the semicolon in the CSV delimiter selection menu. Merged...
authorrobertall <robertall>
Sat, 31 May 2008 15:05:57 +0000 (15:05 +0000)
committerrobertall <robertall>
Sat, 31 May 2008 15:05:57 +0000 (15:05 +0000)
mod/data/export_form.php

index 512173f70bbd6a36eb2718b9614c8a799cf982e2..66545851e21818ba54cf0ebf1b7f3777ba89ce00 100644 (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') . '&nbsp;', 'csv');
         $typesarray[] = &MoodleQuickForm::createElement('select', 'delimiter_name', null, $choices);