function theme_quiz_user_summary in Quiz 5
Same name and namespace in other branches
- 8.4 quiz.pages.inc \theme_quiz_user_summary()
- 5.2 quiz.module \theme_quiz_user_summary()
- 6.6 quiz.pages.inc \theme_quiz_user_summary()
- 6.2 quiz.pages.inc \theme_quiz_user_summary()
- 6.3 quiz.pages.inc \theme_quiz_user_summary()
- 6.4 quiz.pages.inc \theme_quiz_user_summary()
- 6.5 quiz.pages.inc \theme_quiz_user_summary()
- 7 quiz.pages.inc \theme_quiz_user_summary()
- 7.4 quiz.pages.inc \theme_quiz_user_summary()
Theme the summary page for user results
Parameters
$quiz: The quiz node object
$questions: The questions array as defined by _quiz_get_answers
$score: Array of score information as returned by quiz_calculate_score()
$summary: Filtered text of the summary
Return value
Themed html
1 theme call to theme_quiz_user_summary()
File
- ./
quiz.module, line 1823 - Quiz Module
Code
function theme_quiz_user_summary($quiz, $questions, $score, $summary) {
// Set the title here so themers can adjust
drupal_set_title(check_plain($quiz->title));
// Display overall result
$output = '';
$output .= '<div id="quiz_score_possible">' . t('You got %num_correct of %question_count correct.', array(
'%num_correct' => $score['num_correct'],
'%question_count' => $score['question_count'],
)) . '</div>' . "\n";
$output .= '<div id="quiz_score_percent">' . t('Your score was: @score%', array(
'@score' => $score['percentage_score'],
)) . '</div><br />' . "\n";
$output .= '<div id="quiz_summary">' . $summary . '</div><br />' . "\n";
// Get the feedback for all questions
$output .= theme('quiz_feedback', $questions, FALSE, TRUE);
return $output;
}