Fixed issue when creating an image element
The images were not loading in the filemanager. This meant that when the element was saved the images would be deleted for that course, affecting existing image elements as well.
This commit is contained in:
parent
136292f331
commit
9413d65ee0
9 changed files with 32 additions and 19 deletions
|
@ -95,7 +95,9 @@ class customcert_element_border extends customcert_element_base {
|
|||
* @param mod_customcert_edit_element_form $mform the edit_form instance
|
||||
*/
|
||||
public function definition_after_data($mform) {
|
||||
$this->element->width = $this->element->data;
|
||||
if (!empty($this->element->data)) {
|
||||
$this->element->width = $this->element->data;
|
||||
}
|
||||
parent::definition_after_data($mform);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue