function theme_quiz_take_question in Quiz 5
Same name and namespace in other branches
- 5.2 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.3 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
1 theme call to theme_quiz_take_question()
- quiz_take_quiz in ./
quiz.module - Handles quiz taking
File
- ./
quiz.module, line 1727 - Quiz Module
Code
function theme_quiz_take_question($quiz, $question_node) {
//Calculation for quiz progress bar
$number_of_questions = quiz_get_number_of_questions($quiz->nid);
$question_number = $number_of_questions - count($_SESSION['quiz_' . $quiz->nid]['quiz_questions']);
// 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;
}