diff --git a/class.class.php b/class.class.php --- a/class.class.php +++ b/class.class.php @@ -23,15 +23,6 @@ class Classes $this->nsections = 0; } - //-------------------------------------------------- - // Adds a new section to the class. - //-------------------------------------------------- - function addSection($l, $p, $s, $e, $d) - { - $this->sections[$this->nsections] = new Section($l, $p, $s, $e, $d); - $this->nsections++; - } - /** * \brief * Adds an already-instantiated section to this class. diff --git a/class.schedule.php b/class.schedule.php --- a/class.schedule.php +++ b/class.schedule.php @@ -92,8 +92,7 @@ class Schedule { echo "Could not find class: " . $n . "
"; } else { - $p = "unknown prof"; - $this->classStorage[$counter]->addSection($l, $p, $s, $e, $d); + $this->classStorage[$counter]->section_add(new Section($l, $s, $e, $d)); } } diff --git a/class.section.php b/class.section.php --- a/class.section.php +++ b/class.section.php @@ -23,8 +23,6 @@ class Section * \param $letter * The identifier (often a letter or numeral) of this section. For * CS-262-A, this would be 'a'. - * \param $prof - * The faculty person(s) who teaches this section. * \param $time_start * The time of day when this section meets. Formatted as a string, * with the 24-hr representation of the hour taking the first two @@ -39,15 +37,19 @@ class Section * one of Monday, Tuesday, Wednesday, Thursday, and Friday. For * example, '135' would be for a course which meets on Monday, * Wednesday, and Friday. + * \param $prof + * The faculty person(s) who teaches this section. */ - function __construct ($letter, $prof, $time_start, $time_end, $days) + function __construct ($letter, $time_start, $time_end, $days, $prof = '') { $this->letter = $letter; - $this->prof = $prof; $this->start = $time_start; $this->tend = $time_end; + $this->idays = $days; $this->bdays = $this->setbdays(); + + $this->prof = $prof; } function setbdays() diff --git a/school.d/calvin.crawl.inc b/school.d/calvin.crawl.inc --- a/school.d/calvin.crawl.inc +++ b/school.d/calvin.crawl.inc @@ -320,7 +320,7 @@ function calvin_crawl(Semester $semester foreach (array('date_start', 'date_end', 'meeting_type', 'days', 'time_start', 'time_end', 'meeting_place') as $var) echo $var . ':' . ${$var} . "\n"; - $section = new Section($section_id['section'], $faculty_name, $time_start, $time_end, $days); + $section = new Section($section_id['section'], $time_start, $time_end, $days, $faculty_name); $semester->section_add($section_id['department'], $section_id['course'], $section); } diff --git a/school.d/cedarville.inc b/school.d/cedarville.inc --- a/school.d/cedarville.inc +++ b/school.d/cedarville.inc @@ -202,9 +202,9 @@ function cedarville_crawl($semester, $ve */ $section_letter = 'L' . $section_letter; $semester->section_add($section_parts['department'], $section_parts['course'], - new Section($section_letter, $instructor, + new Section($section_letter, $meeting['time_start'], $meeting['time_end'], - $meeting['days'])); + $meeting['days'], $instructor)); } } }