We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Integrate Forums into challenges 
Navigating to the forum of a challenge currently takes the participant outside of the challenge environment. Navigating back to the challenge is not possible through the breadcrumbs on the forum page and instead requires going via the Challenge tab and searching for the respective Challenge again. It would be nicer if the forums were visually integrated into the challenge page layout and if the breadcrumbs reflected their nesting in the challenge rather than their nesting under all forum on GC. 

See here: https://github.com/DIAGNijmegen/rse-roadmap/issues/83#issuecomment-919250835


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `app/grandchallenge/forum_conversation/templatetags/forum_extras.py`
Content:
```
1 from actstream.models import Follow
2 from django import template
3 from django.contrib.contenttypes.models import ContentType
4 
5 from grandchallenge.notifications.forms import FollowForm
6 
7 register = template.Library()
8 
9 
10 @register.simple_tag
11 def get_follow_object_pk(user, follow_object):
12     object_follows_for_user = Follow.objects.filter(
13         user=user,
14         content_type=ContentType.objects.get(
15             app_label=follow_object._meta.app_label,
16             model=follow_object._meta.model_name,
17         ),
18     ).all()
19 
20     if not object_follows_for_user:
21         current_follow_object = []
22     else:
23         current_follow_object = []
24         for obj in object_follows_for_user:
25             if not obj.follow_object:
26                 continue
27             elif obj.follow_object.id == follow_object.id:
28                 current_follow_object = obj.pk
29     return current_follow_object
30 
31 
32 @register.simple_tag
33 def follow_form(*, user, object_id, content_type):
34     return FollowForm(
35         user=user,
36         initial={
37             "object_id": object_id,
38             "content_type": content_type,
39             "actor_only": False,
40         },
41     )
42 
43 
44 @register.simple_tag()
45 def get_content_type(follow_object):
46     try:
47         ct = ContentType.objects.get(
48             app_label=follow_object._meta.app_label,
49             model=follow_object._meta.model_name,
50         )
51     except AttributeError:
52         ct = None
53     return ct
54
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/app/grandchallenge/forum_conversation/templatetags/forum_extras.py b/app/grandchallenge/forum_conversation/templatetags/forum_extras.py
--- a/app/grandchallenge/forum_conversation/templatetags/forum_extras.py
+++ b/app/grandchallenge/forum_conversation/templatetags/forum_extras.py
@@ -51,3 +51,9 @@
     except AttributeError:
         ct = None
     return ct
+
+
+@register.simple_tag()
+def is_participant(user, challenge):
+    if challenge.is_participant(user):
+        return True

{"golden_diff": "diff --git a/app/grandchallenge/forum_conversation/templatetags/forum_extras.py b/app/grandchallenge/forum_conversation/templatetags/forum_extras.py\n--- a/app/grandchallenge/forum_conversation/templatetags/forum_extras.py\n+++ b/app/grandchallenge/forum_conversation/templatetags/forum_extras.py\n@@ -51,3 +51,9 @@\n     except AttributeError:\r\n         ct = None\r\n     return ct\r\n+\r\n+\r\n+@register.simple_tag()\r\n+def is_participant(user, challenge):\r\n+    if challenge.is_participant(user):\r\n+        return True\n", "issue": "Integrate Forums into challenges \nNavigating to the forum of a challenge currently takes the participant outside of the challenge environment. Navigating back to the challenge is not possible through the breadcrumbs on the forum page and instead requires going via the Challenge tab and searching for the respective Challenge again. It would be nicer if the forums were visually integrated into the challenge page layout and if the breadcrumbs reflected their nesting in the challenge rather than their nesting under all forum on GC. \r\n\r\nSee here: https://github.com/DIAGNijmegen/rse-roadmap/issues/83#issuecomment-919250835\r\n\n", "before_files": [{"content": "from actstream.models import Follow\r\nfrom django import template\r\nfrom django.contrib.contenttypes.models import ContentType\r\n\r\nfrom grandchallenge.notifications.forms import FollowForm\r\n\r\nregister = template.Library()\r\n\r\n\r\n@register.simple_tag\r\ndef get_follow_object_pk(user, follow_object):\r\n    object_follows_for_user = Follow.objects.filter(\r\n        user=user,\r\n        content_type=ContentType.objects.get(\r\n            app_label=follow_object._meta.app_label,\r\n            model=follow_object._meta.model_name,\r\n        ),\r\n    ).all()\r\n\r\n    if not object_follows_for_user:\r\n        current_follow_object = []\r\n    else:\r\n        current_follow_object = []\r\n        for obj in object_follows_for_user:\r\n            if not obj.follow_object:\r\n                continue\r\n            elif obj.follow_object.id == follow_object.id:\r\n                current_follow_object = obj.pk\r\n    return current_follow_object\r\n\r\n\r\n@register.simple_tag\r\ndef follow_form(*, user, object_id, content_type):\r\n    return FollowForm(\r\n        user=user,\r\n        initial={\r\n            \"object_id\": object_id,\r\n            \"content_type\": content_type,\r\n            \"actor_only\": False,\r\n        },\r\n    )\r\n\r\n\r\n@register.simple_tag()\r\ndef get_content_type(follow_object):\r\n    try:\r\n        ct = ContentType.objects.get(\r\n            app_label=follow_object._meta.app_label,\r\n            model=follow_object._meta.model_name,\r\n        )\r\n    except AttributeError:\r\n        ct = None\r\n    return ct\r\n", "path": "app/grandchallenge/forum_conversation/templatetags/forum_extras.py"}], "after_files": [{"content": "from actstream.models import Follow\r\nfrom django import template\r\nfrom django.contrib.contenttypes.models import ContentType\r\n\r\nfrom grandchallenge.notifications.forms import FollowForm\r\n\r\nregister = template.Library()\r\n\r\n\r\n@register.simple_tag\r\ndef get_follow_object_pk(user, follow_object):\r\n    object_follows_for_user = Follow.objects.filter(\r\n        user=user,\r\n        content_type=ContentType.objects.get(\r\n            app_label=follow_object._meta.app_label,\r\n            model=follow_object._meta.model_name,\r\n        ),\r\n    ).all()\r\n\r\n    if not object_follows_for_user:\r\n        current_follow_object = []\r\n    else:\r\n        current_follow_object = []\r\n        for obj in object_follows_for_user:\r\n            if not obj.follow_object:\r\n                continue\r\n            elif obj.follow_object.id == follow_object.id:\r\n                current_follow_object = obj.pk\r\n    return current_follow_object\r\n\r\n\r\n@register.simple_tag\r\ndef follow_form(*, user, object_id, content_type):\r\n    return FollowForm(\r\n        user=user,\r\n        initial={\r\n            \"object_id\": object_id,\r\n            \"content_type\": content_type,\r\n            \"actor_only\": False,\r\n        },\r\n    )\r\n\r\n\r\n@register.simple_tag()\r\ndef get_content_type(follow_object):\r\n    try:\r\n        ct = ContentType.objects.get(\r\n            app_label=follow_object._meta.app_label,\r\n            model=follow_object._meta.model_name,\r\n        )\r\n    except AttributeError:\r\n        ct = None\r\n    return ct\r\n\r\n\r\n@register.simple_tag()\r\ndef is_participant(user, challenge):\r\n    if challenge.is_participant(user):\r\n        return True\r\n", "path": "app/grandchallenge/forum_conversation/templatetags/forum_extras.py"}]}