You are here

function theme_short_answer_user_answer in Quiz 8.6

Same name and namespace in other branches
  1. 8.4 question_types/short_answer/short_answer.theme.inc \theme_short_answer_user_answer()
  2. 8.5 question_types/quiz_short_answer/theme/short_answer.theme.inc \theme_short_answer_user_answer()
  3. 6.4 question_types/short_answer/theme/short_answer.theme.inc \theme_short_answer_user_answer()
  4. 7.6 question_types/short_answer/theme/short_answer.theme.inc \theme_short_answer_user_answer()
  5. 7 question_types/short_answer/theme/short_answer.theme.inc \theme_short_answer_user_answer()
  6. 7.4 question_types/short_answer/theme/short_answer.theme.inc \theme_short_answer_user_answer()
  7. 7.5 question_types/short_answer/theme/short_answer.theme.inc \theme_short_answer_user_answer()

Theme the short_answer answer.

Parameters

array $variables:

Return value

string An HTML string.

File

question_types/quiz_short_answer/theme/short_answer.theme.inc, line 16
Theme functions for the short_answer question type.

Code

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,
  ));
}