diff --git a/public/main/forum/forumfunction.inc.php b/public/main/forum/forumfunction.inc.php
index 10763040027..f0f55f862df 100644
--- a/public/main/forum/forumfunction.inc.php
+++ b/public/main/forum/forumfunction.inc.php
@@ -1844,14 +1844,14 @@ function saveThread(
) {
$message .= get_lang('Your message has to be approved before people can view it.').'
';
$message .= get_lang('You can now return to the').
- ' '.
+ ' '.
get_lang('Forum').'
';
} else {
$message .= get_lang('You can now return to the').
- ' '.
+ ' '.
get_lang('Forum').'
';
$message .= get_lang('You can now return to the').
- ' '.
+ ' '.
get_lang('Message').'';
}
$reply_info['new_post_id'] = $postId;
diff --git a/public/main/inc/lib/api.lib.php b/public/main/inc/lib/api.lib.php
index 2ad2f434aa3..05effc02431 100644
--- a/public/main/inc/lib/api.lib.php
+++ b/public/main/inc/lib/api.lib.php
@@ -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;
diff --git a/src/CourseBundle/Entity/CForum.php b/src/CourseBundle/Entity/CForum.php
index e99bf9d9210..dd39740efdf 100644
--- a/src/CourseBundle/Entity/CForum.php
+++ b/src/CourseBundle/Entity/CForum.php
@@ -8,6 +8,7 @@
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 @@
*/
#[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]
diff --git a/src/CourseBundle/Entity/CForumCategory.php b/src/CourseBundle/Entity/CForumCategory.php
index 23ac0047eb1..51ff4163a62 100644
--- a/src/CourseBundle/Entity/CForumCategory.php
+++ b/src/CourseBundle/Entity/CForumCategory.php
@@ -8,6 +8,7 @@
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 @@
#[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]
diff --git a/src/CourseBundle/Entity/CForumThread.php b/src/CourseBundle/Entity/CForumThread.php
index ca42d581c01..03e93957176 100644
--- a/src/CourseBundle/Entity/CForumThread.php
+++ b/src/CourseBundle/Entity/CForumThread.php
@@ -8,6 +8,7 @@
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 @@
*/
#[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]