diff --git a/public/main/forum/viewforum.php b/public/main/forum/viewforum.php index 4540761427..ab15352efc 100644 --- a/public/main/forum/viewforum.php +++ b/public/main/forum/viewforum.php @@ -305,8 +305,8 @@ if ('learnpath' !== $origin) { // 2. the course member is here and new threads are allowed // 3. a visitor is here and new threads AND allowed AND anonymous posts are allowed if (api_is_allowed_to_edit(false, true) || - (1 == $forumEntity->getAllowNewThreads() && isset($_user['user_id'])) || - (1 == $forumEntity->getAllowNewThreads() && !isset($_user['user_id']) && 1 == $forumEntity->getAllowAnonymous()) + (1 == $forumEntity->getAllowNewThreads() && api_get_user_id()) || + (1 == $forumEntity->getAllowNewThreads() && !api_get_user_id() && 1 == $forumEntity->getAllowAnonymous()) ) { if (1 != $forumEntity->getLocked() && 1 != $forumEntity->getLocked()) { if (!api_is_anonymous() && !api_is_invitee()) { diff --git a/public/main/lp/lp_list.php b/public/main/lp/lp_list.php index 716a113b57..6df79a8485 100644 --- a/public/main/lp/lp_list.php +++ b/public/main/lp/lp_list.php @@ -306,7 +306,7 @@ foreach ($categories as $category) { // student view automatically. Many teachers are confused // by that, so maybe a solution can be found to avoid it $maker = (empty($details['lp_maker']) ? '' : Security::remove_XSS($details['lp_maker'])); - //$url_start_lp .= '&isStudentView=true'; + $url_start_lp .= '&isStudentView=true'; $extra = $lpVisibility ? '' : get_lang('Learners cannot see this learning path'); }