Changeset - 00282418d2ef
[Not reviewed]
Merge default
0 1 0
ethanzonca - 15 years ago 2010-09-30 20:03:52

Merge
1 file changed with 11 insertions and 0 deletions:
0 comments (0 inline, 0 general)
class.schedule.php
Show inline comments
 
@@ -32,14 +32,16 @@ class Schedule
 
    /**
 
     * \brief
 
     *   Create a schedule with the given name.
 
     */
 
    function __construct($name)
 
    {
 
      $this->classStorage = array();
 
      $this->nclasses = 0;
 
      $this->scheduleName = $name;
 
      $this->storage = array();
 
      $this->title = "SlatePermutate - Scheduler";
 
      $this->section_format = 'numerous';
 
    }
 

	
 
	//--------------------------------------------------
 
	// Mutators and Accessors
 
@@ -91,12 +93,21 @@ class Schedule
 
	// Finds all of the possible permutations and stores
 
	// the results in the storage array.
 
	//--------------------------------------------------
 
	function findPossibilities()
 
	{
 
        $this->possiblePermutations = 1;
 
	  /* special case: there is nothing entered into the schedule and thus there is one, NULL permutation */
 
	  if (!$this->nclasses)
 
	    {
 
	      /* have an empty schedule */
 
	      $this->classStorage[0] = array();
 
	      $this->nPermutations = 1;
 
	      return;
 
	    }
 

	
 
		$position = 0;
 
		$counter = 0;
 

	
 
        for($i = 0; $i < $this->nclasses; $i++)
 
        {
 
			$this->possiblePermutations = $this->possiblePermutations * $this->classStorage[$i]->getnsections();
0 comments (0 inline, 0 general)