public function ScaleResponse::save in Quiz 7
Same name and namespace in other branches
- 8.6 question_types/quiz_scale/src/Plugin/quiz/QuizQuestion/ScaleResponse.php \ScaleResponse::save()
- 8.5 question_types/quiz_scale/src/Plugin/quiz/QuizQuestion/ScaleResponse.php \ScaleResponse::save()
- 6.6 question_types/scale/scale.classes.inc \ScaleResponse::save()
- 6.4 question_types/scale/scale.classes.inc \ScaleResponse::save()
- 7.6 question_types/scale/scale.classes.inc \ScaleResponse::save()
- 7.4 question_types/scale/scale.classes.inc \ScaleResponse::save()
- 7.5 question_types/scale/scale.classes.inc \ScaleResponse::save()
Implementation of save
Overrides QuizQuestionResponse::save
See also
QuizQuestionResponse#save()
File
- question_types/
scale/ scale.classes.inc, line 579 - The main classes for the scale question type.
Class
- ScaleResponse
- Extension of QuizQuestionResponse
Code
public function save() {
$id = db_insert('quiz_scale_user_answers')
->fields(array(
'answer_id' => $this->answer_id,
'result_id' => $this->rid,
'question_vid' => $this->question->vid,
'question_nid' => $this->question->nid,
))
->execute();
}