diff --git a/main/inc/lib/api.lib.php b/main/inc/lib/api.lib.php index 10709fd45c5..d17f590ed68 100644 --- a/main/inc/lib/api.lib.php +++ b/main/inc/lib/api.lib.php @@ -7406,10 +7406,13 @@ function api_get_course_url($courseCode = null, $sessionId = null, $groupId = nu if (!empty($courseDirectory)) { // directory not empty, so we do have a course $url = api_get_path(WEB_COURSE_PATH).$courseDirectory.'/index.php?id_session='.$sessionId.'&gidReq='.$groupId; - } elseif (!empty($sessionId) && api_get_configuration_value('remove_session_url') !== true) { + } elseif (!empty($sessionId) && + api_get_setting('session.remove_session_url') !== 'true' + ) { // if the course was unset and the session was set, send directly to the session $url = api_get_path(WEB_CODE_PATH).'session/index.php?session_id='.$sessionId; } + // if not valid combination was found, return an empty string return $url; } diff --git a/main/inc/lib/userportal.lib.php b/main/inc/lib/userportal.lib.php index db5649d3d19..01ac5d51047 100755 --- a/main/inc/lib/userportal.lib.php +++ b/main/inc/lib/userportal.lib.php @@ -1784,7 +1784,7 @@ public function returnCoursesAndSessions( $this->tpl->assign('session', $listSession); $this->tpl->assign('show_tutor', (api_get_setting('show_session_coach') === 'true' ? true : false)); $this->tpl->assign('gamification_mode', $gameModeIsActive); - $this->tpl->assign('remove_session_url', api_get_configuration_value('remove_session_url')); + $this->tpl->assign('remove_session_url', api_get_setting('session.remove_session_url')); if ($viewGridCourses) { $sessions_with_no_category = $this->tpl->fetch( diff --git a/main/install/configuration.dist.php b/main/install/configuration.dist.php index b493db261c9..67c659b22e7 100755 --- a/main/install/configuration.dist.php +++ b/main/install/configuration.dist.php @@ -359,10 +359,7 @@ ] ]; */ -// Hide session link of course_block on index/userportal -//$_configuration['remove_session_url']= false ; -// -// + // ------ AGENDA CONFIGURATION SETTINGS // Shows a legend in the agenda tool /* diff --git a/main/template/default/user_portal/classic_session.html.twig b/main/template/default/user_portal/classic_session.html.twig index b45f4b8796a..378af01c822 100644 --- a/main/template/default/user_portal/classic_session.html.twig +++ b/main/template/default/user_portal/classic_session.html.twig @@ -5,7 +5,7 @@