protected function QuizQuestion::getFormat in Quiz 7.4
Same name and namespace in other branches
- 7.6 question_types/quiz_question/quiz_question.core.inc \QuizQuestion::getFormat()
- 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 638 - 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;
}