You are here

public function ScaleResponse::save in Quiz 8.6

Same name and namespace in other branches
  1. 8.5 question_types/quiz_scale/src/Plugin/quiz/QuizQuestion/ScaleResponse.php \ScaleResponse::save()
  2. 6.6 question_types/scale/scale.classes.inc \ScaleResponse::save()
  3. 6.4 question_types/scale/scale.classes.inc \ScaleResponse::save()
  4. 7.6 question_types/scale/scale.classes.inc \ScaleResponse::save()
  5. 7 question_types/scale/scale.classes.inc \ScaleResponse::save()
  6. 7.4 question_types/scale/scale.classes.inc \ScaleResponse::save()
  7. 7.5 question_types/scale/scale.classes.inc \ScaleResponse::save()

Implementation of save().

See also

QuizQuestionResponse::save()

File

question_types/quiz_scale/src/Plugin/quiz/QuizQuestion/ScaleResponse.php, line 42

Class

ScaleResponse
Extension of QuizQuestionResponse.

Code

public function save() {
  db_merge('quiz_scale_user_answers')
    ->key(array(
    'result_answer_id' => $this->result_answer_id,
  ))
    ->fields(array(
    'answer_id' => $this->answer_id,
    'result_answer_id' => $this->result_answer_id,
  ))
    ->execute();
}