diff --git a/main/inc/lib/display.lib.php b/main/inc/lib/display.lib.php index c42a87bcb7..8bf7d55a4a 100755 --- a/main/inc/lib/display.lib.php +++ b/main/inc/lib/display.lib.php @@ -1670,14 +1670,18 @@ class Display /** * Return the five star HTML * - * @param string id of the rating ul element - * @param string url that will be added (for jquery see hot_courses.tpl) - * @param string point info array see function CourseManager::get_course_ranking() - * @param bool add a div wrapper - * @todo use templates + * @param string $id of the rating ul element + * @param string $url that will be added (for jquery see hot_courses.tpl) + * @param array $point_info point info array see function CourseManager::get_course_ranking() + * @param bool $add_div_wrapper add a div wrapper + * @return string **/ - public static function return_rating_system($id, $url, $point_info = array(), $add_div_wrapper = true) - { + public static function return_rating_system( + $id, + $url, + $point_info = [], + $add_div_wrapper = true + ) { $number_of_users_who_voted = isset($point_info['users_who_voted']) ? $point_info['users_who_voted'] : null; $percentage = isset($point_info['point_average']) ? $point_info['point_average'] : 0; @@ -1685,7 +1689,6 @@ class Display $percentage = $percentage*125/100; } $accesses = isset($point_info['accesses']) ? $point_info['accesses'] : 0; - $star_label = sprintf(get_lang('XStarsOutOf5'), $point_info['point_average_star']); $html = '