mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Avoid one notice when creating a new glossary.
This commit is contained in:
parent
33f48f030e
commit
48429e57e6
1 changed files with 4 additions and 2 deletions
|
@ -241,9 +241,11 @@ if (!$mainglossary or $mainglossary->id == $form->instance ) {
|
|||
//get and update available formats
|
||||
$recformats = glossary_get_available_formats();
|
||||
//reload current format, because of it has changed (deleted format)
|
||||
if (isset($form->id)) {
|
||||
if ($currentglossary = get_record("glossary",'id',$form->id)) {
|
||||
$form->displayformat = $currentglossary->displayformat;
|
||||
}
|
||||
}
|
||||
|
||||
$formats = array();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue