diff --git a/main/gradebook/lib/be/category.class.php b/main/gradebook/lib/be/category.class.php index f7b2783872..8963e5e28f 100755 --- a/main/gradebook/lib/be/category.class.php +++ b/main/gradebook/lib/be/category.class.php @@ -2165,7 +2165,7 @@ class Category implements GradebookItem * @param int $user_id * @param bool $sendNotification * - * @return bool|string + * @return array */ public static function generateUserCertificate( $category_id, @@ -2538,7 +2538,7 @@ class Category implements GradebookItem * @param float $score The achieved score * @param int $userId The user id * @param int $categoryId The gradebook category - * @return false|string The insert id + * @return int The insert id */ public static function registerCurrentScore($score, $userId, $categoryId) { diff --git a/main/gradebook/lib/be/evaluation.class.php b/main/gradebook/lib/be/evaluation.class.php index d882133a4e..f786e5ed3d 100755 --- a/main/gradebook/lib/be/evaluation.class.php +++ b/main/gradebook/lib/be/evaluation.class.php @@ -456,7 +456,7 @@ class Evaluation implements GradebookItem /** * Check if an evaluation name (with the same parent category) already exists - * @param $name name to check (if not given, the name property of this object will be checked) + * @param string $name to check (if not given, the name property of this object will be checked) * @param $parent parent category * @return bool */ diff --git a/main/gradebook/lib/fe/displaygradebook.php b/main/gradebook/lib/fe/displaygradebook.php index 72c240daf3..f901e18642 100755 --- a/main/gradebook/lib/fe/displaygradebook.php +++ b/main/gradebook/lib/fe/displaygradebook.php @@ -242,14 +242,17 @@ class DisplayGradebook * Displays the header for the gradebook containing the navigation tree and links * @param Category $catobj * @param int $showtree '1' will show the browse tree and naviation buttons + * @param $selectcat * @param boolean $is_course_admin * @param boolean $is_platform_admin - * @param boolean Whether to show or not the link to add a new qualification + * @param bool $simple_search_form + * @param boolean $show_add_qualification Whether to show or not the link to add a new qualification * (we hide it in case of the course-embedded tool where we have only one - * calification per course or session) - * @param boolean Whether to show or not the link to add a new item inside + * per course or session) + * @param boolean $show_add_link Whether to show or not the link to add a new item inside * the qualification (we hide it in case of the course-embedded tool - * where we have only one calification per course or session) + * where we have only one qualification per course or session) + * @param array $certificateLinkInfo * @return void Everything is printed on screen upon closing */ public static function header( @@ -261,7 +264,7 @@ class DisplayGradebook $simple_search_form, $show_add_qualification = true, $show_add_link = true, - $certificateLinkInfo = null + $certificateLinkInfo = [] ) { $userId = api_get_user_id(); $courseId = api_get_course_int_id(); @@ -284,7 +287,6 @@ class DisplayGradebook $message_resource = $objcat->show_message_resource_delete($course_id); $grade_model_id = $catobj->get_grade_model_id(); $header = null; - if (isset($catobj) && !empty($catobj)) { $categories = Category::load( null,