Skip to content

Commit 80e7a7e

Browse files
Merge pull request #4925 from christianbeeznest/ofaj-21044-4
Forum: Fix allow new threads option - refs BT#21044
2 parents 9d33fba + 521e7c8 commit 80e7a7e

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

public/main/forum/viewforum.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,8 +305,8 @@ function setFocus() {
305305
// 2. the course member is here and new threads are allowed
306306
// 3. a visitor is here and new threads AND allowed AND anonymous posts are allowed
307307
if (api_is_allowed_to_edit(false, true) ||
308-
(1 == $forumEntity->getAllowNewThreads() && isset($_user['user_id'])) ||
309-
(1 == $forumEntity->getAllowNewThreads() && !isset($_user['user_id']) && 1 == $forumEntity->getAllowAnonymous())
308+
(1 == $forumEntity->getAllowNewThreads() && api_get_user_id()) ||
309+
(1 == $forumEntity->getAllowNewThreads() && !api_get_user_id() && 1 == $forumEntity->getAllowAnonymous())
310310
) {
311311
if (1 != $forumEntity->getLocked() && 1 != $forumEntity->getLocked()) {
312312
if (!api_is_anonymous() && !api_is_invitee()) {

public/main/lp/lp_list.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ function confirmation(name) {
306306
// student view automatically. Many teachers are confused
307307
// by that, so maybe a solution can be found to avoid it
308308
$maker = (empty($details['lp_maker']) ? '' : Security::remove_XSS($details['lp_maker']));
309-
//$url_start_lp .= '&isStudentView=true';
309+
$url_start_lp .= '&isStudentView=true';
310310
$extra = $lpVisibility ? '' : get_lang('Learners cannot see this learning path');
311311
}
312312

0 commit comments

Comments
 (0)