function _AdvisingScreen::build_excess_credit
Search API
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 563
Class
Code
function build_excess_credit()
{
$pC = "";
$pC .= $this->draw_semester_box_top(t("Excess Credits"));
$is_empty = true;
// Should we exclude graduate credits from this list?
$bool_grad_credit_block = (variable_get("display_graduate_credit_block", "yes") == "yes") ? TRUE : FALSE;
$graduate_level_codes_array = csv_to_array(variable_get("graduate_level_codes", "GR"));
// 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->get_has_been_displayed($course->req_by_degree_id) == TRUE)
{ // Skip ones which have been assigned to groups or semesters.
continue;
}
// Skip transfer credits.
if ($course->bool_transfer == true)
{
continue;
}
// Skip substitutions
// Only skip if we have substituted for every degree the student is enrolled in.
if ($course->get_bool_substitution(-1) == TRUE)
{
fpm($course->get_bool_substitution(-1));
fpm($course);
continue;
}
// Exclude graduate credits?
if ($bool_grad_credit_block && $course->level_code != "" && in_array($course->level_code, $graduate_level_codes_array)) {
continue;
}
// Tell the course_row what group we are coming from. (in this case: none)
$course->disp_for_group_id = "";
$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, "EXCESS_CREDIT");
}
}