We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Active feedbacks bug
Minor bug where feedbacks where everyone answers does not get set to inactive.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `apps/feedback/mommy.py`
Content:
```
1 # -*- coding: utf-8 -*-
2 import datetime
3 import socket
4 import locale
5 import logging
6 
7 from django.utils import timezone
8 from django.contrib.contenttypes.models import ContentType
9 from django.conf import settings
10 from django.core.mail import EmailMessage
11 
12 from apps.events.models import Event, AttendanceEvent, Attendee
13 from apps.feedback.models import FeedbackRelation
14 from apps.marks.models import Mark, UserEntry
15 from apps.mommy import Task, schedule
16 
17 class FeedbackMail(Task):
18 
19     @staticmethod
20     def run():
21         logger = logging.getLogger("feedback")
22         logger.info("Feedback job started")
23         locale.setlocale(locale.LC_ALL, "nb_NO.UTF-8")
24         active_feedbacks = FeedbackRelation.objects.filter(active=True)
25        
26         for feedback in active_feedbacks:
27             message = FeedbackMail.generate_message(feedback, logger)
28 
29             if message.send:
30                 EmailMessage(message.subject, unicode(message), message.committee_mail, [], message.attended_mails).send()
31                 logger.info('Emails sent to: ' + str(message.attended_mails))
32 
33                 if message.results_message:
34                     EmailMessage("Feedback resultat", message.results_message,"online@online.ntnu.no", [message.committee_mail]).send() 
35                     logger.info('Results mail sent to :' + message.committee_mail)
36 
37     @staticmethod
38     def generate_message(feedback, logger):
39         logger.info('Processing: "' + feedback.get_title() + '"')
40         today = timezone.now().date()
41         yesterday = today + datetime.timedelta(days=-1)
42         not_responded = FeedbackMail.get_users(feedback)
43         logger.info('Not responded: ' + str(not_responded))
44         message = Message()
45 
46         #return if everyone has answered
47         if not not_responded:
48             logger.info('Everyone has answered')
49             return message
50 
51         
52         message.attended_mails = FeedbackMail.get_user_mails(not_responded)
53 
54         message.committee_mail = FeedbackMail.get_committee_email(feedback)
55         deadline = feedback.deadline.strftime("%d. %B").encode("utf-8")
56         title = str(FeedbackMail.get_title(feedback)).encode("utf-8")
57         message.link = str(u"\n\n" + FeedbackMail.get_link(feedback)).encode("utf-8")
58         results_link = str(FeedbackMail.get_link(feedback) + "results").encode("utf-8")
59        
60         start_date = feedback.get_start_date()
61         deadline_diff = (feedback.deadline - today).days
62 
63         message.subject = u"Feedback: %s" % (title)
64         message.intro = u"Hei, vi ønsker tilbakemelding på \"%s\"" % (title)
65         message.mark = FeedbackMail.mark_message(feedback)
66         message.contact = u"\n\nEventuelle spørsmål sendes til %s " % (message.committee_mail)
67         message.start_date = FeedbackMail.start_date_message(start_date)
68 
69         if deadline_diff < 0: #Deadline passed
70             feedback.active = False
71             feedback.save()
72             logger.info("Deadline passed feedback set to inactive")
73 
74             if feedback.gives_mark:
75                 FeedbackMail.set_marks(title, not_responded)    
76                 
77                 message.intro = u"Fristen for å svare på \"%s\" har gått ut og du har fått en prikk." % (title)
78                 message.mark = ""
79                 message.start_date = ""
80                 message.link = ""
81                 message.send = True
82             
83             logger.info("Marks given to: " + str(not_responded))
84 
85         elif deadline_diff < 1: #Last warning
86             message.deadline = u"\n\nI dag innen 23:59 er siste frist til å svare på skjemaet."
87             
88             message.results_message = u"Hei, siste purremail på feedback skjema har blitt sendt til alle " \
89             u"gjenværende deltagere på \"%s\".\nDere kan se feedback-resultatene på:\n%s\n" % \
90             (title, results_link)
91             message.send = True
92             logger.info("Last warning message generated")
93         elif deadline_diff < 3 and feedback.gives_mark: # 3 days from the deadline
94             message.deadline = u"\n\nFristen for å svare på skjema er %s innen kl 23:59." % (deadline)
95             message.send = True
96             logger.info("Warning message generated")
97         elif FeedbackMail.send_first_notification(feedback): #Day after the event or feedback creation 
98             message.deadline = u"\n\nFristen for å svare på skjema er %s innen kl 23:59." % (deadline)
99         
100             message.results_message = u"Hei, nå har feedbackmail blitt sendt til alle " \
101             u"deltagere på \"%s\".\nDere kan se feedback-resultatene på:\n%s\n" % \
102             (title, results_link)
103             message.send = True
104             logger.info("First message generated")
105         else:
106             logger.info("No message generated")
107 
108         return message
109         
110     @staticmethod
111     def send_first_notification(feedback):
112         start_date = FeedbackMail.start_date(feedback)
113 
114         #The object that requires feedback doesnt have a start date
115         if not start_date:
116             yesterday = timezone.now().date() - datetime.timedelta(days=1)
117             if feedback.created_date == yesterday.date():
118                 #Send the first notification the day after the feedback relation was created
119                 return True
120         else:
121             day_after_event = start_date + datetime.timedelta(1)
122             if day_after_event == datetime.datetime.date(timezone.now()):
123                 #Send the first notification the day after the event
124                 return True
125         return False
126 
127     @staticmethod
128     def start_date(feedback):
129         start_date = feedback.get_start_date()
130         
131         if start_date:
132             return start_date.date()
133         else:
134             return False
135 
136     @staticmethod
137     def start_date_message(start_date):
138         #If the object(event) doesnt have start date it will send 
139         #the first notification the day after the feedbackrelation is made
140         if start_date:
141             start_date_string = start_date.strftime("%d. %B").encode("utf-8")
142             message_start_date = u"som du var med på den %s:" % (start_date_string)
143         else:
144             message_start_date = ""
145         
146         return message_start_date   
147 
148     @staticmethod
149     def get_users(feedback):
150         return feedback.get_slackers()
151 
152     @staticmethod
153     def get_user_mails(not_responded):
154         return  [user.email for user in not_responded]
155 
156     @staticmethod
157     def get_link(feedback):
158         return str(settings.BASE_URL + feedback.get_absolute_url())
159 
160     @staticmethod
161     def get_title(feedback):
162         return feedback.get_title()
163 
164     @staticmethod
165     def get_committee_email(feedback):
166         return feedback.get_email()
167 
168     @staticmethod
169     def mark_message(feedback):
170         if feedback.gives_mark:
171             return u"\nVær oppmerksom på at du får prikk dersom du ikke svarer " \
172             u"på disse spørsmålene innen fristen."
173         else:
174             return ""
175 
176     @staticmethod
177     def set_marks(title, not_responded):
178         mark = Mark()
179         mark.title = u"Manglende tilbakemelding på %s" % (title)
180         mark.category = 4 #Missed feedback
181         mark.description = u"Du har fått en prikk fordi du ikke har levert tilbakemelding."
182         mark.save()
183         
184         for user in not_responded:
185             user_entry = UserEntry()
186             user_entry.user = user
187             user_entry.mark = mark
188             user_entry.save()
189     
190 class Message():
191     subject = ""
192     intro = ""
193     start_date = ""
194     deadline = ""
195     mark = ""
196     contact = ""
197     link = ""
198     send = False
199     end = u"\n\nMvh\nLinjeforeningen Online"
200     results_message = False
201 
202     committee_mail = ""
203     attended_mails = False
204 
205 
206     def __unicode__(self):
207         message = "%s %s %s %s %s %s %s" % (
208             self.intro, 
209             self.start_date, 
210             self.link, 
211             self.deadline, 
212             self.mark, 
213             self.contact, 
214             self.end)
215         return message
216 
217 schedule.register(FeedbackMail, day_of_week='mon-sun', hour=8, minute=00)
218
```
--- 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/apps/feedback/mommy.py b/apps/feedback/mommy.py
--- a/apps/feedback/mommy.py
+++ b/apps/feedback/mommy.py
@@ -45,7 +45,10 @@
 
         #return if everyone has answered
         if not not_responded:
