You are here

function quiz_take_question_view in Quiz 6.4

Same name and namespace in other branches
  1. 8.4 quiz.module \quiz_take_question_view()
  2. 7 quiz.module \quiz_take_question_view()
  3. 7.4 quiz.module \quiz_take_question_view()

Create the view for a question the user is about to take.

Parameters

$question_node: The question node that should be rendered.

$quiz_node: The quiz node.

Return value

A string containing the body of the node.

Related topics

1 call to quiz_take_question_view()
quiz_take_quiz in ./quiz.module
Handles quiz taking.

File

./quiz.module, line 2002
Quiz Module

Code

function quiz_take_question_view($question_node, $quiz_node) {
  $question_node->allow_skipping = $quiz_node->allow_skipping;
  $question_node = node_build_content($question_node, FALSE, TRUE);
  node_invoke_nodeapi($question_node, 'alter', FALSE, TRUE);
  $question_node->body = drupal_render($question_node->content);
  return theme('quiz_single_question_node', $question_node);
}