equal
deleted
inserted
replaced
220 |
220 |
221 if remarks: |
221 if remarks: |
222 notification.remarks = remarks |
222 notification.remarks = remarks |
223 notification.message += "<b>Reason: </b>%s"%remarks |
223 notification.message += "<b>Reason: </b>%s"%remarks |
224 |
224 |
|
225 elif role == "CL": |
|
226 |
|
227 notification.sent_from = sent_from |
|
228 notification.task = task |
|
229 notification.remarks = remarks |
|
230 |
|
231 claimed_by_url = '<a href="/user/view/uid=%s">%s</a>'%(sent_from.id, sent_from.username) |
|
232 task_url = '<a href="/task/view/tid=%s">%s</a>'%(task.id, task.title) |
|
233 |
|
234 notification.sub = 'New claim for the task "%s"'%(task.title[:20]) |
|
235 notification.message = '%s has submitted a claim for the task "%s" mentored by you.<br />'%(claimed_by_url, task_url) |
|
236 notification.message += '<b>Claim proposal:</b> %s'%(remarks) |
|
237 |
|
238 |
|
239 |
225 notification.save() |
240 notification.save() |
226 |
241 |
227 def mark_notification_read(notification_id): |
242 def mark_notification_read(notification_id): |
228 """ |
243 """ |
229 makes a notification identified by the notification_id read. |
244 makes a notification identified by the notification_id read. |