You are here

function theme_scale_answer_node_view in Quiz 8.4

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

Theme function for the answer part of the node view

Parameters

$alternatives: Array of alternatives as text

1 theme call to theme_scale_answer_node_view()
ScaleQuestion::getNodeView in question_types/scale/lib/Drupal/scale/ScaleQuestion.php
Implementation of getNodeView

File

question_types/scale/scale.theme.inc, line 16
The theme file for scale.

Code

function theme_scale_answer_node_view($variables) {
  $alternatives = $variables['alternatives'];
  $header = array(
    t('Alternatives'),
  );
  $rows = array();
  foreach ($alternatives as $alternative) {
    $rows[] = array(
      $alternative,
    );
  }
  return theme('table', array(
    'header' => $header,
    'rows' => $rows,
  ));
}