+            feedback.active = False
+            feedback.save()
             logger.info('Everyone has answered')
+            logger.info('Feedback set to innactive')
             return message

{"golden_diff": "diff --git a/apps/feedback/mommy.py b/apps/feedback/mommy.py\n--- a/apps/feedback/mommy.py\n+++ b/apps/feedback/mommy.py\n@@ -45,7 +45,10 @@\n \n         #return if everyone has answered\n         if not not_responded:\n+            feedback.active = False\n+            feedback.save()\n             logger.info('Everyone has answered')\n+            logger.info('Feedback set to innactive')\n             return message\n", "issue": "Active feedbacks bug\nMinor bug where feedbacks where everyone answers does not get set to inactive.\n\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\nimport datetime\nimport socket\nimport locale\nimport logging\n\nfrom django.utils import timezone\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.conf import settings\nfrom django.core.mail import EmailMessage\n\nfrom apps.events.models import Event, AttendanceEvent, Attendee\nfrom apps.feedback.models import FeedbackRelation\nfrom apps.marks.models import Mark, UserEntry\nfrom apps.mommy import Task, schedule\n\nclass FeedbackMail(Task):\n\n    @staticmethod\n    def run():\n        logger = logging.getLogger(\"feedback\")\n        logger.info(\"Feedback job started\")\n        locale.setlocale(locale.LC_ALL, \"nb_NO.UTF-8\")\n        active_feedbacks = FeedbackRelation.objects.filter(active=True)\n       \n        for feedback in active_feedbacks:\n            message = FeedbackMail.generate_message(feedback, logger)\n\n            if message.send:\n                EmailMessage(message.subject, unicode(message), message.committee_mail, [], message.attended_mails).send()\n                logger.info('Emails sent to: ' + str(message.attended_mails))\n\n                if message.results_message:\n                    EmailMessage(\"Feedback resultat\", message.results_message,\"online@online.ntnu.no\", [message.committee_mail]).send() \n                    logger.info('Results mail sent to :' + message.committee_mail)\n\n    @staticmethod\n    def generate_message(feedback, logger):\n        logger.info('Processing: \"' + feedback.get_title() + '\"')\n        today = timezone.now().date()\n        yesterday = today + datetime.timedelta(days=-1)\n        not_responded = FeedbackMail.get_users(feedback)\n        logger.info('Not responded: ' + str(not_responded))\n        message = Message()\n\n        #return if everyone has answered\n        if not not_responded:\n            logger.info('Everyone has answered')\n            return message\n\n        \n        message.attended_mails = FeedbackMail.get_user_mails(not_responded)\n\n        message.committee_mail = FeedbackMail.get_committee_email(feedback)\n        deadline = feedback.deadline.strftime(\"%d. %B\").encode(\"utf-8\")\n        title = str(FeedbackMail.get_title(feedback)).encode(\"utf-8\")\n        message.link = str(u\"\\n\\n\" + FeedbackMail.get_link(feedback)).encode(\"utf-8\")\n        results_link = str(FeedbackMail.get_link(feedback) + \"results\").encode(\"utf-8\")\n       \n        start_date = feedback.get_start_date()\n        deadline_diff = (feedback.deadline - today).days\n\n        message.subject = u\"Feedback: %s\" % (title)\n        message.intro = u\"Hei, vi \u00f8nsker tilbakemelding p\u00e5 \\\"%s\\\"\" % (title)\n        message.mark = FeedbackMail.mark_message(feedback)\n        message.contact = u\"\\n\\nEventuelle sp\u00f8rsm\u00e5l sendes til %s \" % (message.committee_mail)\n        message.start_date = FeedbackMail.start_date_message(start_date)\n\n        if deadline_diff < 0: #Deadline passed\n            feedback.active = False\n            feedback.save()\n            logger.info(\"Deadline passed feedback set to inactive\")\n\n            if feedback.gives_mark:\n                FeedbackMail.set_marks(title, not_responded)    \n                \n                message.intro = u\"Fristen for \u00e5 svare p\u00e5 \\\"%s\\\" har g\u00e5tt ut og du har f\u00e5tt en prikk.\" % (title)\n                message.mark = \"\"\n                message.start_date = \"\"\n                message.link = \"\"\n                message.send = True\n            \n            logger.info(\"Marks given to: \" + str(not_responded))\n\n        elif deadline_diff < 1: #Last warning\n            message.deadline = u\"\\n\\nI dag innen 23:59 er siste frist til \u00e5 svare p\u00e5 skjemaet.\"\n            \n            message.results_message = u\"Hei, siste purremail p\u00e5 feedback skjema har blitt sendt til alle \" \\\n            u\"gjenv\u00e6rende deltagere p\u00e5 \\\"%s\\\".\\nDere kan se feedback-resultatene p\u00e5:\\n%s\\n\" % \\\n            (title, results_link)\n            message.send = True\n            logger.info(\"Last warning message generated\")\n        elif deadline_diff < 3 and feedback.gives_mark: # 3 days from the deadline\n            message.deadline = u\"\\n\\nFristen for \u00e5 svare p\u00e5 skjema er %s innen kl 23:59.\" % (deadline)\n            message.send = True\n            logger.info(\"Warning message generated\")\n        elif FeedbackMail.send_first_notification(feedback): #Day after the event or feedback creation \n            message.deadline = u\"\\n\\nFristen for \u00e5 svare p\u00e5 skjema er %s innen kl 23:59.\" % (deadline)\n        \n            message.results_message = u\"Hei, n\u00e5 har feedbackmail blitt sendt til alle \" \\\n            u\"deltagere p\u00e5 \\\"%s\\\".\\nDere kan se feedback-resultatene p\u00e5:\\n%s\\n\" % \\\n            (title, results_link)\n            message.send = True\n            logger.info(\"First message generated\")\n        else:\n            logger.info(\"No message generated\")\n\n        return message\n        \n    @staticmethod\n    def send_first_notification(feedback):\n        start_date = FeedbackMail.start_date(feedback)\n\n        #The object that requires feedback doesnt have a start date\n        if not start_date:\n            yesterday = timezone.now().date() - datetime.timedelta(days=1)\n            if feedback.created_date == yesterday.date():\n                #Send the first notification the day after the feedback relation was created\n                return True\n        else:\n            day_after_event = start_date + datetime.timedelta(1)\n            if day_after_event == datetime.datetime.date(timezone.now()):\n                #Send the first notification the day after the event\n                return True\n        return False\n\n    @staticmethod\n    def start_date(feedback):\n        start_date = feedback.get_start_date()\n        \n        if start_date:\n            return start_date.date()\n        else:\n            return False\n\n    @staticmethod\n    def start_date_message(start_date):\n        #If the object(event) doesnt have start date it will send \n        #the first notification the day after the feedbackrelation is made\n        if start_date:\n            start_date_string = start_date.strftime(\"%d. %B\").encode(\"utf-8\")\n            message_start_date = u\"som du var med p\u00e5 den %s:\" % (start_date_string)\n        else:\n            message_start_date = \"\"\n        \n        return message_start_date   \n\n    @staticmethod\n    def get_users(feedback):\n        return feedback.get_slackers()\n\n    @staticmethod\n    def get_user_mails(not_responded):\n        return  [user.email for user in not_responded]\n\n    @staticmethod\n    def get_link(feedback):\n        return str(settings.BASE_URL + feedback.get_absolute_url())\n\n    @staticmethod\n    def get_title(feedback):\n        return feedback.get_title()\n\n    @staticmethod\n    def get_committee_email(feedback):\n        return feedback.get_email()\n\n    @staticmethod\n    def mark_message(feedback):\n        if feedback.gives_mark:\n            return u\"\\nV\u00e6r oppmerksom p\u00e5 at du f\u00e5r prikk dersom du ikke svarer \" \\\n            u\"p\u00e5 disse sp\u00f8rsm\u00e5lene innen fristen.\"\n        else:\n            return \"\"\n\n    @staticmethod\n    def set_marks(title, not_responded):\n        mark = Mark()\n        mark.title = u\"Manglende tilbakemelding p\u00e5 %s\" % (title)\n        mark.category = 4 #Missed feedback\n        mark.description = u\"Du har f\u00e5tt en prikk fordi du ikke har levert tilbakemelding.\"\n        mark.save()\n        \n        for user in not_responded:\n            user_entry = UserEntry()\n            user_entry.user = user\n            user_entry.mark = mark\n            user_entry.save()\n    \nclass Message():\n    subject = \"\"\n    intro = \"\"\n    start_date = \"\"\n    deadline = \"\"\n    mark = \"\"\n    contact = \"\"\n    link = \"\"\n    send = False\n    end = u\"\\n\\nMvh\\nLinjeforeningen Online\"\n    results_message = False\n\n    committee_mail = \"\"\n    attended_mails = False\n\n\n    def __unicode__(self):\n        message = \"%s %s %s %s %s %s %s\" % (\n            self.intro, \n            self.start_date, \n            self.link, \n            self.deadline, \n            self.mark, \n            self.contact, \n            self.end)\n        return message\n\nschedule.register(FeedbackMail, day_of_week='mon-sun', hour=8, minute=00)\n", "path": "apps/feedback/mommy.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\nimport datetime\nimport socket\nimport locale\nimport logging\n\nfrom django.utils import timezone\nfrom django.contrib.contenttypes.models import ContentType\nfrom django.conf import settings\nfrom django.core.mail import EmailMessage\n\nfrom apps.events.models import Event, AttendanceEvent, Attendee\nfrom apps.feedback.models import FeedbackRelation\nfrom apps.marks.models import Mark, UserEntry\nfrom apps.mommy import Task, schedule\n\nclass FeedbackMail(Task):\n\n    @staticmethod\n    def run():\n        logger = logging.getLogger(\"feedback\")\n        logger.info(\"Feedback job started\")\n        locale.setlocale(locale.LC_ALL, \"nb_NO.UTF-8\")\n        active_feedbacks = FeedbackRelation.objects.filter(active=True)\n       \n        for feedback in active_feedbacks:\n            message = FeedbackMail.generate_message(feedback, logger)\n\n            if message.send:\n                EmailMessage(message.subject, unicode(message), message.committee_mail, [], message.attended_mails).send()\n                logger.info('Emails sent to: ' + str(message.attended_mails))\n\n                if message.results_message:\n                    EmailMessage(\"Feedback resultat\", message.results_message,\"online@online.ntnu.no\", [message.committee_mail]).send() \n                    logger.info('Results mail sent to :' + message.committee_mail)\n\n    @staticmethod\n    def generate_message(feedback, logger):\n        logger.info('Processing: \"' + feedback.get_title() + '\"')\n        today = timezone.now().date()\n        yesterday = today + datetime.timedelta(days=-1)\n        not_responded = FeedbackMail.get_users(feedback)\n        logger.info('Not responded: ' + str(not_responded))\n        message = Message()\n\n        #return if everyone has answered\n        if not not_responded:\n            feedback.active = False\n            feedback.save()\n            logger.info('Everyone has answered')\n            logger.info('Feedback set to innactive')\n            return message\n\n        \n        message.attended_mails = FeedbackMail.get_user_mails(not_responded)\n\n        message.committee_mail = FeedbackMail.get_committee_email(feedback)\n        deadline = feedback.deadline.strftime(\"%d. %B\").encode(\"utf-8\")\n        title = str(FeedbackMail.get_title(feedback)).encode(\"utf-8\")\n        message.link = str(u\"\\n\\n\" + FeedbackMail.get_link(feedback)).encode(\"utf-8\")\n        results_link = str(FeedbackMail.get_link(feedback) + \"results\").encode(\"utf-8\")\n       \n        start_date = feedback.get_start_date()\n        deadline_diff = (feedback.deadline - today).days\n\n        message.subject = u\"Feedback: %s\" % (title)\n        message.intro = u\"Hei, vi \u00f8nsker tilbakemelding p\u00e5 \\\"%s\\\"\" % (title)\n        message.mark = FeedbackMail.mark_message(feedback)\n        message.contact = u\"\\n\\nEventuelle sp\u00f8rsm\u00e5l sendes til %s \" % (message.committee_mail)\n        message.start_date = FeedbackMail.start_date_message(start_date)\n\n        if deadline_diff < 0: #Deadline passed\n            feedback.active = False\n            feedback.save()\n            logger.info(\"Deadline passed feedback set to inactive\")\n\n            if feedback.gives_mark:\n                FeedbackMail.set_marks(title, not_responded)    \n                \n                message.intro = u\"Fristen for \u00e5 svare p\u00e5 \\\"%s\\\" har g\u00e5tt ut og du har f\u00e5tt en prikk.\" % (title)\n                message.mark = \"\"\n                message.start_date = \"\"\n                message.link = \"\"\n                message.send = True\n            \n            logger.info(\"Marks given to: \" + str(not_responded))\n\n        elif deadline_diff < 1: #Last warning\n            message.deadline = u\"\\n\\nI dag innen 23:59 er siste frist til \u00e5 svare p\u00e5 skjemaet.\"\n            \n            message.results_message = u\"Hei, siste purremail p\u00e5 feedback skjema har blitt sendt til alle \" \\\n            u\"gjenv\u00e6rende deltagere p\u00e5 \\\"%s\\\".\\nDere kan se feedback-resultatene p\u00e5:\\n%s\\n\" % \\\n            (title, results_link)\n            message.send = True\n            logger.info(\"Last warning message generated\")\n        elif deadline_diff < 3 and feedback.gives_mark: # 3 days from the deadline\n            message.deadline = u\"\\n\\nFristen for \u00e5 svare p\u00e5 skjema er %s innen kl 23:59.\" % (deadline)\n            message.send = True\n            logger.info(\"Warning message generated\")\n        elif FeedbackMail.send_first_notification(feedback): #Day after the event or feedback creation \n            message.deadline = u\"\\n\\nFristen for \u00e5 svare p\u00e5 skjema er %s innen kl 23:59.\" % (deadline)\n        \n            message.results_message = u\"Hei, n\u00e5 har feedbackmail blitt sendt til alle \" \\\n            u\"deltagere p\u00e5 \\\"%s\\\".\\nDere kan se feedback-resultatene p\u00e5:\\n%s\\n\" % \\\n            (title, results_link)\n            message.send = True\n            logger.info(\"First message generated\")\n        else:\n            logger.info(\"No message generated\")\n\n        return message\n        \n    @staticmethod\n    def send_first_notification(feedback):\n        start_date = FeedbackMail.start_date(feedback)\n\n        #The object that requires feedback doesnt have a start date\n        if not start_date:\n            yesterday = timezone.now().date() - datetime.timedelta(days=1)\n            if feedback.created_date == yesterday.date():\n                #Send the first notification the day after the feedback relation was created\n                return True\n        else:\n            day_after_event = start_date + datetime.timedelta(1)\n            if day_after_event == datetime.datetime.date(timezone.now()):\n                #Send the first notification the day after the event\n                return True\n        return False\n\n    @staticmethod\n    def start_date(feedback):\n        start_date = feedback.get_start_date()\n        \n        if start_date:\n            return start_date.date()\n        else:\n            return False\n\n    @staticmethod\n    def start_date_message(start_date):\n        #If the object(event) doesnt have start date it will send \n        #the first notification the day after the feedbackrelation is made\n        if start_date:\n            start_date_string = start_date.strftime(\"%d. %B\").encode(\"utf-8\")\n            message_start_date = u\"som du var med p\u00e5 den %s:\" % (start_date_string)\n        else:\n            message_start_date = \"\"\n        \n        return message_start_date   \n\n    @staticmethod\n    def get_users(feedback):\n        return feedback.get_slackers()\n\n    @staticmethod\n    def get_user_mails(not_responded):\n        return  [user.email for user in not_responded]\n\n    @staticmethod\n    def get_link(feedback):\n        return str(settings.BASE_URL + feedback.get_absolute_url())\n\n    @staticmethod\n    def get_title(feedback):\n        return feedback.get_title()\n\n    @staticmethod\n    def get_committee_email(feedback):\n        return feedback.get_email()\n\n    @staticmethod\n    def mark_message(feedback):\n        if feedback.gives_mark:\n            return u\"\\nV\u00e6r oppmerksom p\u00e5 at du f\u00e5r prikk dersom du ikke svarer \" \\\n            u\"p\u00e5 disse sp\u00f8rsm\u00e5lene innen fristen.\"\n        else:\n            return \"\"\n\n    @staticmethod\n    def set_marks(title, not_responded):\n        mark = Mark()\n        mark.title = u\"Manglende tilbakemelding p\u00e5 %s\" % (title)\n        mark.category = 4 #Missed feedback\n        mark.description = u\"Du har f\u00e5tt en prikk fordi du ikke har levert tilbakemelding.\"\n        mark.save()\n        \n        for user in not_responded:\n            user_entry = UserEntry()\n            user_entry.user = user\n            user_entry.mark = mark\n            user_entry.save()\n    \nclass Message():\n    subject = \"\"\n    intro = \"\"\n    start_date = \"\"\n    deadline = \"\"\n    mark = \"\"\n    contact = \"\"\n    link = \"\"\n    send = False\n    end = u\"\\n\\nMvh\\nLinjeforeningen Online\"\n    results_message = False\n\n    committee_mail = \"\"\n    attended_mails = False\n\n\n    def __unicode__(self):\n        message = \"%s %s %s %s %s %s %s\" % (\n            self.intro, \n            self.start_date, \n            self.link, \n            self.deadline, \n            self.mark, \n            self.contact, \n            self.end)\n        return message\n\nschedule.register(FeedbackMail, day_of_week='mon-sun', hour=8, minute=00)\n", "path": "apps/feedback/mommy.py"}]}