Merge branch 'MDL-31386-master-1' of git://git.luns.net.uk/moodle

This commit is contained in:
Eloy Lafuente (stronk7)
2012-02-15 03:14:58 +01:00
@@ -170,7 +170,14 @@ class backup_lesson_activity_structure_step extends backup_activity_structure_st
FROM {lesson_pages}
WHERE lessonid = ? ORDER BY prevpageid",
array(backup::VAR_PARENTID));
$answer->set_source_table('lesson_answers', array('pageid' => backup::VAR_PARENTID));
// We use SQL here as answers must be ordered by id so that the restore gets them in the right order
$answer->set_source_sql('
SELECT *
FROM {lesson_answers}
WHERE pageid = :pageid
ORDER BY id',
array('pageid' => backup::VAR_PARENTID));
// Check if we are also backing up user information
if ($this->get_setting_value('userinfo')) {