Fixing show score

skala
Julio Montoya 14 years ago
parent e3499250d3
commit 0cc4e6f88c
  1. 2
      main/exercice/exercise.lib.php
  2. 4
      main/exercice/exercise_show.php

@ -1097,7 +1097,7 @@ function show_score($score, $weight, $show_porcentage = true) {
}
if ($show_porcentage) {
$html = round(($score / ($weight != 0 ? $weight : 1)) * 100, 2) . '% (' . $score_rounded . ' / ' . $weight . ')';
} else {
} else {
$html = $score_rounded . ' / ' . $weight;
}
}

@ -600,8 +600,8 @@ if ($origin!='learnpath' || ($origin == 'learnpath' && isset($_GET['fb_type'])))
$my_result = number_format(($totalScore/$totalWeighting)*100,1,'.','');
$my_result = float_format($my_result,1);
echo $my_result."%";
} else {
echo show_score($my_total_score,$my_total_weight,false);
} else {
echo show_score($totalScore,$totalWeighting,false);
}
echo '</div>';
}

Loading…
Cancel
Save