Ejemplo n.º 1
0
 /**
  * Update a question_attempts row to refect any changes in a question_attempt
  * (but not any of its steps).
  * @param question_attempt $qa the question attempt that has changed.
  */
 public function update_question_attempt(question_attempt $qa)
 {
     $record = new stdClass();
     $record->id = $qa->get_database_id();
     $record->maxmark = $qa->get_max_mark();
     $record->minfraction = $qa->get_min_fraction();
     $record->maxfraction = $qa->get_max_fraction();
     $record->flagged = $qa->is_flagged();
     $record->questionsummary = $qa->get_question_summary();
     $record->rightanswer = $qa->get_right_answer_summary();
     $record->responsesummary = $qa->get_response_summary();
     $record->timemodified = time();
     $this->db->update_record('question_attempts', $record);
 }