Fixed incorrect setting of 'fileid' form element

This commit is contained in:
Mark Nelson 2017-08-27 16:23:47 +08:00
parent 2b79d6c58b
commit 43a4b8b8e7

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