Fixed incorrect setting of 'fileid' form element

This commit is contained in:
Mark Nelson 2017-08-27 16:23:47 +08:00
parent 7b04c7a67f
commit f75a943352

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);