Browse Source

Minor - format code

jmontoyaa 6 years ago
parent
commit
221fa61064
2 changed files with 4 additions and 9 deletions
  1. 2 3
      main/inc/lib/userportal.lib.php
  2. 2 6
      user_portal.php

+ 2 - 3
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) {

+ 2 - 6
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)) {