MDL-47569 backup: Do not close questions tag if never opened

This can happen when restoring quizzes that
do not have any questions.
This commit is contained in:
Mark Nielsen 2014-10-07 11:48:35 -07:00
parent 95dc1e42d5
commit 292f663581

View File

@ -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');
}
}
/**