mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-44018 quesiton variant was not backed up or restored.
This commit is contained in:
parent
974c2cdc03
commit
3f87a74b60
2 changed files with 4 additions and 1 deletions
|
@ -216,7 +216,7 @@ abstract class backup_questions_activity_structure_step extends backup_activity_
|
|||
|
||||
$qas = new backup_nested_element($nameprefix . 'question_attempts');
|
||||
$qa = new backup_nested_element($nameprefix . 'question_attempt', array('id'), array(
|
||||
'slot', 'behaviour', 'questionid', 'maxmark', 'minfraction', 'maxfraction',
|
||||
'slot', 'behaviour', 'questionid', 'variant', 'maxmark', 'minfraction', 'maxfraction',
|
||||
'flagged', 'questionsummary', 'rightanswer', 'responsesummary',
|
||||
'timemodified'));
|
||||
|
||||
|
|
|
@ -4069,6 +4069,9 @@ abstract class restore_questions_activity_structure_step extends restore_activit
|
|||
|
||||
$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);
|
||||
|
||||
if (!property_exists($data, 'maxfraction')) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue