You are here

protected function QuizQuestion::getFormat in Quiz 7.5

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

Utility function that returns the format of the node body.

Return value

string|null The format of the node body

File

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

Class

QuizQuestion
A base implementation of a quiz_question.

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;
}