You are here

ajax_quiz.module in Quiz 7

File

includes/ajax_quiz/ajax_quiz.module
View source
<?php

/*
 * @file
 * module file for ajax_quiz quiz module
 */

/**
 * Implementation of hook_help().
 */

/**
 * @todo Please document this function.
 * @see http://drupal.org/node/1354
 */
function ajax_quiz_help($path, $arg) {
  if ($path == 'admin/help#ajax_quiz') {
    return '<p>' . t('AJAX version of quiz. Successive quiz questions will be loaded in the same page without page reload.') . '</p>';
  }
}

/**
 * Implementation of hook_perm()
 * Valid permissions for this module
 * @return array An array of valid permissions.
 */

/**
 * @todo Please document this function.
 * @see http://drupal.org/node/1354
 */
function ajax_quiz_permission() {
  return array(
    'access ajax quiz' => array(
      'title' => t('access ajax quiz'),
      'description' => t('TODO Add a description for \'access ajax quiz\''),
    ),
  );
}

/**
 * Implements hook_menu().
 *
 */
function ajax_quiz_menu() {
  $items = array();
  $items['node/%quiz_type_access/ajax-quiz'] = array(
    'title' => 'Take by AJAX',
    'file' => 'ajax_quiz.admin.inc',
    'page callback' => 'ajax_quiz_instruction',
    'page arguments' => array(
      1,
    ),
    'access arguments' => array(
      'access ajax quiz',
    ),
    'type' => MENU_LOCAL_TASK,
  );
  return $items;
}

/*
 * @function
 * Implementation of hook_init
 * includes the necessary js file(s).
 */

/**
 * @todo Please document this function.
 * @see http://drupal.org/node/1354
 */
function ajax_quiz_init() {

  //drupal_add_js(drupal_get_path('module', 'ajax_quiz') . '/ajax_quiz.js');
}

Functions

Namesort descending Description
ajax_quiz_help @todo Please document this function.
ajax_quiz_init @todo Please document this function.
ajax_quiz_menu Implements hook_menu().
ajax_quiz_permission @todo Please document this function.