From 221fa610646fcef40a4f0abb2d306860a08d92de Mon Sep 17 00:00:00 2001 From: jmontoyaa Date: Mon, 30 Apr 2018 10:27:34 +0200 Subject: [PATCH] Minor - format code --- main/inc/lib/userportal.lib.php | 5 ++--- user_portal.php | 8 ++------ 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/main/inc/lib/userportal.lib.php b/main/inc/lib/userportal.lib.php index c587e3ac56..8a7f6b430e 100755 --- a/main/inc/lib/userportal.lib.php +++ b/main/inc/lib/userportal.lib.php @@ -1165,11 +1165,8 @@ class IndexManager $loadHistory = false ) { $gameModeIsActive = api_get_setting('gamification_mode'); - $listCourse = ''; - $specialCourseList = ''; $viewGridCourses = api_get_configuration_value('view_grid_courses') === true; $showSimpleSessionInfo = api_get_configuration_value('show_simple_session_info'); - $coursesWithoutCategoryTemplate = '/user_portal/classic_courses_without_category.tpl'; $coursesWithCategoryTemplate = '/user_portal/classic_courses_with_category.tpl'; $showAllSessions = api_get_configuration_value('show_all_sessions_on_my_course_page') === true; @@ -1196,6 +1193,8 @@ class IndexManager $courseCompleteList = []; $coursesInCategoryCount = 0; $coursesNotInCategoryCount = 0; + $listCourse = ''; + $specialCourseList = ''; // If we're not in the history view... if ($loadHistory == false) { diff --git a/user_portal.php b/user_portal.php index 0f89481aa9..078d59d4a5 100755 --- a/user_portal.php +++ b/user_portal.php @@ -146,7 +146,6 @@ if (!$myCourseListAsCategory) { } // if teacher, session coach or admin, display the button to change te course view - if ($displayMyCourseViewBySessionLink && ( api_is_drh() || @@ -213,7 +212,7 @@ if (api_get_setting('go_to_course_after_login') == 'true') { // Session has many courses. if (isset($sessionInfo['session_id'])) { - $url = api_get_path(WEB_CODE_PATH).'session/?session_id='.$sessionInfo['session_id']; + $url = api_get_path(WEB_CODE_PATH).'session/index.php?session_id='.$sessionInfo['session_id']; header('Location:'.$url); exit; @@ -226,10 +225,7 @@ if (api_get_setting('go_to_course_after_login') == 'true') { $count_of_sessions == 0 && $count_of_courses_no_sessions == 1 ) { - $courses = CourseManager::get_courses_list_by_user_id( - $userId - ); - + $courses = CourseManager::get_courses_list_by_user_id($userId); if (!empty($courses) && isset($courses[0]) && isset($courses[0]['code'])) { $courseInfo = api_get_course_info_by_id($courses[0]['real_id']); if (!empty($courseInfo)) {