function AdvisingScreen::build_graduate_credit
Search API
7.x AdvisingScreen.php | AdvisingScreen::build_graduate_credit() |
6.x AdvisingScreen.php | AdvisingScreen::build_graduate_credit() |
Constructs the HTML which will be used to display the student's graduate credits (if any exist)
1 call to AdvisingScreen::build_graduate_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 663
Class
Code
function build_graduate_credit()
{
$pC = "";
$is_empty = true;
$pC .= $this->draw_semester_box_top(variable_get_for_school("graduate_credits_block_title", t("Graduate Credits"), $this->student->school_id), FALSE);
// Basically, go through all the courses the student has taken,
// And only show the graduate credits. Similar to build_transfer_credits
$graduate_level_codes_array = csv_to_array(variable_get_for_school("graduate_level_codes", "GR", $this->student->school_id));
$this->student->list_courses_taken->sort_alphabetical_order(false, true);
$this->student->list_courses_taken->reset_counter();
while ($this->student->list_courses_taken->has_more())
{
$course = $this->student->list_courses_taken->get_next();
// Skip non graduate credits.
if (!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, false, true);
$is_empty = FALSE;
}
$notice = trim(variable_get_for_school("graduate_credits_block_notice", t("These courses may not be used for undergraduate credit."), $this->student->school_id));
// Do we have a notice to display?
if ($notice != "")
{
$pC .= "<tr><td colspan='8'>
<div class='hypo ' style='margin-top: 15px; padding: 5px;'>
<b>" . t("Important Notice:") . "</b> $notice
</div>
</td></tr>";
}
$pC .= $this->draw_semester_box_bottom();
if (!$is_empty)
{
$this->add_to_screen($pC, "GRADUATE_CREDIT");
}
}