|
|
@ -54,7 +54,7 @@ class restore_game_activity_structure_step extends restore_activity_structure_st |
|
|
|
$paths[] = new restore_path_element('game_grade', '/activity/game/game_grades/game_grade'); |
|
|
|
$paths[] = new restore_path_element('game_repetition', '/activity/game/game_repetiotions/game_repetition'); |
|
|
|
$paths[] = new restore_path_element('game_attempt', '/activity/game/game_attempts/game_attempt'); |
|
|
|
$paths[] = new restore_path_element('game_query', '/activity/game/game_attempts/game_attempt/game_querys/game_query'); |
|
|
|
$paths[] = new restore_path_element('game_query', '/activity/game/game_attempts/game_attempt/game_queries/game_query'); |
|
|
|
|
|
|
|
// The games. |
|
|
|
$paths[] = new restore_path_element('game_bookquiz', '/activity/game/game_attempts/game_attempt/game_bookquiz'); |
|
|
@ -215,14 +215,16 @@ class restore_game_activity_structure_step extends restore_activity_structure_st |
|
|
|
$oldid = $data->id; |
|
|
|
|
|
|
|
$data->gameid = $this->get_new_parentid('game'); |
|
|
|
$data->attemptid = get_mappingid('game_attempt', $data->attemptid); |
|
|
|
$data->attemptid = $this->get_new_parentid('game_attempt'); |
|
|
|
|
|
|
|
$data->userid = $this->get_mappingid('user', $data->userid); |
|
|
|
$data->questionid = $this->get_mappingid('question', $data->questionid); |
|
|
|
$data->glossaryentryid = $this->get_mappingid('glossary_entries', $data->glossaryentryid); |
|
|
|
$data->glossaryentryid = $this->get_mappingid('glossary_entry', $data->glossaryentryid); |
|
|
|
$data->answerid = $this->get_mappingid('question_answers', $data->answerid); |
|
|
|
|
|
|
|
$newitemid = $DB->insert_record('game_queries', $data); |
|
|
|
$this->set_mapping('game_query', $oldid, $newitemid); |
|
|
|
|
|
|
|
$this->set_mapping('game_queries', $oldid, $newitemid); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
@ -315,7 +317,7 @@ class restore_game_activity_structure_step extends restore_activity_structure_st |
|
|
|
$data = (object)$data; |
|
|
|
|
|
|
|
$data->id = $this->get_new_parentid('game_attempt'); |
|
|
|
$data->queryid = $this->get_mappingid('game_query', $data->queryid); |
|
|
|
$data->queryid = $this->get_mappingid('game_queries', $data->queryid); |
|
|
|
|
|
|
|
game_insert_record( 'game_hangman', $data); |
|
|
|
} |
|
|
|