Commit b0f399bd authored by Alan Marchiori's avatar Alan Marchiori
Browse files

fixed preorts for dbbackend

parent 8deb47bd
......@@ -17,11 +17,13 @@ def send_feedback_email(labpath, coursename, student_id, labstr):
error("No feedback for {} on {}, regrade if needed.".format(student_id, labstr))
return
#who = f"{os.environ['USER']}@{config.email_domain}"
subj = f"[{coursename}]: {labstr} feedback"
toemail = f"{student_id}@{config.email_domain}"
send_email(config.feedback_email_from,
f"{student_id}@{config.email_domain}",
f"[{coursename}]: {labstr} feedback",
toemail,
subj,
hist['grade']['feedback'])
echo (f"SENT: {toemail} <-- {subj}")
@click.command(short_help="Email LAB feedback (TA only)")
@click.option('--lab', type=int, default=None)
......
......@@ -219,7 +219,7 @@ def student_report(coursename, coursepath, labname, clone):
if 'comment' in r[part]:
echo ("\tComments: {}".format(r[part]['comment']))
else:
echo ("Ungraded.")
echo (f"Check your email for a message from {config.feedback_email_from}.")
#r[part]['who'].split("@")[0])
echo ("-"*max(10,width-5))
......
......@@ -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"
feedback_email_from = "labtool-no-reply@bucknell.edu"
# where UserConfig is stored. (cannot be overridden)
local_conf = "~/.labtool/config.json"
......@@ -17,13 +17,15 @@ local_conf = "~/.labtool/config.json"
course_name_fmt = "{course}-{semester}-{section}"
# places to search for coures.json, all courses are loaded
course_paths = ['/home/accounts/COURSES/cs206',
course_paths = ['/home/cs206',
'/home/accounts/COURSES/cs206',
'/nfs/unixspace/linux/accounts/COURSES/cs206/',
'/unixspace/csci206/']
# places to search for helper progs (ie rars.jar, etc)
# used in checker execute
bin_paths = ['/home/accounts/COURSES/cs206/bin',
bin_paths = ['/home/cs206',
'/home/accounts/COURSES/cs206/bin',
'/nfs/unixspace/linux/accounts/COURSES/cs206/bin',
'/unixspace/csci206/bin']
......
......@@ -22,7 +22,7 @@ import os
import platform
import sys
__version__ = '1.0.10'
__version__ = '2.0.0'
__date__ = '2020-04-12T15:39:19.329244'
__user__ = 'cs206'
__host__ = 'linuxremote3.bucknell.edu'
......
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