Using Mail Merge in WeBWorK to send out individualized grades (midterm or final)

How to use WeBWorK’s Mail Merge to send individual grades to students:

First we will download a spreadsheet (in csv format) that contains the WeBWorK scores so far. You’ve probably done this already, but if not, here is how:


• Go to “scoring tools”

• Scores: choose problem sets and click on the blue button to save the scoring file

• Download the resulting file (right-click on the name link): the default name for this file is something similar to MAT1375-Shaver_totals.csv


Now we will fill in the information we want to upload and email out:


• Open the csv in spreadsheet program

• Copy the grades you want to send out [I am sending out test scores and other grading-related information as well as the midterm grade itself) from your grading spreadsheet into blank columns (leaving the first four columns intact)


For example, now my csv looks like this: (click on the image to embiggen it)



I always leave the “SECTION” and “RECITATION” columns in, I don’t know why. Based on my experiments, The STUDENT ID field is required in order to do Mail Merge, and possibly also the login ID, so I do not mess with the first four columns at all.


• Save this file in csv format. I always give it a new name, such as MAT1375-Shaver-MidtermMailMarge.csv, before I upload it.

• Upload the mail merge csv file. You will want to upload it into your “scoring” folder.


• Now compose the mail merge letter. For the parts that are to be individualized, use the following macros:



$COL[7] = whatever is in column 7 (Test 1, in my example spreadsheet}


For example, at the bottom of the page is the (rather detailed!) email I sent out last Spring. with the dates corrected to this semester. It’s a good idea to save a copy of your template on your computer as well as saving it as a template in the Email part of WeBWorK.


• In Email in WeBWorK: copy your template letter and paste it into the body of the form. Under “Merge file” use the drop-down menu to find the file you uploaded. Also change the subject line to something informative!

• Now select the students you want to send to. You can easily select  “All students in course”. But if you are a little nervous and want to make sure the mail merge is working correctly, choose a student in the middle of the list somewhere and preview first.

• Then select all students and click on “Send Email”, which is inconveniently located at the lower left of the page.


That’s it. It’s easier than it sounds, although I had a few snags the first time I tried it.


My email message template follows, just to show how the macros are used:


Dear $FN $LN:


This is a report on your grades so far (as of 29 October) and your midterm grade.


Your Test 1 score was  $COL[7]% (not including any extra credit you may have earned)

Your Test 2 score was  $COL[8]%

(The lowest passing score is 60%)


You have $COL[11] homework problems put on the board (not including points for answering student questions on the blog), as of today. Remember that you must put at least 10 problems on the board by the end of the semester: this is 5% of your grade!


Your WeBWorK total score as of 29 October is $COL[10]: remember that WeBWorK is 10% of your grade!


Your Midterm grade was $COL[12]



P = passing

BL = borderline

U = unsatisfactory

SA = stopped attending: if you received this grade, you should consider withdrawing officially from the course so as not to get a grade of WU. (I have no way to know whether or not you have actually already withdrawn: if you have, just ignore this.)


If you are considering withdrawing from the course, please consult with a Financial Aid advisor before you do so. If you do not withdraw, you are expected to attend the course regularly and to do all the work necessary to pass the course.


The deadline to withdraw with a grade of W is Thursday 7 November 2013.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.