You are here

quizfileupload.theme.inc in Quiz File Upload 7.5

Same filename and directory in other branches
  1. 6 theme/quizfileupload.theme.inc

Theme functions for the quizfileupload question type.

File

theme/quizfileupload.theme.inc
View source
<?php

/**
 * @file
 * Theme functions for the quizfileupload question type.
 */

/**
 * Theme the quizfileupload answer.
 *
 * @param array $variables
 *
 * @return string
 *   An HTML string.
 */
function theme_quizfileupload_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 quizfileupload response form.
 *
 * @param array $variables
 *
 * @return string
 *   An HTML string.
 */
function theme_quizfileupload_response_form($variables) {
  $form = $variables['form'];
  return drupal_render_children($form);
}

Functions

Namesort descending Description
theme_quizfileupload_response_form Theme the quizfileupload response form.
theme_quizfileupload_user_answer Theme the quizfileupload answer.