MDL-49547 question restore: avoid tag-related notices.

This commit is contained in:
Tim Hunt
2015-03-26 15:31:36 +00:00
parent 20d38830ae
commit 95ef9d8095
+5
View File
@@ -3892,6 +3892,11 @@ class restore_create_categories_and_questions extends restore_structure_step {
$data = (object)$data;
$newquestion = $this->get_new_parentid('question');
$questioncreated = (bool) $this->get_mappingid('question_created', $this->get_old_parentid('question'));
if (!$questioncreated) {
// This question already exists in the question bank. Nothing for us to do.
return;
}
if (!empty($CFG->usetags)) { // if enabled in server
// TODO: This is highly inefficient. Each time we add one tag