public function TrueFalseResponse::save in Quiz 6.6
Same name and namespace in other branches
- 6.3 question_types/quiz_question/quiz_question.truefalse.inc \TrueFalseResponse::save()
- 6.4 question_types/truefalse/truefalse.classes.inc \TrueFalseResponse::save()
- 6.5 question_types/quiz_question/quiz_question.truefalse.inc \TrueFalseResponse::save()
- 7.6 question_types/truefalse/truefalse.classes.inc \TrueFalseResponse::save()
- 7 question_types/truefalse/truefalse.classes.inc \TrueFalseResponse::save()
- 7.4 question_types/truefalse/truefalse.classes.inc \TrueFalseResponse::save()
- 7.5 question_types/truefalse/truefalse.classes.inc \TrueFalseResponse::save()
File
- question_types/
truefalse/ truefalse.classes.inc, line 169 - Defines the classes necessary for a True/False quiz.
Class
Code
public function save() {
$sql = "INSERT INTO {quiz_truefalse_user_answers} (question_nid, question_vid, result_id, answer, score) VALUES (%d, %d, %d, %d, %d)";
db_query($sql, $this->question->nid, $this->question->vid, $this->rid, (int) $this->answer, (int) $this
->getScore());
}