From 07ce9b6434508d84fc5e381731601217321364bd Mon Sep 17 00:00:00 2001 From: dongsheng Date: Wed, 29 Jul 2009 02:39:33 +0000 Subject: [PATCH] "MDL-18520, use select instead radio button in admin page" --- repository/filesystem/repository.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/repository/filesystem/repository.class.php b/repository/filesystem/repository.class.php index 2d54ff8609..c5f64a4fb0 100644 --- a/repository/filesystem/repository.class.php +++ b/repository/filesystem/repository.class.php @@ -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')); -- 2.39.5