function theme_quiz_h5p_response in Quiz 7.4
Theme function for user response report
Parameters
array $variables User response data:
Return value
bool|string User response report
1 theme call to theme_quiz_h5p_response()
- QuizQuestionH5PResponse::getReportFormResponse in question_types/
quiz_h5p/ QuizQuestionH5PResponse.class.inc - Implements getReportFormResponse of QuizQuestionResponse interface
File
- question_types/
quiz_h5p/ theme/ quiz_h5p.theme.inc, line 10
Code
function theme_quiz_h5p_response($variables) {
$H5PReport = H5PReport::getInstance();
$reportHtml = $H5PReport
->generateReport($variables['question']);
// Add styles used during processing
$module_path = drupal_get_path('module', 'quiz_h5p');
foreach ($H5PReport
->getStylesUsed() as $style) {
drupal_add_css("{$module_path}/report/{$style}");
}
return $reportHtml;
}