You are here

function theme_matching_response in Quiz 6.4

Same name and namespace in other branches
  1. 8.6 question_types/quiz_matching/theme/matching.theme.inc \theme_matching_response()
  2. 8.4 question_types/matching/matching.theme.inc \theme_matching_response()
  3. 8.5 question_types/quiz_matching/theme/matching.theme.inc \theme_matching_response()
  4. 7.6 question_types/matching/theme/matching.theme.inc \theme_matching_response()
  5. 7 question_types/matching/theme/matching.theme.inc \theme_matching_response()
  6. 7.4 question_types/matching/theme/matching.theme.inc \theme_matching_response()
  7. 7.5 question_types/matching/theme/matching.theme.inc \theme_matching_response()

Theme the contents of the matching response form

Parameters

$metadata: Can be used as a table header

$data: Can be used as table rows

1 theme call to theme_matching_response()
MatchingResponse::getReportFormResponse in question_types/matching/matching.classes.inc
Implementation of getReportFormResponse

File

question_types/matching/theme/matching.theme.inc, line 75
Themes for the matching module.

Code

function theme_matching_response($metadata, $data) {
  if (isset($data[0]['is_correct'])) {
    foreach ($data as $id => $match_data) {
      $theme = $match_data['is_correct'] ? 'quiz_score_correct' : 'quiz_score_incorrect';
      $data[$id]['is_correct'] = array(
        'data' => theme($theme),
        'class' => 'quiz_summary_qcell',
      );
    }
  }
  return theme('table', $metadata, $data);
}