Permalink
Browse files

MDL-35693 question engine: set id when saving a new question_attempt

  • Loading branch information...
1 parent c5575c6 commit daa3fe0ab68961b80d8ab88d1fb48a7f2af9aa5a @timhunt timhunt committed Sep 28, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 question/engine/datalib.php
@@ -117,6 +117,7 @@ public function insert_question_attempt(question_attempt $qa, $context) {
$record->responsesummary = $qa->get_response_summary();
$record->timemodified = time();
$record->id = $this->db->insert_record('question_attempts', $record);
+ $qa->set_database_id($record->id);
foreach ($qa->get_step_iterator() as $seq => $step) {
$this->insert_question_attempt_step($step, $record->id, $seq, $context);

0 comments on commit daa3fe0

Please sign in to comment.