mirror of
https://github.com/moodle/moodle.git
synced 2025-03-18 22:50:19 +01:00
MDL-27787 Fix restore of matching quetsions backed up from Moodle 2.0.
This commit is contained in:
parent
7a5f3a3cc7
commit
d7ad6ac4ef
@ -71,6 +71,24 @@ class restore_qtype_match_plugin extends restore_qtype_plugin {
|
||||
|
||||
// If the question has been created by restore, we need to create its question_match too
|
||||
if ($questioncreated) {
|
||||
// Fill in some field that were added in 2.1, and so which may be missing
|
||||
// from backups made in older versions of Moodle.
|
||||
if (!isset($data->correctfeedback)) {
|
||||
$data->correctfeedback = '';
|
||||
$data->correctfeedbackformat = FORMAT_HTML;
|
||||
}
|
||||
if (!isset($data->partiallycorrectfeedback)) {
|
||||
$data->partiallycorrectfeedback = '';
|
||||
$data->partiallycorrectfeedbackformat = FORMAT_HTML;
|
||||
}
|
||||
if (!isset($data->incorrectfeedback)) {
|
||||
$data->incorrectfeedback = '';
|
||||
$data->incorrectfeedbackformat = FORMAT_HTML;
|
||||
}
|
||||
if (!isset($data->shownumcorrect)) {
|
||||
$data->shownumcorrect = 0;
|
||||
}
|
||||
|
||||
// Adjust some columns
|
||||
$data->question = $newquestionid;
|
||||
// Keep question_match->subquestions unmodified
|
||||
|
Loading…
x
Reference in New Issue
Block a user