You are here

quiz_directions.module in Quiz 7.6

The main file for quiz_directions.

Directions are implemented as a question type. However, they do not affect the score.

File

question_types/quiz_directions/quiz_directions.module
View source
<?php

/**
 * The main file for quiz_directions.
 *
 * Directions are implemented as a question type. However, they do not affect the score.
 * @file
 */

/**
 * Implements hook_help().
 */
function quiz_directions_help($path, $args) {
  if ($path == 'admin/help#quiz_directions') {
    return t('Provides directions which can be inserted alongside questions in a quiz.');
  }
}

/**
 * Implements hook_quiz_question_info().
 */
function quiz_directions_quiz_question_info() {
  return array(
    'quiz_directions' => array(
      'name' => t('@quiz directions', array(
        '@quiz' => QUIZ_NAME,
      )),
      'description' => t('@quiz directions allow you to drop in directions anywhere in a quiz. You can also use them to insert a confirmation step at the end of the quiz.', array(
        '@quiz' => QUIZ_NAME,
      )),
      'question provider' => 'QuizDirectionsQuestion',
      'response provider' => 'QuizDirectionsResponse',
      'module' => 'quiz_question',
    ),
  );
}

/**
 * Implements hook_quiz_question_config().
 */
function quiz_directions_quiz_question_config() {
  return FALSE;
}

/**
 * Implements hook_theme().
 */
function quiz_directions_theme() {
  return array(
    'quiz_directions_answering_form' => array(
      'render element' => 'form',
      'path' => drupal_get_path('module', 'quiz_directions') . '/theme',
      'template' => 'quiz-directions-answering-form',
    ),
  );
}

Functions