"MDL-16697, fixed itemid in filepicker"

This commit is contained in:
dongsheng 2009-09-11 03:24:51 +00:00
parent d355865942
commit 2289c0e43d

View File

@ -82,6 +82,10 @@ class MoodleQuickForm_filepicker extends HTML_QuickForm_input {
$currentfile = $file->get_filename();
$draftvalue = 'value="'.$draftitemid.'"';
}
} else {
// no existing area info provided - let's use fresh new draft area
$this->setValue(file_get_unused_draft_itemid());
$draftitemid = $this->getValue();
}
if ($COURSE->id == SITEID) {
$context = get_context_instance(CONTEXT_SYSTEM);