function _AdvisingScreen::build_excess_credit

4.x _AdvisingScreen.php _AdvisingScreen::build_excess_credit()
5.x _AdvisingScreen.php _AdvisingScreen::build_excess_credit()

Constructs the HTML to show the Excess Credits list.

1 call to _AdvisingScreen::build_excess_credit()
_AdvisingScreen::build_screen_elements in classes/_AdvisingScreen.php
This function calls the other "build" functions to assemble the View or What If tabs in FlightPath.

File

classes/_AdvisingScreen.php, line 537

Class

_AdvisingScreen

Code

function build_excess_credit() 
 {

  $pC = "";
  $pC .= $this->draw_semester_box_top(t("Excess Credits"));
  $is_empty = true;

  // Basically, go through all the courses the student has taken,
  // selecting out the ones that are not fulfilling any
  // requirements.
  $this->student->list_courses_taken->sort_alphabetical_order();
  $this->student->list_courses_taken->reset_counter();
  while ($this->student->list_courses_taken->has_more()) 
   {
    $course = $this->student->list_courses_taken->get_next();

    if ($course->bool_has_been_displayed == true) 
     { // Skip ones which have been assigned to groups or semesters.
      continue;
    }

    // Skip transfer credits.
    if ($course->bool_transfer == true) 
     {
      continue;
    }

    // Skip substitutions
    if ($course->bool_substitution == true) 
     {
      continue;
    }

    $pC .= $this->draw_course_row($course, "", "", false, false);
    $is_empty = false;
  }


  $pC .= $this->draw_semester_box_bottom();

  if (!$is_empty) 
   {
    $this->add_to_screen($pC);
  }
}