|
@@ -910,13 +910,18 @@ foreach ($questionList as $questionId) {
|
|
|
|
|
|
$score = [];
|
|
|
if ($show_results) {
|
|
|
+ $scorePassed = $my_total_score >= $my_total_weight;
|
|
|
+ if (function_exists('bccomp')) {
|
|
|
+ $compareResult = bccomp($my_total_score, $my_total_weight, 3);
|
|
|
+ $scorePassed = $compareResult === 1 || $compareResult === 0;
|
|
|
+ }
|
|
|
$score['result'] = ExerciseLib::show_score(
|
|
|
$my_total_score,
|
|
|
$my_total_weight,
|
|
|
false,
|
|
|
false
|
|
|
);
|
|
|
- $score['pass'] = $my_total_score >= $my_total_weight ? true : false;
|
|
|
+ $score['pass'] = $scorePassed;
|
|
|
$score['type'] = $answerType;
|
|
|
$score['score'] = $my_total_score;
|
|
|
$score['weight'] = $my_total_weight;
|