[svn r18548] Minor - Added 0/0 when the score is empty into flat view and round score about certificate into gradebook tool - see FS#3510

skala
Cristian Fasanando 16 years ago
parent 4c03c4d0de
commit 3d9f792a8b
  1. 2
      main/gradebook/lib/fe/gradebooktable.class.php
  2. 7
      main/gradebook/lib/scoredisplay.class.php

@ -178,7 +178,7 @@ class GradebookTable extends SortableTable
$item_value = number_format($item_value, 2, '.', ' ');
$cattotal = Category :: load($id);
$scoretotal= $cattotal[0]->calc_score(api_get_user_id());
$scoretotal_display = (isset($scoretotal)? $scoretotal[0].'/'.$scoretotal[1].'('.round(($scoretotal[0] / $scoretotal[1]) * 100,2) . ' %)': '-');
$scoretotal_display = (isset($scoretotal)? round($scoretotal[0],2).'/'.round($scoretotal[1],2).'('.round(($scoretotal[0] / $scoretotal[1]) * 100,2) . ' %)': '-');
$row[] = $item_value;
} else {
$row[] = $invisibility_span_open . $data[3] . $invisibility_span_close;

@ -266,7 +266,12 @@ class ScoreDisplay
}
private function display_as_div ($score) {
return $score[0] . ' / ' . $score[1];
if ($score==1) {
return '0/0';
} else {
return $score[0] . ' / ' . $score[1];
}
}
private function display_custom ($score) {

Loading…
Cancel
Save