function _AdvisingScreen::build_test_scores

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

Constructs the HTML to show the student's test scores.

1 call to _AdvisingScreen::build_test_scores()
_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 1191

Class

_AdvisingScreen

Code

function build_test_scores() 
 {
  // This function will build our Test Scores box.
  // Only do this if the student actually has any test scores.

  if ($this->student->list_standardized_tests->is_empty) 
   {
    return;
  }

  $top_scores = array();

  $pC = "";
  $pC .= $this->draw_semester_box_top(t("Test Scores"), TRUE);

  $pC .= "<tr><td colspan='8' class='tenpt'>
					";

  $fsC = "";

  // Go through and find all the test scores for the student...
  $this->student->list_standardized_tests->reset_counter();
  while ($this->student->list_standardized_tests->has_more()) {
    $st = $this->student->list_standardized_tests->get_next();

    $dt = strtotime($st->date_taken);
    $ddate = format_date($dt, "just_date");

    $fsC .= "<div>
						<b>$st->description</b> - $ddate
						<ul>";
    foreach ($st->categories as $position => $cat_array) 
     {
      $fsC .= "<li>{$cat_array ["description"]} - {$cat_array ["score"]}</li>";

    }
    $fsC .= "</ul>
					</div>";

  }

  $pC .= fp_render_c_fieldset($fsC, t("Click to view/hide standardized test scores"), TRUE);

  $pC .= "</td></tr>";


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

  $this->add_to_screen($pC);
}