You are here

public function QuizQuestion::getNodeView in OG Quiz 7

Retrieve information relevant for viewing the node.

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

Return value

Content array

1 call to QuizQuestion::getNodeView()
LongAnswerQuestion::getNodeView in includes/og_long_answer.php
Implementation of getNodeView
1 method overrides QuizQuestion::getNodeView()
LongAnswerQuestion::getNodeView in includes/og_long_answer.php
Implementation of getNodeView

File

includes/og_quiz_question.php, line 371
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_type_get_type($this->node);
  $content['question_type'] = array(
    '#markup' => '<div class="question_type_name">' . $type->name . '</div>',
    '#weight' => -2,
  );

  /*
  $question_body = field_get_items('node', $this->node, 'body');
  $content['question'] = array(
    '#markup' => '<div class="question-body">' . $question_body[0]['safe_value'] . '</div>',
    '#weight' => -1,
  );
  */
  return $content;
}