mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Merge branch 'MDL-32188' of git://github.com/timhunt/moodle
Conflicts: lib/db/upgrade.php
This commit is contained in:
commit
cbf34f34cc
74 changed files with 1680 additions and 298 deletions
|
@ -209,7 +209,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',
|
||||
'slot', 'behaviour', 'questionid', 'maxmark', 'minfraction', 'maxfraction',
|
||||
'flagged', 'questionsummary', 'rightanswer', 'responsesummary',
|
||||
'timemodified'));
|
||||
|
||||
|
|
|
@ -4047,6 +4047,10 @@ abstract class restore_questions_activity_structure_step extends restore_activit
|
|||
$data->questionid = $question->newitemid;
|
||||
$data->timemodified = $this->apply_date_offset($data->timemodified);
|
||||
|
||||
if (!property_exists($data, 'maxfraction')) {
|
||||
$data->maxfraction = 1;
|
||||
}
|
||||
|
||||
$newitemid = $DB->insert_record('question_attempts', $data);
|
||||
|
||||
$this->set_mapping($nameprefix . 'question_attempt', $oldid, $newitemid);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue