ajax_quiz.module in Quiz 6.6
Same filename and directory in other branches
File
includes/ajax_quiz/ajax_quiz.moduleView source
<?php
/*
* @file
* module file for ajax_quiz quiz module
*/
/**
* Implementation of hook_help().
*/
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.
*/
function ajax_quiz_perm() {
return array(
'access ajax quiz',
);
}
/**
* Implementation of hook_menu
*
*/
function ajax_quiz_menu() {
$items = array();
$items['node/%quiz_type_access/ajax-quiz'] = array(
'title' => t('AJAX quiz'),
'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).
*/
function ajax_quiz_init() {
//drupal_add_js(drupal_get_path('module', 'ajax_quiz') . '/ajax_quiz.js');
}
Functions
Name | Description |
---|---|
ajax_quiz_help | Implementation of hook_help(). |
ajax_quiz_init | |
ajax_quiz_menu | Implementation of hook_menu |
ajax_quiz_perm | Implementation of hook_perm() Valid permissions for this module |