diff --git a/class.schedule.php b/class.schedule.php --- a/class.schedule.php +++ b/class.schedule.php @@ -87,7 +87,7 @@ class Schedule //-------------------------------------------------- // Adds a section to the desired class. //-------------------------------------------------- - function addSection($course_name, $letter, $time_start, $time_end, $days, $synonym = NULL, $faculty = NULL, $location = NULL) + function addSection($course_name, $letter, $time_start, $time_end, $days, $synonym = NULL, $faculty = NULL, $location = NULL, $type = 'lecture') { $found = false; $counter = 0; @@ -114,7 +114,7 @@ class Schedule $section = new Section($letter, array(), $synonym, $faculty); $this->classStorage[$counter]->section_add($section); } - $section->meeting_add(new SectionMeeting($days, $time_start, $time_end, $location)); + $section->meeting_add(new SectionMeeting($days, $time_start, $time_end, $location, $type)); } } diff --git a/inc/class.section_meeting.inc b/inc/class.section_meeting.inc --- a/inc/class.section_meeting.inc +++ b/inc/class.section_meeting.inc @@ -218,6 +218,7 @@ class SectionMeeting 'time_end' => $this->time_end, 'days' => array(), 'location' => $this->location, + 'type' => $this->type, ); for ($day = 0; $day < 5; $day ++) diff --git a/process.php b/process.php --- a/process.php +++ b/process.php @@ -139,7 +139,7 @@ if(!$DEBUG) /* Skip the section name, which isn't a section */ if(is_array($section)) { - $allClasses->addSection($class['name'], $section['letter'], $section['start'], $section['end'], arrayToDays($section['days'], 'alpha'), $section['synonym'], $section['professor'], $section['location']); + $allClasses->addSection($class['name'], $section['letter'], $section['start'], $section['end'], arrayToDays($section['days'], 'alpha'), $section['synonym'], $section['professor'], $section['location'], $section['type']); } } } diff --git a/scripts/scheduleInput.js b/scripts/scheduleInput.js --- a/scripts/scheduleInput.js +++ b/scripts/scheduleInput.js @@ -130,7 +130,7 @@ function genSectionHtml(cnum) } /* @TODO: This should select & set items based on args, if the args != '' */ -function genSectionHtml_n(cnum, name, synonym, stime, etime, days, prof, location) +function genSectionHtml_n(cnum, name, synonym, stime, etime, days, prof, location, type) { var snum = sectionsOfClass[cnum]; @@ -193,7 +193,9 @@ function genSectionHtml_n(cnum, name, sy \ '; result = result + '
' - + ''+ ''; + + '' + + '' + + ''; return result; } @@ -213,14 +215,14 @@ function genOptionHtml(value, content, t * \brief * Add a section to a class. */ -function add_section_n(cnum, name, synonym, stime, etime, days, prof, location) +function add_section_n(cnum, name, synonym, stime, etime, days, prof, location, type) { - jQuery('.pclass'+cnum).after(genSectionHtml_n(cnum, name, synonym, stime, etime, days, prof, location)); + jQuery('.pclass'+cnum).after(genSectionHtml_n(cnum, name, synonym, stime, etime, days, prof, location, type)); sectionsOfClass[cnum] ++; } function add_section(cnum) { - return add_section_n(cnum, '', '', '', '', {'m':false, 't':false, 'w':false, 'h':false, 'f':false}, '', ''); + return add_section_n(cnum, '', '', '', '', {'m':false, 't':false, 'w':false, 'h':false, 'f':false}, '', '', ''); } /** @@ -239,7 +241,7 @@ function add_sections(cnum, data) for (i = data.sections.length - 1; i >= 0; i --) { section = data.sections[i]; - add_section_n(cnum, section.section, section.synonym, section.time_start, section.time_end, section.days, section.prof, section.location); + add_section_n(cnum, section.section, section.synonym, section.time_start, section.time_end, section.days, section.prof, section.location, section.type); } }