Skip to content
Browse files

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

  • Loading branch information...
1 parent 9273bd1 commit 0222cd954510a4bcfe47c3f05622e37294d51551 @timhunt timhunt committed Sep 28, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 question/engine/datalib.php
View
1 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 0222cd9

Please sign in to comment.
Something went wrong with that request. Please try again.