Minor - Improved gradebook functions documentation - refs BT#6003

skala
Yannick Warnier 12 years ago
parent 7f66ba98c9
commit 370749f042
  1. 1
      main/gradebook/gradebook_view_result.php
  2. 9
      main/gradebook/lib/results_data_generator.class.php

@ -483,6 +483,7 @@ if ($file_type == null) { //show the result header
}
DisplayGradebook :: display_header_result($eval[0], $currentcat[0]->get_id(), 1);
}
// Letter-based scores are built from lib/results_data_generator.class.php::get_score_display()
$resulttable->display();
Display :: display_footer();
}

@ -115,7 +115,14 @@ class ResultsDataGenerator
}
private function get_score_display ($score, $realscore, $ignore_score_color) {
/**
* Re-formats the score to show percentage ("2/4 (50 %)") or letters ("A")
* @param float Current absolute score (max score is taken from $this->evaluation->get_max()
* @param bool Whether we want the real score (2/4 (50 %)) or the transformation (A, B, C, etc)
* @param bool Whether we want to ignore the score color
* @result string The score as we want to show it
*/
private function get_score_display ($score, $realscore, $ignore_score_color = false) {
if ($score != null) {
$scoredisplay = ScoreDisplay :: instance();
$type = SCORE_CUSTOM;

Loading…
Cancel
Save