You are here

function theme_matching_match_node_view in Quiz 8.4

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

Theme the answer part of the node view

Parameters

$subquestions: Array with all the data in the subquestions.

1 theme call to theme_matching_match_node_view()
MatchingQuestion::getNodeView in question_types/matching/lib/Drupal/matching/MatchingQuestion.php
Implementation of getNodeView

File

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

Code

function theme_matching_match_node_view($variables) {
  $subquestions = $variables['subquestions'];

  // We know the correct answer for each subquestion
  if (isset($subquestions[0]['correct'])) {
    $header = array(
      t('Subquestion'),
      t('Correct match'),
      t('Feedback'),
    );
  }
  else {
    $header = array(
      t('Subquestion'),
      t('Possible match'),
    );
  }
  return theme('table', array(
    'header' => $header,
    'rows' => $subquestions,
  ));
}