mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Merge branch 'MDL-29048-m22' of git://github.com/ankitagarwal/moodle into MOODLE_22_STABLE
This commit is contained in:
commit
7259dbc551
1 changed files with 5 additions and 0 deletions
|
@ -66,6 +66,11 @@ class restore_glossary_activity_structure_step extends restore_activity_structur
|
||||||
if (!in_array($data->displayformat, $formats)) {
|
if (!in_array($data->displayformat, $formats)) {
|
||||||
$data->displayformat = 'dictionary';
|
$data->displayformat = 'dictionary';
|
||||||
}
|
}
|
||||||
|
if (!empty($data->mainglossary) and $data->mainglossary == 1 and
|
||||||
|
$DB->record_exists('glossary', array('mainglossary' => 1, 'course' => $this->get_courseid()))) {
|
||||||
|
// Only allow one main glossary in the course
|
||||||
|
$data->mainglossary = 0;
|
||||||
|
}
|
||||||
|
|
||||||
// insert the glossary record
|
// insert the glossary record
|
||||||
$newitemid = $DB->insert_record('glossary', $data);
|
$newitemid = $DB->insert_record('glossary', $data);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue