mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +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,8 +241,10 @@ if (!$mainglossary or $mainglossary->id == $form->instance ) {
|
||||||
//get and update available formats
|
//get and update available formats
|
||||||
$recformats = glossary_get_available_formats();
|
$recformats = glossary_get_available_formats();
|
||||||
//reload current format, because of it has changed (deleted format)
|
//reload current format, because of it has changed (deleted format)
|
||||||
if ($currentglossary = get_record("glossary",'id',$form->id)) {
|
if (isset($form->id)) {
|
||||||
$form->displayformat = $currentglossary->displayformat;
|
if ($currentglossary = get_record("glossary",'id',$form->id)) {
|
||||||
|
$form->displayformat = $currentglossary->displayformat;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$formats = array();
|
$formats = array();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue