Commit 64dd6daa authored by Olivier's avatar Olivier
Browse files

M12: title of email is defined together with body + general cleanup

parent d98e04ff
# -*- coding: utf-8 -*-
"""
Author: German Santa Maria
Author: Germán Santa-Maria
Script: Email Grades
Description: This script can be used to send personalized emails with grades
......@@ -17,7 +17,6 @@ Input:
Output:
1 - sent_emails.csv : file with the log of the sent emails
"""
"""-------------------------Hard coded input--------------------------------"""
......@@ -117,7 +116,7 @@ with open(input_csv_path, newline='') as f:
avg_grade.append(row[25])
for ID in custom_ID_A:
attachment_name = "Solution_submission_1_"+ID+".pdf"
attachment_name = "Solution_submission_"+ID+".pdf"
attachments.append(attachment_name)
# Make sure that all the attachments are in the script_input folder
......@@ -128,9 +127,13 @@ for i in range(0, len(custom_ID_A)):
solutions_pdfs_path+attachments[i]+
' was not found, no emails were sent')
"""-----------------Build email text for each student-----------------------"""
# Write a personalized email body for each student
#------------Email body for students with only one peer-----------------------#
###########################################################################
# Content specific to assignment exercise
subject = "Insert subject here"
# Email body for students with only one peer#
standard_body_onepeer = """Dear XXstudent_nameXX,
thank you for grading your peers on this coursework assignment!
......@@ -158,7 +161,7 @@ with best regards,
"""
#-----------------Email body for students with two peers----------------------#
# Email body for students with two peers
standard_body_twopeers = """Dear XXstudent_nameXX,
thank you for grading your peers on the third coursework assignment!
......@@ -197,6 +200,7 @@ with best regards,
(author)
"""
###########################################################################
for i in range(0, len(names)):
......@@ -265,9 +269,6 @@ for i in range(0, len(names)):
# Reciever email
receiver_email = emails[i]
# Email subject
subject = "Insert subject here"
# Email body
body = email_bodies[i]
......
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