File/bin/assign_numbers.php

Description

Assign Competitor Numbers.

This is a command-line script for assigning competitor numbers. It reassigns numbers, destructively, on every invocation. It expectes at least two and upto 4 command-line arguments

  • a CompUnix name
  • an assignment method: Alphabetical, Random, Last-Digit
  • initial number, defaulting to 100
  • ending number, defaults to 999 only needed by Last-Digit
This file is part of CompInaBox.

Includes
 include ("$CIB_CONFIG_PATH/comps/{$unixname}_config.inc") (line 141)
 include (paths.inc) (line 130)
 include ("$CIB_INCLUDE_PATH/tools/SlidingDoors_header.inc") (line 144)
Functions
assignNumber (line 77)
void assignNumber (mixed $number, mixed &$assigned, mixed &$availible, mixed $person)
findDigit (line 96)
void findDigit (mixed $avail, mixed $numNeeded)
numberAvailible (line 68)
void numberAvailible (mixed $availible, mixed $digit, mixed &$number)
renumber (line 33)

Reset indexes on an array.

Given an array, loops through the array adding each element in turn back to a new array. Generating a new set of strictly increaseing, from 0, keys, useful after various array permutations have reordered elements, but kept key correspondence.

  • return: the array with reset keys
array renumber (array $arr)
  • array $arr: the array to re-number
roundUpNumber (line 86)
void roundUpNumber (mixed &$numbers, mixed $digit)
sortSchools (line 44)
void sortSchools (mixed $arr)

Documentation generated on Tue, 25 Apr 2006 12:58:45 -0400 by phpDocumentor 1.3.0RC3