score multiplyer limited to .25

This commit is contained in:
Leander
2017-05-02 13:43:21 +02:00
parent aa4fe851d0
commit 0af8d4d42c

View File

@@ -188,7 +188,8 @@ if($uid == '') {
array($uid)
)['data'][0]['answered_questions'];
$new_points = round($new_points / $answered_questions);
$score_multiplyer = 0.005 * $answered_questions;
$score_multiplyer = (0.005 * $answered_questions < 0.25) ?
0.005 * $answered_questions : 0.25;
$new_user_high = $old_user_high == 0 ?
$new_points : round(
$old_user_high * (1 - $score_multiplyer)