You are here

protected function QuizQuestion::getFormat in Quiz 7.6

Same name and namespace in other branches
  1. 7.4 question_types/quiz_question/quiz_question.core.inc \QuizQuestion::getFormat()
  2. 7.5 question_types/quiz_question/quiz_question.core.inc \QuizQuestion::getFormat()

Utility function that returns the format of the node body

1 call to QuizQuestion::getFormat()
LongAnswerQuestion::getNodeView in question_types/long_answer/long_answer.classes.inc
Implementation of getNodeView

File

question_types/quiz_question/quiz_question.core.inc, line 414
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

protected function getFormat() {
  $node = isset($this->node) ? $this->node : $this->question;
  $body = field_get_items('node', $node, 'body');
  return isset($body[0]['format']) ? $body[0]['format'] : NULL;
}