Skip to content
Browse files

Merge branch 'MDL-44018_24' of git://github.com/timhunt/moodle into M…

…OODLE_24_STABLE
  • Loading branch information...
2 parents 9b19a46 + 16ae4b8 commit e50a4e2386b36a6926eeedc2823449592e31e019 @damyon damyon committed
Showing with 4 additions and 1 deletion.
  1. +1 −1 backup/moodle2/backup_stepslib.php
  2. +3 −0 backup/moodle2/restore_stepslib.php
View
2 backup/moodle2/backup_stepslib.php
@@ -210,7 +210,7 @@ protected function add_question_usages($element, $usageidname, $nameprefix = '')
$qas = new backup_nested_element($nameprefix . 'question_attempts');
$qa = new backup_nested_element($nameprefix . 'question_attempt', array('id'), array(
- 'slot', 'behaviour', 'questionid', 'maxmark', 'minfraction',
+ 'slot', 'behaviour', 'questionid', 'variant', 'maxmark', 'minfraction',
'flagged', 'questionsummary', 'rightanswer', 'responsesummary',
'timemodified'));
View
3 backup/moodle2/restore_stepslib.php
@@ -3837,6 +3837,9 @@ protected function restore_question_attempt_worker($data, $nameprefix) {
$data->questionusageid = $this->get_new_parentid($nameprefix . 'question_usage');
$data->questionid = $question->newitemid;
+ if (!property_exists($data, 'variant')) {
+ $data->variant = 1;
+ }
$data->timemodified = $this->apply_date_offset($data->timemodified);
$newitemid = $DB->insert_record('question_attempts', $data);

0 comments on commit e50a4e2

Please sign in to comment.
Something went wrong with that request. Please try again.