We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Remove the "Users Online" section in footer.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `django/cantusdb_project/main_app/templatetags/helper_tags.py`
Content:
```
1 import calendar
2 from typing import Union, Optional
3 from django.utils.http import urlencode
4 from django import template
5 from main_app.models import Source
6 from django.utils.safestring import mark_safe
7 
8 register = template.Library()
9 
10 
11 @register.filter(name="month_to_string")
12 def month_to_string(value: Optional[Union[str, int]]) -> Optional[Union[str, int]]:
13     """Converts month number to textual representation, 3 letters (Jan, Mar, etc)"""
14     if type(value) == int and value in range(1, 13):
15         return calendar.month_abbr[value]
16     else:
17         return value
18 
19 
20 @register.simple_tag(takes_context=True)
21 def url_add_get_params(context, **kwargs):
22     query = context["request"].GET.copy()
23     query.pop("page", None)
24     query.update(kwargs)
25     return query.urlencode()
26 
27 
28 @register.simple_tag(takes_context=False)
29 def source_links():
30     sources = (
31         Source.objects.filter(public=True, visible=True, segment__id=4063)
32         .exclude(siglum=None)
33         .values("siglum", "id")
34         .order_by("siglum")
35     )
36     options = ""
37     # <option value="source1">Source 1</option>
38     # <option value="source2">Source 2</option>
39     # <option value="source3">Source 3</option>
40     for source in sources:
41         option_str = (
42             f"<option value=source/{source['id']}>{source['siglum']}</option>\n"
43         )
44         options += option_str
45 
46     return mark_safe(options)
47
```
--- 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/django/cantusdb_project/main_app/templatetags/helper_tags.py b/django/cantusdb_project/main_app/templatetags/helper_tags.py
--- a/django/cantusdb_project/main_app/templatetags/helper_tags.py
+++ b/django/cantusdb_project/main_app/templatetags/helper_tags.py
@@ -44,3 +44,7 @@
         options += option_str
 
     return mark_safe(options)
+
+@register.filter(name='has_group') 
+def has_group(user, group_name):
+    return user.groups.filter(name=group_name).exists()

{"golden_diff": "diff --git a/django/cantusdb_project/main_app/templatetags/helper_tags.py b/django/cantusdb_project/main_app/templatetags/helper_tags.py\n--- a/django/cantusdb_project/main_app/templatetags/helper_tags.py\n+++ b/django/cantusdb_project/main_app/templatetags/helper_tags.py\n@@ -44,3 +44,7 @@\n         options += option_str\n \n     return mark_safe(options)\n+\n+@register.filter(name='has_group') \n+def has_group(user, group_name):\n+    return user.groups.filter(name=group_name).exists()\n", "issue": "Remove the \"Users Online\" section in footer.\n\n", "before_files": [{"content": "import calendar\nfrom typing import Union, Optional\nfrom django.utils.http import urlencode\nfrom django import template\nfrom main_app.models import Source\nfrom django.utils.safestring import mark_safe\n\nregister = template.Library()\n\n\n@register.filter(name=\"month_to_string\")\ndef month_to_string(value: Optional[Union[str, int]]) -> Optional[Union[str, int]]:\n    \"\"\"Converts month number to textual representation, 3 letters (Jan, Mar, etc)\"\"\"\n    if type(value) == int and value in range(1, 13):\n        return calendar.month_abbr[value]\n    else:\n        return value\n\n\n@register.simple_tag(takes_context=True)\ndef url_add_get_params(context, **kwargs):\n    query = context[\"request\"].GET.copy()\n    query.pop(\"page\", None)\n    query.update(kwargs)\n    return query.urlencode()\n\n\n@register.simple_tag(takes_context=False)\ndef source_links():\n    sources = (\n        Source.objects.filter(public=True, visible=True, segment__id=4063)\n        .exclude(siglum=None)\n        .values(\"siglum\", \"id\")\n        .order_by(\"siglum\")\n    )\n    options = \"\"\n    # <option value=\"source1\">Source 1</option>\n    # <option value=\"source2\">Source 2</option>\n    # <option value=\"source3\">Source 3</option>\n    for source in sources:\n        option_str = (\n            f\"<option value=source/{source['id']}>{source['siglum']}</option>\\n\"\n        )\n        options += option_str\n\n    return mark_safe(options)\n", "path": "django/cantusdb_project/main_app/templatetags/helper_tags.py"}], "after_files": [{"content": "import calendar\nfrom typing import Union, Optional\nfrom django.utils.http import urlencode\nfrom django import template\nfrom main_app.models import Source\nfrom django.utils.safestring import mark_safe\n\nregister = template.Library()\n\n\n@register.filter(name=\"month_to_string\")\ndef month_to_string(value: Optional[Union[str, int]]) -> Optional[Union[str, int]]:\n    \"\"\"Converts month number to textual representation, 3 letters (Jan, Mar, etc)\"\"\"\n    if type(value) == int and value in range(1, 13):\n        return calendar.month_abbr[value]\n    else:\n        return value\n\n\n@register.simple_tag(takes_context=True)\ndef url_add_get_params(context, **kwargs):\n    query = context[\"request\"].GET.copy()\n    query.pop(\"page\", None)\n    query.update(kwargs)\n    return query.urlencode()\n\n\n@register.simple_tag(takes_context=False)\ndef source_links():\n    sources = (\n        Source.objects.filter(public=True, visible=True, segment__id=4063)\n        .exclude(siglum=None)\n        .values(\"siglum\", \"id\")\n        .order_by(\"siglum\")\n    )\n    options = \"\"\n    # <option value=\"source1\">Source 1</option>\n    # <option value=\"source2\">Source 2</option>\n    # <option value=\"source3\">Source 3</option>\n    for source in sources:\n        option_str = (\n            f\"<option value=source/{source['id']}>{source['siglum']}</option>\\n\"\n        )\n        options += option_str\n\n    return mark_safe(options)\n\n@register.filter(name='has_group') \ndef has_group(user, group_name):\n    return user.groups.filter(name=group_name).exists() \n", "path": "django/cantusdb_project/main_app/templatetags/helper_tags.py"}]}