public function MultichoiceQuestion::getNodeView in Quiz 7
Same name and namespace in other branches
- 6.4 question_types/multichoice/multichoice.classes.inc \MultichoiceQuestion::getNodeView()
- 7.6 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 368 - 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(
'#markup' => theme('multichoice_answer_node_view', array(
'alternatives' => $this->node->alternatives,
'show_correct' => $this
->viewCanRevealCorrect(),
)),
'#weight' => 2,
);
return $content;
}