function AdvisingScreen::build_transfer_credit

6.x AdvisingScreen.php AdvisingScreen::build_transfer_credit()

Constructs the HTML which will be used to display the student's transfer credits

1 call to AdvisingScreen::build_transfer_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 582

Class

AdvisingScreen

Code

function build_transfer_credit() 
 {
  $pC = "";
  $is_empty = true;
  $pC .= $this->draw_semester_box_top("Transfer Credit", FALSE);
  // Basically, go through all the courses the student has taken,
  // And only show the transfers.  This is similar to Excess credit.

  $student_id = $this->student->student_id;
  $school_id = db_get_school_id_for_student_id($student_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 transfer credits.
    if ($course->bool_transfer != true) 
     {
      continue;
    }

    $bool_add_footnote = false;
    if ($course->get_has_been_displayed($course->req_by_degree_id) == true) 
     { // Show the footnote if this has already been displayed
      // elsewhere on the page.
      $bool_add_footnote = true;
    }

    // Tell the course what group we are coming from. (in this case: none)
    $course->disp_for_group_id = "";

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

  }



  if (@$GLOBALS ["advising_course_has_asterisk"] == true) 
   {
    $pC .= "<tr>
        <td colspan='10'>
        <div class=' ' style='margin-top: 10px; padding: 3px;'>
        <b>*</b> Courses marked with an asterisk (*) have
          equivalencies at " . variable_get_for_school("school_initials", "DEMO", $school_id) . ".  
          Click on the course for more
          details.      
        </div>    
        </td>
        </tr>
        ";
  }

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

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

}