Fixed incorrect setting of 'fileid' form element

This commit is contained in:
Mark Nelson 2017-08-27 16:23:47 +08:00
parent be25ea3637
commit e406bb48c7

View file

@ -250,7 +250,7 @@ class element extends \mod_customcert\element {
$imageinfo = json_decode($this->get_data());
if ($file = $this->get_file()) {
$element = $mform->getElement('fileid');
$element->setValue($this->get_data());
$element->setValue($file->get_id());
$element = $mform->getElement('width');
$element->setValue($imageinfo->width);