public function MultichoiceResponse::isAllWrong in Quiz 7.4
Same name and namespace in other branches
- 6.4 question_types/multichoice/multichoice.classes.inc \MultichoiceResponse::isAllWrong()
- 7.6 question_types/multichoice/multichoice.classes.inc \MultichoiceResponse::isAllWrong()
- 7 question_types/multichoice/multichoice.classes.inc \MultichoiceResponse::isAllWrong()
- 7.5 question_types/multichoice/multichoice.classes.inc \MultichoiceResponse::isAllWrong()
If all answers in a question is wrong
Return value
boolean TRUE if all answers are wrong. False otherwise.
1 call to MultichoiceResponse::isAllWrong()
- MultichoiceResponse::score in question_types/
multichoice/ multichoice.classes.inc - Implementation of score
File
- question_types/
multichoice/ multichoice.classes.inc, line 953 - The main classes for the multichoice question type.
Class
- MultichoiceResponse
- Extension of QuizQuestionResponse
Code
public function isAllWrong() {
foreach ($this->question->alternatives as $key => $alt) {
if ($alt['score_if_chosen'] > 0 || $alt['score_if_not_chosen'] > 0) {
return FALSE;
}
}
return TRUE;
}