You are here

function quiz_take_question_view in Quiz 7

Same name and namespace in other branches
  1. 8.4 quiz.module \quiz_take_question_view()
  2. 6.4 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 2113
Quiz Module

Code

function quiz_take_question_view($question_node, $quiz_node) {
  $question_node->allow_skipping = $quiz_node->allow_skipping;
  node_build_content($question_node, 'teaser');
  module_invoke_all('node_build_alter', $question_node, FALSE);

  //$question_node->body = drupal_render($question_node->content);
  return theme('quiz_single_question_node', array(
    'question_node' => $question_node,
  ));
}