You are here

public function QuizQuestion::getNodeView in Quiz 6.4

Same name and namespace in other branches
  1. 7.6 question_types/quiz_question/quiz_question.core.inc \QuizQuestion::getNodeView()
  2. 7 question_types/quiz_question/quiz_question.core.inc \QuizQuestion::getNodeView()
  3. 7.4 question_types/quiz_question/quiz_question.core.inc \QuizQuestion::getNodeView()
  4. 7.5 question_types/quiz_question/quiz_question.core.inc \QuizQuestion::getNodeView()

Retrieve information relevant for viewing the node.

(This data is generally added to the node's extra field.)

Return value

Content array

6 calls to QuizQuestion::getNodeView()
LongAnswerQuestion::getNodeView in question_types/long_answer/long_answer.classes.inc
Implementation of getNodeView
MatchingQuestion::getNodeView in question_types/matching/matching.classes.inc
Implementation of getNodeView
MultichoiceQuestion::getNodeView in question_types/multichoice/multichoice.classes.inc
Implementation of getNodeView
ScaleQuestion::getNodeView in question_types/scale/scale.classes.inc
Implementation of getNodeView
ShortAnswerQuestion::getNodeView in question_types/short_answer/short_answer.classes.inc
Implementation of getNodeView

... See full list

6 methods override QuizQuestion::getNodeView()
LongAnswerQuestion::getNodeView in question_types/long_answer/long_answer.classes.inc
Implementation of getNodeView
MatchingQuestion::getNodeView in question_types/matching/matching.classes.inc
Implementation of getNodeView
MultichoiceQuestion::getNodeView in question_types/multichoice/multichoice.classes.inc
Implementation of getNodeView
ScaleQuestion::getNodeView in question_types/scale/scale.classes.inc
Implementation of getNodeView
ShortAnswerQuestion::getNodeView in question_types/short_answer/short_answer.classes.inc
Implementation of getNodeView

... See full list

File

question_types/quiz_question/quiz_question.core.inc, line 301
Classes used in the Quiz Question module.

Class

QuizQuestion
A base implementation of a quiz_question, adding a layer of abstraction between the node API, quiz API and the question types.

Code

public function getNodeView() {
  $type = node_get_types('type', $this->node);
  $content['question_type'] = array(
    '#type' => 'markup',
    '#value' => '<div class="question_type_name">' . $type->name . '</div>',
    '#weight' => -2,
  );
  $content['question'] = array(
    '#type' => 'markup',
    '#value' => '<div class="question-body">' . check_markup($this->node->body, $this->node->format, FALSE) . '</div>',
    '#weight' => -1,
  );
  return $content;
}