Commit 9922ce0b authored by Hans-Peter Deifel's avatar Hans-Peter Deifel

Put more information about lecture in mod-mail

Specifically, put the lecture name in in the subject and the semester in
the body.

fixes #291
parent 601cf9bd
......@@ -43,13 +43,14 @@ def empfang_mail(mail):
def alert_moderators(meta):
formatfoo = {'name': meta['name'],
'lecture': meta['lecture'],
'modurl': config.weburl + config.modurl}
'modurl': config.weburl + config.modurl,
'semester': "%s%02d" % (meta['semester'][1], meta['semester'][0])}
mail = email.message.Message()
mail.set_payload(file(os.path.join(config.templates,
'alert.eml')).read() % formatfoo, 'utf-8')
mail.add_header("From", config.mailfrom)
mail.add_header("To", config.mailfrom)
mail.add_header("Subject", "Neue Einsendung")
mail.add_header("Subject", u"Neue Einsendung zu" + meta['lecture'])
mail_admins(mail.as_string(False), subjects=map(lambda x: x[0], meta['courses']))
......
......@@ -4,6 +4,7 @@ Es ist soeben eine neue Anfrage eingegangen:
%(lecture)s
%(name)s
%(semester)s
Besuche bitte %(modurl)s
......
Markdown is supported
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