private function ChoiceQuestion::updateAlternative in Quiz 6.6
1 call to ChoiceQuestion::updateAlternative()
- ChoiceQuestion::save in question_types/
choice/ choice.classes.inc - Implementation of save
File
- question_types/
choice/ choice.classes.inc, line 142 - The main classes for the choice question type.
Class
- ChoiceQuestion
- Implementation of QuizQuestion.
Code
private function updateAlternative($i) {
$sql = 'UPDATE {quiz_choice_answer}
SET answer = \'%s\', answer_format = %d, feedback_if_chosen = \'%s\',
feedback_if_chosen_format = %d, feedback_if_not_chosen = \'%s\',
feedback_if_not_chosen_format = %d, score_if_chosen = %d, score_if_not_chosen = %d
WHERE id = %d AND question_nid = %d AND question_vid = %d';
$short = $this->node->alternatives[$i];
db_query($sql, $short['answer'], $short['answer_format'], $short['feedback_if_chosen'], $short['feedback_if_chosen_format'], $short['feedback_if_not_chosen'], $short['feedback_if_not_chosen_format'], $short['score_if_chosen'], $short['score_if_not_chosen'], $short['id'], $this->node->nid, $this->node->vid);
}