quiz_question.theme.inc in Quiz 6.5
Same filename and directory in other branches
- 8.4 question_types/quiz_question/quiz_question.theme.inc
- 6.6 question_types/quiz_question/quiz_question.theme.inc
- 6.3 question_types/quiz_question/quiz_question.theme.inc
- 6.4 question_types/quiz_question/quiz_question.theme.inc
- 7.6 question_types/quiz_question/quiz_question.theme.inc
- 7 question_types/quiz_question/quiz_question.theme.inc
- 7.4 question_types/quiz_question/quiz_question.theme.inc
- 7.5 question_types/quiz_question/quiz_question.theme.inc
File
question_types/quiz_question/quiz_question.theme.incView source
<?php
/*
* @file
* Themes for the quiz question module.
*/
/**
* Implementation of theme_$type_report().
* Theme the feedback report for a quiz. This report is generated (typically) at the end of the quiz.
*/
function theme_quiz_question_report($question, $show_points, $show_feedback) {
if (!isset($question->answers[0])) {
drupal_set_message('No result could be calculated.', 'status');
return;
}
$answer = $question->answers[0];
$types = _quiz_get_question_types();
$constructor = $types[$question->type]['response provider'];
$result = new $constructor($answer['result_id'], $question);
return $result
->formatReport();
}
Functions
Name | Description |
---|---|
theme_quiz_question_report | Implementation of theme_$type_report(). Theme the feedback report for a quiz. This report is generated (typically) at the end of the quiz. |