function AdvisingScreenTypeView::build_semester_list
Search API
7.x AdvisingScreenTypeView.php | AdvisingScreenTypeView::build_semester_list() |
6.x AdvisingScreenTypeView.php | AdvisingScreenTypeView::build_semester_list() |
In __advising_screen, this method simply displays the degree plan's semesters to the screen. But here, we need to go through the type categories: ex: Core, Major, Supporting, and Electives, and only display courses and groups from each semester fitting that type.
File
- classes/
AdvisingScreenTypeView.php, line 27
Class
- AdvisingScreenTypeView
- This class is the View by Type view for FlightPath. As such, it inherits most of it's classes from __advising_screen.
Code
function build_semester_list()
{
$list_semesters = $this->degree_plan->list_semesters;
// Go through each semester and add it to the screen...
$list_semesters->reset_counter();
// We want to go through our requirement types, and create a box for each one, if available.
$types = fp_get_requirement_types($this->student->school_id);
foreach ($types as $code => $desc) {
$temp = $this->display_semester_list($list_semesters, $code, $desc, TRUE);
if ($temp) {
$this->add_to_screen($temp, "SEMESTER_TYPE_" . $code);
}
}
$temp_d_s = new Semester(DegreePlan::SEMESTER_NUM_FOR_DEVELOPMENTALS); // developmental requirements.
if ($dev_sem = $list_semesters->find_match($temp_d_s))
{
$this->add_to_screen($this->display_semester($dev_sem), "SEMESTER_" . DegreePlan::SEMESTER_NUM_FOR_DEVELOPMENTALS);
}
}