Merge pull request #4925 from christianbeeznest/ofaj-21044-4

Forum: Fix allow new threads option - refs BT#21044
pull/4926/head
christianbeeznest 1 year ago committed by GitHub
commit 80e7a7e1a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      public/main/forum/viewforum.php
  2. 2
      public/main/lp/lp_list.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()) {

@ -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');
}

Loading…
Cancel
Save