public function MultichoiceQuestion::getNodeView in Quiz 6.4
Same name and namespace in other branches
- 7.6 question_types/multichoice/multichoice.classes.inc \MultichoiceQuestion::getNodeView()
- 7 question_types/multichoice/multichoice.classes.inc \MultichoiceQuestion::getNodeView()
- 7.4 question_types/multichoice/multichoice.classes.inc \MultichoiceQuestion::getNodeView()
- 7.5 question_types/multichoice/multichoice.classes.inc \MultichoiceQuestion::getNodeView()
Implementation of getNodeView
Overrides QuizQuestion::getNodeView
See also
QuizQuestion#getNodeView()
File
- question_types/
multichoice/ multichoice.classes.inc, line 325 - The main classes for the multichoice question type.
Class
- MultichoiceQuestion
- Extension of QuizQuestion.
Code
public function getNodeView() {
$content = parent::getNodeView();
if ($this->node->choice_random) {
$this
->shuffle($this->node->alternatives);
}
$content['answers'] = array(
'#value' => theme('multichoice_answer_node_view', $this->node->alternatives, $this
->viewCanRevealCorrect()),
'#weight' => 2,
);
return $content;
}