]> git.mjollnir.org Git - moodle.git/commitdiff
"MDL-18520, use select instead radio button in admin page"
authordongsheng <dongsheng>
Wed, 29 Jul 2009 02:39:33 +0000 (02:39 +0000)
committerdongsheng <dongsheng>
Wed, 29 Jul 2009 02:39:33 +0000 (02:39 +0000)
repository/filesystem/repository.class.php

index 2d54ff86095dbdc20a4d6960b240e6ffa31500bf..c5f64a4fb0967c8a0056a34e82290ca42ec8d88d 100644 (file)
@@ -130,12 +130,14 @@ class repository_filesystem extends repository {
         $path = $CFG->dataroot . '/repository/';
         if ($handle = opendir($path)) {
             $fieldname = get_string('path', 'repository_filesystem');
+            $choices = array();
             while (false !== ($file = readdir($handle))) {
                 if (is_dir($path.$file) && $file != '.' && $file!= '..') {
-                    $mform->addElement('radio', 'fs_path', $fieldname, $file, $file);
+                    $choices[$file] = $file;
                     $fieldname = '';
                 }
             }
+            $mform->addElement('select', 'fs_path', $fieldname, $choices);
             closedir($handle);
         }
         $mform->addElement('static', null, '',  get_string('information','repository_filesystem'));