choosecoursefile file selection fixed

This commit is contained in:
skodak
2007-01-11 11:33:44 +00:00
parent 5b4d9f8f68
commit 7dc22930f7
+3 -1
View File
@@ -75,7 +75,9 @@ class MoodleQuickForm_choosecoursefile extends MoodleQuickForm_group
} else {
$courseid=$COURSE->id;
}
$url="/files/index.php?id=$courseid&choose=id_".$this->getElementName(0);
// first find out the text field id - this is a bit hacky, is there a better way?
$choose = 'id_'.str_replace(array('[', ']'), array('_', ''), $this->getElementName(0));
$url="/files/index.php?id=$courseid&choose=".$choose;
if ($this->_options['options'] == 'none') {
$options = 'menubar=0,location=0,scrollbars,resizable,width='. $this->_options['width'] .',height='. $this->_options['height'];