diff --git a/Web/Models/Entities/User.php b/Web/Models/Entities/User.php index 36b0681a..ead200f9 100644 --- a/Web/Models/Entities/User.php +++ b/Web/Models/Entities/User.php @@ -397,9 +397,15 @@ class User extends RowModel $incompleteness += 20; } + $total = max(100 - $incompleteness + $this->getRating(), 0); + if(quirk("profile.rating-bar-behaviour") === 0) + $percent = intval(substr(strval($total), -2)); + else + $percent = min($total, 100); + return (object) [ - "total" => 100 - $incompleteness + $this->getRating(), - "percent" => min(100 - $incompleteness + $this->getRating(), 100), + "total" => $total, + "percent" => $percent, "unfilled" => $unfilled, ]; } diff --git a/Web/Presenters/templates/User/View.xml b/Web/Presenters/templates/User/View.xml index f1768ba8..43c7da15 100644 --- a/Web/Presenters/templates/User/View.xml +++ b/Web/Presenters/templates/User/View.xml @@ -122,8 +122,8 @@