Commit 5c2f0e86 authored by Alan Marchiori's avatar Alan Marchiori
Browse files

basic email added

parent c8289cf3
import click
import config
from config.echo import *
import courses
from utils.history import History
from utils.git import Git
......@@ -15,9 +16,10 @@ def send_feedback_email(labpath, coursename, student_id, labstr):
if not 'feedback' in hist['grade']:
error("No feedback for {} on {}, regrade if needed.".format(student_id, labstr))
return
who = f"{os.environ['USER']}@{config.email_domain}"
#who = f"{os.environ['USER']}@{config.email_domain}"
send_email(who, f"{student_id}@{config.email_domain}",
send_email(config.feedback_email_from,
f"{student_id}@{config.email_domain}",
f"[{coursename}]: {labstr} feedback",
hist['grade']['feedback'])
......
......@@ -36,6 +36,7 @@ def make_feedback_msg(rubric, parts):
parts['TOTAL']['grade'],
parts['TOTAL']['total']
))
msg.append("\nGraded by: {}".format(parts['TOTAL']['who']))
return "\n".join(msg)
def ta_report(coursename, coursepath, labname, user, clone):
if labname == None:
......
......@@ -9,7 +9,7 @@ smtp_server = "smtp.bucknell.edu"
# domain name to make an email address from git user id
email_domain = "bucknell.edu"
feedback_email_from = "no-reply@bucknell.edu"
# where UserConfig is stored. (cannot be overridden)
local_conf = "~/.labtool/config.json"
......
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