function _AdvisingScreenTypeView::build_semester_list

4.x _AdvisingScreenTypeView.php _AdvisingScreenTypeView::build_semester_list()
5.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 4 type categories: 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();

  $this->add_to_screen($this->display_semester_list($list_semesters, "c", t("Core Requirements"), true));
  $this->add_to_screen($this->display_semester_list($list_semesters, "m", t("Major Requirements"), true));
  $this->add_to_screen($this->display_semester_list($list_semesters, "s", t("Supporting Requirements"), true));
  $this->add_to_screen($this->display_semester_list($list_semesters, "e", t("Electives"), true));


  $temp_d_s = new Semester(-55); // developmental requirements.
  if ($dev_sem = $list_semesters->find_match($temp_d_s)) 
   {
    $this->add_to_screen($this->display_semester($dev_sem));
  }


}