Internal: Fix forum visibility and notification issues - refs BT#21692

pull/5588/head
christianbeeznst 5 months ago
parent d79566bf13
commit 7932938c74
  1. 6
      public/main/forum/forumfunction.inc.php
  2. 4
      public/main/inc/lib/api.lib.php
  3. 3
      src/CourseBundle/Entity/CForum.php
  4. 3
      src/CourseBundle/Entity/CForumCategory.php
  5. 3
      src/CourseBundle/Entity/CForumThread.php

@ -1844,14 +1844,14 @@ function saveThread(
) {
$message .= get_lang('Your message has to be approved before people can view it.').'<br />';
$message .= get_lang('You can now return to the').
' <a href="viewforum.php?'.api_get_cidreq().'&forum='.$values['forum_id'].'">'.
' <a href="viewforum.php?'.api_get_cidreq(true, true, false).'&forum='.$values['forum_id'].'">'.
get_lang('Forum').'</a><br />';
} else {
$message .= get_lang('You can now return to the').
' <a href="viewforum.php?'.api_get_cidreq().'&forum='.$values['forum_id'].'">'.
' <a href="viewforum.php?'.api_get_cidreq(true, true, false).'&forum='.$values['forum_id'].'">'.
get_lang('Forum').'</a><br />';
$message .= get_lang('You can now return to the').
' <a href="viewthread.php?'.api_get_cidreq().'&forum='.$values['forum_id'].'&thread='.$thread->getIid().'">'.
' <a href="viewthread.php?'.api_get_cidreq(true, true, false).'&forum='.$values['forum_id'].'&thread='.$thread->getIid().'">'.
get_lang('Message').'</a>';
}
$reply_info['new_post_id'] = $postId;

@ -2075,7 +2075,9 @@ function api_get_cidreq($addSessionId = true, $addGroupId = true, $origin = '')
if (!empty($url)) {
$url .= '&gradebook='.(int) api_is_in_gradebook();
$url .= '&origin='.$origin;
if (false !== $origin) {
$url .= '&origin=' . $origin;
}
}
return $url;

@ -8,6 +8,7 @@ namespace Chamilo\CourseBundle\Entity;
use Chamilo\CoreBundle\Entity\AbstractResource;
use Chamilo\CoreBundle\Entity\ResourceInterface;
use Chamilo\CoreBundle\Entity\ResourceShowCourseResourcesInSessionInterface;
use Chamilo\CourseBundle\Repository\CForumRepository;
use DateTime;
use Doctrine\Common\Collections\ArrayCollection;
@ -21,7 +22,7 @@ use Symfony\Component\Validator\Constraints as Assert;
*/
#[ORM\Table(name: 'c_forum_forum')]
#[ORM\Entity(repositoryClass: CForumRepository::class)]
class CForum extends AbstractResource implements ResourceInterface, Stringable
class CForum extends AbstractResource implements ResourceInterface, ResourceShowCourseResourcesInSessionInterface, Stringable
{
#[ORM\Column(name: 'iid', type: 'integer')]
#[ORM\Id]

@ -8,6 +8,7 @@ namespace Chamilo\CourseBundle\Entity;
use Chamilo\CoreBundle\Entity\AbstractResource;
use Chamilo\CoreBundle\Entity\ResourceInterface;
use Chamilo\CoreBundle\Entity\ResourceShowCourseResourcesInSessionInterface;
use Chamilo\CourseBundle\Repository\CForumCategoryRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
@ -18,7 +19,7 @@ use Symfony\Component\Validator\Constraints as Assert;
#[ORM\Table(name: 'c_forum_category')]
#[ORM\Entity(repositoryClass: CForumCategoryRepository::class)]
class CForumCategory extends AbstractResource implements ResourceInterface, Stringable
class CForumCategory extends AbstractResource implements ResourceInterface, ResourceShowCourseResourcesInSessionInterface, Stringable
{
#[ORM\Column(name: 'iid', type: 'integer')]
#[ORM\Id]

@ -8,6 +8,7 @@ namespace Chamilo\CourseBundle\Entity;
use Chamilo\CoreBundle\Entity\AbstractResource;
use Chamilo\CoreBundle\Entity\ResourceInterface;
use Chamilo\CoreBundle\Entity\ResourceShowCourseResourcesInSessionInterface;
use Chamilo\CoreBundle\Entity\User;
use Chamilo\CourseBundle\Repository\CForumThreadRepository;
use DateTime;
@ -23,7 +24,7 @@ use Symfony\Component\Validator\Constraints as Assert;
*/
#[ORM\Table(name: 'c_forum_thread')]
#[ORM\Entity(repositoryClass: CForumThreadRepository::class)]
class CForumThread extends AbstractResource implements ResourceInterface, Stringable
class CForumThread extends AbstractResource implements ResourceInterface, ResourceShowCourseResourcesInSessionInterface, Stringable
{
#[ORM\Column(name: 'iid', type: 'integer')]
#[ORM\Id]

Loading…
Cancel
Save