Forum: Allow access to create topic - refs BT#21044

pull/4932/head
christian 1 year ago
parent 46245888c5
commit fcbe161f91
  1. 2
      public/main/forum/newthread.php
  2. 2
      public/main/forum/viewthread.php

@ -120,7 +120,7 @@ if (api_is_in_gradebook()) {
/* Is the user allowed here? */
// The user is not allowed here if:
// 1. the forumcategory or forum is invisible (visibility==0) and the user is not a course manager
if (!api_is_allowed_to_edit(false, true) && //is a student
if (!api_is_allowed_to_create_course() && //is a student
(
($current_forum_category && false == $current_forum_category->isVisible($courseEntity, $sessionEntity)) ||
false == $current_forum_category->isVisible($courseEntity, $sessionEntity)

@ -276,7 +276,7 @@ if (!empty($groupId)) {
// If the user is not a course administrator and the forum is hidden
// then the user is not allowed here.
if (!api_is_allowed_to_edit(false, true) &&
if (!api_is_allowed_to_create_course() &&
(
!$forumEntity->isVisible($courseEntity, $sessionEntity) ||
!$threadEntity->isVisible($courseEntity, $sessionEntity)

Loading…
Cancel
Save