diff --git a/class.schedule.php b/class.schedule.php --- a/class.schedule.php +++ b/class.schedule.php @@ -22,6 +22,12 @@ class Schedule private $storage; // Integer array of valid schedules private $title; /** + * \brief + * My global identification number. Not defined until the schedule + * is processed and first saved. + */ + private $id; + /** * The input format of the sections. Only used for the UI. Valid * values are 'numerous' for custom, 'numbered' for numeric, and 'lettered' for * alphabetical. @@ -300,11 +306,11 @@ class Schedule echo '});'; /* Close document.ready */ echo 'window.print(); '; - echo '
Select Schedules to Print :: Return to normal view :: Home
'; - echo 'Select Schedules to Print :: Return to normal view :: Home
'; + echo 'id_get() . '&print=all">Print :: Home
'; } if($this->nPermutations > 0) @@ -575,18 +581,7 @@ class Schedule } /* edit button */ - if (!isset($savedkey)) - { - if (isset($_REQUEST['savedkey'])) - $savedkey = (int)$_REQUEST['savedkey']; - else - /* - * if this is a new saved schedule, it'll be the - * next item added to $_SESSION['saved'] - */ - $savedkey = max(array_keys($_SESSION['saved'])) + 1; - } - echo ''; + echo ''; echo "There were a total of " . $this->possiblePermutations . " possible permutations. Only " . $this->nPermutations . " permutations had no class conflicts.
"; @@ -649,4 +644,24 @@ class Schedule { return $this->classStorage[$class_key]; } + + /** + * \brief + * Set my global ID. + * + * Only to be called by schedule_store_store(). + */ + function id_set($id) + { + $this->id = $id; + } + + /* + * \brief + * Get my global ID. + */ + function id_get() + { + return $this->id; + } }