public function MultichoiceResponse::isAllWrong in Quiz 7.5
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.4 question_types/multichoice/multichoice.classes.inc \MultichoiceResponse::isAllWrong()
Checks if all answers in a question are wrong.
Return value
bool 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 940 - Multichoice classes.
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;
}