short_answer.theme.inc in Quiz 8.6
Same filename and directory in other branches
Theme functions for the short_answer question type.
File
question_types/quiz_short_answer/theme/short_answer.theme.incView source
<?php
/**
* @file
* Theme functions for the short_answer question type.
*/
/**
* Theme the short_answer answer.
*
* @param array $variables
*
* @return string
* An HTML string.
*/
function theme_short_answer_user_answer($variables) {
$answer = $variables['answer'];
$correct = $variables['correct'];
$header = array(
t('Correct Answer'),
t('User Answer'),
);
$row = array(
array(
$correct,
$answer,
),
);
return theme('table', array(
'header' => $header,
'rows' => $row,
));
}
/**
* Theme the short_answer response form.
*
* @param array $variables
*
* @return string
* An HTML string.
*/
function theme_short_answer_response_form($variables) {
$form = $variables['form'];
return drupal_render_children($form);
}
Functions
Name | Description |
---|---|
theme_short_answer_response_form | Theme the short_answer response form. |
theme_short_answer_user_answer | Theme the short_answer answer. |