From 57d38b56b2b06218c67eb2df8528f99f9ea6fd30 Mon Sep 17 00:00:00 2001 From: jmontoyaa Date: Tue, 4 Jul 2017 11:25:03 +0200 Subject: [PATCH] Minor - format code. --- main/admin/dashboard_add_users_to_user.php | 4 ++-- main/inc/lib/social.lib.php | 1 - main/lp/learnpath.class.php | 4 ++-- src/Chamilo/CoreBundle/Component/Utils/ChamiloApi.php | 2 +- src/Chamilo/CourseBundle/Entity/CTool.php | 3 +-- 5 files changed, 6 insertions(+), 8 deletions(-) diff --git a/main/admin/dashboard_add_users_to_user.php b/main/admin/dashboard_add_users_to_user.php index 8bcc914d12..9d74a57df0 100755 --- a/main/admin/dashboard_add_users_to_user.php +++ b/main/admin/dashboard_add_users_to_user.php @@ -45,9 +45,9 @@ $isAdmin = UserManager::is_admin($user_id); if ($isAdmin) { $userStatus = PLATFORM_ADMIN; $tool_name = get_lang('AssignUsersToPlatformAdministrator'); -} else if ($user_info['status'] == SESSIONADMIN) { +} elseif ($user_info['status'] == SESSIONADMIN) { $tool_name = get_lang('AssignUsersToSessionsAdministrator'); -} else if ($user_info['status'] == STUDENT_BOSS) { +} elseif ($user_info['status'] == STUDENT_BOSS) { $tool_name = get_lang('AssignUsersToBoss'); } else { $tool_name = get_lang('AssignUsersToHumanResourcesManager'); diff --git a/main/inc/lib/social.lib.php b/main/inc/lib/social.lib.php index 031feecb2e..211bc02db2 100755 --- a/main/inc/lib/social.lib.php +++ b/main/inc/lib/social.lib.php @@ -759,7 +759,6 @@ class SocialManager extends UserManager if (in_array($show, $show_groups) && !empty($group_id)) { // Group image $userGroup = new UserGroup(); - $group_info = $userGroup->get($group_id); $userGroupImage = $userGroup->get_picture_group( diff --git a/main/lp/learnpath.class.php b/main/lp/learnpath.class.php index 2337296575..62ba2f50f0 100755 --- a/main/lp/learnpath.class.php +++ b/main/lp/learnpath.class.php @@ -2760,7 +2760,7 @@ class learnpath // It's a simple string item from which the ID can be found in the refs list, // so we can transform it directly to an ID for export. return $this->items[$this->refs_list[$prereq]]->ref; - } else if (isset($this->refs_list['ITEM_'.$prereq])) { + } elseif (isset($this->refs_list['ITEM_'.$prereq])) { return $this->items[$this->refs_list['ITEM_'.$prereq]]->ref; } else { // The last case, if it's a complex form, then find all the IDs (SCORM strings) @@ -3631,7 +3631,7 @@ class learnpath if (Database::num_rows($res) > 0) { $row = Database::fetch_array($res); $this->lp_view_id = $row['id']; - } else if (!api_is_invitee()) { + } elseif (!api_is_invitee()) { // There is no database record, create one. $sql = "INSERT INTO $lp_view_table (c_id, lp_id,user_id, view_count, session_id) VALUES ($course_id, ".$this->get_id().",".$this->get_user_id().", 1, $sessionId)"; diff --git a/src/Chamilo/CoreBundle/Component/Utils/ChamiloApi.php b/src/Chamilo/CoreBundle/Component/Utils/ChamiloApi.php index 793f1cbba3..3c1cf23808 100644 --- a/src/Chamilo/CoreBundle/Component/Utils/ChamiloApi.php +++ b/src/Chamilo/CoreBundle/Component/Utils/ChamiloApi.php @@ -117,7 +117,7 @@ class ChamiloApi $courseInfo['extLink']['url'], ['class' => 'extLink'] ); - } else if (!empty($courseInfo['extLink']['url'])) { + } elseif (!empty($courseInfo['extLink']['url'])) { $headerLogo .= $courseInfo['extLink']['url']; } } diff --git a/src/Chamilo/CourseBundle/Entity/CTool.php b/src/Chamilo/CourseBundle/Entity/CTool.php index fff5ba06ac..cc9cc9216b 100644 --- a/src/Chamilo/CourseBundle/Entity/CTool.php +++ b/src/Chamilo/CourseBundle/Entity/CTool.php @@ -96,8 +96,7 @@ class CTool * * @ORM\Column(name="target", type="string", length=20, nullable=false) */ - private - $target; + private $target; /** * @var string