function theme_quiz_take_question in Quiz 6.3
Same name and namespace in other branches
- 5.2 quiz.module \theme_quiz_take_question()
- 5 quiz.module \theme_quiz_take_question()
- 6.6 quiz.pages.inc \theme_quiz_take_question()
- 6.2 quiz.pages.inc \theme_quiz_take_question()
- 6.5 quiz.pages.inc \theme_quiz_take_question()
Theme a question page.
Parameters
$quiz: The quiz node object.
$question_node: The question node.
Return value
Themed html.
Deprecated
This should not be used. Rendering is now done through the standard node rendering system.
File
- ./
quiz.pages.inc, line 375 - User pages.
Code
function theme_quiz_take_question($quiz, $question_node) {
//Calculation for quiz progress bar.
$number_of_questions = quiz_get_number_of_questions($quiz->vid, $quiz->nid);
$question_number = $number_of_questions - count($_SESSION['quiz_' . $quiz->nid]['quiz_questions']);
$question_node->question_number = $question_number;
// Set the title here in case themers want to do something different.
drupal_set_title(check_plain($quiz->title));
// Return the elements of the page.
$output = '';
$output .= theme('quiz_progress', $question_number, $number_of_questions);
$output .= module_invoke($question_node->type, 'render_question', $question_node);
return $output;
}