2007 January 18 / E-Mail Me
This page describes the nuts and bolts of configuring and running my grading program for reading assignments submitted via e-mail.
The program is written in Perl, but the same effect could be achieved in any language for which you can find a software library to inspect IMAP e-mail mailboxes. You do need to be using an IMAP e-mail server for this to work. You also need to download two items:
Next, in your e-mail program, I recommend that you make a folder where you can store all of your reading assignment responses. After a few weeks there are a lot of them, and you don't want them clogging up your inbox, and you don't want to delete them until the semester is finished. For the sake of argument, suppose that your folder name is MYFOLDER.
Now you have to configure the program a little. Open it up in any text editor. Near the top there is a license notice, followed by a user configuration section with stuff about your server, folder, subject prefix, and topics. You need to customize these as follows.
my $servername = 'MYSERVER.MYSCHOOL.edu';
my $foldername = 'mail/MYFOLDER';
my $subjectprefix = 'MYPREFIX';
my @topics = ('3.3,3.4', '4.1', '4.2', '3.7 and p. 79');
That's it for configuring the program. Save the file. If you're using some text editor that insists on naming the file 'processreading.txt', then rename it to 'processreading.pl' afterwards. You can always go back and edit it again, to add more topics, for example.
Based on the topics we entered above, your first reading assignment e-mail will be sent out with the subject line 'MYPREFIX 1.3,1.4', your second will be sent out with subject 'MYPREFIX 2.1', and so on. If you were using the prefix '31LReading', here's what your first assignment might look like:
To: ...
Subject: 31LReading 3.3,3.4
Please answer these reading questions by Thu at 10:00 PM, by replying to
this e-mail message and typing your answers in your reply. When you reply,
do not alter the Subject line; it should be something like "Re: 31LReading
3.3,3.4". Also, please do not attach files. If you wish to e-mail me about
some other matter, send it in a separate e-mail, without "31LReading" in the
Subject line. You do not need to type your name; your address identifies you.
1. How can you tell that the function graphed in Figure 3.20 (Section 3.2)
is invertible? What is the domain of its inverse?
2. Does the graph y = ln x have a horizontal asymptote? Does its inverse
function have a vertical asymptote? Explain.
As you send out subsequent assignments over the term, you can start leaving out the tedious instructions, of course.
The students receive the assignment like any other e-mail message, and they reply to it. Once the deadline has passed, you open up your e-mail program and see all of the responses. If your program supports it, you can sort by Subject; then all of the responses are together, so they're easy to go through. Read each response, reply to it if you like, and put it into your MYFOLDER folder. If the student replies to your reply, then you can put that into MYFOLDER too; only one submission per address will be counted by the program. On the other hand, do not put any response into MYFOLDER that does not deserve credit; put it somewhere else. In practice, this happens extremely rarely.
You'll probably want to run the grading program once, early in the semester, to make sure that it's working. Otherwise, there is no reason to run the grading program until the end of the semester, when you want to know exactly how many assignments each student completed. However, there is nothing stopping you from running the program earlier in the semester — perhaps halfway through — if you wish to collect preliminary data.
You can run the program in any terminal, by typing
perl processreading.pl
at the command prompt. The program asks you for your username and password. While it is working, it outputs some "error messages", including
Then it prints out the good stuff: for each e-mail address, the number of assignments submitted on time by that address. I assume that you can work backward from the address to the student's name, and enter the appropriate score in your gradebook. In theory, any student who changes his e-mail address will have some assignments show up under the old address, and some under the new address. But I haven't had any trouble matching students with addresses.
Alternatively, you can route the output to a file (say MYFILE.txt) by typing
perl processreading.pl > MYFILE.txt
If you do that, the error messages are printed out on the screen as before, but the final output data is stored in the indicated file. It's tab-delimited, so you can open it easily in a spreadsheet program.
I have to explain one wrinkle: How does the program know when each assignment is due? Well, I used to enter the due dates manually, but that was tedious. To save time, I now have the program figure the dates out, according to this convention: The due date for each assignment is the moment when the first submission for the next assignment arrives. This convention assumes that you only have one assignment active at any given time. You can't send out the next assignment until after this one is due, or else some student may jump the gun and end the current assignment before its official due date.
There is one exception to the convention. The final assignment (and, in freakish cases, any other assignments for which the next assignment was never submitted) cannot be assigned a due date based on the next assignment. Instead, they are assigned a due date of right now — meaning, the moment you run the program.
In case you want to understand what's going on, the code is heavily commented and simple in its structure, so it should be relatively easy to read. But here's an overview.
The program connects to your IMAP server and inspects every message in your MYFOLDER folder. For each message, it records the address, the date, and the topic (meaning the part of the Subject line after the subject prefix). Any messages with unknown topics generate error messages on the screen. The collection of this data may take a while. When it's complete, the program disconnects from the server.
The program scans through all of the recorded messages and determines the earliest submission date for each topic. It then assigns each topic's due date to be the earliest submission date of the next topic (or right now, in the special cases described above).
The program scans through all of the recorded messages again, marking each assignment that each address submitted. Multiple responses by a single address for a single assignment only count once, and responses to unidentifiable topics have already been thrown out. (Thus there is little danger that a student can increase his score by sending extra messages, etc. However, you do have to handle manually any students who change their e-mail addresses; this has not been a problem for me.) Late assignments generate error messages to the screen.
The program counts how many assignments each address submitted and prints them to standard output (screen or file).