diff --git a/backup/cc/cc2moodle.php b/backup/cc/cc2moodle.php index 332a9562185..0728daca872 100644 --- a/backup/cc/cc2moodle.php +++ b/backup/cc/cc2moodle.php @@ -338,7 +338,7 @@ class cc2moodle { $replace_values = array($i, $i - 1, - $topic['title'], + entities::safexml($topic['title']), $node_node_course_sections_section_mods_mod); } else { diff --git a/backup/converter/moodle1/handlerlib.php b/backup/converter/moodle1/handlerlib.php index 5265fa01593..bbdfd7f97fb 100644 --- a/backup/converter/moodle1/handlerlib.php +++ b/backup/converter/moodle1/handlerlib.php @@ -1292,7 +1292,9 @@ class moodle1_question_bank_handler extends moodle1_xml_handler { * Closes the questions wrapper */ public function on_questions_end() { - $this->xmlwriter->end_tag('questions'); + if ($this->questionswrapperwritten) { + $this->xmlwriter->end_tag('questions'); + } } /**