Commit 7ee5fdd8 authored by Martin Mareš's avatar Martin Mareš
Browse files

Fix URL in e-mail notifications

parent 5f6c83af
...@@ -1697,7 +1697,7 @@ def send_notify_to_dest(post, topic, course, author, target, dest, reply_to): ...@@ -1697,7 +1697,7 @@ def send_notify_to_dest(post, topic, course, author, target, dest, reply_to):
] ]
if post.modified: if post.modified:
h.append(('Updated', post.modified.replace(microsecond=0).astimezone().strftime("%Y-%m-%d %H:%M:%S"))) h.append(('Updated', post.modified.replace(microsecond=0).astimezone().strftime("%Y-%m-%d %H:%M:%S")))
h.append(('URL', url_for('topic_index', sident=course.ident, cident=course.ident, tident=topic.ident, student_uid=target_uid, _external=True, _scheme='https'))) h.append(('URL', url_for('topic_index', sident=course.sident, cident=course.ident, tident=topic.ident, student_uid=target_uid, _external=True, _scheme='https')))
h.append(('Points', post.points if post.points is not None else '-')) h.append(('Points', post.points if post.points is not None else '-'))
head = "\n".join(["{:12} {}".format(p[0] + ':', p[1]) for p in h]) + "\n\n" head = "\n".join(["{:12} {}".format(p[0] + ':', p[1]) for p in h]) + "\n\n"
body = post.comment or "" body = post.comment or ""
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment