/[drupal]/contributions/modules/randomizer/randomizer.module
ViewVC logotype

Diff of /contributions/modules/randomizer/randomizer.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.3, Wed Jun 21 20:44:08 2006 UTC revision 1.4, Mon Nov 6 22:01:03 2006 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id:$  // $Id: randomizer.module,v 1.3 2006/06/21 20:44:08 deekayen Exp $
3    
4  /**  /**
5   * @file   * @file
6   * Generate a set of random numbers   * Generate a set of pseudo-random numbers
7   *   *
8   * @author David Norman <deekayen at: deekayen (dot) net>   * @author David Kent Norman
9   * @link http://deekayen.net/   * @link http://deekayen.net/
10   * @link http://drupal.org/node/66575   * @link http://drupal.org/node/66575
11   * @todo markers, alternate rand generators (rand vs mt_rand), seeding, excel export, randomize form input   * @todo markers, alternate rand generators (rand vs mt_rand), seeding, excel export, randomize form input
# Line 27  function randomizer_help($section = 'adm Line 27  function randomizer_help($section = 'adm
27      case 'admin/help#randomizer':      case 'admin/help#randomizer':
28        return t('<p>This module is designed to assist researchers and students who want an easy way to perform random sampling or assign participants to experimental conditions.</p>');        return t('<p>This module is designed to assist researchers and students who want an easy way to perform random sampling or assign participants to experimental conditions.</p>');
29        break;        break;
     case 'admin/modules#description':  
       return t('Generate a random set of numbers.');  
       break;  
30      case 'admin/settings/randomizer':      case 'admin/settings/randomizer':
31        return t('Set default values for the public form.');        return t('Set default values for the public form.');
32        break;        break;
# Line 97  function randomizer_menu($may_cache) { Line 94  function randomizer_menu($may_cache) {
94        'callback' => 'randomizer_page',        'callback' => 'randomizer_page',
95        'access' => user_access('access randomizer'),        'access' => user_access('access randomizer'),
96        'type' => MENU_SUGGESTED_ITEM);        'type' => MENU_SUGGESTED_ITEM);
97        $items[] = array(
98          'path' => 'admin/settings/randomizer',
99          'title' => t('Randomizer'),
100          'description' => t('Set bounds for list generation.'),
101          'callback' => 'drupal_get_form',
102          'callback arguments' => 'randomizer_admin_settings',
103          'access' => user_access('administer site configuration'),
104          'type' => MENU_NORMAL_ITEM
105        );
106    }    }
107    return $items;    return $items;
108  }  }
# Line 209  function randomizer_page() { Line 215  function randomizer_page() {
215   *   *
216   * @return array   * @return array
217   */   */
218  function randomizer_settings() {  function randomizer_admin_settings() {
219    $form = array();    $form = array();
220    $form['randomizer_max_sets'] = array(    $form['randomizer_max_sets'] = array(
221      '#type' => 'textfield',      '#type' => 'textfield',
# Line 226  function randomizer_settings() { Line 232  function randomizer_settings() {
232      '#title' => t('Maximum numbers per set users may generate')      '#title' => t('Maximum numbers per set users may generate')
233    );    );
234    $form = array_merge($form, randomizer_form());    $form = array_merge($form, randomizer_form());
235    return $form;    return system_settings_form($form);
236  }  }
237    
238  /**  /**

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.2