Skip to content
Browse files

Merge branch 'MDL-29048-m22' of git://github.com/ankitagarwal/moodle …

…into MOODLE_22_STABLE
  • Loading branch information...
2 parents 39949b5 + e2acc0a commit 7259dbc551b97cc2f703e9164193a602281a3c64 @stronk7 stronk7 committed Dec 20, 2011
Showing with 5 additions and 0 deletions.
  1. +5 −0 mod/glossary/backup/moodle2/restore_glossary_stepslib.php
View
5 mod/glossary/backup/moodle2/restore_glossary_stepslib.php
@@ -66,6 +66,11 @@ protected function process_glossary($data) {
if (!in_array($data->displayformat, $formats)) {
$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
$newitemid = $DB->insert_record('glossary', $data);

0 comments on commit 7259dbc

Please sign in to comment.
Something went wrong with that request. Please try again.