diff --git a/backup/moodle2/restore_qtype_plugin.class.php b/backup/moodle2/restore_qtype_plugin.class.php index 60f599a38b9..7520aa31910 100644 --- a/backup/moodle2/restore_qtype_plugin.class.php +++ b/backup/moodle2/restore_qtype_plugin.class.php @@ -181,7 +181,7 @@ abstract class restore_qtype_plugin extends restore_plugin { $info = new stdClass(); $info->filequestionid = $oldquestionid; $info->dbquestionid = $newquestionid; - $info->answer = $data->answertext; + $info->answer = s($data->answertext); throw new restore_step_exception('error_question_answers_missing_in_db', $info); } $newitemid = $this->questionanswercache[$data->answertext]; diff --git a/lang/en/error.php b/lang/en/error.php index 6e8f4157386..93db2e57ee6 100644 --- a/lang/en/error.php +++ b/lang/en/error.php @@ -224,6 +224,7 @@ $string['duplicateroleshortname'] = 'There is already a role with this short nam $string['duplicateusername'] = 'Duplicate username - skipping record'; $string['emailfail'] = 'Emailing failed'; $string['error'] = 'Error occurred'; +$string['error_question_answers_missing_in_db'] = 'Failed to find an answer matching "{$a->answer}" in the question_answers database table. This occurred while restoring the question with id {$a->filequestionid} in the backup file, which has been matched to the existing question with id {$a->dbquestionid} in the database.'; $string['errorprocessingarchive'] = 'Error processing archive file'; $string['errorcleaningdirectory'] = 'Error cleaning directory "{$a}"'; $string['errorcopyingfiles'] = 'Error copying files';